Skip to content

Prepare for Py +3.9 support #4398

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 13 commits into from
Oct 24, 2024
Merged

Conversation

elpekenin
Copy link
Contributor

As per title, so far:

  • Mass search+replace for stuff like List->list
  • Silence warnings, while no better solution is found, for Type[UT]
  • Update usages of deprecated typing.AsyncContextManager
  • Update 3.8 to 3.9 in pyproject.toml
  • Use str.removeprefix (i might have missed a couple of places doing the same logic manually)

@harshil21
Copy link
Member

@elpekenin Python 3.8 reached EoL yesterday and 3.13 final was released. Do you want to still work on this or should we pick it up again?

@elpekenin
Copy link
Contributor Author

Will (try and) take a look later today

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.

Heyho. I've scrolled through the changes a bit, but didn't see anything besides the two comments below. @elpekenin what'sy our status on this PR otherwise? I see that it's still marked as draft.

@harshil21 harshil21 added 🛠 breaking change type: breaking 🔗 python related technology: python labels Oct 22, 2024
@Bibo-Joshi Bibo-Joshi marked this pull request as ready for review October 23, 2024 20:07
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.

@elpekenin @harshil21 if I don't hear vehement disagreement from you, I'll merge some time on the weekend :)

@Bibo-Joshi Bibo-Joshi changed the title [Draft] Prepare for Py +3.9 support Prepare for Py +3.9 support Oct 23, 2024
@elpekenin
Copy link
Contributor Author

elpekenin commented Oct 23, 2024

Sorry for the silence, somehow i didnt get/see notifications about the feedback.

I have no idea what GenericUT[UT] is supposed to mean. From my understanding:

  • We wouldnt need an alias for the hint
  • Would just use Type[UT] in there (uppercase just because tooling might get confused with type also being the name of the variable)
  • Referencing UT outside function would be the same as using Any as it is not bound by the specific callers' typing (?)
    ... But its been such a headache trying stuff without any success that im fine with anything that tooling like :P

@Bibo-Joshi
Copy link
Member

But its been such a headache trying stuff without any success that im fine with anything that tooling like :P

Its certainly weird 😅 my last commit seemed to work and I also checked that reveal_type produces sane output with both mypy and pyright, so it would be goos enough for me :D

# Conflicts:
#	telegram/ext/_application.py
# Conflicts:
#	.github/workflows/unit_tests.yml
@Bibo-Joshi Bibo-Joshi merged commit 5ab82a9 into python-telegram-bot:master Oct 24, 2024
22 checks passed
@Bibo-Joshi
Copy link
Member

Thank you very much for the contribution :)

@elpekenin elpekenin deleted the 39-changes branch October 24, 2024 21:38
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🛠 breaking change type: breaking 🔗 python related technology: python
Projects
Status: 3.9 - starting 10-2024
Development

Successfully merging this pull request may close these issues.

4 participants