API changes:
- Cogs must now inherit from `commands.Cog` (see #2151 for discussion and more details)
- All functions which are not decorators in the `redbot.core.checks` module are now deprecated in favour of their counterparts in `redbot.core.utils.mod`. This is to make this module more consistent and end the confusing naming convention.
- `redbot.core.checks.check_overrides` function is now gone, overrideable checks can now be created with the `@commands.permissions_check` decorator
- Command, Group, Cog and Context have some new attributes and methods, but they are for internal use so shouldn't concern cog creators (unless they're making a permissions cog!).
- `__permissions_check_before` and `__permissions_check_after` have been replaced: A cog method named `__permissions_hook` will be evaluated as permissions hooks in the same way `__permissions_check_before` previously was. Permissions hooks can also be added/removed/verified through the new `*_permissions_hook()` methods on the bot object, and they will be verified even when permissions is unloaded.
- New utility method `redbot.core.utils.chat_formatting.humanize_list`
- New dependency [`schema`](https://github.com/keleshev/schema)
User-facing changes:
- When a `@bot_has_permissions` check fails, the bot will respond saying what permissions were actually missing.
- All YAML-related `[p]permissions` subcommands now reside under the `[p]permissions acl` sub-group (tbh I still think the whole cog has too many top-level commands)
- The YAML schema for these commands has been changed
- A rule cannot be set as allow and deny at the same time (previously this would just default to allow)
Documentation:
- New documentation for `redbot.core.commands.requires` and `redbot.core.checks` modules
- Renewed documentation for the permissions cog
- `sphinx.ext.doctest` is now enabled
Note: standard discord.py checks will still behave exactly the same way, in fact they are checked before `Requires` is looked at, so they are not overrideable.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* [V3] Stop `tmp` dir showing up
* [V3] Remove requirements.txt and declare in install_requires
* Remove requirements.txt from tox.ini
* Update and pin all dependencies and sub-dependencies
* Update for breaking changes
* Reformat
* Update docs/requirements.txt and tox.ini requirements
* Add 3.7 to identifiers and travis/tox builds
* Attempt at fixing the travis build matrix
* Attempt #2
* Attempt 3
* aiohttp.ClientSession.close() -> detach() in sync code
* Add raven-aiohttp to requirements
* Fix stuff in setup.py
- Added discord.py back into requirements list
- Fix typo in alabaster extra requirement
Also in the Pipfile:
- Removed allow_prereleases and explicitly pinned black, since this is the only dep we want a prerelease for.
* Update to Rapptz/discord.py@8ccb98d395
* Add proper 3.7 build in Travis
See travis-ci/travis-ci#9815
* Which version of 3.6 does Xenial install then?
* Maybe we should stop pipenv installing useless stuff
* Nevermind, back to specific minor version
* Remove lots of WET dependency stuff
* Fix egg fragment for dependency link
* Configure tox environments for install, dev install and docs build
* Configure Travis to run tox
* Use 3.5.1 since it's our minimum supported version
* Bump lower travis build version to 3.5.2
Turns out a dependency is incompatible with 3.5.1.
* Modify Travis config to install from pipenv
* Try without skipping the lock
* Try without pip cache
* D the dev install with pipenv
* See if adding the pip cache back in breaks
* Remove the development installation
It doesn't really make any sense considering we already should be installed in develop mode, as does Travis.
* Oops, tox should go under dev packages
* Do black --check with tox
* Uncache pip again...
* Try a build matrix, and try ignoring virtualenvs
* Activate pipenv shell on travis
* Try installing prereleases
* Try the build matrix like this
* Try exclusion
* Upgrade pip
* Try this environment marker
* Back to stages...
* Try run over shell
* Try skipping the lock again
* This'll be faster but probably ignore 3.5
Because Travis
* Just manually list sources for black to check
* Magic?
* What if I told you...
That this worked perfectly on Tobotimus/Red-DiscordBot@test_travis_matrix
* It couldn't possibly be this easy
* Let's add some comments to be nice
* Let's change back to trusty just in case the stages fuck up
* Add another comment because why not
* Let's try caching pip one more time
* We don't need to whitelist these