Skip to content

Conversation

amercader
Copy link
Member

  1. Refactor module loading for Python 3.12 support: loader.find_module() was deprecated and has been removed in py3.12,
    refactored the code following the examples on:

    https://docs.python.org/3.9/library/importlib.html#importing-programmatically

  2. Refactor dates tests for Python 3.11 support: datetime.datetime.fromisoformat() got more lenient in Python 3.11, so
    some of the tested strings result in valid dates:

    https://docs.python.org/3.11/library/datetime.html#datetime.datetime.fromisoformat

Part of getting everything green in our CKAN / Python matrix: https://github.com/ckan/ckan-python-monitor

`loader.find_module()` was deprecated and has been removed in py3.12,
refactored the code following the examples on:

https://docs.python.org/3.9/library/importlib.html#importing-programmatically
`datetime.datetime.fromisoformat()` got more lenient in Python 3.11, so
some of the tested strings result in valid dates:

https://docs.python.org/3.11/library/datetime.html#datetime.datetime.fromisoformat
@amercader amercader changed the title Refactorings for Pythin 3.11 and 3.12 support Refactorings for Python 3.11 and 3.12 support Jul 19, 2024
@ckanbot
Copy link

ckanbot commented Jul 23, 2024

Successfully created backport PR for dev-v2.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants