[V3] Major dependency update #1974

Merged
Tobotimus merged 29 commits from V3/refactor_deps into V3/develop 2018-08-15 04:10:55 +02:00
Tobotimus commented 2018-08-03 09:07:39 +02:00 (Migrated from github.com)

Alright, so this is the major dependency update we've been waiting for. These are the details of new dependency versions:

  • discord.py pinned to commit Rapptz/discord.py@8ccb98d395
  • Other dependencies and sub-dependencies have all been pinned as shown in the updated setup.py
  • The same has been done with sub-dependencies in the extras (including dev dependencies). I know we've talked a bit about changing how we're treating extras but that's part of the tox vs pipenv discussion.

Other changes (these are up for discussion)

  • I removed requirements.txt and put our requirements into setup.py. This seems to be the way python libraries and applications are doing it these days, requirements.txt is being retired and replaced by things like Pipfile.
  • discord.py>=1.0.0a0 is listed as a dependency in the requirements and is removed when on READTHEDOCS (since it seems to cause issues there, but nowhere else). Previously, it was being added if we weren't on READTHEDOCS. This makes it clearer that it is in fact a requirement for installation and deployment.
  • distro is installed conditionally using PEP 508 environment markers, which have actually been around for a while.
  • setup_requires has been removed - it's no longer required for the package to be installed correctly.
  • Added a __name__ == '__main__' guard to setup.py, although it's not entirely necessary it might be useful one day to import the module from another one.
  • python_version has been updated to >=3.6,<3.8 to allow the use of python 3.7. The bot itself, and all of its dependencies, are no longer incompatible with python 3.7. 🎉

Accounting for breaking changes

This PR shouldn't bring any breaking changes to this library. However, there were breaking changes in aiohttp-json-rpc and discord.py which needed accounting for. We might need to keep an eye on how these have been dealt with (specifically RPC, sorry @tekulvw) in case something's been done incorrectly.

Alright, so this is the major dependency update we've been waiting for. These are the details of new dependency versions: - discord.py pinned to commit Rapptz/discord.py@8ccb98d395537b1c9acc187e1647dfdd07bb831b - Other dependencies and sub-dependencies have *all* been pinned [as shown in the updated setup.py](https://github.com/Cog-Creators/Red-DiscordBot/pull/1974/files?utf8=%E2%9C%93&diff=unified#diff-2eeaed663bd0d25b7e608891384b7298R16) - The same has been done with sub-dependencies in the extras (including dev dependencies). I know we've talked a bit about changing how we're treating extras but that's part of the tox vs pipenv discussion. ### Other changes (these are up for discussion) - I removed requirements.txt and put our requirements into setup.py. This seems to be the way python libraries and applications are doing it these days, requirements.txt is being retired and replaced by things like Pipfile. - discord.py>=1.0.0a0 is listed as a dependency in the requirements and is removed when on `READTHEDOCS` (since it seems to cause issues there, but nowhere else). Previously, it was being *added* if we weren't on `READTHEDOCS`. This makes it clearer that it is in fact a requirement for installation and deployment. - `distro` is installed conditionally using [PEP 508 environment markers](https://www.python.org/dev/peps/pep-0508/#environment-markers), which have actually been around for a while. - `setup_requires` has been removed - it's no longer required for the package to be installed correctly. - Added a `__name__ == '__main__'` guard to setup.py, although it's not entirely necessary it might be useful one day to import the module from another one. - `python_version` has been **updated to `>=3.6,<3.8` to allow the use of python 3.7**. The bot itself, and all of its dependencies, are no longer incompatible with python 3.7. :tada: ### Accounting for breaking changes This PR shouldn't bring any breaking changes to this library. However, there were breaking changes in aiohttp-json-rpc and discord.py which needed accounting for. We might need to keep an eye on how these have been dealt with (specifically RPC, sorry @tekulvw) in case something's been done incorrectly.
palmtree5 (Migrated from github.com) reviewed 2018-08-03 09:07:39 +02:00
tekulvw (Migrated from github.com) reviewed 2018-08-03 09:07:39 +02:00
Twentysix26 (Migrated from github.com) reviewed 2018-08-03 09:07:39 +02:00
Kowlin (Migrated from github.com) reviewed 2018-08-03 09:07:39 +02:00
aikaterna (Migrated from github.com) reviewed 2018-08-03 09:07:39 +02:00
mikeshardmind (Migrated from github.com) reviewed 2018-08-03 11:15:09 +02:00
mikeshardmind (Migrated from github.com) commented 2018-08-03 11:15:09 +02:00

Since this will allow 3.7 usage, this should also include a 3.7 identifier for pypi

Since this will allow 3.7 usage, this should also include a 3.7 identifier for pypi
Tobotimus commented 2018-08-03 11:49:07 +02:00 (Migrated from github.com)

I've added the 3.7 pypi classifier, and also added a 3.7 build to tox and travis. Unfortunately with Travis, they don't have an option to use v3.7.0 of python, the latest 3.7 one they have is 3.7-dev which is actually 3.7.0a4. This'll have to do for now though.

The build failures are coming from tox trying to install a non-existent version of red-lavalink: this'll be fixed once that release has been made.

I've added the 3.7 pypi classifier, and also added a 3.7 build to tox and travis. Unfortunately with Travis, they don't have an option to use v3.7.0 of python, the latest 3.7 one they have is 3.7-dev which is actually 3.7.0a4. This'll have to do for now though. The build failures are coming from tox trying to install a non-existent version of red-lavalink: this'll be fixed once that release has been made.
calebj commented 2018-08-03 16:51:46 +02:00 (Migrated from github.com)

ClientSession.close() is async-only now, so these need to be moved to async or changed to detach():

`ClientSession.close()` is async-only now, so these need to be moved to async or changed to `detach()`: - [redbot/pytest/core.py:181](https://github.com/Tobotimus/Red-DiscordBot/blob/7881630671df581efef4f184e35484a7f3f69c2f/redbot/pytest/core.py#L181) - [redbot/cogs/image/image.py:27](https://github.com/Tobotimus/Red-DiscordBot/blob/7881630671df581efef4f184e35484a7f3f69c2f/redbot/cogs/image/image.py#L27) - [redbot/cogs/audio/audio.py:1929](https://github.com/Tobotimus/Red-DiscordBot/blob/7881630671df581efef4f184e35484a7f3f69c2f/redbot/cogs/audio/audio.py#L1929)
Redjumpman commented 2018-08-03 18:05:26 +02:00 (Migrated from github.com)

The only thing I found at the moment is the issue with ClientSession.close() as @calebj pointed out. I'll continue testing as this PR evolves.

The only thing I found at the moment is the issue with `ClientSession.close()` as @calebj pointed out. I'll continue testing as this PR evolves.
Tobotimus commented 2018-08-04 07:44:07 +02:00 (Migrated from github.com)

The aiohttp.ClientSession.close() calls in sync code have been changed to detach() calls as requested

The `aiohttp.ClientSession.close()` calls in sync code have been changed to `detach()` calls as requested
mikeshardmind (Migrated from github.com) reviewed 2018-08-04 23:35:03 +02:00
@ -6,24 +6,27 @@
[tox]
mikeshardmind (Migrated from github.com) commented 2018-08-04 23:35:03 +02:00

This wont work as a dependency link anymore. Something changed on github's redirection and this breaks now.

fatal: unable to update url base from redirection:
  asked for: https://github.com/Rapptz/discord.py/tarball/f06563cb3520058c900ba6d4921ce38f2407b729/info/refs?service=git-upload-pack
   redirect: https://codeload.github.com/Rapptz/discord.py/legacy.tar.gz/f06563cb3520058c900ba6d4921ce38f2407b729

Link format should no longer point to an archive, but a commit as part of a repo.

git+https://github.com/Rapptz/discord.py@f06563cb3520058c900ba6d4921ce38f2407b729#egg=discord.py1.0.0a

Or we need to adjust the archive link and hope it doesn't change again. I don't like relying on that, and the redirection behavior to remain the same.

This wont work as a dependency link anymore. Something changed on github's redirection and this breaks now. ``` fatal: unable to update url base from redirection: asked for: https://github.com/Rapptz/discord.py/tarball/f06563cb3520058c900ba6d4921ce38f2407b729/info/refs?service=git-upload-pack redirect: https://codeload.github.com/Rapptz/discord.py/legacy.tar.gz/f06563cb3520058c900ba6d4921ce38f2407b729 ``` Link format should no longer point to an archive, but a commit as part of a repo. ``` git+https://github.com/Rapptz/discord.py@f06563cb3520058c900ba6d4921ce38f2407b729#egg=discord.py1.0.0a ``` Or we need to adjust the archive link and hope it doesn't change again. I don't like relying on that, and the redirection behavior to remain the same.
Tobotimus (Migrated from github.com) reviewed 2018-08-07 09:04:05 +02:00
@ -6,24 +6,27 @@
[tox]
Tobotimus (Migrated from github.com) commented 2018-08-07 09:04:04 +02:00

I don't seem to be able to reproduce the issue.

I'm not really sure if git+ links work as dependency links for a package in setup.py. But even if they did, they require all users to have git installed when installing the bot.

I don't seem to be able to reproduce the issue. I'm not really sure if `git+` links work as dependency links for a package in setup.py. But even if they did, they require all users to have git installed when installing the bot.
mikeshardmind (Migrated from github.com) reviewed 2018-08-07 16:46:51 +02:00
@ -6,24 +6,27 @@
[tox]
mikeshardmind (Migrated from github.com) commented 2018-08-07 16:46:51 +02:00

I went to get full reproduction steps and can't anymore either. I'll keep an eye out for if it comes up again in some way later on at which point it can be addressed, but until I can reproduce it even semi-consistently, this can be ignored for now.

Worth noting, git is a listed dependency in all our documentation and installation instructions due to downloader's use of it.

I went to get full reproduction steps and can't anymore either. I'll keep an eye out for if it comes up again in some way later on at which point it can be addressed, but until I can reproduce it even semi-consistently, this can be ignored for now. Worth noting, git is a listed dependency in all our documentation and installation instructions due to downloader's use of it.
Redjumpman commented 2018-08-12 21:46:31 +02:00 (Migrated from github.com)

Any news on when we might see the websockets version bump via #36 on Red-Lavalink merged?

Any news on when we might see the websockets version bump via #36 on Red-Lavalink merged?
Tobotimus commented 2018-08-13 02:48:06 +02:00 (Migrated from github.com)

@Redjumpman Whenever we hold a gun to someone's head and tell them to press the big green button 😁

@Redjumpman Whenever we hold a gun to someone's head and tell them to press the big green button :grin:
Tobotimus commented 2018-08-13 06:40:31 +02:00 (Migrated from github.com)

This is no longer blocked!

I've gone and done some extra stuff now. Here are the details:

  • Travis is now building on the Xenial distribution so we can test with python 3.7.0
  • Travis no longer does a pipenv install --dev at the start, since the only dependency it needs is tox. Now it just installs and runs tox.
  • I've included a dependency_links.txt file and added it to the MANIFEST.in because we're starting to copy the discord.py commit hash all over the place. This serves as a single place to change the commit hash whenever we update our discord.py version, and is used by tox, setup.py and RTD.
  • I've removed docs/requirements.txt as it's more boilerplate which is no longer needed - we can have RTD install the docs extra instead.
  • The [dev-packages] in Pipfile now just reference the extras [test,docs,style] since this reduces more boilerplate, and it seems to work fine.
This is no longer blocked! I've gone and done some extra stuff now. Here are the details: - Travis is now building on the Xenial distribution so we can test with python 3.7.0 - Travis no longer does a `pipenv install --dev` at the start, since the only dependency it needs is tox. Now it just installs and runs tox. - I've included a `dependency_links.txt` file and added it to the `MANIFEST.in` because we're starting to copy the discord.py commit hash all over the place. This serves as a single place to change the commit hash whenever we update our discord.py version, and is used by tox, setup.py and RTD. - I've removed docs/requirements.txt as it's more boilerplate which is no longer needed - we can have RTD install the `docs` extra instead. - The `[dev-packages]` in Pipfile now just reference the extras `[test,docs,style]` since this reduces more boilerplate, and it seems to work fine.
mikeshardmind (Migrated from github.com) requested changes 2018-08-14 03:17:26 +02:00
mikeshardmind (Migrated from github.com) left a comment

Beyond needing to specify the versioning in discord.py to get it to install without using a cached version, I haven't found any breakage on python3.6 or python3.7 in any of the core cogs. This has a 👍 from me pending that change.

Beyond needing to specify the versioning in discord.py to get it to install without using a cached version, I haven't found any breakage on python3.6 or python3.7 in any of the core cogs. This has a :+1: from me pending that change.
@ -0,0 +1 @@
https://github.com/Rapptz/discord.py/tarball/8ccb98d395537b1c9acc187e1647dfdd07bb831b#egg=discord.py-1.0.0a0
mikeshardmind (Migrated from github.com) commented 2018-08-14 03:11:53 +02:00

This needs to be listed as

https://github.com/Rapptz/discord.py/tarball/8ccb98d395537b1c9acc187e1647dfdd07bb831b#egg=discord.py-1.0.0a

or else this: https://gist.github.com/mikeshardmind/2c84190bc3d972e18b5566928a4627f6
happens

I'm also going to continue the prior recommendation on this being changed to the below, but the above is sufficient.

git+https://github.com/Rapptz/discord.py@8ccb98d395537b1c9acc187e1647dfdd07bb831b#egg=discord.py-1.0.0a
This needs to be listed as ``` https://github.com/Rapptz/discord.py/tarball/8ccb98d395537b1c9acc187e1647dfdd07bb831b#egg=discord.py-1.0.0a ``` or else this: https://gist.github.com/mikeshardmind/2c84190bc3d972e18b5566928a4627f6 happens I'm also going to continue the prior recommendation on this being changed to the below, but the above is sufficient. ``` git+https://github.com/Rapptz/discord.py@8ccb98d395537b1c9acc187e1647dfdd07bb831b#egg=discord.py-1.0.0a ```
Tobotimus (Migrated from github.com) reviewed 2018-08-14 04:41:07 +02:00
@ -0,0 +1 @@
https://github.com/Rapptz/discord.py/tarball/8ccb98d395537b1c9acc187e1647dfdd07bb831b#egg=discord.py-1.0.0a0
Tobotimus (Migrated from github.com) commented 2018-08-14 04:41:07 +02:00

Good catch @mikeshardmind, just fixed that up. Gonna stick to a tarball link for now though.

Good catch @mikeshardmind, just fixed that up. Gonna stick to a tarball link for now though.
mikeshardmind (Migrated from github.com) approved these changes 2018-08-14 19:06:02 +02:00
mikeshardmind (Migrated from github.com) left a comment

This looks ready to ship now.

This looks ready to ship now.
calebj (Migrated from github.com) approved these changes 2018-08-14 19:27:33 +02:00
calebj (Migrated from github.com) left a comment

I also agree that this is ready.

I also agree that this is ready.
Redjumpman (Migrated from github.com) approved these changes 2018-08-14 23:17:56 +02:00
Redjumpman commented 2018-08-14 23:18:03 +02:00 (Migrated from github.com)

+1 from me now.

+1 from me now.
Tobotimus commented 2018-08-15 04:10:17 +02:00 (Migrated from github.com)

Alright, this is being merged 🎉 Thanks @Redjumpman @calebj and @mikeshardmind for reviewing :)

Alright, this is being merged :tada: Thanks @Redjumpman @calebj and @mikeshardmind for reviewing :)
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!1974
No description provided.