Skip to content
Permalink
Branch: V3/develop
Commits on Nov 19, 2019
  1. [Downloader] Make `Repo.clean_url` work with relative urls. (#3142)

    jack1142 authored and mikeshardmind committed Nov 19, 2019
    * fix(downloader): return string, catch ValueError for relative urls
    
    * chore(changelog): add towncrier entry
Commits on Nov 17, 2019
  1. chore(changelog): fix wrong references in changelog entries for Downl…

    jack1142 authored and Kowlin committed Nov 17, 2019
    …oader (#3130)
  2. [Downloader] Add `Repo.clean_url` and use it in `[p]findcog` (#3129)

    jack1142 authored and mikeshardmind committed Nov 17, 2019
    * enhance(downloader): add `Repo.clean_url` and use it in `[p]findcog`
    
    * chore(changelog): add towncrier entries
Commits on Nov 15, 2019
  1. [Docs] Add information about ``info.json``'s ``min_python_version`` k…

    jack1142 authored and Kowlin committed Nov 15, 2019
    …ey in Downloader Framework page. (#3125)
    
    * docs(downloader): add missing `min_python_version` key
    
    * chore(changelog): add towncrier entry
Commits on Nov 14, 2019
  1. [Audio] Stop player before destroying on emptydisconnect (#3119)

    jack1142 authored and mikeshardmind committed Nov 14, 2019
    * fix(audio): stop player before disconnect in emptydisconnect
    
    * chore(changelog): add towncrier entry
Commits on Nov 8, 2019
  1. [Core] Add `redbot --edit` cli flag (replacement for `[p]set owner&to…

    jack1142 authored and mikeshardmind committed Nov 8, 2019
    …ken`) (#3060)
    
    * feat(core): add `redbot --edit` cli flag
    
    * chore(changelog): add towncrier entries
    
    * refactor(core): clean up `redbot --edit`, few fixes
    
    * fix(core): prepare for review
    
    * chore(changelog): update towncrier entry to use double ticks :p
    
    * style(black): ugh, Sinbad's git hook isn't perfect (using worktrees)
    
    * fix: Address Flame's first review
  2. [V3 Downloader] Revision tracking (#2571)

    jack1142 authored and mikeshardmind committed Nov 8, 2019
    * feat(downloader): Install cog from specific commit in repo (initial commit)
    
    - Repo and Installable have commit property now
    - New class inheriting from Installable -
    InstalledCog (old one from converters.py removed)
    - New Repo.checkout() method, which is also async ctx manager
    ref #2527
    
    * fix(downloader): Keep information about repo's branch in config
    
    - This is needed to make sure that repo can go back from detached state in some rare unexpected
    cases
    - current branch is determined by `git symbolic-ref` now as this command errors for detached
    HEAD
    
    * feat(downloader): Update repo without cogs, update single cog
    
    The most important part of issue #2527 has been added here
    - `[p]repo update` command added
    - new conf format - nested dictionary repo_name->cog_name->cog_json
      installed libraries are now kept in conf too
      - `InstalledCog` renamed to `InstalledModule` - installed libraries use this class
      - `Downloader.installed_libraries()` and `Downloader.installed_modules()` added
      - `Downloader._add_to_installed()` and `Downloader._remove_from_installed()`
        now accept list of modules, of both cogs and libraries
    - `[p]cog install` tells about fails of copying cog and installing shared libraries
    - `[p]cog update` will truly update only chosen cogs (if provided) or cogs that need update
      - pinned cogs aren't checked
      - before update, repos are updated
      - to determine if update is needed `Repo.get_modified_modules()` is used
    - `[p]cog pin` and `[p]cog unpin` commands for pinning/unpinning cogs added
    - `Repo.checkout()` allows to choose ctx manager exit's checkout revision
    - `Repo.install_cog()` returns `InstalledModule` now and raises CopyingError (maybe breaking?)
    - `Repo.install_libraries()` returns 2-tuple of installed and failed libraries (maybe breaking?)
    - `RepoManager.get_all_cogs()` added, which returns cogs from all repos
    - `RepoManager.repos` property added, which contains tuple of `Repo`
    
    * test(downloader): Repo.current_branch() throws an exception, when branch can't be determined
    
    * style(downloader): rename _add_to_installed to _save_to_installed
    
    This method is used for both adding and updating existing modules in Config
    
    * refactor(downloader): add ctx.typing() for few commands
    
    `[p]cog install` is nested hell, can't wait for moving install logic to separate method
    
    * fix(downloader): refactor and fix `set` usage
    
    * perf(downloader): update commits for ALL checked modules to omit diffs next time
    
    This will also disable running git diff for cogs that have the same commit as the latest one
    
    * style(downloader): few style improvements
    
    - use of mutable object in method definition
    - make Repo._get_full_sha1() public method
    - too long
    line
    - don't use len to check if sequence is empty
    
    * feat(downloader): add `[p]cog updateallfromrepos` and `[p]cog updatetoversion` commands
    
    - moved cog update logic into `Downloader._cog_update_logic()` (lack of better name)
      - splitted
    whole cog update process into smaller methods
      - might still need some improvements
    - added new
    methods to `Repo` class:
      - `is_on_branch()` to check if repo is currently checked out to branch
    
    - `is_ancestor()` to check if one commit is ancestor of the other
    - fix for
    `Downloader._available_updates()` behaviour
    broken by commit
    5755ab0
    
    * feat(downloader): try to find last commit where module is still present
    
    Enhancements:
    - `Installable` now has `repo` attribute containing repo object or `None` if repo is
    missing
    - `Downloader._install_cogs()` and `Downloader._reinstall_libraries()` are able to install
    modules from different commits of repo
    - `Repo.checkout()` as ctx manager will now exit to commit
    which was active before checking out
    - unification of `rev` and `hash` terms:
    All function
    parameters are explicitly called `hash`, if it can only be commit's full sha1 hash or `rev` if it
    can be anything that names a commit object, see
    [link](https://git-scm.com/docs/git-rev-parse#_specifying_revisions)
    - new
    `Repo.get_last_module_occurence()` method, which gets module's Installable from last commit in which
    it still occurs
    
    * docs(downloader): Add basic description for `InstalledModule`
    
    * fix(downloader): cog ignored during updates if its commit was missing
    
    After config format update, commit string is empty until update and when such cog was checked and it
    wasn't available in repo anymore, it was ignored
    
    * refactor(downloader): Installing cogs from specific rev will pin them
    
    * perf(downloader): Don't checkout when current commit equals target hash
    
    - changes to `Repo.checkout()`:
      - `exit_to_rev` is now keyword only argument
      - added
    `force_checkout` to force checkout even if `Repo.commit` value is the same as target hash
    
    * refactor(downloader): Repo._run() stderr is redirected to debug log now
    
    - added two keyword arguments:
      - `valid_exit_codes` which specifies valid exit codes, used to
    determine if stderr should be sent as debug or error level in logging
      - `debug_only` which
    specifies if stderr can be sent only as debug level in logging
    
    * style(downloader): stop using `set` as arg name in `_load_repos()`
    
    * feat(downloader): pass multiple cogs to `[p]cog (un)pin`
    
    * refactor(downloader): accept module name instead of instance, fix spelling
    
    * style(downloader): few small style changes
    
    * fix(downloader): add type annotations + fixes based on them
    
    - fix wrong type annotations and add a lot of new ones
    - add checks for `Installable.repo` being `None`
    - fix wrong return type in `Downloader._install_requirements`
    - show repo names correctly when updating all repos
    - fix error when some requirement fails to install
    
    BREAKING CHANGE:
    - type of `Repo.available_modules` is now consistent (always `tuple`)
    
    * tests: use same event loop policy as in Red's code
    
    * enhance(downloader): fully handle ambiguous revisions
    
    * build(deps): add pytest-mock dependency to tests extra
    
    * fix(downloader): minor fixes
    
    * feat(downloader): add tool for editing Downloader's test repo
    
    This script aims to help update the human-readable version of repo
    used for git integration tests in ``redbot/tests/downloader_testrepo.export``
    by exporting/importing it in/from provided directory.
    
    Note
    ----
    Editing `downloader_git_test_repo.export` file manually is strongly discouraged,
    especially editing any part of commit directives as that causes a change in the commit's hash.
    Another problem devs could encounter when trying to manually edit that file
    are editors that will use CRLF instead of LF for new line character(s) and therefore break it.
    
    I also used `.gitattributes` to prevent autocrlf from breaking testrepo.
    
    Also, if Git ever changes currently used SHA-1 to SHA-256 we will have to
    update old hashes with new ones. But it's a small drawback,
    when we can have human-readable version of repo.
    
    Known limitations
    -----------------
    ``git fast-export`` exports commits without GPG signs so this script disables it in repo's config.
    This also means devs shouldn't use ``--gpg-sign`` flag in ``git commit`` within the test repo.
    
    * tests(downloader): add git tests and test repo for them
    
    Also added Markdown file that is even more clear than export file
    on what the test repo contains.
    This is manually created but can be automated on later date.
    
    * test(downloader): add more tests related to RepoManager
    
    These tests use expected output that is already guaranteed by git tests.
    
    * chore(CODEOWNERS): add jack1142 to Downloader's folders
    
    I know this doesn't actually give any benefit to people that don't have
    write permission to the repo but I saw other big fella devs doing this,
    so I think this might be advisable.
    
    * enhance(downloader): allow easy schema updates in future
    
    * enhance(downloader): more typing fixes, add comments for clarity
    
    * feat(downloader): add python and bot version check to update process
    
    follow-up on #2605, this commit fully fixes #1866
    
    * chore(changelog): add towncrier entries
    
    * fix(downloader): use `*args` instead of `commands.Greedy`
    
    * fix(downloader): hot-reload issue - `InstallableType` now inherits from `IntEnum`
    
    There's desync of `InstallableType` class types due to hot-reload
    and `IntEnum` allows for equality check between different types
    
    * enhance(downloader): ensure there's no cog with same name installed
    
    should fix #2927
    
    * fix(downloader): last few changes before marking as ready for review
Commits on Oct 22, 2019
  1. [Core/Downloader] Add 3rd-party lib folder to `sys.path` before loadi…

    jack1142 authored and mikeshardmind committed Oct 22, 2019
    …ng cogs (#3062)
    
    * fix(core,downloader): add lib folder to sys.path before loading cogs
    
    * chore(changelog): add towncrier entry
    
    * fix(core): always append 3rd-party lib path to the end of `sys.path`
  2. [Docs] Add missing descriptions for function returns (#3054)

    jack1142 authored and mikeshardmind committed Oct 22, 2019
    * docs: add missing descriptions for function returns
    
    * chore(changelog): add towncrier entry
  3. [Docs] Link to Getting started guide at the end of installation guides (

    jack1142 authored and mikeshardmind committed Oct 22, 2019
    #3032)
    
    * docs: link to Getting started guide at the end of installation guides
    
    * chore(changelog): add towncrier entry
  4. [Audio] Restart Lavalink after unexpected shutdown (#3034)

    jack1142 authored and mikeshardmind committed Oct 22, 2019
    * fix(audio): lavalink not getting restarted after unexpected shutdown
    
    * chore(changelog): add towncrier entry
Commits on Oct 17, 2019
  1. [Docs] Change links to d.py docs to use pinned version instead of v1.…

    jack1142 authored and mikeshardmind committed Oct 17, 2019
    …0.1. (#3053)
    
    * docs: change links to d.py docs to use stable version instead of v1.0.1
    
    * chore(changelog): add towncrier entry
    
    * docs: add |DPY_VERSION| substitution and :dpy_docs: role
    
    * chore(changelog): update towncrier entries to reflect new changes
Commits on Oct 16, 2019
  1. [Core] Fix error message about guild-only command and add dm-only err…

    jack1142 authored and mikeshardmind committed Oct 16, 2019
    …or message (#3057)
    
    * enhance(core): fix guild-only error message, add dm-only error message
    
    * chore(changelog): add towncrier entries
Commits on Sep 28, 2019
  1. [Tunnel] Add `use_cached` and `images_only` kwargs to `files_from_att…

    jack1142 authored and mikeshardmind committed Sep 28, 2019
    …ach` (#2887)
    
    * feat(tunnel): add `use_cached` kwarg
    
    re #2885
    
    * feat(tunnel): add `images_only` kwarg
    
    re #2885
    
    * chore(changelog): add towncrier entry
  2. [Commands] `cls` parameter can now be passed to group like in d.py (#…

    jack1142 authored and mikeshardmind committed Sep 28, 2019
    …2881)
    
    * fix(commands): ``cls`` parameter can now be passed like in d.py
    
    * chore: add changelog entry
    
    * Update changelog.d/2881.misc.rst
    
    Co-Authored-By: Toby Harradine <Tobotimus@users.noreply.github.com>
    
    * Rename 2881.misc.rst to 2881.enhance.rst
  3. [Core] Give friendly error when provided instance name doesn't exist. (

    jack1142 authored and mikeshardmind committed Sep 28, 2019
    …#2969)
    
    * Update data_manager.py
    
    * Towncrier entry
  4. [Docs] Link directly to installing Red from installing requirements u…

    jack1142 authored and mikeshardmind committed Sep 28, 2019
    …sing chocolatey section (#2995)
    
    * docs: link directly to installing Red from installing using chocolatey
    
    * chore(changelog): add towncrier entry
Commits on Sep 9, 2019
  1. [Permissions] Possible solution for clearing out usage of commands wi…

    jack1142 authored and mikeshardmind committed Sep 9, 2019
    …th <who_or_what> (#2992)
    
    * style(permissions): clear out usage of commands with <who_or_what>
    
    * chore(changelog): add towncrier entry
    
    * style(permissions): fix black formatting
Commits on Sep 7, 2019
  1. [Core] Fix infinite typing for commands with cooldown (#2987)

    jack1142 authored and mikeshardmind committed Sep 7, 2019
    * fix(core): cooldown error can't reinvoke command (infinite typing issue)
    
    * chore(changelog): add towncrier entry
Commits on Aug 29, 2019
  1. [Core] Various fixes to `redbot-setup delete` (#2958)

    jack1142 authored and Tobotimus committed Aug 29, 2019
    - ``redbot-setup delete`` no longer errors about "unexpected keyword argument" (fix #2955)
    - ``redbot-setup delete`` no longer prompts about backup when user passes ``--no-prompt`` option (fix #2956)
    - ``--[no-]backup``, ``--[no-]drop-db`` and ``--[no-]remove-datapath`` in ``redbot-setup delete`` command are now on/off flags. ``--no-prompt`` was changed to flag too, but it doesn't have ``--prompt`` equivalent as there's no much point in having it
    - ``redbot-setup`` now uses `click.confirm` for confirmation prompts and thy now also have default values for user convenience
Commits on Aug 28, 2019
  1. [Utils] Stop using `:` in backup's filename - Windows doesn't accept …

    jack1142 authored and Tobotimus committed Aug 28, 2019
    …it (#2957)
Commits on Aug 27, 2019
  1. [Mod] Fix recording username changes (#2919)

    jack1142 authored and mikeshardmind committed Aug 27, 2019
    * fix(mod): past names are now properly recorded in `on_user_update` event
    
    * chore(changelog): add towncrier entry
    
    * chore(changelog): specify what commands were affected
Commits on Aug 20, 2019
  1. Add `pip-wheel-metadata` folder to `.gitignore` (#2941)

    jack1142 authored and Tobotimus committed Aug 20, 2019
Commits on Jul 14, 2019
  1. [Docs] Add awaits and missing imports in usage examples (#2860)

    jack1142 authored and Tobotimus committed Jul 14, 2019
    Well, the modlog examples had to be changed a lot, because `await` obviously won't work in regular method.
Commits on Jul 2, 2019
  1. [Downloader]: RepoManager: don't load repos in __init__ (#2829)

    jack1142 authored and Tobotimus committed Jul 2, 2019
    Loading repos is already done in initialize() method.
    This could actually turn out badly
    if both
    of git processes would touch the same repo at the same time.
    
    This also fixes create_backup in
    setup.py - now it properly generates repos.json
  2. test(core): ignore pylint's ImportErrors for `distro` package (#2830)

    jack1142 authored and mikeshardmind committed Jul 2, 2019
Commits on Jun 23, 2019
  1. [Admin] Convert set to list because set is not JSON serializable (#2792)

    jack1142 authored and Tobotimus committed Jun 23, 2019
Commits on Jun 22, 2019
  1. docs(config): wrong code example in `Value.__call__` (#2780)

    jack1142 authored and mikeshardmind committed Jun 22, 2019
    fix #2775
Commits on Jun 19, 2019
  1. style(modlog): Phrase information about `reason` command better (#2777)

    jack1142 authored and mikeshardmind committed Jun 19, 2019
Commits on May 23, 2019
  1. [Downloader] Fix problem with copying directory tree. (#2690)

    jack1142 authored and mikeshardmind committed May 23, 2019
    * fix(downloader): clear paths in `distutils.dir_util._path_created` before copying tree
    
    fix #2685
    
    * style(downloader): add comment about PR
Commits on May 21, 2019
  1. docs(install): remove information about voice extra (#2717)

    jack1142 authored and mikeshardmind committed May 21, 2019
Commits on May 19, 2019
  1. [Setup] Fix: wrong var used for instance data in `remove_instance` (#…

    jack1142 authored and mikeshardmind committed May 19, 2019
Commits on May 16, 2019
  1. [General]: shorten descriptions properly with disabled embeds in urban (

    jack1142 authored and mikeshardmind committed May 16, 2019
Commits on Apr 29, 2019
  1. [Downloader] Suppress `commands.ExtensionNotLoaded` for `bot.unload_e…

    jack1142 authored and mikeshardmind committed Apr 29, 2019
    …xtension()` call (#2625)
    
    fix(downloader): suppress `commands.ExtensionNotLoaded` for `bot.unload_extension()` call (#2625)
  2. [V3 Downloader] Allow to specify minimum and maximum bot version in i…

    jack1142 authored and mikeshardmind committed Apr 29, 2019
    …nfo.json (#2605)
    
    * feat(downloader): add `min_bot_version` and `max_bot_version`
    
    Adds actually working way of specifying minimum and maximum bot version and removes not working
    `bot_version`
    
    BREAKING CHANGE: - removal of `bot_version` attribute in `Installable`
    
    * test(downloader): `Installable` tests fix for new bot version attributes
    
    * docs(changelog): added changelog entries for this PR
Older
You can’t perform that action at this time.