close
Skip to content

Releases: thierry-martinez/pyml

A no-op release to adapt to release 21.0 of stdcompat

29 Aug 09:03
22e0051

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: ocamllibs/pyml@2023110...2025080

2023-11-01

29 Aug 09:03
22e0051

Choose a tag to compare

2022-09-05

29 Aug 09:03
22e0051

Choose a tag to compare

  • Support for OCaml 5.0

  • Support for Python 3.11.
    All OCaml exceptions raised in callbacks are now encapsulated with their
    backtrace in Python exceptions instead of bypassing the Python interpreter.
    The former behavior led to segmentation faults in the test-suite, and nothing
    indicate that previous versions of Python were supposed to support that well.
    The new behavior can break existing code, especially code relying on
    Py.Run.simple_string, which now catches all exceptions, including OCaml
    exceptions. If you need proper exception handling, you can use Py.Run.eval.
    (reported by Jerry James,
    https://github.com/thierry-martinez/pyml/issues/84)

  • New function Py.Object.dir.

  • New functions Py.Err.set_interrupt and, for Python >=3.10,
    Py.Err.set_interrupt_ex.

  • New functions
    Py.Dict.{to_bindings_seq, to_bindings_seq_map, to_bindings_string_seq}.

  • New function Py.Capsule.create, equivalent to Py.Capsule.make, but
    returning the record { wrap; unwrap } of the new type 'a Py.Capsule.t
    instead of a pair.

  • Do not let python capture sigint by default (can be changed by passing
    ~python_sigint:true to Py.initialize): Ctrl+C now interrupts the
    program, even after Py.initialize is called.
    (reported by Arulselvan Madhavan,
    https://github.com/thierry-martinez/pyml/issues/83)

  • Bindings for exceptions: PyExc_EncodingWarning (added in Python 3.10),
    PyExc_ResourceWarning (added in Python 3.2)
    (reported by Jerry James,
    https://github.com/thierry-martinez/pyml/issues/84)

  • Fixes in bindings for PyCompilerFlags, PyMarshal_WriteObjectToFile,
    and PySet_Clear
    (reported by Jerry James,
    https://github.com/thierry-martinez/pyml/issues/84)

2022-06-15

29 Aug 09:03

Choose a tag to compare

  • Numpy.to_bigarray_k is continuation-passing-style version of Numpy.to_bigarray,
    allowing caller to convert Numpy arrays to bigarrays without having to know
    the kind and the layout of the array
    (suggested by Lindsay Errington and Andie Sigler,
    https://github.com/thierry-martinez/pyml/issues/81)

2022-03-25

29 Aug 09:03

Choose a tag to compare

  • Fix debug build detection

  • Expose the function Py.Callable.handle_errors

2022-03-22

29 Aug 09:03

Choose a tag to compare

2021-10-15

29 Aug 09:02

Choose a tag to compare

2021-09-24

29 Aug 09:02

Choose a tag to compare

2021-02-26

29 Aug 09:02

Choose a tag to compare

  • Compatibility with Python 3.10 (reported by Richard W.M. Jones)

    • PyObject_AsCharBuffer, PyObject_AsReadBuffer, PyObject_AsWriteBuffer bindings are marked optional as they have been removed in Python 3.10.

    • Py_fopen is optional and Py_wfopen is used instead if available.

  • More general handling of Unix architectures.
    (Fixed by Pino Toscano, https://github.com/thierry-martinez/pyml/pull/57)

  • Add Py.Set module for Python sets.
    (Added by Laurent Mazare)

  • Fix ocamllibs#61: Numpy.to_bigarray raises an exception if source value is not a Numpy array instead of segfaulting.
    (Reported by Jonathan Laurent)

  • Fix ocamllibs#56, ocamllibs#59: Add python-config heuristics to find Python library.
    (Reported by Anders Thuné and Nils Becker)

  • Fix import_module_opt for Python <3.6
    (Reported by opam CI.)

20200518

29 Aug 09:02

Choose a tag to compare