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

Fix issues with Python 3.2 ResourceWarning workaround #87

Merged
merged 5 commits into from
Dec 6, 2022

Conversation

musicinmybrain
Copy link
Contributor

It doesn’t seem that socket.SocketError has existed in the standard library in vaguely-recent memory. This causes an error like the following:

AttributeError: module 'socket' has no attribute 'SocketError'

It seems that socket.error was intended instead.

Furthermore, syslog.socket will be None here on Python 3.11, which causes another unhandled exception:

AttributeError: 'NoneType' object has no attribute 'close'

Since the whole workaround is supposed to be for Python 3.2, which is long since end-of-life, the best approach seems to be to remove the workaround entirely.

musicinmybrain and others added 5 commits December 3, 2022 09:07
Python 3.2 is long since end-of-life, and the workaround produces an
unhandled exception on Python 3.11:

  AttributeError: NoneType object has no attribute close
@dataflake dataflake merged commit 7cded08 into zopefoundation:master Dec 6, 2022
@dataflake
Copy link
Member

I just released ZConfig 3.6.1 with these changes.

@musicinmybrain
Copy link
Contributor Author

Thank you! The new release works as expected. (I’ve just taken over as maintainer of the python-ZConfig package in Fedora Linux.) I’m glad that this PR was useful.

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.

None yet

2 participants