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

Stop using depreciated cgi module #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CoolCat467
Copy link

@CoolCat467 CoolCat467 commented Jul 22, 2023

This PR replaces the depreciated cgi module's multipart form data decoding with the multipart form data decoding using the email module.

Along the way I also changed opening file objects to use with statements and added <DOCTYPE html> tags to multiple pages.

Closes #19

@dereckson
Copy link

Thanks for this pull request @CoolCat467

I've did the following tests and all seem to work:

  • woof
  • woof
  • empty woof -U
  • woof -U, then compare the file hashes

This change has been adopted as a patch by HomeBrew maintainer and seems stable on macOS too.

I'd like a Python 3.13 version, so I'm going to maintain a fork and adopting your change too: https://devcentral.nasqueron.org/D3536

dereckson pushed a commit to nasqueron/wurf that referenced this pull request Oct 18, 2024
Summary:
The cgi module has been deprecated and will be removed in Python 3.13.

Side edits:
  - adhere more to Python conventions
  - improve HTML doctype
  - proofread messages

Source: simon-budig#21

Ref T2041.

Test Plan:
  - `woof CONTRIBUTORS.md`
  - `woof archiv/`
  - `woof -U` (without upload)
  - `woof -U`, then compare file hashes

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T2041

Differential Revision: https://devcentral.nasqueron.org/D3536
dereckson pushed a commit to nasqueron/wurf that referenced this pull request Oct 18, 2024
Summary:
The Debian package for woof included a man page.

Man page author: Andrea Colangelo <warp10@ubuntu.com>

Source: simon-budig#21

Ref T2059.

Test Plan: man ./doc/woof.1

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T2059

Differential Revision: https://devcentral.nasqueron.org/D3537
@CoolCat467
Copy link
Author

While you are at it, take a look at https://github.com/CoolCat467/dotfiles/blob/main/dotfiles/.bin/woof, I added type annotations and overall modernized the project.

@dereckson
Copy link

While you are at it, take a look at https://github.com/CoolCat467/dotfiles/blob/main/dotfiles/.bin/woof, I added type annotations and overall modernized the project.

This is indeed welcome, but I guess the discussion its out of scope of this cgi pull request.
Ping me on Libera.chat if you use IRC, we can coordinate on that.

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.

DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
2 participants