Skip to content

Add Python 3.11-3.13 support, drop 3.6-3.8 support - #78

Open
VeckoTheGecko wants to merge 5 commits into
castelao:mainfrom
VeckoTheGecko:v/dev
Open

Add Python 3.11-3.13 support, drop 3.6-3.8 support#78
VeckoTheGecko wants to merge 5 commits into
castelao:mainfrom
VeckoTheGecko:v/dev

Conversation

@VeckoTheGecko

@VeckoTheGecko VeckoTheGecko commented Sep 26, 2024

Copy link
Copy Markdown

Hello! This package is one of our dependencies and I saw it could do with a bit of a refresh to bring up to speed with modern Python.
Changes:

  • Add support for Python 3.11-3.13 and remove Python 3.6-3.8 (Python 3.6-3.8 have reached end of life)
    • Remove dependency on deprecated pkg_resources
      • pkg_resources is deprecated in favour of importlib.resources which was introduced in python 3.7. These changes use importlib.resources.files which was added in Python 3.9
    • Update test matrix with new Python versions
    • add init.py to rules so its seen as a module
    • Update project metadata with new versions, and link to docs

Cleanup:

  • Update installation instructions (I feel that listing the dependencies isn’t that important, and can become out of sync with pyproject.toml)
  • Remove .travis.yml (this looked legacy from what I could tell)
  • Remove some legacy python 2.x code)
  • Remove requirements.txt (this information is already covered by pyproject.toml).
  • Updated contributing doc
  • Update invalid escape sequence (\s)

Python 3.13 is being released next week (1 Oct) so I think let's wait until then before merging and doing a minor release!

Python 3.6-3.8 have reached end of life.

* Remove dependency on deprecated pkg_resources
* Update test matrix
* add __init__.py to `rules` so its seen as a module and can be loaded in
@VeckoTheGecko

Copy link
Copy Markdown
Author

While adding 3.12/3.13 support it would be good to also patch one (or perhaps more, I only found 1) invalid escape sequences.

e.g., \s in self.raw_text = re.sub("\n\s*(?=\n)", "", raw_text)

@VeckoTheGecko

VeckoTheGecko commented Nov 19, 2024

Copy link
Copy Markdown
Author

@castelao would you be able to run CI and review?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant