TileDB-Py icon indicating copy to clipboard operation
TileDB-Py copied to clipboard

Enable python 3.12

Open dudoslav opened this issue 1 year ago • 1 comments

Enable python 3.12 for this repo

dudoslav avatar May 01 '24 15:05 dudoslav

See also #1865

johnkerl avatar May 01 '24 15:05 johnkerl

Reasons why tests were failing:

  • tarfile supports extraction filters, a mechanism to mitigate some of the security issues: https://docs.python.org/3.12/library/tarfile.html#extraction-filters. Solved it using filter="fully_trusted"argument for tf.extractall(). For some older Windows versions of Python filter argument is not implemented. Handled it with a try catch.
  • __repr__ of collections.OrderedDict for py3.12 has changed: https://github.com/python/cpython/pull/101661. This means we are getting different expected output for 3.12. Solved it using ellipsis marker: https://docs.python.org/3/library/doctest.html#doctest.ELLIPSIS

kounelisagis avatar May 08 '24 10:05 kounelisagis

Please include pytest outputs for 3.12 executions

dudoslav avatar May 08 '24 12:05 dudoslav

Please include pytest outputs for 3.12 executions

Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:20:11) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tiledb
>>> tiledb.version()
(0, 28, 1, 'dev10')
>>> tiledb.libtiledb.version()
(2, 20, 1)

Tests run successfully.

kounelisagis avatar May 09 '24 08:05 kounelisagis