-
Notifications
You must be signed in to change notification settings - Fork 99
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
Comments
Michael Howitz wrote at 2023-1-10 06:27 -0800:
...
/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
I think, I have seen already a discussion about a `cgi.FieldStorage`
replacement.
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)
The `smtpd` reference comes from `pages.txt` and `security.pt`
in `Products.Five.browser.tests`.
It likely can be replaced by any module usually not "allowed".
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
Those will go away once the `smtpd` reference is gone.
|
Once new releases for |
Jens Vagelpohl wrote at 2023-1-11 23:03 -0800:
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.
I plan to work on a `cgi.FieldStorage` replacement -- probably
together with work on #648.
|
FYI, I have created releases for |
Are we ready to depend on https://pypi.org/project/multipart (homepage https://github.com/defnull/multipart) as replacement for |
|
Jens Vagelpohl wrote at 2023-1-13 02:28 -0800:
...
`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.
There are 2 main problems:
1. the complexity of MIME messages (which HTTP builds upon)
2. the need to handle really large messages (RAM) efficiently.
The first problem could be addressed by using Python's
`email.feedparser`.
Unfortunately, it builds an in-memory structure and
therefore is not RAM efficient for large messages (e.g.
for uploads).
I looked at the code and it cannot easily be made to avoid
large in memory structures.
The `multipart` `README` promises efficient handling of
large messages.
Therefore, I would prefer to give `multipart` a trial.
|
Dieter Maurer wrote at 2023-1-13 12:14 +0100:
Jens Vagelpohl wrote at 2023-1-13 02:28 -0800:
> ...
>`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.
...
The `multipart` `README` promises efficient handling of
large messages.
Therefore, I would prefer to give `multipart` a trial.
We cannot use the main entry function of `multipart`
(i.e. `parse_form_data`) because it uses (home grown) mappings
for its result which do not preserve the form field order.
Preserving this order is essential for the `:records` modifier.
However, we can use the `multipart` parser to do
the `multipart/form-data` parsing - i.e. the most difficult part.
|
|
After #1094 is merged, we now only have the following (besides some warnings during installation):
|
FEATURE REQUEST
What I did:
tox -epy311
What I expect to happen:
Successful test run without any deprecation warnings.
What actually happened:
I left out the deprecation warnings about changes in
unittest
as there is already zopefoundation/meta#143It 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:
master
branchThe text was updated successfully, but these errors were encountered: