Skip to content

Prevented modifications to the request object's original data #454

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 6 commits into from
Dec 19, 2016

Conversation

pulsastrix
Copy link
Contributor

Currently the de_json() methods of some subclasses of TelegramObject make modifications to the data of the request object. Usually, this shouldn't be a problem, but it might be one if other parts of the code try to read the data and expect something else to be there. By calling TelegramObject's de_json() method, which makes a copy of the data that can be worked with, this problem should be solved.

See #357 for an issue concerning this.

@pulsastrix
Copy link
Contributor Author

Looks like the tests are failing because too many requests were sent, like in #459.

@pulsastrix pulsastrix closed this Nov 8, 2016
@pulsastrix pulsastrix reopened this Nov 8, 2016
pulsastrix and others added 2 commits November 11, 2016 15:38
no-messing-with-request

# Conflicts:
#	telegram/utils/request.py
@tsnoam
Copy link
Member

tsnoam commented Dec 19, 2016

@HakimusGIT
Thank you for your contribution. I reviewed the PR and it's good to be merged. Though:

  1. I've pushed a commit undoing some style changes (probably yapf fault) which are unrelated to the PR and, ehm, yapf was wrong there.
  2. I'm waiting to see one last time the travis build pass before merging.

@tsnoam tsnoam merged commit a8fecc5 into python-telegram-bot:master Dec 19, 2016
@pulsastrix pulsastrix deleted the no-messing-with-request branch December 21, 2016 13:38
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy