Updates Sir-lancebot To Python3.9.4#683
Conversation
- typing.List[] to list[] - typing.Dict[] to dict[] - typing.Tuple[] to tuple[]
- Adds `linesep` parameter to LinePaginator.
Update typehints and a few asyncio Methods to Python 3.9
|
Merged |
HassanAbouelela
left a comment
There was a problem hiding this comment.
Preliminary block on this PR (I have not reviewed the actual content yet). This PR can not be merged yet, for the same reason our other projects can not be migrated. A lot of the dependencies you've bumped do not have wheels for 3.9 yet, which means these changes are not acceptable through no fault of your own. Without wheels, you need build tools, which significantly hurts people contributing on systems that don't have them by default (such as windows), and will not work in our CI. You can test the state of these current deps using the docker image.
This is not entirely correct, I tested it on docker and with pipenv, the only dependency which doesn't have python3.9 wheels is |
|
Way too many conflicts. Best to make a new PR. |
Closes #549
This PR upgrades the Python version we use for the bot to Python 3.9.4. One of the major upgrades this offers for us is that we can now use
list[dict[str, str]]rather than importingtypingmodule and then doing those uglytyping.List[Typing.Dict[str, str]]annotations.Changes to be aware of
Bumps Python to 3.9 in Pipfile & lock and Docker.
Bumps all dependencies to the latest version, which support
python3.9and solve the breaking changes onlyAdds super class call to
LinePaginator, discord.py addslinesepargument to thePaginatorin v1.7.0.typingmodule has deprecatedIterator,Mapping,Callable,Containerin python3.9, and they have to be imported fromcollections.abcrather now.asyncio.ensure_futurehas been changed toasyncio.create_taskas it is a higher level function and is more readable, and preferred overasyncio.ensure_futureloop.run_in_executorhas been changed toasyncio.to_thread. It is mainly used for running IO-bound functions in a separate thread to avoid blocking the event loop, and essentially works as a high-level version ofrun_in_executor()that can directly take keyword arguments.Dependency Tracker
[REMOVED] All dependencies have been tested and updated by myself and @ToxicKidz