Also made the Makefile work slightly nicer with other tools, e.g. IDE run configurations, by allowing the python executable to be set as an env var.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
- uvloop is now a dependency on non-Windows CPython systems
- `make setupenv` renamed to `make newenv`
- `make syncenv` added to sync local venv to current dependencies
- `dev-requirements.txt` moved into `tools` directory
### Replacement for pipenv's environment setup
First of all, there's a new Make recipe for all devs and contributors on both Windows and Posix, `make setupenv`, which is kind of a replacement for `pipenv install --dev`. It creates a virtual environment in `.venv` using the inbuilt `venv` module, clearing out any existing virtual environment if needed first. Then it installs all dev dependencies using our new `dev-requirements.txt` file. `CONTRIBUTING.md` has been updated to reflect all of this.
### Dependency version bumping tool
Secondly, I've added a python script, `tools/bumpdeps.py` to help with bumping dependency versions. It has its own Make recipe too, `make bumpdeps`. This script won't work on Windows (yet). It reads the `tools/primary_deps.ini` file, which contains the primary requirements of Red and its extras with loose version specifiers, and outputs all pinned dependencies, in `setup.cfg` format. It's not a foolproof dependency resolver, it's quite simple, but it's bound to help out a lot. It'll try to give warnings if there might be a version conflict, but updating `setup.cfg` with its output and then doing `pip install -r dev-requirements.txt` will allow pip to issue warnings if something is conflicting.
So to add a new dependency, add it to `tools/primary_deps.ini` in the appropriate place, and either use `make bumpdeps` to completely update all dependencies, or simply add it to `setup.cfg` manually with its sub-dependencies, and all versions pinned.
### Sphinx 2.1.2 (docs changes)
The sphinx update brought along the ability to disable type annotations being rendered in function and method signatures, and I have gladly gone and done that. Type annotations should already be specified under the "Parameters" section, and the way sphinx renders them in function signatures makes them much harder to read.
Also, documented classes will now display what classes they inherit from.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Dependency update
discord.py==1.0.1
websockets<7
[style]
black==19.3b0
[Docs]
jinja==2.10.1
urllib3==1.24.2
Changes related to breaking changes from discord.py have also been made
to match
As of this commit, help formatter is back to discord.py's default
This is in anticipation of #2246, although I've written that PR to not break on 3.6, the feature itself is not usable on 3.6. So I think the best way forward is to simply require python 3.7. This also allows devs and cog creators to utilise all of the new features in 3.7, and it also updates the docs so all operating systems will have 3.7 installed.
Signed-off-by: Toby <tobyharradine@gmail.com>
* Set 3.6.6 as minimum python version on Windows
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Conditional python_requires in setup.py
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Should probably add the comment too
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Correct minimum version
see #2092
While this is needed because of an import just for typing, I see no reason not to bump the minimum version since this is a minor version difference since this is several minor version behind the latest 3.6, and there have been both security and performance improvements since.
That said, we need to be testing on our lowest supported version to ensure we don't have this happen again, right now our tests run on whatever Travis grabs for 3.6, which I assume is 3.6.6, but could be wrong.
* Update other mentions of min version to 3.6.2
* Add output sanitization defaults to context.send
Add some common regex filters in redbot.core.utils.common_filters
Add a wrapper for ease of use in bot.send_filtered
Sanitize ModLog Case's user field (other's considered trusted as moderator input)
Sanitize Usernames/Nicks in userinfo command.
Santize Usernames in closing of tunnels.
* Add documentation
* [V3 Warnings] clarify text on entering commands
* Fix up action commands and allow for no command on both add and remove
* Notify warned user when they receive a warning + disallow warning and unwarning self
* Add myself to COOWNERS for the warnings cog
* basic caching layer
* bit more work, now with an upper size to the cache
* cache fix
* smarter cache invalidation
* One more cache case
* Put in a bare skeleton of something else still needed
* more logic handling improvements
* more work, still not finished
* mass-resolve is done in theory, but needs testing
* small bugfixin + comments
* add note about before/after hooks
* LRU-dict fix
* when making comments about optimizations, provide historical context
* fmt pass
* This starts setting up checks.py to handle managed permission overrides
* A decent starting point, more work to come
* missing else fix
* more work on this
* reduce redundant code
* More work on this...
* more progress
* add a debug flag to some things in .resolvers to help with exploring why checks behave in a certain way
* modify this to be a list for ease of showing full resolution order
* more
* don't bypass is_owner, ever
* remove old logic about ownercommands
* better handling of chec validity
* anonymous functions return None for __module__, remove some code as a result
* mutable default bind fix
* Add a caching layer (to be invalidated as needed)
Ensure checks in the chain inserted before the core logic only return None or False
(whitelists then blacklists are checked first in core logic, from most to least specific scope, overriding this with an allow does not make sense)
* more progress, slow work as I have time
* Modifies the predicates so that their inner functions are accesible from cogs without
being a check
* Update checks.py
Safety for existing permissions.py cogs
* This is where I take a change of course on setting this up,
because this would have been the most long winded interactive command ever as
it was starting to progress.
This is going to support individual entry updates, settings from yaml, gettings, and clearing existing settings
as well as printing a settings template out and referring people to what is going to be very well written docs
* block permissions cog from being unblocked by the permissions cog as a safety feature (really, co-owner exists at this point)
* WIP
* Okay, this has the intent of the changes, just to actually test these as working as intended + add corresponding guild functions
* oh nice, missed a couple files, sec...
* WIP, also, something's broken in resolvers or check_overrides >>
* This is working now (still needs docs and more...)
* unmerge changes from other PR
* is_owner still needs to exist in here due to management of non checked commands
* Update this to new style standards
* forgot to commit some local changes earlier
* fix update logic
* fix update logic
* b14 fix, lol
* fix issue with management command name
* this isnt a real fix
* Ok..
* perms
* This is working, but needs docs and more configuration opts now
* more
* Ux functions, need testing
* style
* fix using the obj str rather than the id
* fix CogOrCommand converter
* Return the correct things in the converter
* last fix, needs docs, and possibly some extra Ux utils
* start doc writing
* extra user facing commands
* yaml docs
* yaml fix
* secondary checks-fix
* 3rd party check stuff
* remove warning that this isn't ready yet
* swap ctx.tick for real responses, require emoji perms for interactive menuing, better attr handling for nicknames
* send file to author
* alias to `p`
* more ctx tick removal
(This is a long ass changelog...)
* Update CONTRIBUTING.md with details on new dev workflow
* Fix typos
* Update link in README.rst
* tiny grammar fix
* Specify the line length
* Update CONTRIBUTING.md
* Fix links in contents
* Add section for keeping dependencies up-to-date
* Include notes about Makefile
* Okay, let's fix the issues here hopefully.
* This is working now
* Unfinished, and needs a lot of testing.
* more work
* working
* minor thing to remove
* improve i18n and usage feedback
* More docstrings
* still not ready...
* push this untested pile of code.
* working, menu needs cleaning up though, modlog converter not here yet
* menu cleanup
* add note about the fact that values are overwritten
* add i18n
* User friendlier quitting
* Better naming of a function
* setup automodule for dataconverter
* More documentation
* use Config.MEMBER (etc) instead of 'MEMBER' (etc)
* Initial commit
* Fix sentry
* Make cog manager install path work relative to the bot's dir
* Fix downloader to save data relative to the defined data folder
* Fix sentry test
* Fix downloader tests
* Change logfile location
* Add another line to codeowners
* Basic tests
* Fix versioning
* Add in FutureWarning for config file changes
* Add reference to issue
* WIP cog path manager
* Initial working state
* Get real reloading working
* Type error thingy
* And fix the tests
* Start UI shit
* path reordering
* Add install path getter/setter and fix config syntax
* Determine bot directory at runtime
* Add UI commands for install path
* Update downloader to use install path
* Add sane install path default
* Make evaluation of cog install path lazy
* Some typing fixes
* Add another line to codeowners
* Conditionally put install path in paths
* Always put install path first
* Dont allow people to add the installdir as an additional path, guarantee install dir isn't shown with paths command
* Make shit update loaded cogs
* Add tests
* Another one