Debian Codegraph @

NEWS

raw
1 Since version 1.11.0 Pycairo uses `Semantic Versioning <http://semver.org/>`__
2
3 .. _v1.29.0:
4
5 1.29.0 - 2025-11-11
6 -------------------
7
8 * :meth:`ImageSurface.get_data`: Return empty memoryview for empty image :pr:`418`
9 * :meth:`ImageSurface.create_for_data`: support empty images :pr:`419`
10 * Drop support for Python 3.9 :pr:`428`
11 * Drop support for PyPy 3.10
12 * Support multi-phase init :pr:`413`
13 * Experimental support for free-threaded Python :pr:`430` :pr:`429`
14 * Update dependencies (libpng, pixman) for the Windows wheels :pr:`431`
15 * build: add "no-x11" option to disable X11 surface support :pr:`432` :issue:`420`
16 * dev: support uv for development :pr:`433`
17
18 .. _v1.28.0:
19
20 1.28.0 - 2025-04-14
21 -------------------
22
23 * Changes:
24 * Remove hypothesis test dependency :pr:`398`
25 * Updated cairo in Windows wheels from 1.18.2 to 1.18.4 :pr:`393`
26 * Provide arm64 Windows wheels again
27 * Release the input buffer passed to :meth:`ImageSurface.create_for_data`
28 when calling :meth:`Surface.finish` already, not just when the underlying
29 surface is destroyed :pr:`405` :issue:`392`
30 * Return a :class:`PathDataType` (:class:`int` subtype) instead of
31 :class:`int` with :meth:`Path.__iter__` :pr:`410`. This was missed in the
32 1.13.0 enum change.
33 * Emit a :class:`DeprecationWarning` in case :meth:`ImageSurface.get_data`
34 is called on an already finished surface :pr:`400` :pr:`412`. In a future
35 version this will raise an exception instead.
36 * Emit a :class:`DeprecationWarning` for the undocumented ``num_glyphs``
37 parameter in :meth:`Context.glyph_extents`, :meth:`Context.glyph_path`,
38 :meth:`Context.show_glyphs`, :meth:`ScaledFont.glyph_extents` :pr:`409`
39 * Fixes:
40 * Remove the executable bit from ``cairo/__init__.py`` :pr:`383`
41 * Remove usage of removed ``typing.ByteString`` to fix compatibility with
42 Python 3.14.0a1 :pr:`389`
43 * docs: Fix pygame integration example using the wrong format :pr:`411`
44 * Typing fixes (no API changes, just type annotations):
45 * Include :class:`os.PathLike` for parameters accepting file paths :pr:`401`
46 * For :meth:`ImageSurface.create_for_data` include all writable buffer types
47 and not just :class:`memoryview` :pr:`402`
48 * Add missing ``Optional`` for :meth:`Surface.set_mime_data`,
49 :meth:`SVGSurface.__init__` :meth:`PDFSurface.__init__`,
50 :meth:`PSSurface.__init__`, :meth:`RecordingSurface.__init__` :pr:`404`
51 * Add various missing :class:`Path` dunder methods like ``__iter__``,
52 ``__eq__``, ``__lt__``, etc. :pr:`408`
53 * Add missing ``__getitem__`` and ``__mul__`` for :class:`Matrix` :pr:`408`
54
55 .. _v1.27.0:
56
57 1.27.0 - 2024-09-06
58 -------------------
59
60 This release only contains build related changes/fixes and no API changes.
61
62 * Drop support for Python 3.8
63 * Add Windows wheels for Python 3.13
64 * Updated cairo in Windows wheels from 1.18.0 to 1.18.2
65 * Port PEP517/wheel build from setuptools to meson-python. This means setup.py
66 is gone. System packagers should not switch to wheel builds and continue using
67 meson directly.
68 * meson: install the package metadata to .dist-info/METADATA instead of .egg-info
69 * Drop arm64 Windows wheels again. pypa/cibuildwheel does not support cross
70 compiling with meson-python. They might be added back in the future if GitHub
71 Actions gains a native Windows runner with arm64 support.
72
73 .. _v1.26.1:
74
75 1.26.1 - 2024-06-21
76 -------------------
77
78 * Fix Surface.set_mime_data() with Python 3.13 :pr:`366`
79 This also fixes the test suite with Python 3.13b2.
80 * Update vendored Windows wheel dependencies :pr:`370`
81
82 .. _v1.26.0:
83
84 1.26.0 - 2024-02-11
85 -------------------
86
87 This release only contains build related changes/fixes and no API changes.
88
89 * Bump minimum required meson version from 0.56.0 to 0.64.0 :pr:`346`
90 * Various meson related cleanups :pr:`350`
91 * Fix header file being installed to the wrong location with meson on some systems :pr:`350`
92 * Adds a new ``wheel`` meson build option as preparation for meson-python support :pr:`350` :pr:`345`
93 * Update dependencies (libpng, pixman, zlib) of the Windows wheels :pr:`358`
94 * Various maintenance related updates :pr:`360` :pr:`359` :pr:`361` :pr:`362`
95
96 .. _v1.25.1:
97
98 1.25.1 - 2023-10-21
99 -------------------
100
101 * Fix a crash with pypy3.10 :pr:`344`
102 * Fix the build with CPython 3.13.0a1 :pr:`343`
103
104 .. _v1.25.0:
105
106 1.25.0 - 2023-09-26
107 -------------------
108
109 * Update to cairo 1.18.0 for the Windows wheel
110 * Provide a Windows arm64 wheel
111 * New APIs:
112
113 * :attr:`Status.SVG_FONT_ERROR` :pr:`334`
114 * :meth:`FontOptions.get_color_mode`, :meth:`FontOptions.set_color_mode`, :class:`ColorMode` :pr:`336`
115 * :meth:`FontOptions.set_color_palette`, :meth:`FontOptions.get_color_palette`, :attr:`COLOR_PALETTE_DEFAULT` :pr:`338`
116 * :meth:`FontOptions.set_custom_palette_color`, :meth:`FontOptions.get_custom_palette_color` :pr:`339`
117 * :attr:`TAG_CONTENT`, :attr:`TAG_CONTENT_REF` :pr:`340`
118 * :meth:`Pattern.get_dither`, :meth:`Pattern.set_dither`, :class:`Dither` :pr:`341`
119
120 .. _v1.24.0:
121
122 1.24.0 - 2023-06-19
123 -------------------
124
125 * Dropped Python 3.7 support
126 * Bumped meson version requirement from 0.53.0 to 0.56.0
127 * Various cairo dependency updates for the Windows wheel build
128 * examples: update to GTK4 :pr:`307`
129 * examples: add a clip_image example :pr:`316`
130 * docs: fix the build with Sphinx 6 :pr:`318`
131 * Various code cleanups :pr:`306`
132 * Added Python 3.12 Windows wheels
133
134 .. _v1.23.0:
135
136 1.23.0 - 2022-11-28
137 -------------------
138
139 Reminder to distro packagers: Building/installing pycairo using setup.py is
140 deprecated, please use meson instead.
141
142 * git: changed default branch from "master" to "main"
143 * Windows: Update the cairo version included in the wheels from 1.17.2 to 1.17.6 :pr:`243`
144 * docs: Document how to look up pycairo headers without loading the module :pr:`300`
145 * tests: don't error out if cairo wasn't built with all features :pr:`293`
146 * New APIs:
147
148 * :attr:`Status.DWRITE_ERROR` :pr:`294`
149 * :attr:`Format.RGB96F`, :attr:`Format.RGBA128F` :pr:`295`
150 * :attr:`PDFVersion.VERSION_1_6`, :attr:`PDFVersion.VERSION_1_7` :pr:`296`
151 * :attr:`HAS_DWRITE_FONT` :pr:`297`
152 * :meth:`Context.set_hairline`, :meth:`Context.get_hairline` :pr:`298`
153 * :meth:`PDFSurface.set_custom_metadata` :pr:`299`
154
155 .. _v1.22.0:
156
157 1.22.0 - 2022-11-19
158 -------------------
159
160 * Officially support Python 3.11 :pr:`285`
161 * PDFSurface.version_to_string(): Fix crash with negative versions :pr:`279`
162 * typing: ImageSurface.get_stride() returns an int :pr:`282`
163 * typing: Fix incorrect interface for Matrix constructor :pr:`271`
164 * typing: Use Generic for Context :pr:`274`
165 * docs: some cairo.Context fixes :pr:`276`
166 * docs: try to make create_from_png/write_to_png more clear :pr:`261`
167 * docs: add an example for how to convert a surface to pillow :pr:`281`
168 * docs: cairo.Format.RGB24: document that unused bytes may be overwritten :pr:`289`
169 * tests: don't depend on specific ref counts :pr:`291`
170 * tests: compatibility fixes for cairo 1.17.6 :pr:`264`
171
172 .. _v1.21.0:
173
174 1.21.0 - 2022-03-07
175 -------------------
176
177 * Require Python 3.7+ :pr:`250`
178 * Require meson 0.53+
179 * Using `setup.py` directly to build/install pycairo is deprecated.
180 Use meson instead.
181 * `setup.py` now requires setuptools. Previously it was optional.
182 * The complete API reference is now included in the typing stubs, so it can be consumed/shown by IDEs. :pr:`236` :pr:`252`
183
184 .. _v1.20.1:
185
186 1.20.1 - 2021-06-03
187 -------------------
188
189 * Use poetry for development :pr:`232`
190 * setup.py: Respect the PKG_CONFIG environment variable :pr:`235`
191 * Make import_cairo inline in addition to static :pr:`224`
192 * docs: Fix example in Pattern.set_filter() docs :pr:`221`
193 * docs: Fix build with newer sphinx :pr:`222`
194 * docs: Fix NumPy width, height-conventions in examples :pr:`231`
195 * docs: Last parameter of rel_curve_to should be dy3, not dy4 :pr:`230`
196 * mypy: Fixes for mypy 0.800+ :pr:`233`
197 * mypy: Don't run mypy via pytest :pr:`234`
198
199 .. _v1.20.0:
200
201 1.20.0 - 2020-10-05
202 -------------------
203
204 * Require Python 3.6+ :pr:`201`
205 * Require cairo 1.15.10+ :pr:`204`
206 * docs: support Sphinx 3.0 :pr:`207`
207 * meson: add 'tests' option to skip tests :pr:`188`
208 * Windows: build wheels :pr:`197`
209 * Add support for Python 3.9 and 3.10 :pr:`198` :pr:`202`
210 * examples: add a Jupyter Notebook example :pr:`181`
211 * Raise an error early when being passed a file object not opened in binary mode :pr:`205`
212 * Add a pyproject.toml file :pr:`206`
213
214
215 .. _v1.19.1:
216
217 1.19.1 - 2020-02-16
218 -------------------
219
220 * docs: Add moderngl in the integration section. :pr:`174` (:user:`Einar Forselv <einarf>`)
221 * Support os.PathLike with PyPy3 >= 7.3.0
222
223
224 .. _v1.19.0:
225
226 1.19.0 - 2020-01-23
227 -------------------
228
229 * Python 2 is no longer supported :pr:`172`
230 * Add machine-readable license statement :pr:`158` (:user:`Maxim Ivanov <ulidtko>`)
231 * travis-ci: Manually set sysroot so correct SDK is used (:user:`Stuart Axon <stuaxo>`)
232 * Support Python 3.8 on Windows (because of DLL lookup changes)
233 * Fix wrong type for set_dash() offset parameter in the docs/types.
234
235
236 .. _v1.18.2:
237
238 1.18.2 - 2019-10-24
239 -------------------
240
241 * Fix a minor compatibility issue with Python 3.8 (fixes the test suite)
242
243
244 .. _v1.18.1:
245
246 1.18.1 - 2019-04-19
247 -------------------
248
249 * meson: install .egg-info to platlib
250 * meson: fix configure error with meson 0.50 re absolute paths :pr:`145`
251 * PyPy: don't use PyOS_FSPath() with PyPy3.6, it's missing: https://github.com/pypy/pypy/issues/2961
252 * Docs fixes :pr:`134` (:user:`Matteo Italia <cvtsi2sd>`)
253
254
255 .. _v1.18.0:
256
257 1.18.0 - 2018-11-04
258 -------------------
259
260 Build:
261 * Dropped Python 3.3 support
262 * meson build requires meson >=0.47 (was >=0.46)
263 * Fix various build warnings with GCC8
264 * meson: Don't link against libpython on non-Windows systems :pr:`120`
265 * meson: Improve support for Visual Studio builds
266 :pr:`121` (:user:`Chun-wei Fan <fanc999>`)
267 * setup.py: Support specifying custom ``--pkgconfigdir``
268 :pr:`127` (:user:`Michał Górny <mgorny>`)
269
270 Fixes:
271 * docs: Remove a broken link :pr:`124` (:user:`Nik Nyby <[email protected]>`)
272 * typing: Add missing annotations for __enter__/__exit__ :pr:`126`
273
274 New API:
275 Some are only available when building with newer cairo versions, see the
276 linked API docs for details.
277
278 * :data:`CAIRO_VERSION`, :data:`CAIRO_VERSION_STRING`,
279 :data:`CAIRO_VERSION_MAJOR`, :data:`CAIRO_VERSION_MINOR`,
280 :data:`CAIRO_VERSION_MICRO`
281 * :attr:`Status.TAG_ERROR`, :attr:`Status.FREETYPE_ERROR`,
282 :attr:`Status.PNG_ERROR`, :attr:`Status.WIN32_GDI_ERROR`
283 * :class:`SVGUnit`, :class:`PDFMetadata`, :class:`PDFOutlineFlags`
284 * :meth:`FontOptions.set_variations`, :meth:`FontOptions.get_variations`
285 * :meth:`Context.tag_begin`, :meth:`Context.tag_end`,
286 :data:`TAG_DEST`, :data:`TAG_LINK`
287 * :meth:`PDFSurface.set_page_label`, :meth:`PDFSurface.set_metadata`,
288 :meth:`PDFSurface.set_thumbnail_size`, :meth:`PDFSurface.add_outline`,
289 :data:`PDF_OUTLINE_ROOT`
290 * :meth:`SVGSurface.set_document_unit`, :meth:`SVGSurface.get_document_unit`
291 * :data:`MIME_TYPE_CCITT_FAX`, :data:`MIME_TYPE_CCITT_FAX_PARAMS`,
292 :data:`MIME_TYPE_EPS`, :data:`MIME_TYPE_EPS_PARAMS`,
293 :data:`MIME_TYPE_JBIG2`, :data:`MIME_TYPE_JBIG2_GLOBAL`,
294 :data:`MIME_TYPE_JBIG2_GLOBAL_ID`
295
296
297 .. _v1.17.1:
298
299 1.17.1 - 2018-07-07
300 -------------------
301
302 * `Meson <https://mesonbuild.com/>`__ support (>=0.46). :issue:`114`
303
304
305 .. _v1.17.0:
306
307 1.17.0 - 2018-04-15
308 -------------------
309
310 * :class:`cairo.Surface` and :class:`cairo.Device` can now be used as context
311 managers. :issue:`103`
312 * Fix a leak when a cairo error was raised.
313 * Fix a leak when a mapped surface was GCed instead of unmapped.
314 * Make it possible to use the C API with Python 3 outside of the compilation
315 unit doing the import by defining ``PYCAIRO_NO_IMPORT``. :issue:`110`
316 * Implement PEP 561 (added a py.typed marker)
317
318
319 .. _v1.16.3:
320
321 1.16.3 - 2018-02-27
322 -------------------
323
324 * Ship Python type annotation stubs. They are currently supported by mypy and
325 PyCharm. :issue:`99` :pr:`101`
326
327
328 .. _v1.16.2:
329
330 1.16.2 - 2018-02-10
331 -------------------
332
333 * setup.py: Some fixes for Debian pybuild quirks. :issue:`98`
334
335
336 .. _v1.16.1:
337
338 1.16.1 - 2018-02-06
339 -------------------
340
341 * setup.py: correctly install pkgconfig into /usr/lib* again.
342 To make JHBuild on Fedora work the following patch is needed:
343 https://bugzilla.gnome.org/show_bug.cgi?id=793216
344
345
346 .. _v1.16.0:
347
348 1.16.0 - 2018-02-05
349 -------------------
350
351 * Add a :func:`get_include` function which returns the compiler include path
352 needed for interfacing with the Pycairo C API :issue:`92`
353 * Note for packagers: The default header installation path has changed, but a
354 compat header is installed to the old location to prevent breakage in case
355 anyone has hardcoded the old path instead of using pkg-config.
356 Just in case anyone is wondering why there are two header files now.
357
358
359 .. _v1.15.6:
360
361 1.15.6 - 2018-01-30
362 -------------------
363
364 * Experimental PyPy and PyPy3 support :issue:`90`
365
366
367 .. _v1.15.5:
368
369 1.15.5 - 2018-01-29
370 -------------------
371
372 * Support Unicode paths under Windows with cairo 1.15.10+ :pr:`87`
373 * Don't include the pkg-config file when building a wheel :issue:`83`
374
375
376 .. _v1.15.4:
377
378 1.15.4 - 2017-11-08
379 -------------------
380
381 Fixes:
382 * Fix some enum conversation errors with (unused) large and negative values.
383 :pr:`81`
384
385 Tests:
386 * Fix a rare test error :pr:`80` (:user:`Sergei Trofimovich <trofi>`)
387
388
389 .. _v1.15.3:
390
391 1.15.3 - 2017-09-17
392 -------------------
393
394 Fixes:
395 * setup.py: Install pkgconfig file into /usr/share/pkgconfig to work around
396 JHBuild on Fedora not picking it up.
397 * Fix tests on big endian machines. :issue:`75`
398 * Support building with MSVC :pr:`72` (:user:`Chun-wei Fan <fanc999>`)
399
400 Tests:
401 * Test MSVC builds on appveyor
402
403
404 .. _v1.15.2:
405
406 1.15.2 - 2017-09-03
407 -------------------
408
409 Fixes:
410 * setup.py: Install pkgconfig file to the same library prefix that Python
411 uses. (/usr/lib64 instead of /usr/lib under Fedora for example) :issue:`70`
412 :pr:`71` (:user:`Sander Sweers <infirit>`)
413
414
415 .. _v1.15.1:
416
417 1.15.1 - 2017-08-19
418 -------------------
419
420 Fixes:
421 * Improved support for Python filesystem paths including
422 :class:`os.PathLike`. See :class:`_PathLike` for details.
423 * Various minor fixes
424
425 Changes:
426 * Expose :class:`cairo.Path`
427
428 Tests:
429 * Improved test coverage from ~70% to ~90%
430
431
432 .. _v1.15.0:
433
434 1.15.0 - 2017-07-24
435 -------------------
436
437 New Features:
438 * Add :meth:`Surface.map_to_image` and :meth:`Surface.unmap_image` :issue:`51`
439 * Add :class:`RasterSourcePattern` :issue:`48`
440 * Add :class:`Glyph` :issue:`53`
441 * Add :class:`Rectangle` :issue:`54`
442 * Add :class:`TextCluster` :issue:`61`
443 * Add :meth:`ScaledFont.text_to_glyphs` and :meth:`ScaledFont.glyph_extents`
444 * Add :meth:`Context.show_text_glyphs`
445 * Add :class:`TextExtents` :issue:`62`
446
447 Changes:
448 * Pycairo instances wrapping the same underlying cairo object now hash and
449 compare equally e.g. ``context.get_target() == context.get_target()``
450 * Functions which returned a cairo error with :attr:`Status.NO_MEMORY` no
451 longer raise :exc:`python3:MemoryError`, but a subclass of :exc:`Error`
452 and :exc:`python3:MemoryError`. Similarly errors with
453 :attr:`Status.READ_ERROR` and :attr:`Status.WRITE_ERROR` no longer raise
454 :exc:`python3:IOError`, but a subclass of :exc:`Error` and
455 :exc:`python3:IOError`. :issue:`55`
456 * Some functions which previously returned a tuple now return a tuple
457 subclass like :class:`Rectangle`, :class:`Glyph`, :class:`TextCluster` and
458 :class:`TextExtents`
459
460
461 .. _v1.14.1:
462
463 1.14.1 - 2017-07-24
464 -------------------
465
466 Fixes:
467 * Fix a crash with :meth:`Surface.get_device` :issue:`57`
468
469
470 .. _v1.14.0:
471
472 1.14.0 - 2017-07-12
473 -------------------
474
475 General:
476 * Requires at least cairo 1.13.1 (The snapshop in Ubuntu 14.04)
477
478 Tests:
479 * Optional `Hypothesis <https://hypothesis.readthedocs.io>`__ tests.
480
481 New Features:
482 * Add :meth:`Surface.set_device_scale` and :meth:`Surface.get_device_scale`.
483 :pr:`44` (:user:`Sander Sweers <infirit>`)
484 * Add :class:`Device` :pr:`45`
485 * Add :meth:`Surface.get_device` :pr:`45`
486 * Add :class:`ScriptDevice` and :class:`ScriptMode` :pr:`46`
487 * Add :class:`ScriptSurface` :issue:`17`
488 * Add :attr:`Status.JBIG2_GLOBAL_MISSING`
489 * Add :meth:`Format.stride_for_width`
490 * Add :class:`TextClusterFlags` and :class:`SurfaceObserverMode`
491 * Add :meth:`Gradient.get_color_stops_rgba`
492 * Add :class:`TeeSurface`
493 * Add :class:`MeshPattern`
494
495
496 .. _v1.13.4:
497
498 1.13.4 - 2017-07-12
499 -------------------
500
501 Fixes:
502 * Fix a rare crash with :meth:`get_data() <ImageSurface.get_data>` under
503 Python 3 (1.13.3 regression).
504
505
506 .. _v1.13.3:
507
508 1.13.3 - 2017-06-01
509 -------------------
510
511 Fixes:
512 * Fix ImageSurface leaking in case :meth:`get_data() <ImageSurface.get_data>` is used under Python 3.
513 :issue:`41`
514
515 Documentation:
516 * Add Pillow to ImageSurface example. :pr:`40` (:user:`Stuart Axon <stuaxo>`)
517 * Describe Freetype-py intergration. :issue:`25` :pr:`43`
518 (:user:`Hin-Tak Leung <HinTak>`)
519
520
521 .. _v1.13.2:
522
523 1.13.2 - 2017-05-21
524 -------------------
525
526 Fixes:
527 * Fix pip failing to install pycairo in some cases. :issue:`39`
528
529 Testing:
530 * Added continuous testing for Windows using MSYS2 and appveyor. :issue:`19`
531
532
533 .. _v1.13.1:
534
535 1.13.1 - 2017-05-07
536 -------------------
537
538 Fixes:
539 * setup.py install: Fix generated pkg-config file if ``--home`` or
540 ``--user`` is specified. :issue:`34`
541 * Fix a build error on macOS Sierra. :pr:`36`
542 (:user:`Nicolas P. Rougier <rougier>`)
543 * examples: Fix snippet examples when .pyc files are present. :issue:`35`
544
545 Documentation:
546 * Add Pyglet integration example. :pr:`33` (:user:`Stuart Axon <stuaxo>`)
547
548
549 .. _v1.13.0:
550
551 1.13.0 - 2017-05-03
552 -------------------
553
554 New Features:
555 * The buffer returned by :meth:`ImageSurface.get_data` under Python 2 now
556 implements the character buffer interface to make it work with
557 pygame.image.frombuffer(). :pr:`29`
558 * All C enum types now have their own corresponding Python enum type:
559 :class:`Antialias`, :class:`Content`, :class:`Extend`, :class:`FillRule`,
560 :class:`Filter`, :class:`FontSlant`, :class:`FontWeight`, :class:`Format`,
561 :class:`HintMetrics`, :class:`HintStyle`, :class:`LineCap`,
562 :class:`LineJoin`, :class:`Operator`, :class:`PDFVersion`,
563 :class:`PSLevel`, :class:`PathDataType`, :class:`RegionOverlap`,
564 :class:`SVGVersion`, :class:`Status`, :class:`SubpixelOrder`. :issue:`26`
565
566 All relevant constants are now an alias to attributes of those types e.g.
567 :data:`ANTIALIAS_DEFAULT` is the same as :attr:`Antialias.DEFAULT`.
568
569 All functions returning enum values now return instances of the new types
570 e.g. :meth:`Context.get_antialias` returns a :class:`Antialias`.
571
572 :attr:`Error.status` is now a :class:`Status`.
573 * All included examples now work with Python 2 & 3
574 * All included examples using GTK+ have been ported to GTK+ 3/PyGObject 3
575
576 Fixes:
577 * Fix the signature of the :class:`ImageSurface` buffer interface for Python 2
578 (int -> Py_ssize_t)
579 * setup.py: Ensure "-fno-strict-aliasing" is used with Python 2.
580
581 Testing:
582 * Added travis-ci tests for flake8 and sphinx. :pr:`30`, :pr:`32`
583 * The test suite now has optional tests for numpy and pygame integration.
584
585
586 .. _v1.12.0:
587
588 1.12.0 - 2017-04-18
589 -------------------
590
591 General:
592 * Require cairo 1.12.0
593 * Use C90 and enforce it on travis-ci. :issue:`5`, :fdobug:`22940`
594
595 Constants:
596 * Add various new cairo.OPERATOR_*, cairo.ANTIALIAS_* and
597 cairo.FORMAT_* constants. :issue:`1`
598 * Add :data:`HAS_MIME_SURFACE` and cairo.MIME_TYPE_*. :issue:`7`,
599 :fdobug:`58771`
600 * Add cairo.PDF_VERSION_*. :pr:`16`
601 * Add cairo.SVG_VERSION_*
602
603 :exc:`Error`:
604 * Add a :data:`Error.status` attribute exposing cairo.STATUS_*
605 * Add :exc:`CairoError` alias for :exc:`Error` for cairocffi compatibility
606
607 :class:`Matrix`:
608 * Expose matrix components as read/write properties. e.g. :data:`Matrix.xx`
609 * Fix type checking of the multiplication operator under
610 Python 3. :issue:`8`, :fdobug:`89162` (Lawrence D'Oliveiro)
611
612 :class:`Surface`:
613 * Add :meth:`Surface.set_mime_data`. :issue:`7`, :fdobug:`58771`
614 * Add :meth:`Surface.get_mime_data`. :issue:`7`, :fdobug:`58771`
615 * Add :meth:`Surface.supports_mime_type`. :issue:`7`, :fdobug:`58771`
616 * Add :meth:`Surface.create_for_rectangle`. :pr:`13`
617 * Add :meth:`Surface.create_similar_image`. :pr:`15`
618 * Add :meth:`Surface.has_show_text_glyphs`
619 * Fix crash when the surface wrapper gets deallocated before the surface
620 object. :issue:`11`
621
622 :class:`Context`:
623 * Add :meth:`Context.in_clip`. :pr:`14`
624
625 :class:`PDFSurface`:
626 * Add :meth:`PDFSurface.restrict_to_version`. :pr:`16`
627 * Add :meth:`PDFSurface.get_versions`. :pr:`16`
628 * Add :meth:`PDFSurface.version_to_string`. :pr:`16`
629
630 :class:`SVGSurface`:
631 * Add :meth:`SVGSurface.restrict_to_version`
632 * Add :meth:`SVGSurface.get_versions`
633 * Add :meth:`SVGSurface.version_to_string`
634
635 :class:`XCBSurface`:
636 * Add :meth:`XCBSurface.set_size`
637
638 :class:`PSSurface`:
639 * Add :meth:`PSSurface.get_levels`
640 * Add :meth:`PSSurface.level_to_string`
641
642 :class:`Pattern`:
643 * Add :meth:`Pattern.set_filter`
644 * Add :meth:`Pattern.get_filter`
645
646 :class:`RecordingSurface`:
647 * Add :meth:`RecordingSurface.get_extents`
648
649 :class:`FontOptions`:
650 * Implement ``__eq__`` and ``__ne__``
651 * Add :meth:`FontOptions.copy`
652 * Add :meth:`FontOptions.hash`
653 * Add :meth:`FontOptions.equal`
654 * Add :meth:`FontOptions.merge`
655
656 :class:`ScaledFont`:
657 * Add :meth:`ScaledFont.get_ctm`
658 * Add :meth:`ScaledFont.get_font_matrix`
659 * Add :meth:`ScaledFont.get_font_options`
660
661
662 .. _v1.11.1:
663
664 1.11.1 - 2017-04-12
665 -------------------
666
667 This release fixes an ABI breakage. I missed that the original pycairo master
668 had already broken ABI compared to 1.10.0.
669
670
671 .. _v1.11.0:
672
673 1.11.0 - 2017-04-09
674 -------------------
675
676 This version is based on the Python 2 version of pycairo 1.10.0 and is API/ABI
677 compatible with both py2cairo 1.10.0 and py3cairo 1.10.0.
678
679 General Changes:
680 * Requires cairo 1.10.2+
681 * Switch to semantic versioning
682 * Switch build system to distutils/setup.py (xpyb integration can be
683 enabled with passing ``--enable-xpyb`` to setup.py build)
684 * Moved to GitHub: https://github.com/pygobject/pycairo
685
686 New Features:
687 * Python 3 support (API/ABI compatible with py3cairo 1.10.0) including
688 support for :exc:`cairo.Error`, :meth:`cairo.ImageSurface.get_data` and
689 :meth:`cairo.ImageSurface.create_for_data`, which were missing in
690 py3cairo.
691 * :class:`cairo.RecordingSurface` (:fdobug:`36854`,
692 `Torsten Landschoff <[email protected]>`__)
693 * :class:`cairo.Region`, :class:`cairo.RectangleInt` and
694 cairo.REGION_OVERLAP_*
695 (:fdobug:`44336`, `Bug Fly <[email protected]>`__)
696
697 Bug Fixes:
698 * Fix crash when read()/write() methods of file objects passed to pycairo
699 raise exceptions.
700 * Fix possible value truncation of handles passed to Win32Surface and
701 Win32PrintingSurface on 64bit Windows. :fdobug:`57493`
702
703
704 1.10.0 - 2011-05-01
705 -------------------
706
707 General Changes:
708 py2cairo 1.10.0 requires cairo 1.10.0 (or later).
709
710 New Constants:
711 cairo.FORMAT_RGB16_565
712
713 Bug Fixes:
714 * context.get_source().get_surface() fails :fdobug:`33013`
715 * Add support for './waf configure --libdir=XXX' :fdobug:`30230`
716
717 Documentation Changes:
718 * Upgrade to using Sphinx 1.0.7.
719 * Include html documentation in the pycairo archive file.
720
721 Build Changes:
722 * Update waf to 1.6.3
723 * Remove setup.py
724
725 Other Changes:
726 * Improve/simplify unicode filename support.
727 * Improve/simplify unicode text support.
728
729
730 1.8.10 - 2010-05-20
731 -------------------
732
733 General Changes:
734 Pycairo 1.8.10 requires cairo 1.8.10 (or later).
735
736 New Classes/Types:
737 * Win32PrintingSurface
738 * XCBSurface - add XCB support using xpyb
739
740 Bug Fixes:
741 * Fix for libtool 2.2 (:fdobug:`27974`).
742 * Mingw32 and pypy fixes (:fdobug:`25203`).
743
744 Other Changes:
745 Tests updated.
746
747 The Win32PrintingSurface and XCBSurface changes mean that pycairo 1.8.10 is
748 not binary compatible with pycairo 1.8.8. So modules that use the pycairo C
749 API (like pygtk) will need to be recompiled to use pycairo 1.8.10.
750
751
752 1.8.8 - 2009-08-26
753 ------------------
754
755 General Changes:
756 * Pycairo 1.8.8 requires cairo 1.8.8 (or later).
757 * Move from CVS to git.
758 * Add support for the waf build tool.
759
760 Updated Methods:
761 * The PDF/PS/SVGSurface constructors now accept None as a filename.
762
763
764 1.8.6 - 2009-06-25
765 ------------------
766
767 General Changes:
768 Pycairo 1.8.6 requires cairo 1.8.6 (or later)
769
770 Bug Fixes:
771 * ImageSurface.create_from_png _read_func fix
772 * ToyFontFace type fix
773 * :fdobug:`19221`: restore cairo.Matrix '*' operator to the way it
774 originally worked.
775
776 Other Changes:
777 Documentation completed.
778
779
780 1.8.4 - 2009-03-19
781 ------------------
782
783 General Changes:
784 Pycairo 1.8.4 requires cairo 1.8.4 (or later) and Python 2.6
785
786 Bug Fixes:
787 * 20674: Add get/set_extend for Gradient Patterns
788
789 New Classes:
790 cairo.ToyFontFace
791
792 New Methods:
793 | Pattern.get_extend
794 | Pattern.set_extend
795 | ToyFontFace.get_family
796 | ToyFontFace.get_slant
797 | ToyFontFace.get_weight
798
799 Deleted Methods:
800 | SurfacePattern.get_extend
801 | SurfacePattern.set_extend
802
803 Other Changes:
804 Threading for surfaces with stream functions has been reenabled.
805 Documentation updates.
806
807
808 1.8.2 - 2009-01-15
809 ------------------
810
811 Pycairo 1.8.0 resulted in crashes for some applications using threads. So
812 upgrading to 1.8.2 is recommended for threaded applications.
813
814 Bug Fixes:
815 * :fdobug:`19287`: Threading support results in crashes in
816 cairo.ImageSurface
817
818 New Methods:
819 Context.set_scaled_font
820
821 API Changes:
822 Matrix multiplication::
823
824 old code: matrix3 = matrix1 * matrix2
825 new equivalent code: matrix3 = matrix1.multiply(matrix2)
826 matrix3 = matrix1 * matrix2
827 is now equivalent to matrix3 = matrix2.multiply(matrix1)
828 which is consistent with standard matrix multiplication.
829
830
831 1.8.0 - 2008-12-15
832 ------------------
833
834 General Changes:
835 Pycairo 1.8.0 requires cairo 1.8.0 (or later).
836 Add documentation (available separately)
837
838 Bug Fixes:
839 * :fdobug:`18101`: Add support for threading
840 * :fdobug:`18947`: cairo.SurfacePattern should INCREF the used surface
841
842 New Methods:
843 | ScaledFont.get_scale_matrix
844 | Surface.mark_dirty_rectangle
845 | Surface.set_fallback_resolution
846
847 New Constants:
848 | cairo.EXTEND_PAD
849 | cairo.HAS_IMAGE_SURFACE
850 | cairo.HAS_USER_FONT
851
852 API Changes:
853 * Surface.mark_dirty: no longer accepts keyword arguments with default
854 values.
855 * PycairoPattern_FromPattern (C API): has a new 'base' argument - to fix
856 :fdobug:`18947`.
857
858 Other Changes:
859 Allow unknown cairo Pattern/Surface types to use the pycairo base
860 Pattern/Surface type.
861
862
863 1.6.4 - 2008-08-18
864 ------------------
865
866 General changes:
867 Pycairo 1.6.4 requires cairo 1.6.4 (or later).
868 requires Python 2.5 (or later).
869
870 Bug fixes:
871 :fdobug:`16112`: Fix win32 'python setup.py ...' build -- use double quotes
872
873 New Methods:
874 | Context.has_current_point
875 | Context.path_extents
876 | ImageSurface.format_stride_for_width
877 | PSSurface.get_eps
878 | PSSurface.set_eps
879 | PSSurface.ps_level_to_string
880 | PSSurface.restrict_to_level
881 | Surface.copy_page
882 | Surface.show_page
883
884 New Constants:
885 cairo.PS_LEVEL_2, cairo.PS_LEVEL_3
886
887 Other changes:
888 test/pygame-test1.py, test/pygame-test2.py : pygame tests
889
890 examples/cairo_snippets/snippets/ellipse.py : Update
891 so line-width is a constant width in device-space not user-space
892
893
894 1.4.12 - 2007-12-13
895 -------------------
896
897 General changes:
898 Pycairo 1.4.12 requires cairo 1.4.12 (or later).
899 requires Python 2.4 (or later).
900
901 Bug fixes:
902 * :fdobug:`10006`: update autogen.sh to support automake >= 1.10
903 * :fdobug:`13460`: use python-config to get python includes
904
905 Other changes:
906 * allow cairo.Context to be subclassed
907 * create a 'doc' subdirectory and start a FAQ file
908
909
910 1.4.0 - 2007-03-14
911 ------------------
912
913 General changes:
914 Pycairo 1.4.0 requires cairo 1.4.0 (or later).
915
916 New methods:
917 | Context.clip_extents
918 | Context.copy_clip_rectangles
919 | Context.get_dash
920 | Context.get_dash_count
921 | Context.get_scaled_font
922 | Context.glyph_extents
923 | Context.glyph_path
924 | Context.show_glyphs
925 | LinearGradient.get_linear_points
926 | RadialGradient.get_radial_circles
927 | SolidPattern.get_rgba
928 | SurfacePattern.get_surface
929
930 Deleted methods:
931 ImageSurface.create_for_array
932 Remove Numeric Python support, since Numeric has been made obsolete by
933 numpy, and numpy data can be read using ImageSurface.create_for_data.
934
935 Other changes:
936 the module cairo.gtk has been removed (pygtk 2.7.0 onwards has cairo
937 support built in).
938
939
940 1.2.6 - 2006-11-27
941 ------------------
942
943 * Pycairo 1.2.6 requires cairo 1.2.6 (or later).
944 * mingw32 compiler fixes (Cedric Gustin)
945 * setup.py improvements (Cedric Gustin)
946 * ImageSurface.get_data() new method added
947 ImageSurface.get_data_as_rgba() method removed
948
949
950 1.2.2 - 2006-08-21
951 ------------------
952
953 * Pycairo requires cairo 1.2.2 (or later).
954 * setup.py has been updated to allow installation by executing
955 $ python setup.py install
956 * examples/cairo_snippets/snippets/gradient_mask.py
957 A new example to demonstrate pattern masks.
958 * The cairo.svg module has been removed because:
959
960 1) Cairo does not include SVG parsing, so this module does not belong
961 in pycairo.
962 2) libsvg-cairo (the underlying C library) is unmaintained.
963
964
965 1.2.0 - 2006-07-03
966 ------------------
967
968 General changes:
969 Pycairo has been updated to work with cairo 1.2.0.
970
971 New methods:
972 | Surface.set_fallback_resolution
973 | Surface_get_content
974 | ImageSurface_get_format
975 | Image_surface_get_stride
976
977 Deleted methods:
978 PDFSurface.set_dpi, PSSurface.set_dpi, SVGSurface.set_dpi
979 - replaced by Surface.set_fallback_resolution
980
981 Other changes:
982 cairo.FORMAT_RGB16_565 added
983
984
985 1.1.6 - 2006-05-29
986 ------------------
987
988 General changes:
989 Pycairo has been updated to work with cairo 1.1.6.
990
991 New objects:
992 SVGSurface
993
994 New methods:
995 | Context.get_group_target
996 | Context.new_sub_path
997 | Context.pop_group
998 | Context.pop_group_to_source
999 | Context.push_group
1000 | Context.push_group_with_content
1001 | FontOptions.get_antialias
1002 | FontOptions.get_hint_metrics
1003 | FontOptions.get_hint_style
1004 | FontOptions.get_subpixel_order
1005 | FontOptions.set_antialias
1006 | FontOptions.set_hint_metrics
1007 | FontOptions.set_hint_style
1008 | FontOptions.set_subpixel_order
1009 | PDFSurface.set_size
1010 | PSSurface.dsc_begin_page_setup
1011 | PSSurface.dsc_begin_setup
1012 | PSSurface.dsc_comment
1013 | PSSurface.set_size
1014 | ScaledFont.get_font_face
1015 | ScaledFont.text_extents
1016 | Surface.get_device_offset
1017 | XlibSurface.get_depth
1018
1019 Updated methods:
1020 PDFSurface()/PSSurface() - can now write to file-like objects (like
1021 StringIO).
1022
1023 surface.write_to_png() and ImageSurface.create_from_png() can now write to
1024 file-like objects (like StringIO).
1025
1026 select_font_face, show_text, text_extents and text_path now accept unicode
1027 objects.
1028
1029 Other changes:
1030 misc bug fixes.
1031
1032 New examples:
1033 | examples/cairo_snippets/snippets_svg.py
1034 | examples/cairo_snippets/snippets/ellipse.py
1035 | examples/cairo_snippets/snippets/group.py
1036 | examples/svg/svgconvert.py
1037
1038
1039 1.0.2 - 2005-10-11
1040 ------------------
1041
1042 General changes:
1043 Pycairo has been updated to work with cairo 1.0.2.
1044
1045 New cairo functions supported:
1046 cairo.ImageSurface.create_for_data()
1047
1048 Updated functions:
1049 ctx.set_source_rgba (r, g, b, a=1.0) now supports a default alpha argument
1050
1051 Other changes:
1052 cairo.Matrix now supports the Python sequence protocol, so you can do:
1053 xx, yx, xy, yy, x0, y0 = matrix
1054
1055
1056 1.0.0 - 2005-08-31
1057 ------------------
1058
1059 General changes:
1060 Pycairo has been updated to work with cairo 1.0.0.
1061
1062 New cairo functions supported:
1063 | cairo.cairo_version()
1064 | cairo.cairo_version_string()
1065 | PSSurface.set_dpi()
1066
1067 Patterns are now implemented in a class hierarchy, the new constructors are:
1068 | cairo.SolidPattern (r, g, b, a=1.0)
1069 | cairo.SurfacePattern (surface)
1070 | cairo.LinearGradient (x0, y0, x1, y1)
1071 | cairo.RadialGradient (cx0, cy0, radius0, cx1, cy1, radius1)
1072
1073 Updated functions:
1074 Surface.write_to_png() now accepts a file object as well as a filename
1075
1076 Updated examples:
1077 The gtk examples now work with pygtk >= 2.7.0 without requiring the
1078 cairo.gtk module
1079
1080 Bug Fixes:
1081 fix "initializer element is not constant" compiler warnings
1082
1083
1084 0.9.0 - 2005-08-10
1085 ------------------
1086
1087 General changes:
1088 Pycairo has been updated to work with cairo 0.9.0.
1089
1090 New cairo functions supported:
1091 | cairo_get_antialias
1092 | cairo_set_antialias
1093 | cairo_surface_mark_dirty_rectangle
1094 | cairo_surface_flush
1095
1096 Bug Fixes:
1097 * double buffering now works with the cairo.gtk module
1098
1099
1100 0.6.0 - 2005-08-01
1101 ------------------
1102
1103 This version has many changes which update Pycairo to the new cairo API. The
1104 change list is not duplicated here, instead see the cairo/NEWS file for full
1105 details of all these API changes.
1106
1107 Pycairo method names that were different from the underlying cairo function
1108 names have been changed to make Pycairo more closely follow cairo and so
1109 enable the cairo documentation to be used for writing Pycairo programs. NOTES
1110 has been updated to list the differences between the C API and the Pycairo
1111 API.
1112
1113 Context.copy_path() has been implemented, it returns a Path instance which
1114 supports the iterator protocol.
1115
1116 Python 2.3 is now required.
1117
1118 New examples:
1119 examples/warpedtext.py: shows usage of the Path iterator
1120
1121 examples/cairo_snippets/: shows many of the 'cairo-demo/cairo_snippets'
1122 examples
1123
1124 examples/gtk/png_view.py: example using cairo.ImageSurface.create_from_png()
1125
1126 General changes:
1127 Pycairo has been updated to work with cairo 0.6.0, including using cairo's
1128 new error handling scheme.
1129
1130 New features:
1131 cairo.CONTENT_COLOR, cairo.ALPHA, cairo.COLOR_ALPHA have been added for
1132 working with surfaces.
1133
1134 A new class cairo.FontOptions has been added.
1135
1136 cairo.ImageSurface.create_from_png() now accepts a filename string or a
1137 file object
1138
1139 New wrapper functions have been added for cairo_get_font_options,
1140 cairo_set_font_options and cairo_surface_get_font_options.
1141
1142
1143 0.5.1 - 2005-06-22
1144 ------------------
1145
1146 New features:
1147 * new class cairo.Win32Surface (Niki Spahiev)
1148 * cairo.HAS_WIN32_SURFACE, cairo.HAS_PS_SURFACE etc are defined to give
1149 access to the values from cairo-features.h
1150
1151 Fixes:
1152 * fix cairo_mask, cairo_mask_surface and cairo_stroke_preserve wrappers
1153 * compile properly against GTK+ 2.7 (Gustavo Carneiro)
1154 * other small fixes, including fixes for gcc 4.0 warnings
1155
1156
1157 0.4.0 - 2005-03-10
1158 ------------------
1159
1160 New cairo bindings:
1161 | cairo_font_extents
1162
1163 Bindings removed:
1164 | cairo_font_set_transform
1165 | cairo_font_current_transform
1166
1167 New examples:
1168 gtk/hangman.py
1169
1170 Other:
1171 Changed version numbering to correspond directly with the Cairo version
1172 Pycairo was developed to work with. So, for example, Pycairo version 0.4.0
1173 represents the Pycairo version that has been developed and tested with
1174 Cairo 0.4.0.
1175
1176
1177 0.1.4 - 2005-01-14
1178 ------------------
1179
1180 The Pycairo license has changed so that it is now dual-licensed under the LGPL
1181 and the MPL, the same as Cairo itself. For details see the COPYING file as
1182 well as COPYING-LGPL-2.1 and COPYING-MPL-1.1.
1183
1184 New cairo bindings:
1185 | cairo_pdf_surface_create
1186 | cairo_set_target_pdf
1187
1188 New libsvg-cairo bindings:
1189 | svg_cairo_parse
1190 | svg_cairo_parse_buffer
1191 | svg_cairo_render
1192 | svg_cairo_get_size
1193
1194 Other:
1195 * Added --without-pygtk configure option.
1196 * Renamed the Pycairo API _new() functions to _wrap() to allow _new() to
1197 * be used for python __new__ functions.
1198 * New examples: svg2png.py and svgview.py.
1199
1200
1201 0.1.3 - 2004-11-24
1202 ------------------
1203
1204 After the recent server compromise we discarded all unsigned
1205 snapshots. That left us without a pycairo snapshot.
1206
1207 Additionally, there were no tags in the source repository so I
1208 couldn't recreate the 0.1.2 snapshot, so here's a new 0.1.3 snapshot.
1209
1210 I apologize if I botched the version number or left something
1211 significant out of this announcement---I'm not the one who will
1212 usually be doing pycairo maintenance.
1213
1214 New bindings:
1215 | current_path
1216 | current_path_flat
1217 | current_font_extents
1218
1219 Changes:
1220 fill_extents,stroke_extents: Remove unnecessary args and
1221 change from a method to an attribute.
1222
1223 Other:
1224 Added two new examples: context-subclass.py and warpedtext.py