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

Add support for Python 3.12 #28

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

fliiiix
Copy link
Contributor

@fliiiix fliiiix commented Oct 10, 2023

Python 3.12 configparser removed SafeConfigParser.
python/cpython#89336 (comment)

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
Copy link
Contributor Author

fliiiix commented Oct 11, 2023

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

Python 3.12 configparser removed SafeConfigParser.
python/cpython#89336 (comment)

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'
```
@heckad
Copy link
Contributor

heckad commented Nov 12, 2023

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

@stevenh
Copy link

stevenh commented Jan 5, 2024

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

@shanx
Copy link

shanx commented Feb 7, 2024

Friendly nudge @csachs :)

@csachs
Copy link
Owner

csachs commented Apr 9, 2024

Please excuse the delay, thanks for the PR.

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.

5 participants