-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
"cgi" standard library module used by bottle is deprecated in Python 3.11, to be removed in 3.13 #1403
Comments
That's unfortunate, bottle uses the
Great. I'm the author of |
Removing the |
PEP 594: Remove the cgi and cgitb modules, deprecated in Python 3.11. cgi.FieldStorage can typically be replaced with urllib.parse.parse_qsl() for GET and HEAD requests, and the email.message module or multipart PyPI project for POST and PUT. |
Any news maybe on this? 3.13 is now getting closer with 3.12 being out in the meantime, albeit the release plan is around half of next year. |
The only viable solution is to copy&paste code from |
Thanks for the fast reply! I see your point and absolutely agree is not "nice", but if we don't want to have dependencies, then I guess it's really the only way to go ("soon" or as Python 3.13 start getting traction). Would you mind when you have time in case create a branch (possibly also for 0.12.x ?) with this so we can start testing? (I'm looking at this in the scope of future Fedora 41 planning to use it) |
@defnull Hi can we using the |
If the only requirement is to handle |
I wonder if the no-deps line should not be open to compromise, as it is theorical: we see with this issue we are always dependant anyway, as least from std lib. |
I'm also fine with copying the lines we from the |
Here is the POC Features:
|
Looks good; are you going to commit a test as well? |
@simsong what do you mean? It passed the test https://github.com/valq7711/bottle/actions/runs/7160872053 |
Ah. I didn’t see that.
…On Mon, Dec 11, 2023 at 1:25 AM valq7711 ***@***.***> wrote:
@simsong <https://github.com/simsong> what do you mean? It passed the
test https://github.com/valq7711/bottle/actions/runs/7160872053
Multipart test is in test_environ.py
The problem is that it is breaking changes as cgi supports nested
multiparts and allows LF-delimiters (instead of CRLF)
—
Reply to this email directly, view it on GitHub
<#1403 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMFHLGUEIPLDPCVBTOOFXLYI2RNRAVCNFSM6AAAAAARZPDW7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGQYDAMBSHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
hi folks, a gentle reminder that 3.13 in alpha 4 and cgi confirmed removed! PEP 594 (Removing dead batteries from the standard library) scheduled removals of many deprecated modules: aifc, audioop, chunk, cgi, cgitb, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib, lib2to3. |
Bottle is not Python 3.13+ ready, see bottlepy/bottle#1403 In Fedora, we need pycurl to be able to use fedpkg, our tool for building Fedora packages. I plan to use this patch in Fedora temporarily until the bottle situation is resolved.
Just a ping as Python 3.13 is closer and closer... |
Python 3.13b2 has landed in Fedora Rawhide breaking bottle |
Bottle is not compatible with Python 3.13 yet due to the removal of the cgi module: bottlepy/bottle#1403
Remove Python 3.13 support for now Bottle is not compatible with Python 3.13 yet due to the removal of the cgi module: bottlepy/bottle#1403
Hello, seems evolution to handle change in python 3.13 is stalled. That does not remove the fact that we are all grateful for the great work done for the last years on bottle. |
For those interested, I intend on maintaining bottle under the fork here: |
I have decided to migrate to fastAPI. It is not difficult, although some features of bottle are missing. |
No the project is not dead, but not healthy either. My dilemma is as follows:
tl;dr; Project is not dead, but struggling. I got stuck and need help. But before anyone can help me, I need to help myself and publish what I already have done. |
@defnull - thank you for the heartfelt reply above. I appreciate all of the work that you have done on Bottle. and it is a great piece of work. The idea of having code that runs on both Python 3.13 and Python 2.7 is admirable, but I think that it is misguided. Running a production website on Python 2.7 would be a mistake because of the ever-increasing number of unfixable security bugs. I would encourage you to drop Python 2 support, as most other projects have done over the past decade. |
@defnull you should let more people be involved in the process and let people co-author commits. |
@defnull I totally agree with @simsong : we are in 2024 and python 2 is hardly a subject. And system stuck on python2 always the possibility to stay on current 0.12.x Fork is not a good option IMHO. Bottle has a nice goodwill. It is known (not as flask, but still) and is respected for the choices your made (no dependency for instance). |
@ilrico - thanks for your comments. I agree that it would be easier for me to stay with Bottle than to move to FastAPI. But unless new projects have a positive reason to use Bottle, it's going to be a dwindling community. The ease of getting an app running with Bottle is its big benefit. It's not just the lack of dependencies, it is the ease of integration. |
Thanks a lot for the feedback and support. I just spend the last 2 hours reviewing what I had done already, cleaning everything up and pushing to #1438. The PR now contains more than it should (e.g. a complete documentation overhaul) but it's a bit late late for being picky. That's fine. New plan:
|
The PR now passes all tests. I'll be off the computer for a couple of days and ask everyone to have a look at #1438 and provide feedback. I'm actually quite happy with it now. If there are no major issues with it, I'd merge that into master next week and prepare a 0.13 release. |
Thanks for your work so far and bring responsive now. Enjoy your time off, and please think about solving the human resource problem. |
New implementation was just merged into master and I'm preparing a 0.13 release at this very moment. |
Done. I'll finally close this issue now :) Thank you for all the feedback, your kind words and above all your patience. The next releases should be way easier, now that the 'big one' is out of the door. I'll now start working on issues and PRs and see which ones can be closed or easily fixed. You can all help by commenting on issues that should be fixed in 0.13 and can be closed now. There sure is a lot of outdated stuff in the issue tracker. |
I'm running bottle with Python 3.11 for the first time and I see this deprecation warning:
I guess bottle needs to stop using this module?
The text was updated successfully, but these errors were encountered: