X Tutup
Skip to content

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

Merged
tsnoam merged 6 commits intopython-telegram-bot:masterfrom
pulsastrix:no-messing-with-request
Dec 19, 2016
Merged

Prevented modifications to the request object's original data#454
tsnoam merged 6 commits intopython-telegram-bot:masterfrom
pulsastrix:no-messing-with-request

Conversation

@pulsastrix
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

X Tutup