csachs / pyproject-flake8

pyproject-flake8 (pflake8), a monkey patching wrapper to connect flake8 with pyproject.toml configuration
The Unlicense
173 stars 16 forks source link

Add support for Python 3.12 #28

Closed fliiiix closed 6 months ago

fliiiix commented 1 year ago

Python 3.12 configparser removed SafeConfigParser. https://github.com/python/cpython/issues/89336#issuecomment-1094366625

leading to this issue

Traceback (most recent call last):
  File "/home/user/.cache/pypoetry/virtualenvs/chapter-marker-bSlZRqHo-py3.12/bin/pflake8", line 5, in <module>
    from pflake8.__main__ import main
  File "/home/user/.cache/pypoetry/virtualenvs/chapter-marker-bSlZRqHo-py3.12/lib/python3.12/site-packages/pflake8/__init__.py", line 54, in <module>
    class DivertingSafeConfigParser(ConfigParserTomlMixin, configparser.SafeConfigParser):
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'
fliiiix commented 1 year ago

probably makes sense to add Python 3.12 here https://github.com/csachs/pyproject-flake8/blob/main/.github/workflows/test.yml#L10

heckad commented 11 months ago

@csachs, could you please look at this pull request?

stevenh commented 10 months ago

This is blocking testing on python 3.12 for us any chance of getting this merged and a new release @csachs?

shanx commented 9 months ago

Friendly nudge @csachs :)

csachs commented 6 months ago

Please excuse the delay, thanks for the PR.