[python-discord/sir-robin] New branch created: jb3/python-3.14
#dev-log
1 messages ยท Page 31 of 1
A bit of TLC to bring project to 3.14, amongst other things:
- Set a required uv version and use the lowest compatible in CI
- Add new lint rules to no longer allow
from __future__ import annotations - Update all dependencies to latest (apart from pytest, since pytest-asyncio does not yet support pytest v9)
GitHub Actions run 19210050522 succeeded.
GitHub Actions run 19210201264 succeeded.
GitHub Actions run 19210338677 succeeded.
[python-discord/bot-core] New branch created: 12.x-poetry-to-uv
Migrates from using poetry to uv with uv_build backend.
[python-discord/bot-core] branch deleted: 12.x-poetry-to-uv
[python-discord/bot-core] New branch created: 12.x-source-code-command
12d8c96 Provide a pre-built SourceCode cog based on bot... - jb3
Copies over the source command from bot, including functionality that allows for tag parsing on bot.
6e5b43a Update source code modules so documentation can... - jb3
Could we add the thumbnail for source objects too?
<img width="811" height="895" alt="Image" src="https://github.com/user-attachments/assets/27e05eca-d863-4a6b-b570-9cc2fd8c97eb" />
async def _get_source_object(ctx: commands.Context[Bot] argument: str) -> tuple[object, SourceType]:
This implementation needs to support itself. Eg, if its defined within the pydis_core class it needs to link to its own repo, with the proper version tag from importlib.metadata.version.
This is technically a bug that always existed, but since nothing exists in pydis_core.exts, it was never revealed.
Lets be explicit.
prefix_command = enum.auto()
This requires changes elsewhere too.
Not sure it's that necessary, I was thinking of moving away from that because it's noisy and looks a bit crap. Might add it elsewhere.
Hmmm, what about github in the footer and bot icon in the author.
I don't really understand, what?
Slash commands are not currently supported. Specifying this is a prefix command makes that more clear. If we want to add support for slash commands, this would want to be renamed anyhow for clarity.
Oh right, then we should use text_command.
Connected!
STARS_THIS_YEAR = DAYS_THIS_YEAR * 2
Isn't the number of stars still 2x the number of days, as per https://github.com/python-discord/sir-robin/issues/158#issuecomment-3507509710 ?
if member_aoc_info["stars"] < _helpers.STARS_THIS_YEAR:
It would continue even if user has the same amount of stars as STARS_THIS_YEAR
def days_in_year(year: int | None = None) -> int:
GitHub Actions run 19215751044 succeeded.
Resolved in 57016b401ac297557320361984a1a9f5ba58cf97
f392398 Add changelog entry for SourceCode functionality - jb3
thoughts on adding a link to bot core as well here?
what about using inspect.getmodule()? It should be less fragile.
Could this perhaps use bot.sha or bot.version in order to pin to the same commit as the currently running code? This will prevent link decay.
self.github_repo = github_repo.rstrip("/")
It should also be clear that the command isn't in the bot's repo and is in a shared repository.
What about using the embed's author for where the source comes from. set_author("Pydis Core") if its from the bot_core repo, set_author(bot.user.name)
Then set the author url to the specific github repo as well. It is subtle but a nice addition.
Noise for most use cases, pydis_core is never really relevant to those outside PyDis (hence we don't really widely promote it).
Supporting commands from pydis_core is about the most we should support I think.
Most of time someone looking at the source command is trying to contribute and looking at how commands are implemented. Giving a link to where other commands are implemented is a benefit and intent of the source command, IMO.
If a user is using the bot's source command, they're already interested in how it works, and surfacing bot-core is an important part of how the pydis bots work.
It is still somewhat relevant, just not here.
31a003bcdf048f0eef87d7688c98f8981c83fb88
43c8d2b61f97ac00fccda1806d345791bb3ea10e
304fe53b3200641905b18ca8cba52a5416f36503
cfc254d03e57f8ec6ae050b5a7704a2cb8b4f5c0
this could be provided as a setup variable with a default of "main"
Embeds look a bit crap with a title, an author and a footer. Interpolating into the footer instead.
c1a18410f9da0f96dba858cd105927f639d1c158
<img width="572" height="483" alt="Screenshot 2025-11-09 at 23 58 17" src="https://github.com/user-attachments/assets/12faf3cb-432e-49fd-a2e7-e4dfc0ab0bd4" />
It could, but this works with our current bots without change on their side. Just seems easier and is guaranteed to work for our use cases.
Setup for the bot core instance is already massive.
I don't see a nice way to include this without fundamentally complicating what is a simple feature that hundreds of bots have.
If someone else feels passionately that we should include it, then sure, but the whole point here is to try and transparently carry across functionality from the current command, which obviously does not mention pydis_core.
[python-discord/sir-robin] branch deleted: jb3/python-3.14
Connected!
GitHub Actions run 19216605594 succeeded.
Connected!
Description
API for NASA seems to be offline/have disappeared.
Steps to Reproduce
Use any of the commands under .space.
Expected Behaviour
Nice pictures from space.
Actual Behaviour
Not nice traceback in logs (either Heroku 404s or 504s).
sir-lancebot-8dd9c4579-8cntf sir-lancebot 2025-11-10 00:21:12 | ERROR | bot.exts.core.error_handler | Unhandled command error: 504, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url='https:...
Connected!
GitHub Actions run 19216780308 succeeded.
๐ ๐ Government shutdown ๐ ๐
Not by Loki, by the Grafana Agent (Alloy).
GitHub Actions run 19217104511 succeeded.
Connected!
GitHub Actions run 19217166800 succeeded.
Looks good! Thanks!
<img width="672" height="806" alt="image" src="https://github.com/user-attachments/assets/65a8c4bd-82e6-420e-b79c-bcfecfb0e1fe" />
GitHub Actions run 19217264980 succeeded.
Rest in pieces, Webhook matching. You were a good idea, but bots can't get tokens for webhooks they didn't create. As such, webhook matching can work, but also needs to check for a token present.
Fair enough, I think. Unified configuration should help this some.
GitHub Actions run 19219380545 succeeded.
Would you please prepare a pull for the bot contributing guide in the website to bump the necessary version for bot?
GitHub Actions run 19235599049 failed.
Would you please prepare a pull for the bot contributing guide in the website to bump the necessary version for bot?
Given it's one file, one line and is solely a content change I'm going to just update main when this is merged.
GitHub Actions run 19236550348 succeeded.
Description
There are some repositories that we frequently want to reference with the .gh repo command, e.g. discord.py, Kubernetes, most PyDis repos.
We should support the following behaviour when the .gh repo command
- Check if the user has provided a full repo (e.g.
user reponameoruser/reponame), if so, use that. - Check if they have provided one argument that is a repo name we've stored (e.g.
kubernetes->kubernetes/kubernetes), if so, use that. - Otherwise, check if `...
Here's an implementation that simply matches to the highest starred repo with that name on GitHub, which would seemingly be easier than a resource file.
Sure, that would also work, but since we don't presently use the PostgreSQL apt repository and simply coast with the Debian stable version, I suggested the version that's going to be in trixie.
jc, thanks. This makes sense.
On 10 Nov 2025, at 17:27, jchristgit @.***> wrote:
jchristgit
left a comment
(python-discord/infra#608)
https://github.com/python-discord/infra/issues/608#issuecomment-3513012231Sure, that would also work, but since we don't presently use the PostgreSQL apt repository and simply coast with the Debian stable version, I suggested the version that's going to be in trixie.
โ
Reply to this email directly, view it on GitHub <ht...
Updating after discussion on Discord:
We will still use a resource file that defines mappings of repos to a fully expanded version (e.g. kubernetes -> kubernetes/kubernetes), but we will replace the failed stage with the search mentioned above.
Updated flow chart follows, we are basically removing our failure state.
flowchart TD
Start([User Input]) --> CheckFull{Full repo provided?<br/>user/reponame}
CheckFull -->|Yes| UseFull[Use provided repo]
CheckFull --...
This is way too large to review. Please split it up into multiple smaller PRs.
This is way too large to review. Please split it up into multiple smaller PRs.
As you have done with python-discord PRs before I recommend you review this commit-by-commit. Large diffs are primarily related to lockfiles and linting changes, for which exclusion is trivial.
52f8dbc refactor: update botstrap to be more beginner-f... - onerandomusername
package: str
"""Name of the package name the symbol is from"""
group: str
"""Interpshinx "role" of the symbol, for example `label` or `method`"""
base_url: str
"""Absolute path to to which the relative path resolves, same for all items with the same package"""
relative_url_path: str
"""Relative path to the page where the symbol is located"""
symbol_id: str
"""Fragment id used to locate the symbol on the page"""
Connected!
GitHub Actions run 19242323402 succeeded.
Agree with Chris! This is a great change! @copilot what do you think?
@python-discord/sudo-devops please confirm
Resolved in c1a3673a91bc9653a492b1ca4060e8f588263bb0
GitHub Actions run 19242664744 succeeded.
Message from the Office of @ChrisLovering:
<img width="96" height="32" alt="Screenshot 2025-11-10 at 18 55 01" src="https://github.com/user-attachments/assets/53f6d73e-4c39-4c37-b31c-55b7088dbfa1" />
[python-discord/bot] branch deleted: jb3/3.14-upgrade
I agree with jc, bumping ruff can happen separately.
can we revert this Pr and separate into multiple PRs so i can properly review?
Connected!
GitHub Actions run 19242736526 succeeded.
can we revert this Pr and separate into multiple PRs so i can properly review?
Chris, PRs are welcome, thanks.
GitHub Actions run 19242817286 succeeded.
Great stuff as always.
Pytest asyncio doesnt support 9.0 yet as far as I can tell.
@dependabot please fix these issues and this should be good to go!
Nitty style, stringify the whole annotation rather than just an argument
async def _get_source_object(ctx: "commands.Context[Bot]", argument: str) -> tuple[object, _SourceType]:
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
@dependabot please fix these issues and this should be good to go!
It won't be, there are changes that make the way we do mocks apparently non-functional on newer versions of pytest and pytest-xdist. We've seen similar issues on other projects (hence why a lot of the dependency bump PRs hold pytest & pytest extensions back).
@copilot - pytest 9.0 supports subtests natively now, and these should be used (and the pytest-subtests removed from the pyproject and project), they are documented here: https://docs.pytest.org/en/stable/how-to/subtests.html#subtests
- The directive about moving to TOML specifically means the new non-INI method: https://docs.pytest.org/en/stable/changelog.html#new-features
GitHub Actions run 19252522625 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.43.0
GitHub Actions run 19267351431 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
!doc refreshdoc
Inventories refreshed
sweet
Hey, Iโd like to work on this issue if itโs still available. Please assign me!
E.g. the command
!d `collections.Counter` some more textdoes not work. It does work without the trailing text. Probably this is a nice simple first issue if someone wants to pick it up.
Hey, Iโd like to work on this issue if itโs still available. Please assign me!
E.g. the command
!d `collections.Counter` some more textdoes not work. It does work without the trailing text. Probably this is a nice simple first issue if someone wants to pick it up.
Assigned now @Sylver-Icy
not reviewed fully, this seems pretty meh.
Nose support was dropped in pytest 8.0.0 so this should no longer be necessary https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
I dunno about just wrapping everything in enumerate in general, I feel like e.g. str(type(channel)) would be a more descriptive name for a test case.
Adding a test case ID seems silly here, as it's coming from an itertools.product and it would be a pain to work out the inputs that it's referring to.
Also the has_targets is not a replacement for the target because there are multiple not none targets.
I'd accept that the message can be removed though, since it's an expected output.
surely this change just isn't necessary?
GitHub Actions run 19276491625 failed.
Hm, it seems like dependabot uses pip as the package ecosystem for security updates, so doesn't update the lock file?
This is free for anyone to work on (continuing off the code from the closed PR if you'd like)
5e0d1a7 Use proper header name for junk sieve rule - jchristgit
Will go through and have a proper look case-by-case, I agree there are probably ways in a lot of them where we can better serialize instead of using enumerate.
<img width="926" height="119" alt="Screenshot 2025-11-11 at 20 19 57" src="https://github.com/user-attachments/assets/dbc85527-c41e-4b8e-b8a1-5acefdd2d9e2" />
Seems to be, yeah. I'll relock and push.
GitHub Actions run 19277609719 succeeded.
GitHub Actions run 19277646597 succeeded.
Fix presumed for #1569 and attempted fix in #1567 is not actually the fix I expected.
This is a dependabot bug, plain and simple. Full issue with workarounds at https://github.com/dependabot/dependabot-core/issues/11913
GitHub Actions run 19278949339 succeeded.
I think this is due to the fix for https://github.com/lemonsaurus/django-simple-bulma/issues/98. I'd guess we're combining classes in unintended ways which has broken stuff now that the CSS ordering has changed.
I think this will just require a bit of work going through site and fixing the things that have changed.
GitHub Actions run 19280011857 succeeded.
Connected!
GitHub Actions run 19280045484 succeeded.
How many lines are typically in the leaderboard? Maybe it would be better to construct a list with append and then reverse it? (to avoid O(N<sup>2</sup>) complexity)
Let's use a consistent quote style. Since Python 3.12 you can do f"(You) {data["name"]}"
This line should only match once, and only insert once. There's an append that runs for each line in the default case below.
I have another PR that modifies this line to sort the user into the list properly over at https://github.com/python-discord/sir-robin/pull/161
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Following the deprecation/retirement of Ingress NGINX we need to look at migrating to the Gateway API which is the successor to the Ingress API.
This ideally needs to be completed by March 2026 when Ingress NGINX will stop receiving updates.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
I'm more than willing to implement this. I recently contributed the quote commands (#1707) and would love to work on improving the .gh repo command with alias support and default org functionality.
Following the deprecation/retirement of Ingress NGINX we need to look at migrating to bare metal deployment which is the successor to the Ingress API.
This ideally needs to be completed by March 2026 when Ingress NGINX will stop receiving updates.
Why? Our balance of stateless in Kubernetes and state on a server is actually incredibly pleasant to work with.
It's a trivial migration and everything else works, we can't just migrate ingress onto a server without migrating every other component of every other application we run.
We tried that project before and it lost steam almost immediately. Are we really going for round 2?
GitHub Actions run 19331437855 failed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Also it could be possible that no such repository exists, in that case we do have a failure.
Connected!
Connected!
Connected!
[python-discord/infra] New branch created: dovecot-2.3
5f3c6fb Upgrade configuration files for Dovecot 2.3 - jchristgit
Fixed by Joe by installing the new Grafana APT key and updating the signed-by
value in /etc/apt/sources.list.d.
Fixed by Joe on lovelace.
GitHub Actions run 19345070490 failed.
Updates our Ansible PostgreSQL setup to:
- Use the PostgreSQL repo
- Switch to PostgreSQL 18
- Re-order tasks
:white_check_mark: Successfully fast-forwarded commits from python-discord:jb3/postgres-18 onto main
[python-discord/infra] branch deleted: jb3/postgres-18
All is said and done. Tickets will be made for the remaining outcasts.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
[python-discord/infra] New comment on pull request #613: Upgrade configuration files for Dovecot 2.3
Merged in b92474d223f94cb0bfa6dda23b6fffd3691396d5
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Relevant Issues
Closes #1710
Description
- Create
bot/resources/utilities/stored_repos.json - If a full repository not provided:
- Enhance
.gh repoto support repository aliases - Add default org support for Python Discord repositories
- Add GitHub โmost starredโ fallback search for non-PyDis / non-stored repositories
- Enhance
I Did:
- [x] Join the Python Discord Community.
- [x] Read all the comments in this template.
- [x] Ensure there...
GitHub Actions run 19386005867 failed.
GitHub Actions run 19386039116 succeeded.
GitHub Actions run 19386102410 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
I have not tested, but looking at changes there's nothing that would break the bot.
Changes look good.
Conditional approval on fix's bool annotation comments.
Less concerned about consistent quote usage and my minor nitpick, so those can be passed on.
the smallest of nitpicks, would appreciate a line break between the if-statements for future me.
Untested, but looks straightforward and nothing immediately bot breaking.
Conditional approval on issue opening for TODO in code.
Does this need an annotation? It should be inferable.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Remove. Will be part of the aoc-faq channel instead. I will be stealing your wording though :D
This should be removed. Message in FAQ channel will address this in addition to the 2 announcements that will go out. Don't want to maintain this in future years.
I went to remove all portions relating to the global leaderboard change command and embed that isn't directly called from the global leader board command. I don't want to maintain that functionality going forward.
Instead there will be new messages in the aoc-faq explaining that change. It will be mentioned in the announcement going out in the next few days and in the 1-3 days before it begins.
I didn't comment on every line that needs to be changed, but you get the idea.
Keep name as "How does scoring work" and then just keep it to scoring for PyDis leaderboards. Would like to remove the global bit just to keep it more focused and straight forward.
As a potential kaizen improvement, if we could mention the "we have multiple leaderboards, so your overall rank will not be shown on that specific leaderboard. Run command to see overall PyDis rank" yada yada, etc etc.
A todo for this was added as part of GH-164. Support may already exist but it has not been tested.
I was writing this code with pyright strict mode enabled. I can remove this if that's necessary.
GitHub Actions run 19395117745 succeeded.
Pyright interprets this as a literal[False] and only realises its a bool later on.
GitHub Actions run 19395150318 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
I'd like to address in some form that its not so much about the competitive aspect, as aoc has toned that down as well (and our mix of leaderboards seems very much against part of the FAQ:
(However, I've made it so you can share a read-only view of your private leaderboard. Please don't use this feature or data to create a "new" global leaderboard.)
That sort of feels like what we in Pydis, and I want to make sure we respect the intent here.
<details>
<summary>Full FAQ entry</sum...
@onerandomusername That still doesn't explain why the annotation would be needed. What would we lose if it was removed?
Besides, pyright ignores explicit annotations on local variables
def foo():
x: bool = False
reveal_type(x) # still Litera[False]
repo_query = each
With this this change, you should be able to avoid the for-loop in Case 1, and maybe add comment to clarify:
if is py_dis:
repo_data = repo_query # Earlier, we already matched the repo with 'repo_query = each'
Techinically you could also do repo_data = each, and then then it would be if fetch_most_starred... elif not is_pydis and therefore removing the extra if is_pydis check but that might hurt reada...
GitHub Actions run 19400369058 succeeded.
GitHub Actions run 19400716619 succeeded.
It's good practice to cancel the cog when unloading. I'm believe it's done here too (not too sure), but it can lead to some problems because a task isn't automatically cancelled when the cog is unloaded.
async def cog_unload(self):
self.refresh_repos.cancel()
GitHub Actions run 19407430179 succeeded.
It's good practice to cancel the cog when unloading. I'm believe it's done here too (not too sure), but it can lead to some problems because a task isn't automatically cancelled when the cog is unloaded.
async def cog_unload(self): self.refresh_repos.cancel()
It wasn't done, I had no idea that was best practice but I have implemented it now.
repos, _ = await self.fetch_data(FETCH_MOST_STARRED_ENDPOINT.format(name=quote(repo_query)))
See comment below
repo_data = repos["items"][0] # Top result
# Remove all the code below this since we no longer need it
If we do this, we can avoid duplicate code and just use the main parsing (the one that is_pydis and stored repos use). Kinda hard to explain, but I hope you know what I mean.
Do note that this case does not seem to check for a parent repo, so if there is a reasoning behind it, make sure to handle it
if not repos["items"]:
See comment below
b358e39 Add role to deploy MongoDB as quadlet on lovelace - jchristgit
[python-discord/infra] New branch created: mongodb
blackbox supports monitoring TLS certificates on any port that runs TLS.
We should incorporate this into our blackbox exporter configuration on lovelace and scrape MongoDB on port 27017, especially as we use custom logic to deploy the SSL certificate for it.
For this, we should allow connections from lovelace's IP addresses to itself.
[python-discord/infra] New branch created: mongodb-stage-2
71e5fb2 Remove Kubernetes MongoDB deployment manifests - jchristgit
e9fc835 Update blackbox MongoDB connection string - jchristgit
c0f8065 Update modmail & forms secrets to use new mongo... - ChrisLovering
We have migrated the data for ModMail, forms backend and blackbox (yet to run) to lovelace.
So far, everything looks good. Joe and Griff are working on backing up the data.
:x: Branch is in diverged status, ahead by 9 commits and behind by 1 commits. Please update the branch to reflect changes on main and try again, or merge locally.
:white_check_mark: Successfully fast-forwarded commits from python-discord:mongodb onto main
[python-discord/infra] branch deleted: mongodb
ee0c10e Remove Kubernetes MongoDB deployment manifests - jchristgit
:white_check_mark: Successfully fast-forwarded commits from python-discord:mongodb-stage-2 onto main
[python-discord/infra] branch deleted: mongodb-stage-2
[python-discord/infra] New branch created: jb3/borg-backups
Replace blackbox with borg for backing up our databases.
WIP as we are a beta version behind from where borg supports S3.
Ah! I get what you mean and I've done it. As for checking the parent repo, my bad, I forgot it. I added it too now.
GitHub Actions run 19421639450 succeeded.
This shouldn't be needed I believe. You already do the same thing in Line 423:
embed = self.build_embed(repo_data)
await ctx.send(embed=embed)
GitHub Actions run 19423802758 succeeded.
Thx for addressing the reviews earlier, these are just some minor ones
So far, it looks good to me, I'll review once more after this change
# If it's a fork, then it will have a parent key
try:
parent = repo_data["parent"]
embed.description += f"\n\nForked from [{parent['full_name']}]({parent['html_url']})"
except KeyError:
log.debug("Repository is not a fork.")
Add back the comment to make it clearer
# There won't be a message key if this repo exists
if "message" in repo_data:
embed = discord.Embed(
title=random.choice(NEGATIVE_REPLIES),
description="The requested repository was not found.",
colour=Colours.soft_red
)
Same thing, add back the comment here to clarify why we check for message
GitHub Actions run 19436882039 succeeded.
GitHub Actions run 19436976456 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
So far liking the general implementation. These comments are more about code style. I previously began a review but it looks like GitHub ate my comments so I might have more to add later.
This variable name doesn't feel accurate. Why are they stored repos? What's special about these?
Naming consistency. The other three are all GET requests as well.
MOST_STARRED_ENDPOINT = "https://api.github.com/search/repositories?q={name}&sort=stars&order=desc&per_page=1"
self.repos and self.stored_repos don't have obviously different names: what makes self.repos different from self.stored_repos?
Please rename self.repos to something more descriptive.
If you store self.repos as a dictionary of repo.name to repo data you won't need to use a for loop below and can instead check name in self.repos
I'm also not sure what I think about making the repo command use this cache: it seems to solve a problem that didn't exist with no apparent gain, though I'm probably overlooking something.
"peps": "python/peps",
}
It may also be worth adding python: python/cpython but this open to debate
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 19454593151 succeeded.
# Determine type of repo
if repo_query.count("/") != 1:
if repo_query in self.stored_repos:
repo_query = self.stored_repos[repo_query]
else:
for each in self.repos:
if repo_query == each["name"]:
repo_query = each
is_pydis = True
break
else:
fetch_most_starred = True
Yeah, stored_...
are you sure we should map python to python/cpython or was that a typo? anyways i did add peps and cpython: python/cpython
i used stored_repos because in the issue jb3 has said UseStored in the flowchart
GitHub Actions run 19454836769 succeeded.
GitHub Actions run 19455069092 failed.
GitHub Actions run 19455097342 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
# 'items' is a list of repos, if it is empty, no repos were found
if not repos["items"]:
Similarly, adding a comment would make it clearer
GitHub Actions run 19473616083 succeeded.
GitHub Actions run 19484565463 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.45.0
GitHub Actions run 19484572318 succeeded.
I do think that python should be mapped to cpython because there isn't a psf/pypa/pypi repository named "python".
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
well the repository mappings are something that can be changed at anytime, we should not be thinking about that as of now. I was hoping for a code review because I still haven't gotten a "Looks good" by now.
We can compact this into a single comprehension statement. I've also added a casefold to this statement to ensure repo name comparison is possible.
fetched_repos, _ = await self.fetch_data(REPOSITORY_ENDPOINT.format(org="python-discord"))
self.pydis_repos = {repo["name"].casefold(): repo for repo in fetched_repos}
log.info(f"Loaded {len(self.pydis_repos)} repos from Python Discord org into memory.")
we should casefold before checking these, see above comments.
if repo_query.count("/") != 1:
if repo_query in self.stored_repos:
repo_query = self.stored_repos[repo_query]
elif repo_query in self.pydis_repos:
repo_query = self.pydis_repos[repo_query]
is_pydis = True
else:
fetch_most_starred = True
This docstring should be more descriptive about what it does below.
this check was already present before i started working on this.
GitHub Actions run 19493573569 succeeded.
if repo_query.count("/") == 0:
repo_query_casefold = repo_query.casefold()
if repo_query_casefold in self.stored_repos:
repo_query = self.stored_repos[repo_query_casefold]
elif repo_query_casefold in self.pydis_repos:
repo_query = self.pydis_repos[repo_query_casefold]
is_pydis = True
We should casefold once and store it in a variable.
Indent doesn't match here, same with the comment above
The repository should look like `user/reponame` or `user reponame`.
If it doesn't match the format above, not a stored or PyDis repo, it will fetch the most-starred repo
matching the search query from GitHub.
This docstring doesn't mention that a repo is fetched normally.
Sounds a bit weird but it's pretty concise, if you can think of a better way, feel free to do so
GitHub Actions run 19498892105 succeeded.
if repo_query.count("/") > 1:
embed = discord.Embed(
title=random.choice(NEGATIVE_REPLIES),
description="There cannot be more than one `/` in the repository.",
colour=Colours.soft_red
)
Very minor change, just keeping the code style consistent throughout
GitHub Actions run 19499755923 succeeded.
this is shaping up nicely, I don't have any more changes:)
GitHub Actions run 19506405022 succeeded.
If providing a default here we should assume description is optional. But we didn't need to that in the past, so I don't think we need to say No description provided.
Either way, one of the two should be implemented:
description=repo_data["description"],
description=repo_data.get("description") or "No description provided.",
If this is because the /orgs/{org}/repos endpoint doesn't provide the same information as the /repos/{org}/{name} endpoint, perhaps we shouldn't be using the cache for that information after all.
GitHub Actions run 19508146279 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Connected!
GitHub Actions run 19521567135 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 19556520587 succeeded.
Implements the clean fix.
Replaces .strip("โ)with.replace(โ", "").split()[0] to properly handle symbols formatted with backticks and trailing text.
This ensures the docs command resolves the correct symbol even if users type symbol extra-stuff.
GitHub Actions run 19559308913 succeeded.
GitHub Actions run 19559327728 succeeded.
GitHub Actions run 19560600547 succeeded.
GitHub Actions run 19567016551 succeeded.
GitHub Actions run 19569973168 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 19574026347 failed.
GitHub Actions run 19576464793 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 19591204787 succeeded.
GitHub Actions run 19591408949 failed.
GitHub Actions run 19591608248 succeeded.
[python-discord/king-arthur] New branch created: correct-misnaming-king-arthur
ef124d6 Fix wrong bot title being used around the codebase - jchristgit
King Arthur The Terrible was promoted. We must address him properly.
GitHub Actions run 19598866919 failed.
Connected!
GitHub Actions run 19599093278 succeeded.
Connected!
GitHub Actions run 19599142723 succeeded.
[king-arthur] Branch correct-misnaming-king-arthur was force-pushed to `f48e4f6`
f48e4f6 Fix wrong bot title being used around the codebase - jchristgit
[python-discord/king-arthur] branch deleted: correct-misnaming-king-arthur
<img width="1395" height="209" alt="Image" src="https://github.com/user-attachments/assets/9c8791b2-e9dc-4d94-8bc6-a1b2aa2ebc89" />
are these the APIs that were being used?
GitHub Actions run 19599192991 failed.
GitHub Actions run 19599232831 succeeded.
[python-discord/infra] New branch created: terrible
c7a8a5b Fix typo in King Arthur The Terrible environmen... - jchristgit
[python-discord/king-arthur] New branch created: 3.14
GitHub Actions run 19599406504 succeeded.
If you're activating the environment you don't need to use uv run subsequently.
We can just remove this, it follows requires-python
For the UV lowest version specifier to work, we should add the minimum UV version to this file (anything above latest stable).
GitHub Actions run 19599511012 succeeded.
GitHub Actions run 19599567360 succeeded.
[python-discord/king-arthur] branch deleted: 3.14
:white_check_mark: Successfully fast-forwarded commits from python-discord:3.14 onto main
GitHub Actions run 19599663484 succeeded.
Did this get applied?
No, but the pydantic settings didn't get updated in king arthur, so nothing breaking yet
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Did this get applied?
Do you have your cluster credentials still?
I lost my credentials,.pls send help
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
gm, this has now been applied & all non-conforming secrets have been deleted.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.45.0
GitHub Actions run 19635420405 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 19646835328 succeeded.
7d586a2 fix: don't say "permanently" when a user is kic... - onerandomusername
Connected!
GitHub Actions run 19647192957 succeeded.
[python-discord/site] New branch created: jb3/sponsors-2025
Updates to Sponsors for 2025, additionally shifts layout into a 4x2 layout.
GitHub Actions run 19652096427 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
AAAAAAAAAAAAAAAAAA
Connected!
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Connected!
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
Connected!
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
eeee
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
[python-discord/bot] New branch created: jb3/fix-doc-devlog-notifications
926de67 Ignore intersphinx std:doc objects from DocItem... - jb3
These items caused issues that led to spam in the #dev-log channel about stale inventories (though inventories were not stale).
All std:doc items are accompanied by a module item or a label item that contains actual contents that are compatible with our doc command, so hopefully ignoring these items will not cause any reduced functionality of the command.
When testing locally this removes all symbols with empty symbol IDs and stops the warning spam to #dev-log.
GitHub Actions run 19686858256 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Can we merge or are we held up on something?
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
It's the above command usage changes as a result of changing how we use argparse, it's on my list to take a look at. Even though they're treated as positional arguments they're being displayed as options.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Fixed this now:
root@038be88be536:/snekbox# snekbox 'some code' --some-nsjail-arg 1234 --- -c abcdef --some-python-arg
Namespace(code='some code', nsjail_args=['--some-nsjail-arg', '1234'], py_args=['-c', 'abcdef', '--some-python-arg'])
Usage is now:
usage: snekbox [-h] code [nsjail_args ...] [--- py_args ...]
positional arguments:
code the Python code to evaluate
nsjail_args override configured NsJail options (default: [])
py_args ...
GitHub Actions run 19715196838 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Connected!
GitHub Actions run 19717182290 succeeded.
Our community leaderboard is very much not a new global leaderboard. It is not pulling in every and anyone's data and it's not publicizing the data for the larger internet to see. It's for our community usage. You need to be in our server to get added to it, you need to be in our server to see the overall leaderboard, and if we find people are not participating in advent of code in good faith we can remove them from the leaderboard and bar them from the completionist role.
Private leaderbo...
Connected!
GitHub Actions run 19765686538 succeeded.
GitHub Actions run 19766476207 succeeded.
c2b5826 update aoc to support 12 stars this year rather... - onerandomusername
d932f37 update summer to get days for year - onerandomusername
64638ab add lb fix in day counts - onerandomusername
f5634d6 update completionist count - onerandomusername
e795694 Apply suggestions from code review - onerandomusername
Connected!
GitHub Actions run 19766497002 succeeded.
GitHub Actions run 19774154095 succeeded.
GitHub Actions run 19774194393 succeeded.
GitHub Actions run 19774380337 succeeded.
GitHub Actions run 19774502853 failed.
GitHub Actions run 19784160083 succeeded.
Connected!
GitHub Actions run 19784169831 succeeded.
GitHub Actions run 19785702726 succeeded.
GitHub Actions run 19787003072 succeeded.
Untested on my end, but changes don't look like they'd cripple the bot.
Thank you both for the PR + changes. Will be using a good portion of the original wording in the FAQ channel and will make sure to credit in AoC announcement.
d69873e fix: update the link for the aoc embed thumbnail - onerandomusername
217c180 show a list of changes for the 2025 season, get... - onerandomusername
9b9fac8 Merge branch 'main' into qt/aoc-no-global - onerandomusername
9088a9f Address CR - mbaruh
1a67d49 Merge pull request #165 from onerandomusername/... - mbaruh
Connected!
GitHub Actions run 19787274099 succeeded.
Current we rely on the "old" way of interfacing with the Advent of Code website to get information from our various community leaderboards to compile into our overall singular community leaderboard. This involves getting the advent of code cookie for my account, which expires ~5-6 weeks after it gets created. We need to get a second account's cookies that's authenticated later in the year to ensure our features work smoothly after the first set of cookies expire.
This is a pain and very sens...
Connected!
[python-discord/sir-robin] New branch created: month-check-for-specific-roles
e79f86d Allow certain roles to run AoC commands in Nove... - mbaruh
The goal is give staff time to make sure that commands work properly in production without having to wait until December. I restricted it to a few roles because it's just for sanity check.
GitHub Actions run 19791144315 succeeded.
can we give the contributors role access too? ๐ ๐
I know this is probably stale but for slash we probably don't need the channel checks, we can just use ephemeral responses if the user can't use the command there.
Will discuss with the wider events team but personally I'm not sure it's critical with the bot being runnable locally & there being reasons we may not want people in leaderboards or using commands publicly before the event.
If we add ephemeral responses I'm more inclined to allow the commands for everyone a couple of days before but not announce it.
I don't really want the contributor role becoming non-cosmetic.
Hey, this is just for administration to make sure that everything runs smoothly before the event begins, there's no value in giving access to a wider audience. Commands that do (link, unlink) can already be accessed in November.
Connected!
Ah fair. This is mainly to test tokens and fetch permissions ahead of time. That makes a lot of sense.
Lgtm then
@jb3 users can already link and unlink AOC accounts in November.
This raises an error even when roles is not provided because the default is not None.
if roles:
Oh right, it was None at first haha
37cdcd4 Fix role condition for listeners - mbaruh
GitHub Actions run 19805922850 succeeded.
if not hasattr(ctx.command, "extras") or "month_checks" not in ctx.command.extras:
log.debug(f"No month checks found for command {ctx.command}.")
return True
user_roles = {r.id for r in ctx.author.roles} if ctx.author.roles else set()
allowed_months_for_user = sorted(
set(
month
for roles, months in ctx.command.extras["month_checks"].items()
for month in months
if not roles or set(roles) & user_...
d4787b5 Replace Month enum with builtin calendar.Month - lemonyte
[python-discord/sir-robin] New branch created: upgrade-to-builtin-month
According to pyproject.toml the minimum Python version is now 3.14.
https://github.com/python-discord/sir-robin/blob/1a67d49f1ae716d378790c3086898dd63668494b/pyproject.toml#L5
GitHub Actions run 19806573305 succeeded.
Umm, it's nice but I'm not sure what to do about it in terms of review. Is there something wrong with my code? Are you saying that there's no need for different errors? At the very least there should be one for when the user is not allowed to run the command at all, although I should probably change that to a more specific MissingAnyRole now that I look at it.
It's not a hard change request, I just think the code is easier to follow this way. If other's approvals override my suggestion that's fine too :)
The function before the changes only raised InMonthCheckFailure, and I don't see a condition where your implementation would raise just a CheckFailure.
In the case the user is not allowed to run the command at all regardless of month, that logic shouldn't be in the in_month_command predicate, I think.
It will be raised when there are only role-specific month checks but none of them apply to the user invoking the command. In that case the result is that the user can't use the command at all. Since it's a result produced by applying the decorator to a command, the predicate should handle it IMO.
Ah fair, I've updated my suggestion to handle that.
GitHub Actions run 19807278934 succeeded.
I tried to clean it up a bit, but although it's not significant I'd like to keep the distinction between general and specific access.
I'd like to keep the distinction between general and specific access.
Yep, that makes sense.
@jb3 @onerandomusername what do you think? A few more pairs of eyes would be helpful.
GitHub Actions run 19808636477 succeeded.
Updated role descriptions for Code Jam. Replaced Owners with Directors. Added PyWeek roles.
GitHub Actions run 19809273320 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.47.0
GitHub Actions run 19907165153 succeeded.
GitHub Actions run 19940088283 failed.
5940328 Add a task to automatically create AoC spoilers... - mbaruh
[python-discord/sir-robin] New branch created: aoc-daily-posting
GitHub Actions run 19945840653 succeeded.
GitHub Actions run 19945873191 succeeded.
GitHub Actions run 19946412544 succeeded.
GitHub Actions run 19946469854 succeeded.
Untested but looks good and solid. Lets me fall asleep early on the couch and not worry about creating a spoiler thread.
Connected!
GitHub Actions run 19959540070 succeeded.
This PR updates the bot/resources/stars.json file used by the Superstarrify command.
- Added 100+ newer and more relevant celebrities
- Alphabetically sorted the complete list
- Kept the existing JSON array structure as expected by the command and tests
Fixes #662.
GitHub Actions run 19975232576 succeeded.
GitHub Actions run 20009392776 succeeded.
The python command on Windows is being phased out.
[python-discord/bot] Checks Successful on PR: #3448 venv tag: only suggest invoking Python with `py`
GitHub Actions run 20010883486 succeeded.
The
pythoncommand on Windows is being phased out.
Source?
GitHub Actions run 20013482996 succeeded.
This is backwards. Its the py command which is being phased out.
A link is broken, its content seems to have moved:
old link: https://www.feldroy.com/books/two-scoops-of-django-3-x
new link: https://www.feldroy.com/two-scoops-of-django
GitHub Actions run 20027956648 failed.
As issue #1575 points out, the link to the book is broken, caused by the contents being moved to a different page.
I've updated the link within the .yaml pertaining to the file, no other changes were necessary.
GitHub Actions run 20061697799 succeeded.
GitHub Actions run 20073052537 failed.
Doc item doc_item.symbol_id='frozenset.add' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 20155362383 failed.
GitHub Actions run 20180180502 succeeded.
top_domain_under_public_suffix does "foo.bar.com" -> "bar.com", but "foo.bar.co.uk" -> "bar.co.uk" I'm guessing?
What does this have to do with decoding urlencoded stuff?
Nevermind, I've read the release notes of tldextract.
What does this have to do with decoding urlencoded stuff?
It doesn't, which is why it's in a separate commit :D just replaced a deprecated attribute
FYI: urllib.parse.unquote the entire URL can change the meaning of the URL quite severely.
For example, http://example.com%2F:%2F@malicious-site.example.org/ is a URL with the host of malicious-site.example.org, the username example.com/ and password /. But if you just unquote the entire thing, you get http://example.com/:/@malicious-site.example.org/ which has the hostname of example.com.
Another example: https://example.com/apple/banana/%2e%2e%2f%2e%2e%2fcherry semantic...
To summarize some discussion with mbaruh from Discord:
- Discord likely uses JavaScript's
URLclass (new URL/URL.parseetc.) to figure out what part of the message should be a hyperlink. - JavaScript's URL parser will handle any amount of extra slashes after
http://and discard them, so e.g.http://////////////////example.comis considered the same ashttp://example.com. - RFC 3986 and the WHATWG web standard thing both allow domain names to be percent-encoded, so `http://%d0...
Relevant Issues
Closes #1450
Description
Added on_raw_reaction_add handler to support reaction events in DMs, as the standard on_reaction_add doesn't fire in DM contexts.
Original Implementation @ OSCxSST/sir-lancebot-SLB/pull/20
I Did:
- [x] Join the Python Discord Community
- [x] Read all the comments in this template
- [x] Ensure there is an issue open, or link relevant di...
You can't remove another users reaction in DMs as you need the MANAGE_MESSAGES perms. You should check the channel.type if you plan on handling for non-dm channels, else remove the whole entire chunk of code.
GitHub Actions run 20205724307 succeeded.
GitHub Actions run 20217279486 succeeded.
GitHub Actions run 20221097730 failed.
GitHub Actions run 20228257334 succeeded.
GitHub Actions run 20231604112 succeeded.
GitHub Actions run 20239198049 succeeded.
one of my favorite urls that discord parses weirdly is: https://github.com/0/...
I also have a few others that are entirely unclickable in the client, I'll share them when I find them
[python-discord/bot] New branch created: confirm-elevated-user-kick
01e75c7 Require confirmation before kicking elevated user - L3viathan
This was already the case when attempting to ban an elevated user, but kicks have almost the same consequences (e.g. loss of roles), so we should prevent it in that case, too.
GitHub Actions run 20272737679 failed.
GitHub Actions run 20272974433 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.47.0
GitHub Actions run 20277944556 succeeded.
GitHub Actions run 20282305147 failed.
GitHub Actions run 20351253517 failed.
[python-discord/sir-lancebot] New comment on pull request #1713: Fix trashcan delete reaction in DMs
As it stands currently, considering you have both on_raw_reaction_add and on_reaction_add, wouldn't the action be performed twice if the message is inside a guild?
GitHub Actions run 20391154158 succeeded.
[python-discord/sir-lancebot] New comment on pull request #1713: Fix trashcan delete reaction in DMs
As it stands currently, considering you have both
on_raw_reaction_addandon_reaction_add, wouldn't the action be performed twice if the message is inside a guild?
Yes, I just tested that, and I think on_reaction_add should be removed then. Also the try-except block removed previously for deleted reactions needs to be added again for this change, which I have done. Few imports also became unused after this change so removing them as well.
GitHub Actions run 20393333550 succeeded.
GitHub Actions run 20393527490 succeeded.
GitHub Actions run 20410998831 succeeded.
GitHub Actions run 20413658243 succeeded.
Hello, I have a docker-compse.yml much like the following example:
services:
llm-gen:
# AI tool that generates code to be evaluated
llm-runner:
# HTTP API that evaluates code submitted from llm-gen
# I'm trying to make this an Adapter from llm-gen API to
# snekbox API
data-api:
# Service that runs an API the generated code has access to
# through a little SDK submitted for execution together with the
# generated code.
snekbox:
# Code runne...
So, regarding question 2, further in the Gemini session I found out some configuration parameters:
# nsjail.cfg example
name: "networked-jail"
mode: ONCE
hostname: "JAIL"
# Disable network isolation if you just want host access
clone_newnet: false
# Remember to mount necessary files for DNS if using networking
mount {
src: "/etc/resolv.conf"
dst: "/etc/resolv.conf"
is_bind: true
}
which together with the following docker setup would achieve what I was looking for
I've run
$ docker run --rm --ipc=none --privileged -p 8060:8060 ghcr.io/python-discord/snekbox
which downloaded the following image:
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/python-discord/snekbox latest 532712262adf 4 weeks ago 399MB
and when I call the API I get a return code of 255
$ curl -H"Content-Type:application/json" -d '{"input":"pr...
Image ghcr.io/python-discord/snekbox:3.11 works as expected
The culprit is probably this mount which contains links to /usr/local which is no longer mounted:
Adding the following mounts seems to fix it (or workaround it)
mount {
src: "/usr/local/bin/python"
dst: "/usr/local/bin/python"
is_bind: true
rw: false
}
mount {
src: "/usr/local/bin/python3"
dst: "/usr/local/bin/python3"
is_bind: true
rw: false
}
mount {
src: "/usr/local/bin/python3.14"
dst: "/usr/local/bin/python3.14"
is_bind: true
rw: false
}
mount {
src: "/usr/local/lib/libpython3.14.so.1.0"
dst: "/usr/local/lib/libpython3.14...
After a bit of extra research, question (1) is a yes, import works and the custom config is used through a docker volume. So, I guess I'll close this.
I suspect this is probably an artefact from #248 which changed what binaries get loaded automatically, if you were to use the latest-pydis version tag you'd probably have the binaries there correctly.
We wanted to try move our specific bundling of a bunch of interpreters into it's own tag so that the main tag is left fairly minimal for other people to build on and expand, therefore it's advised that you build a custom image based off snekbox:latest where you configure the contents of `/s...
!remind 1d12h this
Sure.
Your reminder will arrive on <t:1766930498:F>!
ID: 8162
Here's your reminder: this
[Jump back to when you created the reminder](#dev-log message)
[python-discord/infra] New branch created: Add-minimum-mongo-image
88bd712 Add minimum mongodb version - ChrisLovering
[python-discord/infra] branch deleted: Add-minimum-mongo-image
Thanks!
GitHub Actions run 20577363776 succeeded.
GitHub Actions run 20655765345 succeeded.
GitHub Actions run 20679743091 succeeded.
[python-discord/bot] New branch created: nedbat-offtopic-picking
d8dd596 Help people choose an off-topic channel. - nedbat
People are confused about how to choose the "right" off-topic channel.
GitHub Actions run 20679766615 succeeded.
[python-discord/bot] branch deleted: nedbat-offtopic-picking
[python-discord/bot] branch deleted: nedbat-pastebin-embed
GitHub Actions run 20682830346 was cancelled.
Connected!
GitHub Actions run 20682833040 succeeded.
GitHub Actions run 20693534285 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Relevant Issues
Closes #1709
Description
This PR provides a full rewrite of the Space cog to address ongoing failures caused by deprecated NASA APIs, inconsistent response formats, and unhandled exceptions. The goal of this rewrite is to restore stability to the spaceโrelated commands while keeping the implementation selfโcontained and avoiding changes to other parts of the codebase.
Summary of Changes
- Implemented a new, robust NASA API request layer that:
- Handles ...
GitHub Actions run 20726260363 failed.
GitHub Actions run 20726399385 failed.
GitHub Actions run 20726449580 failed.
GitHub Actions run 20726508596 failed.
GitHub Actions run 20726617793 failed.
GitHub Actions run 20726897380 failed.
Another day, another update.
I have rewritten the code to fix the space commands and I added better error handling however I have not found a solution for the mars API yet but I am working on it.
CI is failing. I haven't looked into it, but given we have https://github.com/python-discord/bot/pull/3439, I'll just close this as a duplicate.
@dependabot ignore this major version
GitHub Actions run 20727970782 failed.
GitHub Actions run 20734720098 failed.
GitHub Actions run 20754601781 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.48.0
GitHub Actions run 20820554353 succeeded.
GitHub Actions run 20824253157 succeeded.
GitHub Actions run 20835377790 failed.
Description
I would like to add a new "prank" command called .hack to the fun category.
This command allows users to "fake hack" a friend by displaying a series of fast-paced, humorous messages that simulate a hacking process (e.g., "Finding IP Address," "Injecting virus," "Stealing history"). It is purely cosmetic and intended to be a lighthearted joke within the community.
Reasoning
Engagement: Itโs a classic Discord bot feature that encourages fun interactions between members...
After #248 the new :latest image (as opposed to the :latest-pydis) image was in a broken state as the default Python symlinked to /usr/local/bin which was then not mounted in nsjail.
This PR fixes that by mounting the system Python interpreter to the container and mounting /usr/local/lib (which in sneakbox images still only contains Python libraries and system-level dependencies).
The custom user base still stores additional dependencies that users may wish to add and is still l...
PR is opened (#256) which does basically include the changes you've proposed here.
For simplicity I've just mounted the entire /usr/local/lib tree as the container base that we're using only has Python in there anyway, so little additional risk and one less mount definition. I've also only included the binary that we actually symlink to from the Docker image, we don't need the python3 and python3.14 variations.
I couldn't reproduce your OSError: [Errno 16] Device or resource busy e...
GitHub Actions run 20934257668 succeeded.
#3320 removed the cban alias, but this (still) causes regular confusion for longer term admins/moderators. I get that cban was a possibly ambiguous alias, but it would be useful to respond with something like
"The cban alias was removed because of ambiguity, did you mean cleanban or compban?"
GitHub Actions run 20965235485 succeeded.
Connected!
GitHub Actions run 21030940155 succeeded.
GitHub Actions run 21038828576 failed.
GitHub Actions run 21046256873 failed.
Is it better to check channel.type instead of instance? Are there other classes for private channels we should be worried about?
[python-discord/king-arthur] New branch created: Version-bumps
a3287a4 Bump actions/upload-artifact from 5 to 6 - dependabot[bot]
GitHub Actions run 21097828716 succeeded.
GitHub Actions run 21097890344 succeeded.
GitHub Actions run 21097900734 succeeded.
GitHub Actions run 21098014495 succeeded.
Originally tried doing that but it did not really work. Just after reading this part:
other classes for private channels
I did some research and found discord.ChannelType.private. So I thought that using a check like channel.type == discord.ChannelType.private will be more readable and hence have implemented it.
As for your concern about other classes for private channels I found that DMChannel and GroupChannel are two types of private channels so using `discord.ChannelType.pri...
import discord
from discord.ext import commands
import sys
#-------------------- on rรฉcupรจre le token
with open("token.txt","r",encoding="utf-8") as fichier :
token= fichier.readline()
#-------------------- on choisit le prรฉfixe pour nos commandes, ici !
bot = commands.Bot(command_prefix="!")
##########################################################################
ร la connexion
##########################################################################
@bot.event
async def on_ready():...
GitHub Actions run 21113532838 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.49.0
GitHub Actions run 21182076953 succeeded.
Doc item doc_item.symbol_id='' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 21271684367 failed.
This adds a helpful response when users attempt to use the deprecated cban
alias, explaining why it was removed and suggesting the correct alternatives
(cleanban or compban).
This should reduce confusion, especially for long-time moderators.
GitHub Actions run 21334904083 succeeded.
I'm tempted to suggest we just add cban back as an alias for compban.
Quite a few moderators are slipping up on this still, if that's the case, the solution is probably to revert to actually having the alias than some deprecation message (moderators can figure out it's deprecated based on the bot not banning a user).
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.50.0
GitHub Actions run 21434777602 succeeded.
GitHub Actions run 21532031694 succeeded.
Connected!
GitHub Actions run 21643317241 failed.
Connected!
GitHub Actions run 21650825732 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.51.0
GitHub Actions run 21679709631 succeeded.
GitHub Actions run 21890938352 succeeded.
GitHub Actions run 21902294217 succeeded.
GitHub Actions run 21915653275 was cancelled.
GitHub Actions run 21916023541 failed.
In its relentless war against software, it appears that Kubernetes has proceeded with the passage of time for long enough that our deployment credentials are now invalid.
Fix it.
Connected!
GitHub Actions run 21918421566 succeeded.
GitHub Actions run 21918599121 succeeded.
GitHub Actions run 21918666370 succeeded.
GitHub Actions run 21918927902 succeeded.
[python-discord/sir-lancebot] Checks Successful on PR: #1722 Bump virtualenv from 20.35.3 to 20.36.1
GitHub Actions run 21918952213 succeeded.
GitHub Actions run 21935336385 succeeded.
GitHub Actions run 21972490322 failed.
GitHub Actions run 21999001830 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.52.0
GitHub Actions run 22063984290 succeeded.
GitHub Actions run 22072558038 succeeded.
GitHub Actions run 22081710612 succeeded.
@ChrisLovering this is a reminder to take these services down when you are home.
@ChrisLovering this is a reminder to take these services down when you are home.
@ChrisLovering this is a reminder to take these services down when you are home.
@ChrisLovering this is a reminder to take these services down when you are home.
@ChrisLovering this is a reminder to take these services down when you are home.
@ChrisLovering this is a reminder to take these services down when you are home.
Everyone, thank you for your support on this matter. I can now confirm these services are offline ๐ซก
[python-discord/infra] branch deleted: cj-winners
@ChrisLovering this is a reminder to take these services down when you are home.
[snekbox] Branch update-all-the-versions was force-pushed to `13d3e74`
[python-discord/snekbox] branch deleted: update-all-the-versions
Hi!
We are a group of students from KTH and have a software development course where we need to contribute to an open source project. If this feature is not implemented yet we would like to do so, and if that is the case please assign us to this issue.
GitHub Actions run 22208878455 failed.
Doc item doc_item.symbol_id='flask.sessions.SecureCookieSession.get' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
GitHub Actions run 22223713899 succeeded.
hello! this issue seems to be stale, is it okay if take it over?
@daDevBoat do you have a deadline for when it'd need to be reviewed and merged?
@chenniebenniebingbang yes, thanks for your interest. Go ahead
@MarkKoz
Hi! Thanks for the reply!
No, we just have a deadline of having to be done with the issue within the 3rd of March, but we would love to contribute to the project!
And it is not a requirement that the PR is merged, just that we worked on an unresolved issue.
However, if it is merged before 13th of March then we get points toward a higher grade.
@daDevBoat Sounds good, go for it
Hi, would like to take this over if possible? Will go through previous closed PR but want to start from scratch.
@MarkKoz Thanks! Then we will do that:)
32fa266 Bump actions/upload-pages-artifact from 3 to 4 - dependabot[bot]
[python-discord/infra] branch deleted: copilot/fix-597
Closing as sprawled beyond initial scope.
[python-discord/infra] branch deleted: copilot/fix-593
[python-discord/infra] New branch created: jb3/dep-bumps
1fa9828 Constrain grep search for ansible vaulted files - jb3
[python-discord/infra] branch deleted: jb3/dep-bumps
Can you address the ansible-lint violation here (bring it in line with other permission values within this project)
4a90b17 Bump peter-evans/create-or-update-comment from ... - dependabot[bot]
Hello! I want to look into this!
Hi,
I would like to take a look at this issue.
Relevant Issues
Description
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [ ] Read and agree to the contributing guidelines?
GitHub Actions run 22309078919 failed.
I disagree with adding such command. I don't find it particularly useful and don't see myself using it. Might be a better fit for Sir Lancebot?
Sure could someone open a issue for Sir Lancebot? It would show stats for Sir Lancebot's repo and the main bot's repo
I think there's a way to move issues but can't figure it out on mobile.
Adding a !stats command with the arguments of <timestamp_start, and.
Example response:
Stats for the bot repository:
Issues opened: 20
Issues closed: 15
Pull Requests opened: 10
Pull Requests closed: 2
Pull Requests merged: 8
Stars gained: 100
New contributors: 10
Commits:50
We can always add more statistics if needed or add more arguments to control the statistics.
This would also work for other repositories like Sir Lancebot, Pythondiscord Site, Snekbox, Sir Arthur and Metricity
Transferred now to sir-lancebot.
After speaking with Moderators, we want to bring back the cban alias for the cleanban command.
Please can you adjust this PR to implement this (should just be undoing the change & adding the alias to the list in the cleanban command).
Thanks for the PR, but we have some wider discussions ongoing about this feature and as a result do not want to update this list at the moment.
[python-discord/bot] branch deleted: confirm-elevated-user-kick