Skip to content

Conversation

@Trifase
Copy link
Contributor

@Trifase Trifase commented Mar 27, 2023

When done, will close #3595

Checklist for PRs

  • Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • Added myself alphabetically to AUTHORS.rst (optional)

@harshil21 harshil21 added 🛠 refactor change type: refactor 🛠 breaking change type: breaking labels Mar 27, 2023
@harshil21 harshil21 mentioned this pull request Mar 27, 2023
3 tasks
@harshil21 harshil21 removed the 🛠 breaking change type: breaking label Mar 27, 2023
@Trifase Trifase marked this pull request as ready for review March 27, 2023 21:16
@Trifase
Copy link
Contributor Author

Trifase commented Mar 28, 2023

I think I've finished - I cannot find any more test to do.

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! The changes look good so far. We'll need a few newunit tests though :)

  • tests for extract_tzinfo_from_defaults in test_datetime.py, where you pass a tg.Bot, a tg.ext.ExtBot without defaults and a tg.ext.ExtBot with defaults to ensure that everything works as expected
  • For all the changed classes we need ensure that the datetime objects are localized as expected in the three cases described above. For that, please add a test_de_json_localization (or sim) after the respective de_json tests. The test fixtures linked in #3595 should be used for that.

Please do reach out if you need help with the unit tests - I know that those are not always simple :)

Copy link
Member

@Bibo-Joshi Bibo-Joshi left a comment

Choose a reason for hiding this comment

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

Thank you for the updates - LGTM! What a nice PR :) If we get another approval (maybe lemontree or pool), we can merge

Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

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

Missed a few changestrings.

Btw, is the docstring important for the args documentation? It only applies to the attributes of the classes, no...

@Trifase Trifase requested a review from Poolitzer April 11, 2023 15:29
@Bibo-Joshi
Copy link
Member

@Poolitzer do you have any comments left? @Trifase I guess there is notheng to be added from your side?

@Trifase
Copy link
Contributor Author

Trifase commented Apr 18, 2023

@Poolitzer do you have any comments left? @Trifase I guess there is notheng to be added from your side?

I think I fullfilled everything that was requested and everything else that was missing!

Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

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

LGTM

@Bibo-Joshi Bibo-Joshi merged commit 7b116be into python-telegram-bot:master Apr 18, 2023
@Bibo-Joshi
Copy link
Member

Thank you very much for this nice contribution @Trifase ! I hope that you also had some fun with the PR :)

@Trifase Trifase deleted the localized-date branch April 18, 2023 17:15
@github-actions github-actions bot locked and limited conversation to collaborators Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🛠 refactor change type: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Message.date is UTC-localized

5 participants