8000 gh-133413: Change the request.Request example method by ppaez · Pull Request #133414 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-133413: Change the request.Request example method #133414

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

ppaez
Copy link
Contributor
@ppaez ppaez commented May 5, 2025

The method has_data of request.Request is used in the explanation of mock autospeccing. This method was removed in version 3.4. This PR proposes to use header_items instead.


📚 Documentation preview 📚: https://cpython-previews--133414.org.readthedocs.build/

has_data is used in the explanation of mock autospeccing. This
method of request.Request was removed in version 3.4.
Copy link
Member
@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

@serhiy-storchaka
Copy link
Member

The has_data() method is also referred in the documentation for HTTPHandler.http_open() and HTTPSHandler.https_open(). Do you mind to fix also these descriptions?

@ppaez
Copy link
Contributor Author
ppaez commented May 12, 2025

Thanks of reviewing this issue. I can propose a fix for the two other references to has_data. At first glance, it seems that the data attribute could be used instead, not sure if the wording depending on req.data. needs to change. I would like to investigate further and do some testing to confirm. Would it be ok to wait on this or do you prefer me to fix those two references in a separate Issue?

@serhiy-storchaka
Copy link
Member

I would prefer to fix them all in one PR.

This is just a documentation issue, and it is old, so few days or weeks don't matter.

has_data was removed in version 3.4
@ppaez
Copy link
Contributor Author
ppaez commented May 12, 2025

Hi @serhiy-storchaka, I added a commit to fix the two references.

Copy link
Member
@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 12, 2025
@serhiy-storchaka serhiy-storchaka merged commit 86c1d43 into python:main May 12, 2025
28 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs May 12, 2025
@miss-islington-app
Copy link

Thanks @ppaez for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 12, 2025
…-133414)

The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d43)

Co-authored-by: ppaez <pp@pp.com.mx>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 12, 2025
…-133414)

The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d43)

Co-authored-by: ppaez <pp@pp.com.mx>
@bedevere-app
Copy link
bedevere-app bot commented May 12, 2025

GH-133945 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 12, 2025
@bedevere-app
Copy link
bedevere-app bot commented May 12, 2025

GH-133946 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 12, 2025
@serhiy-storchaka
Copy link
Member

Thank you for your contribution @ppaez.

serhiy-storchaka pushed a commit that referenced this pull request May 12, 2025
…) (GH-133945)

The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d43)

Co-authored-by: ppaez <pp@pp.com.mx>
serhiy-storchaka pushed a commit that referenced this pull request May 12, 2025
…) (GH-133946)

The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d43)

Co-authored-by: ppaez <pp@pp.com.mx>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants
0