From b578c45eb7e61a68941d801e2f51cea78f0488f9 Mon Sep 17 00:00:00 2001 From: Noelle Wang <73260931+No767@users.noreply.github.com> Date: Sun, 21 Jan 2024 01:55:11 -0800 Subject: [PATCH 01/10] Include proper security practices (#48) --- bot/cogs/admin.py | 2 +- bot/cogs/config.py | 2 ++ bot/cogs/tickets.py | 5 +++++ bot/libs/utils/errors.py | 34 ++++++++++++++++------------------ 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/bot/cogs/admin.py b/bot/cogs/admin.py index 15bbec7..9a2dcd7 100644 --- a/bot/cogs/admin.py +++ b/bot/cogs/admin.py @@ -104,7 +104,7 @@ def reload_lib_modules(self, module: str) -> list[tuple[str, str]]: # To learn more about it, see the link below (and ?tag ass on the dpy server): # https://about.abstractumbra.dev/discord.py/2023/01/29/sync-command-example.html @commands.guild_only() - @commands.command(name="sync") + @commands.command(name="sync", hidden=True) async def sync( self, ctx: RoboContext, diff --git a/bot/cogs/config.py b/bot/cogs/config.py index 258b81e..1e5b6a3 100644 --- a/bot/cogs/config.py +++ b/bot/cogs/config.py @@ -127,6 +127,7 @@ async def config(self, ctx: GuildContext) -> None: if ctx.invoked_subcommand is None: await ctx.send_help(ctx.command) + @commands.cooldown(1, 20, commands.BucketType.guild) @config.command(name="setup", usage="ticket_name: log_name: ") async def setup(self, ctx: GuildContext, *, flags: SetupFlags) -> None: """First-time setup for Rodhaj @@ -278,6 +279,7 @@ async def setup(self, ctx: GuildContext, *, flags: SetupFlags) -> None: msg = f"Rodhaj channels successfully created! The ticket channel can be found under {ticket_channel.mention}" await ctx.send(msg) + @commands.cooldown(1, 20, commands.BucketType.guild) @config.command(name="delete") async def delete(self, ctx: GuildContext) -> None: """Permanently deletes Rodhaj channels and tickets.""" diff --git a/bot/cogs/tickets.py b/bot/cogs/tickets.py index 9c09695..3ef86b7 100644 --- a/bot/cogs/tickets.py +++ b/bot/cogs/tickets.py @@ -320,6 +320,7 @@ def get_solved_tag( ### Feature commands @is_ticket_or_dm() + @commands.cooldown(1, 20, commands.BucketType.channel) @commands.hybrid_command(name="close", aliases=["solved", "closed", "resolved"]) async def close(self, ctx: RoboContext) -> None: """Closes the thread""" @@ -356,7 +357,11 @@ async def close(self, ctx: RoboContext) -> None: self.get_ticket_owner_id.cache_invalidate(closed_ticket.id) await self.notify_finished_ticket(ctx, owner_id) + # 10 command invocations per 12 seconds for each member + # These values should not be tripped unless someone is spamming + # https://github.com/Rapptz/RoboDanny/blob/rewrite/cogs/mod.py#L524C9-L524C74 @is_ticket_thread() + @commands.cooldown(10, 12, commands.BucketType.member) @commands.command(name="reply", aliases=["r"]) async def reply( self, ctx: GuildContext, *, message: Annotated[str, commands.clean_content] diff --git a/bot/libs/utils/errors.py b/bot/libs/utils/errors.py index ab220f0..196e9ed 100644 --- a/bot/libs/utils/errors.py +++ b/bot/libs/utils/errors.py @@ -29,27 +29,27 @@ def create_premade_embed(title: str, description: str) -> ErrorEmbed: return embed +def build_cooldown_embed(error: commands.CommandOnCooldown) -> ErrorEmbed: + embed = ErrorEmbed() + embed.timestamp = discord.utils.utcnow() + embed.title = "Command On Cooldown" + embed.description = ( + f"This command is on cooldown. Try again in {error.retry_after:.2f}s" + ) + return embed + + async def send_error_embed(ctx: commands.Context, error: commands.CommandError) -> None: - if isinstance(error, commands.CommandInvokeError) or isinstance( + if isinstance(error, commands.CommandOnCooldown): + await ctx.send(embed=build_cooldown_embed(error)) + elif isinstance(error, commands.CommandInvokeError) or isinstance( error, commands.HybridCommandError ): await ctx.send(embed=produce_error_embed(error)) - elif isinstance(error, commands.CommandNotFound): - await ctx.send( + elif isinstance(error, commands.NoPrivateMessage): + await ctx.author.send( embed=create_premade_embed( - "Command not found", - "The command you were looking for could not be found", - ) - ) - elif isinstance(error, commands.NotOwner): - # Basically completely silence it making people not know what happened - return - elif isinstance(error, commands.MissingPermissions): - missing_perms = ", ".join(error.missing_permissions).rstrip(",") - await ctx.send( - embed=create_premade_embed( - "Missing Permissions", - f"You are missing the following permissions: {missing_perms}", + "Guild Only", "This command cannot be used in private messages" ) ) elif isinstance(error, commands.MissingRequiredArgument): @@ -59,5 +59,3 @@ async def send_error_embed(ctx: commands.Context, error: commands.CommandError) f"You are missing the following argument(s): {error.param.name}", ) ) - else: - await ctx.send(embed=produce_error_embed(error)) From a32481c8b31244cb1209dd796949560de26e9061 Mon Sep 17 00:00:00 2001 From: Noelle Wang <73260931+No767@users.noreply.github.com> Date: Sun, 21 Jan 2024 02:17:17 -0800 Subject: [PATCH 02/10] Add issue/feature requests and PR templates (#49) --- .github/ISSUE_TEMPLATE/bug_report.yml | 68 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 47 +++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 26 +++++++++ 3 files changed, 141 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..8fa109e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,68 @@ +name: Bug Report +description: Report broken or incorrect behaviour +labels: [unconfirmed bug] +body: + - type: markdown + attributes: + value: > + Thanks for taking the time to fill out a bug. + If you want real-time support, consider reaching out to the development team on Discord. + + Please note that this form is for bugs only! + - type: input + attributes: + label: Summary + description: A simple summary of your bug report + validations: + required: true + - type: textarea + attributes: + label: Reproduction Steps + description: > + What you did to make it happen. + validations: + required: true + - type: textarea + attributes: + label: Minimal Reproducible Code + description: > + A short snippet of code that showcases the bug. + render: Python + - type: textarea + attributes: + label: Expected Results + description: > + What did you expect to happen? + validations: + required: true + - type: textarea + attributes: + label: Actual Results + description: > + What actually happened? + validations: + required: true + - type: textarea + attributes: + label: System Information + description: > + Run `python -m discord -v` and paste this information below. + + This command required v1.1.0 or higher of the library. If this errors out then show some basic + information involving your system such as operating system and Python version. + validations: + required: true + - type: checkboxes + attributes: + label: Checklist + description: > + Let's make sure you've properly done due diligence when reporting this issue! + options: + - label: I have searched the open issues for duplicates. + required: true + - label: I have shown the entire traceback, if possible. + required: true + - type: textarea + attributes: + label: Additional Context + description: If there is anything else to say, please do so here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..fe3b53d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,47 @@ +name: Feature Request +description: Suggest a feature for Rodhaj +labels: [feature request] +body: + - type: input + attributes: + label: Summary + description: > + A short summary of what your feature request is. + validations: + required: true + - type: dropdown + attributes: + multiple: false + label: What is the feature request for? + options: + - Rodhaj + - The documentation + validations: + required: true + - type: textarea + attributes: + label: The Problem + description: > + What problem is your feature trying to solve? + What becomes easier or possible when this feature is implemented? + validations: + required: true + - type: textarea + attributes: + label: The Ideal Solution + description: > + What is your ideal solution to the problem? + What would you like this feature to do? + validations: + required: true + - type: textarea + attributes: + label: The Current Solution + description: > + What is the current solution to the problem, if any? + validations: + required: false + - type: textarea + attributes: + label: Additional Context + description: If there is anything else to say, please do so here. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6297c12 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ +# Summary + + + +## Types of changes + +What types of changes does your code introduce to Rodhaj +_Put an `x` in the boxes that apply_ + +- [ ] Bugfix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation Update (Updates to README.md, the documentation, etc) +- [ ] Other (if none of the other choices apply) + + +## Checklist + + + +_Put an `x` in the boxes that apply_ + +- [ ] If code changes were made then they have been tested. + - [ ] I have updated the documentation to reflect the changes. (if appropriate) +- [ ] All workflows (except pre-commit.ci) pass with my new changes +- [ ] This PR does **not** address a duplicate issue or PR From bc833c38ca9fd49ed3805c4e6c8303fb8781dc22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 13:57:04 +0000 Subject: [PATCH 03/10] [pip](deps): Bump psutil from 5.9.7 to 5.9.8 (#51) Bumps [psutil](https://github.com/giampaolo/psutil) from 5.9.7 to 5.9.8. - [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst) - [Commits](https://github.com/giampaolo/psutil/compare/release-5.9.7...release-5.9.8) --- updated-dependencies: - dependency-name: psutil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 37 +++++++++++++++++++------------------ pyproject.toml | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index 28b3449..65fbf37 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1400,27 +1400,27 @@ virtualenv = ">=20.10.0" [[package]] name = "psutil" -version = "5.9.7" +version = "5.9.8" description = "Cross-platform lib for process and system monitoring in Python." optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "psutil-5.9.7-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:0bd41bf2d1463dfa535942b2a8f0e958acf6607ac0be52265ab31f7923bcd5e6"}, - {file = "psutil-5.9.7-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:5794944462509e49d4d458f4dbfb92c47539e7d8d15c796f141f474010084056"}, - {file = "psutil-5.9.7-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:fe361f743cb3389b8efda21980d93eb55c1f1e3898269bc9a2a1d0bb7b1f6508"}, - {file = "psutil-5.9.7-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:e469990e28f1ad738f65a42dcfc17adaed9d0f325d55047593cb9033a0ab63df"}, - {file = "psutil-5.9.7-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:3c4747a3e2ead1589e647e64aad601981f01b68f9398ddf94d01e3dc0d1e57c7"}, - {file = "psutil-5.9.7-cp27-none-win32.whl", hash = "sha256:1d4bc4a0148fdd7fd8f38e0498639ae128e64538faa507df25a20f8f7fb2341c"}, - {file = "psutil-5.9.7-cp27-none-win_amd64.whl", hash = "sha256:4c03362e280d06bbbfcd52f29acd79c733e0af33d707c54255d21029b8b32ba6"}, - {file = "psutil-5.9.7-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ea36cc62e69a13ec52b2f625c27527f6e4479bca2b340b7a452af55b34fcbe2e"}, - {file = "psutil-5.9.7-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1132704b876e58d277168cd729d64750633d5ff0183acf5b3c986b8466cd0284"}, - {file = "psutil-5.9.7-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe8b7f07948f1304497ce4f4684881250cd859b16d06a1dc4d7941eeb6233bfe"}, - {file = "psutil-5.9.7-cp36-cp36m-win32.whl", hash = "sha256:b27f8fdb190c8c03914f908a4555159327d7481dac2f01008d483137ef3311a9"}, - {file = "psutil-5.9.7-cp36-cp36m-win_amd64.whl", hash = "sha256:44969859757f4d8f2a9bd5b76eba8c3099a2c8cf3992ff62144061e39ba8568e"}, - {file = "psutil-5.9.7-cp37-abi3-win32.whl", hash = "sha256:c727ca5a9b2dd5193b8644b9f0c883d54f1248310023b5ad3e92036c5e2ada68"}, - {file = "psutil-5.9.7-cp37-abi3-win_amd64.whl", hash = "sha256:f37f87e4d73b79e6c5e749440c3113b81d1ee7d26f21c19c47371ddea834f414"}, - {file = "psutil-5.9.7-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:032f4f2c909818c86cea4fe2cc407f1c0f0cde8e6c6d702b28b8ce0c0d143340"}, - {file = "psutil-5.9.7.tar.gz", hash = "sha256:3f02134e82cfb5d089fddf20bb2e03fd5cd52395321d1c8458a9e58500ff417c"}, + {file = "psutil-5.9.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8"}, + {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73"}, + {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7"}, + {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36"}, + {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d"}, + {file = "psutil-5.9.8-cp27-none-win32.whl", hash = "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e"}, + {file = "psutil-5.9.8-cp27-none-win_amd64.whl", hash = "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631"}, + {file = "psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81"}, + {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421"}, + {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4"}, + {file = "psutil-5.9.8-cp36-cp36m-win32.whl", hash = "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee"}, + {file = "psutil-5.9.8-cp36-cp36m-win_amd64.whl", hash = "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2"}, + {file = "psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0"}, + {file = "psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf"}, + {file = "psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8"}, + {file = "psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c"}, ] [package.extras] @@ -1628,6 +1628,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -2296,4 +2297,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "d9fb522bddafb558c9e5f73dc798a6432c2db8dbc15c081f0b343ff4cdea963b" +content-hash = "24cf2e5a74ab70d5d1a400e2cec4c623bf180acaa63d1506c3fe662851456a2a" diff --git a/pyproject.toml b/pyproject.toml index 95d1f72..9fc559d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ uvloop = {markers = "sys_platform != \"win32\"", version = "^0.19.0"} winloop = {markers = "sys_platform == \"win32\"", version = "^0.1.0"} asyncpg = "^0.29.0" discord-ext-menus = {git = "https://github.com/Rapptz/discord-ext-menus", rev = "8686b5d1bbc1d3c862292eb436ab630d6e9c9b53"} -psutil = "^5.9.7" +psutil = "^5.9.8" pygit2 = "^1.13.3" python-dateutil = "^2.8.2" click = "^8.1.7" From 6bb9fc407fbe122adb5603cbc615ba9bc673b7c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:00:50 +0000 Subject: [PATCH 04/10] [pip](deps-dev): Bump ruff from 0.1.13 to 0.1.14 (#53) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.13 to 0.1.14. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.13...v0.1.14) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/poetry.lock b/poetry.lock index 65fbf37..04c0f78 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1686,28 +1686,28 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "ruff" -version = "0.1.13" +version = "0.1.14" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.1.13-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:e3fd36e0d48aeac672aa850045e784673449ce619afc12823ea7868fcc41d8ba"}, - {file = "ruff-0.1.13-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9fb6b3b86450d4ec6a6732f9f60c4406061b6851c4b29f944f8c9d91c3611c7a"}, - {file = "ruff-0.1.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b13ba5d7156daaf3fd08b6b993360a96060500aca7e307d95ecbc5bb47a69296"}, - {file = "ruff-0.1.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9ebb40442f7b531e136d334ef0851412410061e65d61ca8ce90d894a094feb22"}, - {file = "ruff-0.1.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:226b517f42d59a543d6383cfe03cccf0091e3e0ed1b856c6824be03d2a75d3b6"}, - {file = "ruff-0.1.13-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:5f0312ba1061e9b8c724e9a702d3c8621e3c6e6c2c9bd862550ab2951ac75c16"}, - {file = "ruff-0.1.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2f59bcf5217c661254bd6bc42d65a6fd1a8b80c48763cb5c2293295babd945dd"}, - {file = "ruff-0.1.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6894b00495e00c27b6ba61af1fc666f17de6140345e5ef27dd6e08fb987259d"}, - {file = "ruff-0.1.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a1600942485c6e66119da294c6294856b5c86fd6df591ce293e4a4cc8e72989"}, - {file = "ruff-0.1.13-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:ee3febce7863e231a467f90e681d3d89210b900d49ce88723ce052c8761be8c7"}, - {file = "ruff-0.1.13-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:dcaab50e278ff497ee4d1fe69b29ca0a9a47cd954bb17963628fa417933c6eb1"}, - {file = "ruff-0.1.13-py3-none-musllinux_1_2_i686.whl", hash = "sha256:f57de973de4edef3ad3044d6a50c02ad9fc2dff0d88587f25f1a48e3f72edf5e"}, - {file = "ruff-0.1.13-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7a36fa90eb12208272a858475ec43ac811ac37e91ef868759770b71bdabe27b6"}, - {file = "ruff-0.1.13-py3-none-win32.whl", hash = "sha256:a623349a505ff768dad6bd57087e2461be8db58305ebd5577bd0e98631f9ae69"}, - {file = "ruff-0.1.13-py3-none-win_amd64.whl", hash = "sha256:f988746e3c3982bea7f824c8fa318ce7f538c4dfefec99cd09c8770bd33e6539"}, - {file = "ruff-0.1.13-py3-none-win_arm64.whl", hash = "sha256:6bbbc3042075871ec17f28864808540a26f0f79a4478c357d3e3d2284e832998"}, - {file = "ruff-0.1.13.tar.gz", hash = "sha256:e261f1baed6291f434ffb1d5c6bd8051d1c2a26958072d38dfbec39b3dda7352"}, + {file = "ruff-0.1.14-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:96f76536df9b26622755c12ed8680f159817be2f725c17ed9305b472a757cdbb"}, + {file = "ruff-0.1.14-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ab3f71f64498c7241123bb5a768544cf42821d2a537f894b22457a543d3ca7a9"}, + {file = "ruff-0.1.14-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7060156ecc572b8f984fd20fd8b0fcb692dd5d837b7606e968334ab7ff0090ab"}, + {file = "ruff-0.1.14-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a53d8e35313d7b67eb3db15a66c08434809107659226a90dcd7acb2afa55faea"}, + {file = "ruff-0.1.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bea9be712b8f5b4ebed40e1949379cfb2a7d907f42921cf9ab3aae07e6fba9eb"}, + {file = "ruff-0.1.14-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2270504d629a0b064247983cbc495bed277f372fb9eaba41e5cf51f7ba705a6a"}, + {file = "ruff-0.1.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80258bb3b8909b1700610dfabef7876423eed1bc930fe177c71c414921898efa"}, + {file = "ruff-0.1.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:653230dd00aaf449eb5ff25d10a6e03bc3006813e2cb99799e568f55482e5cae"}, + {file = "ruff-0.1.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87b3acc6c4e6928459ba9eb7459dd4f0c4bf266a053c863d72a44c33246bfdbf"}, + {file = "ruff-0.1.14-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6b3dadc9522d0eccc060699a9816e8127b27addbb4697fc0c08611e4e6aeb8b5"}, + {file = "ruff-0.1.14-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:1c8eca1a47b4150dc0fbec7fe68fc91c695aed798532a18dbb1424e61e9b721f"}, + {file = "ruff-0.1.14-py3-none-musllinux_1_2_i686.whl", hash = "sha256:62ce2ae46303ee896fc6811f63d6dabf8d9c389da0f3e3f2bce8bc7f15ef5488"}, + {file = "ruff-0.1.14-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b2027dde79d217b211d725fc833e8965dc90a16d0d3213f1298f97465956661b"}, + {file = "ruff-0.1.14-py3-none-win32.whl", hash = "sha256:722bafc299145575a63bbd6b5069cb643eaa62546a5b6398f82b3e4403329cab"}, + {file = "ruff-0.1.14-py3-none-win_amd64.whl", hash = "sha256:e3d241aa61f92b0805a7082bd89a9990826448e4d0398f0e2bc8f05c75c63d99"}, + {file = "ruff-0.1.14-py3-none-win_arm64.whl", hash = "sha256:269302b31ade4cde6cf6f9dd58ea593773a37ed3f7b97e793c8594b262466b67"}, + {file = "ruff-0.1.14.tar.gz", hash = "sha256:ad3f8088b2dfd884820289a06ab718cde7d38b94972212cc4ba90d5fbc9955f3"}, ] [[package]] From 3aaf6e542ea26a8ce4afadab8e1c81177fd54d99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:06:38 +0000 Subject: [PATCH 05/10] [pip](deps): Bump msgspec from 0.18.5 to 0.18.6 (#52) Bumps [msgspec](https://github.com/jcrist/msgspec) from 0.18.5 to 0.18.6. - [Release notes](https://github.com/jcrist/msgspec/releases) - [Commits](https://github.com/jcrist/msgspec/compare/0.18.5...0.18.6) --- updated-dependencies: - dependency-name: msgspec dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 76 +++++++++++++++++++++++++------------------------- pyproject.toml | 2 +- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/poetry.lock b/poetry.lock index 04c0f78..0b12785 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1148,47 +1148,47 @@ tests = ["pytest", "pytz", "simplejson"] [[package]] name = "msgspec" -version = "0.18.5" +version = "0.18.6" description = "A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML." optional = false python-versions = ">=3.8" files = [ - {file = "msgspec-0.18.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:50479d88f3c4e9c73b55fbe84dc14b1cee8cec753e9170bbeafe3f9837e9f7af"}, - {file = "msgspec-0.18.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf885edac512e464c70a5f4f93b6f778c83ea4b91d646b6d72f6f5ac950f268e"}, - {file = "msgspec-0.18.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:773a38ead7832d171d1b9406bf42448a218245584af36e42c31f26d9f48a493a"}, - {file = "msgspec-0.18.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5999eb65646b131f439ebb07c22446e8976b7fd8a312dca09ce6fa2c21162bb"}, - {file = "msgspec-0.18.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:a0ec78bd93684db61dfccf7a421b2e1a525b1a0546b4d8c4e339151be57d58a6"}, - {file = "msgspec-0.18.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b547c7ad9786a79b0090a811d95d2d04063625a66fd96ed767cdfbabd8087c67"}, - {file = "msgspec-0.18.5-cp310-cp310-win_amd64.whl", hash = "sha256:e4c2fc93a98afefd1a78e957ca63363a8e5fd1b58bf70a8d66413c8f2a4723a2"}, - {file = "msgspec-0.18.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ee1f9414523d9a53744d21a6a2b6a636d9008be016963148a2646b38132e11dd"}, - {file = "msgspec-0.18.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0017f6af35a3959002df4c82af60c1df2160701529dd89b17df971fde5945257"}, - {file = "msgspec-0.18.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13da9df61745b7757070dae6e3476ab4e13bb9dd3e3d11b050dfcae540058bd1"}, - {file = "msgspec-0.18.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01ed3472a0508f88a25a9d3bccafb840110f0fc5eb493b4baa43646e4e7c75c2"}, - {file = "msgspec-0.18.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f55c4610cb0514aef8b35bfd0682f4cc2d7efd5e9b58acf30abd90b2a2376b5d"}, - {file = "msgspec-0.18.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8f7c0460aefdc8f01ea35f26e38c62b574bbf0b138ade860f557bbf9e9dac50c"}, - {file = "msgspec-0.18.5-cp311-cp311-win_amd64.whl", hash = "sha256:024f880df7d2f8cfdb9f9904efa0f386d3692457159bd58f850c20f11c07d16f"}, - {file = "msgspec-0.18.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b3d206af4280172948d014d20b2cea7939784a99ea9a7ac943ce71100dbe8f98"}, - {file = "msgspec-0.18.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:261cc6e3a687e6f31b80056ab12f6adff3255f9b68b86d92b0b497f8b289c84c"}, - {file = "msgspec-0.18.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b6af133ba491a09ef8dcbc2d9904bcec220247e2067bb75d5d6daa12e0739d6c"}, - {file = "msgspec-0.18.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d318593e0ddc11b600552a470ec27baeb0b86a8e37903ac5ce7472ba0d6f7bf8"}, - {file = "msgspec-0.18.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9a7b682cca3ba251a19cc769d38615ddd9551e086858decd950c156c2e79ecc1"}, - {file = "msgspec-0.18.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b491b2549d22e11d7cfe34a231f9bd006cb6b71adefa070a070075d2f601e75c"}, - {file = "msgspec-0.18.5-cp312-cp312-win_amd64.whl", hash = "sha256:c79e7115f0143688c5d866359e7b6b76dd1581a81c9aeac7805a9d6320e9f2ca"}, - {file = "msgspec-0.18.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c13e0a510bbd00cb29d193fceff55d1e17a99c9f97284cdbe61c15496c2f7803"}, - {file = "msgspec-0.18.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f4eeb22921ca6cdfbf17ca874eccbe23eb010c89ffb3017b628940c37d53ce4a"}, - {file = "msgspec-0.18.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9420750f19c311e490db3edff9d153621c4989c582cf1be40c307c86d6cc2c1e"}, - {file = "msgspec-0.18.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6431305c645fb2a88a6da1fcec53dbaac61697f1219000b9589f9286532aabc0"}, - {file = "msgspec-0.18.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b7b49cba0577edc8ac166263b5fec3619fe5a267805cfc041bccaf8a0c58ef05"}, - {file = "msgspec-0.18.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3f387cabddf2dc26d6fa7f1a8158deefc8db9e0626eacebbe4875f421c66d574"}, - {file = "msgspec-0.18.5-cp38-cp38-win_amd64.whl", hash = "sha256:482bdf77f3892dd603061b2b21ac6a4492bb797a552c92e833a41fe157162257"}, - {file = "msgspec-0.18.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f290bfe7e21e8069890d101d8a060500b22a3aeb7860274644c4ec9240ddbedc"}, - {file = "msgspec-0.18.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0027fba5362a3cb1bdd5503709aa2dbffad22dffd50f415086ed5f74f229ead9"}, - {file = "msgspec-0.18.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd8a64da668b4eeef4b21dcecc640ed6950db661e2ea42ae52bbac5a2dbffb3a"}, - {file = "msgspec-0.18.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be2440fa5699e1b3062d17fdfd8c6a459d72bb4edbce403353af6f39c8c5a6fa"}, - {file = "msgspec-0.18.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:eccba21248f90f332335b109e89685e79940367974812cd13975313f480f3dd8"}, - {file = "msgspec-0.18.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c30fadc1a1118097920dd868e42469fed32c7078ca2feff2fc19e7c017065322"}, - {file = "msgspec-0.18.5-cp39-cp39-win_amd64.whl", hash = "sha256:fae28faef5fd61847930d8e86fd83c18f991a338efd8fbf69c1d35d42c652f41"}, - {file = "msgspec-0.18.5.tar.gz", hash = "sha256:8e545651531f2d01b983d0ac0c7f3b6d99674267ff261b5f344f5016160b5608"}, + {file = "msgspec-0.18.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:77f30b0234eceeff0f651119b9821ce80949b4d667ad38f3bfed0d0ebf9d6d8f"}, + {file = "msgspec-0.18.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1a76b60e501b3932782a9da039bd1cd552b7d8dec54ce38332b87136c64852dd"}, + {file = "msgspec-0.18.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06acbd6edf175bee0e36295d6b0302c6de3aaf61246b46f9549ca0041a9d7177"}, + {file = "msgspec-0.18.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40a4df891676d9c28a67c2cc39947c33de516335680d1316a89e8f7218660410"}, + {file = "msgspec-0.18.6-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:a6896f4cd5b4b7d688018805520769a8446df911eb93b421c6c68155cdf9dd5a"}, + {file = "msgspec-0.18.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3ac4dd63fd5309dd42a8c8c36c1563531069152be7819518be0a9d03be9788e4"}, + {file = "msgspec-0.18.6-cp310-cp310-win_amd64.whl", hash = "sha256:fda4c357145cf0b760000c4ad597e19b53adf01382b711f281720a10a0fe72b7"}, + {file = "msgspec-0.18.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e77e56ffe2701e83a96e35770c6adb655ffc074d530018d1b584a8e635b4f36f"}, + {file = "msgspec-0.18.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d5351afb216b743df4b6b147691523697ff3a2fc5f3d54f771e91219f5c23aaa"}, + {file = "msgspec-0.18.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3232fabacef86fe8323cecbe99abbc5c02f7698e3f5f2e248e3480b66a3596b"}, + {file = "msgspec-0.18.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3b524df6ea9998bbc99ea6ee4d0276a101bcc1aa8d14887bb823914d9f60d07"}, + {file = "msgspec-0.18.6-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:37f67c1d81272131895bb20d388dd8d341390acd0e192a55ab02d4d6468b434c"}, + {file = "msgspec-0.18.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d0feb7a03d971c1c0353de1a8fe30bb6579c2dc5ccf29b5f7c7ab01172010492"}, + {file = "msgspec-0.18.6-cp311-cp311-win_amd64.whl", hash = "sha256:41cf758d3f40428c235c0f27bc6f322d43063bc32da7b9643e3f805c21ed57b4"}, + {file = "msgspec-0.18.6-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d86f5071fe33e19500920333c11e2267a31942d18fed4d9de5bc2fbab267d28c"}, + {file = "msgspec-0.18.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce13981bfa06f5eb126a3a5a38b1976bddb49a36e4f46d8e6edecf33ccf11df1"}, + {file = "msgspec-0.18.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e97dec6932ad5e3ee1e3c14718638ba333befc45e0661caa57033cd4cc489466"}, + {file = "msgspec-0.18.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad237100393f637b297926cae1868b0d500f764ccd2f0623a380e2bcfb2809ca"}, + {file = "msgspec-0.18.6-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:db1d8626748fa5d29bbd15da58b2d73af25b10aa98abf85aab8028119188ed57"}, + {file = "msgspec-0.18.6-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:d70cb3d00d9f4de14d0b31d38dfe60c88ae16f3182988246a9861259c6722af6"}, + {file = "msgspec-0.18.6-cp312-cp312-win_amd64.whl", hash = "sha256:1003c20bfe9c6114cc16ea5db9c5466e49fae3d7f5e2e59cb70693190ad34da0"}, + {file = "msgspec-0.18.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f7d9faed6dfff654a9ca7d9b0068456517f63dbc3aa704a527f493b9200b210a"}, + {file = "msgspec-0.18.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9da21f804c1a1471f26d32b5d9bc0480450ea77fbb8d9db431463ab64aaac2cf"}, + {file = "msgspec-0.18.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46eb2f6b22b0e61c137e65795b97dc515860bf6ec761d8fb65fdb62aa094ba61"}, + {file = "msgspec-0.18.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8355b55c80ac3e04885d72db515817d9fbb0def3bab936bba104e99ad22cf46"}, + {file = "msgspec-0.18.6-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9080eb12b8f59e177bd1eb5c21e24dd2ba2fa88a1dbc9a98e05ad7779b54c681"}, + {file = "msgspec-0.18.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:cc001cf39becf8d2dcd3f413a4797c55009b3a3cdbf78a8bf5a7ca8fdb76032c"}, + {file = "msgspec-0.18.6-cp38-cp38-win_amd64.whl", hash = "sha256:fac5834e14ac4da1fca373753e0c4ec9c8069d1fe5f534fa5208453b6065d5be"}, + {file = "msgspec-0.18.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:974d3520fcc6b824a6dedbdf2b411df31a73e6e7414301abac62e6b8d03791b4"}, + {file = "msgspec-0.18.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fd62e5818731a66aaa8e9b0a1e5543dc979a46278da01e85c3c9a1a4f047ef7e"}, + {file = "msgspec-0.18.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7481355a1adcf1f08dedd9311193c674ffb8bf7b79314b4314752b89a2cf7f1c"}, + {file = "msgspec-0.18.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6aa85198f8f154cf35d6f979998f6dadd3dc46a8a8c714632f53f5d65b315c07"}, + {file = "msgspec-0.18.6-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e24539b25c85c8f0597274f11061c102ad6b0c56af053373ba4629772b407be"}, + {file = "msgspec-0.18.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c61ee4d3be03ea9cd089f7c8e36158786cd06e51fbb62529276452bbf2d52ece"}, + {file = "msgspec-0.18.6-cp39-cp39-win_amd64.whl", hash = "sha256:b5c390b0b0b7da879520d4ae26044d74aeee5144f83087eb7842ba59c02bc090"}, + {file = "msgspec-0.18.6.tar.gz", hash = "sha256:a59fc3b4fcdb972d09138cb516dbde600c99d07c38fd9372a6ef500d2d031b4e"}, ] [package.extras] @@ -2297,4 +2297,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "24cf2e5a74ab70d5d1a400e2cec4c623bf180acaa63d1506c3fe662851456a2a" +content-hash = "feaf97f502139324dc51844a16cc97f122aaa83a4075f0d5fe048e8ac6cea45a" diff --git a/pyproject.toml b/pyproject.toml index 9fc559d..2c2116d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ click = "^8.1.7" typing-extensions = "^4.9.0" environs = "^10.3.0" async-lru = "^2.0.4" -msgspec = "^0.18.5" +msgspec = "^0.18.6" jishaku = "^2.5.2" [tool.poetry.group.dev.dependencies] From 2ab554d084e9dae22260490334dbd797f5800837 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 10:49:12 -0800 Subject: [PATCH 06/10] [pre-commit.ci] pre-commit autoupdate (#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.13 → v0.1.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.13...v0.1.14) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff31c7f..1ba655d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: stages: [commit] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.13 + rev: v0.1.14 hooks: - id: ruff name: Ruff From d8e070f625686f98a4f58796af9be81973d2744d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:54:45 +0000 Subject: [PATCH 07/10] [pip](deps): Bump psutil from 5.9.7 to 5.9.8 (#55) Bumps [psutil](https://github.com/giampaolo/psutil) from 5.9.7 to 5.9.8. - [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst) - [Commits](https://github.com/giampaolo/psutil/compare/release-5.9.7...release-5.9.8) --- updated-dependencies: - dependency-name: psutil dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2fd5cf9..64397a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ uvloop==0.19.0 ; sys_platform != "win32" winloop==0.1.0 ; sys_platform == "win32" asyncpg==0.29.0 discord-ext-menus @ git+https://github.com/Rapptz/discord-ext-menus@8686b5d1bbc1d3c862292eb436ab630d6e9c9b53 -psutil==5.9.7 +psutil==5.9.8 pygit2==1.13.3 python-dateutil==2.8.2 click==8.1.7 From 9e50f32d3fc0dd6c220d35c6ab12067e72a466b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:59:28 +0000 Subject: [PATCH 08/10] [pip](deps): Bump msgspec from 0.18.5 to 0.18.6 (#56) Bumps [msgspec](https://github.com/jcrist/msgspec) from 0.18.5 to 0.18.6. - [Release notes](https://github.com/jcrist/msgspec/releases) - [Commits](https://github.com/jcrist/msgspec/compare/0.18.5...0.18.6) --- updated-dependencies: - dependency-name: msgspec dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 64397a4..0ed6ce4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,5 +10,5 @@ click==8.1.7 typing-extensions==4.9.0 environs==10.3.0 async-lru==2.0.4 -msgspec==0.18.5 +msgspec==0.18.6 jishaku==2.5.2 \ No newline at end of file From b9ae30bb2f0095a9159a32c8eb91d8c586baa4c5 Mon Sep 17 00:00:00 2001 From: Noelle Wang <73260931+No767@users.noreply.github.com> Date: Wed, 24 Jan 2024 22:56:44 -0800 Subject: [PATCH 09/10] Implement permissions system (#50) --- bot/cogs/config.py | 11 ++-- bot/cogs/tickets.py | 36 ++++------ bot/libs/utils/checks.py | 65 +++++++++++++++---- bot/libs/utils/help.py | 39 ++++++++++- .../V3__perms_and_config_changes.sql | 11 ++++ bot/migrations/V4__custom_prefix.sql | 9 +++ bot/rodhaj.py | 3 + permissions.md | 9 +++ 8 files changed, 144 insertions(+), 39 deletions(-) create mode 100644 bot/migrations/V3__perms_and_config_changes.sql create mode 100644 bot/migrations/V4__custom_prefix.sql create mode 100644 permissions.md diff --git a/bot/cogs/config.py b/bot/cogs/config.py index 1e5b6a3..d523bfc 100644 --- a/bot/cogs/config.py +++ b/bot/cogs/config.py @@ -7,7 +7,8 @@ import msgspec from async_lru import alru_cache from discord.ext import commands -from libs.utils import GuildContext, is_manager +from libs.utils import GuildContext +from libs.utils.checks import bot_check_permissions, check_permissions if TYPE_CHECKING: from rodhaj import Rodhaj @@ -119,7 +120,8 @@ async def get_guild_config(self, guild_id: int) -> Optional[GuildConfig]: config = GuildConfig(bot=self.bot, **dict(rows)) return config - @is_manager() + @check_permissions(manage_guild=True) + @bot_check_permissions(manage_channels=True, manage_webhooks=True) @commands.guild_only() @commands.hybrid_group(name="config") async def config(self, ctx: GuildContext) -> None: @@ -253,8 +255,8 @@ async def setup(self, ctx: GuildContext, *, flags: SetupFlags) -> None: return query = """ - INSERT INTO guild_config (id, category_id, ticket_channel_id, logging_channel_id, logging_broadcast_url, ticket_broadcast_url) - VALUES ($1, $2, $3, $4, $5, $6); + INSERT INTO guild_config (id, category_id, ticket_channel_id, logging_channel_id, logging_broadcast_url, ticket_broadcast_url, prefix) + VALUES ($1, $2, $3, $4, $5, $6, $7); """ try: await self.pool.execute( @@ -265,6 +267,7 @@ async def setup(self, ctx: GuildContext, *, flags: SetupFlags) -> None: logging_channel.id, lgc_webhook.url, tc_webhook.url, + [], ) except asyncpg.UniqueViolationError: await ticket_channel.delete(reason=delete_reason) diff --git a/bot/cogs/tickets.py b/bot/cogs/tickets.py index 3ef86b7..ffb4dfb 100644 --- a/bot/cogs/tickets.py +++ b/bot/cogs/tickets.py @@ -1,6 +1,5 @@ from __future__ import annotations -from functools import lru_cache from typing import TYPE_CHECKING, Annotated, NamedTuple, Optional, Union import asyncpg @@ -14,6 +13,7 @@ get_partial_ticket, safe_content, ) +from libs.utils.checks import bot_check_permissions from libs.utils.embeds import Embed, LoggingEmbed from .config import GuildWebhookDispatcher @@ -23,7 +23,6 @@ from rodhaj import Rodhaj -STAFF_ROLE = 1184257456419913798 TICKET_EMOJI = "\U0001f3ab" # U+1F3AB Ticket @@ -101,15 +100,6 @@ def add_status_checklist( ) -> StatusChecklist: return self.in_progress_tickets.setdefault(author_id, status) - #### Determining staff - - @lru_cache(maxsize=64) - def get_staff(self, guild: discord.Guild) -> Optional[list[discord.Member]]: - mod_role = guild.get_role(STAFF_ROLE) - if mod_role is None: - return None - return [member for member in mod_role.members] - ### Conditions for closing tickets async def can_close_ticket(self, ctx: RoboContext): @@ -128,22 +118,17 @@ async def can_close_ticket(self, ctx: RoboContext): return False async def can_admin_close_ticket(self, ctx: RoboContext) -> bool: - guild_id = self.bot.transprogrammer_guild_id - guild = self.bot.get_guild(guild_id) or (await self.bot.fetch_guild(guild_id)) - staff_members = self.get_staff(guild) - - if staff_members is None: - return False - - # TODO: Add the hierarchy system here - staff_ids = [member.id for member in staff_members] + # More than likely it will be closed through the threads + # That means, it must be done in a guild. Thus, we know that + # it will always be discord.Member + perms = ctx.channel.permissions_for(ctx.author) # type: ignore from_ticket_channel = ( isinstance(ctx.channel, discord.Thread) and ctx.partial_config is not None and ctx.channel.parent_id == ctx.partial_config.ticket_channel_id ) - if ctx.author.id in staff_ids and from_ticket_channel is True: + if perms.manage_threads and from_ticket_channel is True: return True return False @@ -319,11 +304,18 @@ def get_solved_tag( ### Feature commands + # This command requires the manage_threads permissions for the bot @is_ticket_or_dm() + @bot_check_permissions(manage_threads=True) @commands.cooldown(1, 20, commands.BucketType.channel) @commands.hybrid_command(name="close", aliases=["solved", "closed", "resolved"]) async def close(self, ctx: RoboContext) -> None: - """Closes the thread""" + """Closes a ticket + + If someone requests to close the ticket + and has Manage Threads permissions, then they can + also close the ticket. + """ query = """ DELETE FROM tickets WHERE thread_id = $1 AND owner_id = $2; diff --git a/bot/libs/utils/checks.py b/bot/libs/utils/checks.py index a006469..365d18d 100644 --- a/bot/libs/utils/checks.py +++ b/bot/libs/utils/checks.py @@ -1,18 +1,22 @@ from __future__ import annotations import os -from typing import Callable, TypeVar +from typing import TYPE_CHECKING, Callable, TypeVar +import discord from discord import app_commands from discord.ext import commands -T = TypeVar("T") +# Although commands.HybridCommand (and it's group version) can be bound here for Type T, +# it doesn't make sense as they are just subclasses of commands.Command and co. +T = TypeVar("T", commands.Command, commands.Group) + +if TYPE_CHECKING: + from libs.utils.context import RoboContext -# For time's sake I might as well take these from RDanny -# There is really no used of creating my own system when there is one out there already async def check_guild_permissions( - ctx: commands.Context, perms: dict[str, bool], *, check=all + ctx: RoboContext, perms: dict[str, bool], *, check=all ) -> bool: is_owner = await ctx.bot.is_owner(ctx.author) if is_owner: @@ -27,9 +31,48 @@ async def check_guild_permissions( ) -def hybrid_permissions_check(**perms: bool) -> Callable[[T], T]: - async def pred(ctx: commands.Context): - return await check_guild_permissions(ctx, perms) +async def check_bot_permissions( + ctx: RoboContext, perms: dict[str, bool], *, check=all +) -> bool: + is_owner = await ctx.bot.is_owner(ctx.author) + if is_owner: + return True + + if ctx.guild is None: + return False + + bot_resolved_perms = ctx.me.guild_permissions # type: ignore + return check( + getattr(bot_resolved_perms, name, None) == value + for name, value in perms.items() + ) + + +def check_permissions(**perms: bool) -> Callable[[T], T]: + async def pred(ctx: RoboContext): + # Usually means this is in the context of a DM + if ( + isinstance(ctx.me, discord.ClientUser) + or isinstance(ctx.author, discord.User) + or ctx.guild is None + ): + return False + guild_perms = await check_guild_permissions(ctx, perms) + can_run = ctx.me.top_role > ctx.author.top_role + return guild_perms and can_run + + def decorator(func: T) -> T: + func.extras["permissions"] = perms + commands.check(pred)(func) + app_commands.default_permissions(**perms)(func) + return func + + return decorator + + +def bot_check_permissions(**perms: bool) -> Callable[[T], T]: + async def pred(ctx: RoboContext): + return await check_bot_permissions(ctx, perms) def decorator(func: T) -> T: commands.check(pred)(func) @@ -40,17 +83,17 @@ def decorator(func: T) -> T: def is_manager(): - return hybrid_permissions_check(manage_guild=True) + return check_permissions(manage_guild=True) def is_mod(): - return hybrid_permissions_check( + return check_permissions( ban_members=True, manage_messages=True, kick_members=True, moderate_members=True ) def is_admin(): - return hybrid_permissions_check(administrator=True) + return check_permissions(administrator=True) def is_docker() -> bool: diff --git a/bot/libs/utils/help.py b/bot/libs/utils/help.py index eeb9347..8972e64 100644 --- a/bot/libs/utils/help.py +++ b/bot/libs/utils/help.py @@ -13,6 +13,28 @@ # Light Orange (255, 199, 184) - Used for command pages +def process_perms_name( + command: Union[commands.Group, commands.Command] +) -> Optional[str]: + merge_list = [] + if ( + all(isinstance(parent, commands.Group) for parent in command.parents) + and len(command.parents) > 0 + ): + # See https://stackoverflow.com/a/27638751 + merge_list = [ + next(iter(parent.extras["permissions"])) for parent in command.parents + ] + + if "permissions" in command.extras: + merge_list.extend([*command.extras["permissions"]]) + + perms_set = sorted(set(merge_list)) + if len(perms_set) == 0: + return None + return ", ".join(name.replace("_", " ").title() for name in perms_set) + + class GroupHelpPageSource(menus.ListPageSource): def __init__( self, @@ -27,10 +49,15 @@ def __init__( self.title: str = f"{self.group.qualified_name} Commands" self.description: str = self.group.description + def _process_description(self, group: Union[commands.Group, commands.Cog]): + if isinstance(group, commands.Group) and "permissions" in group.extras: + return f"{self.description}\n\n**Required Permissions**: {process_perms_name(group)}" + return self.description + async def format_page(self, menu: RoboPages, commands: list[commands.Command]): embed = discord.Embed( title=self.title, - description=self.description, + description=self._process_description(self.group), colour=discord.Colour.from_rgb(197, 184, 255), ) @@ -271,8 +298,16 @@ async def send_cog_help(self, cog): ) await menu.start() - def common_command_formatting(self, embed_like, command): + def common_command_formatting( + self, + embed_like: Union[discord.Embed, GroupHelpPageSource], + command: commands.Command, + ): embed_like.title = self.get_command_signature(command) + processed_perms = process_perms_name(command) + if isinstance(embed_like, discord.Embed) and processed_perms is not None: + embed_like.add_field(name="Required Permissions", value=processed_perms) + if command.description: embed_like.description = f"{command.description}\n\n{command.help}" else: diff --git a/bot/migrations/V3__perms_and_config_changes.sql b/bot/migrations/V3__perms_and_config_changes.sql new file mode 100644 index 0000000..f4db688 --- /dev/null +++ b/bot/migrations/V3__perms_and_config_changes.sql @@ -0,0 +1,11 @@ +-- Revision Version: V3 +-- Revises: V2 +-- Creation Date: 2024-01-23 08:41:08.795638 UTC +-- Reason: perms and config changes + +-- Remove this column as it was never used +ALTER TABLE IF EXISTS guild_config DROP COLUMN locked; + +-- Also in lieu with permissions based commands, +-- we don't need to store perms levels on users +ALTER TABLE IF EXISTS user_config DROP COLUMN permission_level; \ No newline at end of file diff --git a/bot/migrations/V4__custom_prefix.sql b/bot/migrations/V4__custom_prefix.sql new file mode 100644 index 0000000..fdf3dad --- /dev/null +++ b/bot/migrations/V4__custom_prefix.sql @@ -0,0 +1,9 @@ +-- Revision Version: V4 +-- Revises: V3 +-- Creation Date: 2024-01-24 02:54:39.500620 UTC +-- Reason: custom prefix support + +-- Allow for custom prefixes to be stored. This is simply setup work +-- for another feature +ALTER TABLE IF EXISTS guild_config ADD COLUMN prefix TEXT[]; + diff --git a/bot/rodhaj.py b/bot/rodhaj.py index fa7746c..8bea9f5 100644 --- a/bot/rodhaj.py +++ b/bot/rodhaj.py @@ -48,6 +48,9 @@ def __init__( activity=discord.Activity( type=discord.ActivityType.watching, name="a game" ), + allowed_mentions=discord.AllowedMentions( + everyone=False, replied_user=False + ), command_prefix=["r>", "?", "!"], help_command=RodhajHelp(), intents=intents, diff --git a/permissions.md b/permissions.md new file mode 100644 index 0000000..c3cd130 --- /dev/null +++ b/permissions.md @@ -0,0 +1,9 @@ +# Required permissions for Rodhaj + +This document serves to provide the necessary permissions +that Rodhaj requires. Currently these are the required +permissions: + +- Manage Threads +- Manage Channels +- Manage Webhooks \ No newline at end of file From 90e78bb7f58f2ec64b2d1bd35ac4015b110b21d6 Mon Sep 17 00:00:00 2001 From: Noelle Wang <73260931+No767@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:44:21 -0800 Subject: [PATCH 10/10] Implement better extension/library watchdog (#58) --- bot/libs/utils/logger.py | 1 + bot/libs/utils/reloader.py | 88 ++++++++++++++++++++++++++++++++++++++ bot/rodhaj.py | 25 +++-------- poetry.lock | 44 ++++++------------- pyproject.toml | 2 +- requirements.txt | 3 +- 6 files changed, 109 insertions(+), 54 deletions(-) create mode 100644 bot/libs/utils/reloader.py diff --git a/bot/libs/utils/logger.py b/bot/libs/utils/logger.py index 310e6ca..294706b 100644 --- a/bot/libs/utils/logger.py +++ b/bot/libs/utils/logger.py @@ -17,6 +17,7 @@ def __enter__(self) -> None: max_bytes = 32 * 1024 * 1024 # 32 MiB self.log.setLevel(logging.INFO) logging.getLogger("discord").setLevel(logging.INFO) + logging.getLogger("watchfiles").setLevel(logging.WARNING) handler = RotatingFileHandler( filename="rodhaj.log", encoding="utf-8", diff --git a/bot/libs/utils/reloader.py b/bot/libs/utils/reloader.py new file mode 100644 index 0000000..3f7fd12 --- /dev/null +++ b/bot/libs/utils/reloader.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +import asyncio +import importlib +import os +import sys +from pathlib import Path +from typing import TYPE_CHECKING, Optional + +from discord.ext import commands +from watchfiles import Change, awatch + +if TYPE_CHECKING: + from rodhaj import Rodhaj + + +class Reloader: + """An watchdog for reloading extensions and library files + + This reloads/unloads extensions, and also reloads library modules. + This does not implement a deep reload, as there is no way to do so + that way. + """ + + def __init__(self, bot: Rodhaj, path: Path): + self.bot = bot + self.path = path + + self.loop = asyncio.get_running_loop() + self.logger = bot.logger + self._cogs_path = self.path / "cogs" + self._libs_path = self.path / "libs" + + ### Finding modules from the path directly + + def find_modules_from_path(self, path: str) -> Optional[str]: + root, ext = os.path.splitext(path) + sys_path_index = len(sys.path[0].split("/")) + if ext != ".py": + return + + local_path = root.split("/")[sys_path_index:] + return ".".join(item for item in local_path) + + ### Loading/reloading extensions and library modules + + async def reload_or_load_extension(self, module: str) -> None: + try: + await self.bot.reload_extension(module) + self.logger.info("Reloaded extension: %s", module) + except commands.ExtensionNotLoaded: + await self.bot.load_extension(module) + self.logger.info("Loaded extension: %s", module) + + async def reload_library(self, module: str) -> None: + try: + actual_module = sys.modules[module] + importlib.reload(actual_module) + self.logger.info("Reloaded lib module: %s", module) + except KeyError: + self.logger.warning("Failed to reload module %s. Does it exist?", module) + + async def reload_extension_or_library(self, module: str) -> None: + if module.startswith("libs"): + await self.reload_library(module) + elif module.startswith("cogs"): + await self.reload_or_load_extension(module) + + ### Internal coroutine to start the watch + + async def _start(self) -> None: + async for changes in awatch(self._cogs_path, self._libs_path): + for ctype, cpath in changes: + module = self.find_modules_from_path(cpath) + if module is None: + continue + + if ctype == Change.modified or ctype == Change.added: + await self.reload_extension_or_library(module) + elif ctype == Change.deleted: + await self.bot.unload_extension(module) + + ### Public method to start the reloader + + def start(self) -> None: + """Starts the deep reloader""" + self.loop.create_task(self._start()) + self.bot.dispatch("deepreloader_ready") diff --git a/bot/rodhaj.py b/bot/rodhaj.py index 8bea9f5..ae10c48 100644 --- a/bot/rodhaj.py +++ b/bot/rodhaj.py @@ -19,16 +19,11 @@ RodhajHelp, send_error_embed, ) +from libs.utils.reloader import Reloader if TYPE_CHECKING: from cogs.tickets import Tickets -_fsw = True -try: - from watchfiles import awatch -except ImportError: - _fsw = False - TRANSPROGRAMMER_GUILD_ID = 1183302385020436480 @@ -65,6 +60,7 @@ def __init__( self.transprogrammer_guild_id = TRANSPROGRAMMER_GUILD_ID self.version = str(VERSION) self._dev_mode = dev_mode + self._reloader = Reloader(self, Path(__file__).parent) ### Ticket related utils async def fetch_partial_config(self) -> Optional[PartialConfig]: @@ -196,17 +192,6 @@ async def on_message(self, message: discord.Message) -> None: return await self.process_commands(message, ctx) - ### Dev related utils - - async def fs_watcher(self) -> None: - cogs_path = Path(__file__).parent.joinpath("cogs") - async for changes in awatch(cogs_path): - changes_list = list(changes)[0] - if changes_list[0].modified == 2: - reload_file = Path(changes_list[1]) - self.logger.info(f"Reloading extension: {reload_file.name[:-3]}") - await self.reload_extension(f"cogs.{reload_file.name[:-3]}") - ### Internal core overrides async def setup_hook(self) -> None: @@ -219,9 +204,9 @@ async def setup_hook(self) -> None: self.partial_config = await self.fetch_partial_config() - if self._dev_mode is True and _fsw is True: - self.logger.info("Dev mode is enabled. Loading FSWatcher") - self.loop.create_task(self.fs_watcher()) + if self._dev_mode: + self.logger.info("Dev mode is enabled. Loading Reloader") + self._reloader.start() async def on_ready(self): if not hasattr(self, "uptime"): diff --git a/poetry.lock b/poetry.lock index 0b12785..0e6e83d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiodns" @@ -137,24 +137,25 @@ files = [ [[package]] name = "anyio" -version = "4.0.0" +version = "4.2.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" files = [ - {file = "anyio-4.0.0-py3-none-any.whl", hash = "sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f"}, - {file = "anyio-4.0.0.tar.gz", hash = "sha256:f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a"}, + {file = "anyio-4.2.0-py3-none-any.whl", hash = "sha256:745843b39e829e108e518c489b31dc757de7d2131d53fac32bd8df268227bfee"}, + {file = "anyio-4.2.0.tar.gz", hash = "sha256:e1875bb4b4e2de1669f4bc7869b6d3f54231cdced71605e6e64c9be77e3be50f"}, ] [package.dependencies] exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.22)"] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] [[package]] name = "astunparse" @@ -811,13 +812,13 @@ tests = ["environs[django]", "pytest"] [[package]] name = "exceptiongroup" -version = "1.1.3" +version = "1.2.0" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, - {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, ] [package.extras] @@ -1084,16 +1085,6 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, - {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -1615,7 +1606,6 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -1623,16 +1613,8 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -1649,7 +1631,6 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -1657,7 +1638,6 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -2297,4 +2277,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "feaf97f502139324dc51844a16cc97f122aaa83a4075f0d5fe048e8ac6cea45a" +content-hash = "b3dc901a7b78f8d6a9c55365a57cdd885f24fd885169ab2602856362c9add17b" diff --git a/pyproject.toml b/pyproject.toml index 2c2116d..d5ad886 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ environs = "^10.3.0" async-lru = "^2.0.4" msgspec = "^0.18.6" jishaku = "^2.5.2" +watchfiles = "^0.21.0" [tool.poetry.group.dev.dependencies] # These are pinned by major version @@ -30,7 +31,6 @@ jishaku = "^2.5.2" pre-commit = "^3" pyright = "^1.1" ruff = "^0.1" -watchfiles = "^0" [tool.poetry.group.docs.dependencies] sphinx = "^7.2.6" diff --git a/requirements.txt b/requirements.txt index 0ed6ce4..dc9f872 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,5 @@ typing-extensions==4.9.0 environs==10.3.0 async-lru==2.0.4 msgspec==0.18.6 -jishaku==2.5.2 \ No newline at end of file +jishaku==2.5.2 +watchfiles>=0.21.0,<1 \ No newline at end of file