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

Replace cgi and logging.warn with new APIs #292

Merged
merged 1 commit into from
Nov 26, 2023

Conversation

GlassOfWhiskey
Copy link
Member

The cgi Python module has been deprecated in PEP 594. In particular, the parse_header function has been deprecated in favor of the new email.message.Message API. This commit replaces all occurrences of parse_header with the new API.

As of Python 3.3, the logging.warn API has been deprected in favor of the logging.warning method. This commit substitutes all occurrences of the warn() method with the equivalent warning() API.

@GlassOfWhiskey GlassOfWhiskey changed the title Replace deprecated functions with new APIs Replace cgi and logging.warn with new APIs Nov 26, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (05dcd32) 65.68% compared to head (ad391ab) 65.87%.

Files Patch % Lines
streamflow/data/remotepath.py 84.61% 1 Missing and 1 partial ⚠️
streamflow/provenance/run_crate.py 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #292      +/-   ##
==========================================
+ Coverage   65.68%   65.87%   +0.19%     
==========================================
  Files          82       82              
  Lines       10144    10149       +5     
  Branches     2397     2399       +2     
==========================================
+ Hits         6663     6686      +23     
+ Misses       3050     3029      -21     
- Partials      431      434       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GlassOfWhiskey GlassOfWhiskey force-pushed the remove-deprecated-functions branch 5 times, most recently from 831d784 to 4450053 Compare November 26, 2023 17:52
The `cgi` Python module has been deprecated in PEP 594. In particular,
the `parse_header` function has been deprecated in favor of the new
`email.message.Message` API. This commit replaces all occurrences of
`parse_header` with the new API. This commit also adds a test for the
`remotepath.download` API to avoid regressions.

As of Python 3.3, the `logging.warn` API has been deprected in favor of
the `logging.warning` method. This commit substitutes all occurrences of
the `warn()` method with the equivalent `warning()` API.
@GlassOfWhiskey GlassOfWhiskey force-pushed the remove-deprecated-functions branch from 4450053 to ad391ab Compare November 26, 2023 18:11
@GlassOfWhiskey GlassOfWhiskey merged commit 4114a06 into master Nov 26, 2023
31 checks passed
@GlassOfWhiskey GlassOfWhiskey deleted the remove-deprecated-functions branch November 26, 2023 18:43
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.

2 participants