Skip to content

Conversation

@Alexandr153
Copy link
Contributor

I replaced deprecated features with the recommended current features(updated to the latest version)

@picnixz picnixz self-requested a review April 17, 2025 17:25
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a NEWS entry, small one. Because now, we're making assumptions that the response object has a .status field, which is only true since Python 3.9. Thankfully, 3.9 is the last security branch, so script running with 3.9 may still somehow run without issues on 3.14 (thus we would mitigate the porting issues).


def http_response(self, request, response):
code, msg, hdrs = response.code, response.msg, response.info()
code, msg, hdrs = response.status, response.msg, response.info()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not changing response.info() as well?

@picnixz picnixz changed the title gh-123503: Replace deprecated members from urllib/request gh-123503: Replace addinfourl and HTTPResponse deprecated attributes with stable ones Apr 17, 2025
@picnixz picnixz changed the title gh-123503: Replace addinfourl and HTTPResponse deprecated attributes with stable ones gh-123503: Replace usages of addinfourl and HTTPResponse deprecated attributes with stable ones Apr 17, 2025
@Alexandr153 Alexandr153 deleted the fix-issue-123503 branch April 18, 2025 04:01
@Alexandr153 Alexandr153 restored the fix-issue-123503 branch April 18, 2025 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants