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

DeprecationWarnings when running tests on Python 3.11 #1091

Closed
icemac opened this issue Jan 10, 2023 · 10 comments
Closed

DeprecationWarnings when running tests on Python 3.11 #1091

icemac opened this issue Jan 10, 2023 · 10 comments

Comments

@icemac
Copy link
Member

icemac commented Jan 10, 2023

FEATURE REQUEST

What I did:

tox -epy311

What I expect to happen:

Successful test run without any deprecation warnings.

What actually happened:

AuthEncoding-4.3-py3.11.egg/AuthEncoding/AuthEncoding.py:200: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
  from crypt import crypt
/Users/mac/vcs/gocept/Zope/src/ZPublisher/HTTPRequest.py:23: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
  from cgi import FieldStorage
AccessControl-5.7-py3.11-macosx-12.0-x86_64.egg/AccessControl/SecurityInfo.py:272: DeprecationWarning: The smtpd module is deprecated and unmaintained and will be removed in Python 3.12.  Please see aiosmtpd (https://aiosmtpd.readthedocs.io/) for the recommended replacement.
  __import__(mname, *imp)
python3.11/smtpd.py:96: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
  import asyncore
/python3.11/smtpd.py:97: DeprecationWarning: The asynchat module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
  import asynchat

I left out the deprecation warnings about changes in unittest as there is already zopefoundation/meta#143

It seems that we will get into some trouble because Python removes some foundational libraries used by Zope or at least its tests.

What version of Python and Zope/Addons I am using:

  • Zope master branch
  • Python 3.11.1
@d-maurer
Copy link
Contributor

d-maurer commented Jan 10, 2023 via email

@dataflake
Copy link
Member

Once new releases for AuthEncoding, AccessControl, DocumentTemplate and DateTime are made and the version pins updated the only remaining warning should be about the cgi module.

@d-maurer
Copy link
Contributor

d-maurer commented Jan 12, 2023 via email

@dataflake
Copy link
Member

FYI, I have created releases for AuthEncoding, AccessControl, DocumentTemplate and DateTime and updated the version pins on master.

@d-maurer
Copy link
Contributor

Are we ready to depend on https://pypi.org/project/multipart (homepage https://github.com/defnull/multipart) as replacement for cgi.FieldStorage or do we want to implement our own FieldStorage?

@dataflake
Copy link
Member

Are we ready to depend on https://pypi.org/project/multipart (homepage https://github.com/defnull/multipart) as replacement for cgi.FieldStorage or do we want to implement our own FieldStorage?

multipart looks OK to me. It doesn't seem to have external dependencies and it's still under (slow) development. The only reason for implementing our own would be if that is very simple to do.

@d-maurer
Copy link
Contributor

d-maurer commented Jan 13, 2023 via email

@d-maurer
Copy link
Contributor

d-maurer commented Jan 14, 2023 via email

@icemac
Copy link
Member Author

icemac commented Jan 16, 2023

zope.publisher already uses the multipart library in https://github.com/zopefoundation/zope.publisher/blob/master/src/zope/publisher/browser.py It was initially implemented in zopefoundation/zope.publisher#55.

@icemac
Copy link
Member Author

icemac commented Jan 19, 2023

After #1094 is merged, we now only have the following (besides some warnings during installation):

@icemac icemac closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants