Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use importlib.metadata to define version, support Python 3.12 #68

Closed
wants to merge 2 commits into from

Commits on Dec 18, 2023

  1. Configuration menu
    Copy the full SHA
    549db06 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2023

  1. refactor: Use importlib.metadata to define version, support Python 3.12

    We previously made use of the pkg_resources module to determine the
    package version (as defined by setuptools-scm) in __about__.py. This
    module is included in setuptools, which as of Python 3.12 has been
    removed from the standard library and is now its own third-party
    package.
    
    There are multiple ways to address this, one being to include
    setuptools in the install_requires list for Python 3.12 and
    later. Another, also listed in the Python Packaging User Guide, is to
    instead use importlib.metadata.version. Since this approach works for
    all Python versions we intend to support (that is, from 3.8 forward),
    this is the better solution.
    
    Thus, refactor __about__.py to use importlib, and add Python 3.12 to
    the test matrix.
    
    Note that Tutor itself does not support Python 3.12 prior to version
    17, so we cannot support the combination of Python 3.12 and Tutor
    version 16 or earlier.
    
    Reference:
    https://packaging.python.org/en/latest/guides/single-sourcing-package-version/
    fghaas committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6135dd4 View commit details
    Browse the repository at this point in the history