#dev-contrib
1 messages · Page 28 of 1
should be a different webhook type at creation i still believe
it would be so cool in some cases fr
no ur thinking of
the interaction response webhooks vs channel webhooks
hash-based message authentication code
@slow bone is a bot that will relay your messages to our moderation team, so that you can start a conversation with the moderation team. Your messages will be relayed to the entire moderator team, who will be able to respond to you via the bot.
It supports attachments, codeblocks, and reactions. As communication happens over direct messages, the conversation will stay between you and the mod team.
To use it, simply send a direct message to the bot.
Should there be an urgent and immediate need for a moderator to look at a channel, feel free to ping the <@&831776746206265384> role instead.
That's Rapptz, right?
yea
i wonder how many macos core devs we have
i've reached out to orbstack for licenses
wonder if it'll just be me lol
i remember the days where to develop site locally you had to update your /etc/hosts file
those were the days
it worked surprisingly well to say how jank it was
you should use the library i'm working on
i checked payloads recently and goddamn they're awesome
I've since reimplemented a visual of pretty much everything identically to how github shows it, with some enhancements
(and github events have slightly more data)
I think we all did that as kids
part of my university coursework was designing a message authenticataion standard with a hash function we'd designed and built
i designed something that beat out SHA-1 and that was enough for me
they're the reason you haven't noticed anything
pyproject.toml line 19
required-version = ">=0.9.7"```
that's recent
I know we talked about it today and I just went looking for it
Went to Lance, then Python, then Robin, but somehow skipped over it
yea
there's so many bots now
it is on python as well but in a PR
one of the owl corp backburner projects is creating a new bot for all members of the devops team, training it on devops message history and having them chat to each other
i can't wait to become the astral shill at the new workplace in december
oh yeah that reminds me when can i have push access /s
not to the repos idc about that i mean to kubernetes
i wonder how many people we have on the owl-corp repos now

Better question is how many dogs
(she is SWE)
omg based
most of the time i try to ask if people know what git is they say no they use jj instead
Didn't you say... they had to quit GitHub for accesability reasons
No that was a friend
Those are the people you stop talking to
Joe stahp emailing me
Oh that was an invoice
Why is Owl Corp invoicing me?
nah that was a friend
also joe if you like jokes i set u up here https://github.com/python-discord/bot/pull/3417#issuecomment-3509097001
OH YEAH
Is Thallium still alive?
Because I still need exactly that and I'm going to have to end up writing it myself...
hey @outer oasis gibe thoughts https://github.com/python-discord/bot-core/pull/310#discussion_r2508396705
*please?
have you thought about poethepoet over taskipy
it auto-activates the venv
poe start becomes a valid command over having to run uv run task start
where is poe then installed, user packages?
you can also bundle it with the project
but then you can't call poe start
i end up.... actually i end up ignoring a lot of the contributing documentation for pydis lmao
i always use uvx prek install -f over pre-commit
that's mostly fine as long as the end products end up being in line with the contribution guidelines
So uhh
If I'm going to add this
I should probably make sure uv-pre-commit is using that same version, shouldn't I?
there's a different between contributing guides and contributing guidelines
yeah
error: Required uv version `>=0.9.7` does not match the running version `0.9.4`. Update `uv` by running `uv self update`.

poethepoet looks fine but I don't think there's really enough motive to swap something out
taskipy works
save from taskipy going completely archived and unmaintained and becoming broken somehow i don't think there's a huge reason to swap things out
especially not because it'd have to be something that we'd do on all projects — we wouldn't leave half on taskipy and half on poethepoet
looks at bot core and how long it was on poetry
looks at how long sir-robin was on python 3.12
looks at---
we have never done python versions at the same time
bot core was on poetry because at the time we moved to uv there wasn't great stuff in uv_build
bot core was intentionally left behind because at that time poetry remained the superior choice for package distribution
you didn't have to use the backend of uv build though!! that's the biggest and most important thing about build standards!! (not annoyed just excited)
I use uv to manage my bot but the backend is flit_core
you use hatchling to manage the site
yeah i know we didn't -- but there was less reason to move until uv_build came along
it doesn't get installed
build backends are optional
cursed
though i imagine the actual answer is uv might just use uv_build
I still don't understand how you came to this conclusion
agreed thank you
poetry was and remains a good tool
Ned made the case in #tools-and-devops that it was dumb that uv had an issue for adding a task runner because it was getting too bloated, and we already have enough task runners in the world
But even JS has a basic script runner
https://docs.npmjs.com/cli/v11/using-npm/scripts
It's such a handy thing and its always annoying to have to reach for another tool
i see that the two of you have disagreements on poetry, and that's fine, but ultimately poetry is used on 285,000 repositories, and there has to be some reason for that
it's not like it's an outright bad tool
nein
it's actually a very good tool and compared to the previous pipenv stuff it's a marvellous tool
hmm yea, but this does something ```
uv pip install bot@.
Resolved 57 packages in 1.42s
Built bot @ file:///Users/joe/Projects/python-discord/bot
Prepared 1 package in 721ms
Installed 1 package in 2ms
setuptools
(and in case you're interested, uv is used on 148,000 repositories)
They failed their one job on purpose
this seems like the kind of argument that ends up with the conclusion that they wronged you personally through a minor change that was either inadvertent or unsupported lol
(and pipenv is on 132,000)
god pipenv moment
I do concede they were we ahead of their time when they came out
But they refused to work with the community on PEP 621 for way too long and it took >10m to lock my repo and it corrupted every week
... do you not know what they did?
i have not heard this, no
you sound like you are sure this was targeted at you though lol
i already talked about infectious upper bounds earlier today and joe shrugged it off
lol, because that is not the case now
That's just a design choice
You get to make your own design choices
That wasn't the malicious part
also i really think saying that locking to <4 is a problem is a bit crazy given there has been no discussion of python 4 other than "it won't break retrocompatibility if things happen" iirc
unless i'm fundamentally misunderstanding the problem
hopefully i will have retired by the time python 4 comes out
i can still use (some) python 2 packages on python 3. ones that haven't been updated in years. Its important to maintain support for not breaking if you don't know you will break.
When they released v1.2 they changed the URL for their installer.
They immediately added a 5% chance to fail randomly if they detected you were in CI because "devs don't see warnings in CI jobs". No deprecation periods, just random flaky failures.
https://github.com/python-poetry/poetry/issues/6314
Long story short, I tried to do an emergency bugfix during a demo, I hit that random chance, got confused because I was distracted+an idiot, tried to upgrade my lockfile which took >12m but actually corrupted it - again - so when CI failed again I had to recreated the log file yet again with took another 12m, all while I'm standing there awkwardly with investors staring at me wondering why I'm not pushing any buttons to do the needful.
So yes, I did fuck up and cause my own problems
but its not my fault
that they decided to purposely fail my CI for using a version that was still supported
but i don't think it was an insane design choice before, it was just a design choice
It's also not my fault that it took >10m to lock my dependencies
oh yeah i remember this
yea okay so
this was bad
and they did choose the wrong way to do that -- and I completely understand people's confidence being knocked using a tool that does things like that
thank you I feel validated
but
i don't think it completely writes off the tool at all and I do think that our decision to continue using it for things like bot core was the right one because it was, despite the design decisions and version rollout strategies, the best tool for the job at the time
I'm mostly teasing
But you haven't actually explained what you like about it (that I've seen) and I am curious
oh yeah wasn't poetry 1.2 the release that should have been 2.0
yea
nothing in particular, which is why we've moved to uv, because nothing really kept me liking it
it was just the right tool at the time
I can agree with that
I used it for a long time
remember at the time we adopted all this the capability of different tools was fundamentally very different
When was this last updated?
august 2024 apparently
it used to be a fucking pipenv setup that took way too fuckin long to lock and install and oh my god i think i had a nap before my dev env for site was ready
Last update This post was last updated on August 29th, 2024.
Motivation When I started with Python and created my first package I was confused. Creating and managing a package seemed much harder than I expected. In addition, multiple tools existed and I wasn’t sure which one to use. I’m sure most of you had the very same problem in the past....
At work you’re using Python 3.7 whereas your personal project should be using the newest Python version (currently 3.11).
little older than that
i'm going by the header
yeah its old
not all things within are updated seemingly
This post was last updated on August 29th, 2024.
poetry also supports python installations now
oh?
and hatch is adding workspace support and also does pbs
actually everything does pbs now
Hatch just finished their workspace support according to the message I read
May not be released yet
anyways
TL;DR: Poetry was slow, flaky, and error prone; and their core team felt very anti-community with the 5% thing and their refusal to support PEP 621
It was a variety of factors, both technical and political, that kept stacking up and up
I'm not just a fanatical hater though, I promised I would try it again when they released PEP 621 support, so whenever my next project idea comes up, I'll be trying Poetry again
iirc poetry still doesn't have dependency-groups support
Anyways
We've gotten very off-topic
i need to make libs.advaith.io for python build frontends and build backends.
tracking pep implementation
@patent pivot ok i updated webhook handling on botstrap and refactored the check to a method
christmas came early
will merge tomorrow when at laptop unless another core dev has any feedback they leave
oh speaking of christmas sir-robin#164 is a hard blocker for christmas :D
and sir-robin#165
(thank you)
hard blocker huh? i'll be sure to tell all the crying orphans that christmas got delayed because of a pr not being closed
lmfao
tbh i don't think that aoc will break until day 13 in a worst case scenario
as project manager for Christmas this sounds excellent
our hard blockers are melting into soft blockers thanks to global warming
and we fixed allowed mentions so a random user won't ping everyone accidently
:)
hey joe can i disclose the bug
the particular command at least
actually there's no security policy here
i set my name on github to ```@ here (but no space) and then resynced aoc. This would have caused anyone looking at the aoc leaderboard if i was in the top ten to mention everyone
there is a security policy https://pydis.com/security.md
How vulnerabilities in our projects should be reported.
but ya once patched disclose away lol
wow no rewards or incentive smh
granted if you wanted to be malicious you could have just ran &aoc link @ everyone which would have.... so robin regurgitates a lot of user input...
you can still use it to annoy a single user & aoc link @joe.banks but that's a lot less worse than ot0-pinging-90000-people
depending on severity people might get a shirt every now and then
no set policy on rewards though
if someone finds an actual breach of snekbox that isn't just resource exhaustion that might be the kind of thing where i might poll the core devs for a shirt or something
Do I get a shirt? I didn't ping 400k people

(unironically I would rep an owl shirt)
lol i don't think mention bugs count (not that there is a policy, just my mental policy) -- though this was creative
pinging people is annoying but not major
what did we claim that stupid CVE for
I debating filing a security report to get u guys a cve for fun
lol
we have a CVE
CVE-2021-41250
it was requested accidentally and i'm still annoyed that it got issued
Lmfao
tried to get it cancelled before it got issued but no luck
I would have given you another one :3
fortunately they don't get automatically issued lol
Working on fixing the code jam command that causes it
I might just do the simple fix of commands.bot_has_permissions(administrator=False) which SHOULD work
Meaning you can't grant admin as an override to fix the permissions error and have to do it the Right Way
It's sir-robin#156 iirc
the bot requires any permission its granting
btw @fallen patrol why is it called SilencedDict when it crashes the entire program instead of silencing errors?
Silenced as in the code calling it will never error
well, it will error but with a SystemExit exception instead of a KeyError exception
...it could just be collections.defaultdict(sys.exit) actually
!e import sys, collections ; di = collections.defaultdict(lambda: raise Exception) ; di.get('hi') ; di['hello']
🤔
oh right
you need a lambda
!e import sys, collections ; di = collections.defaultdict(lambda: sys.exit(1)) ; di.get('hi') ; di['hello']
:warning: Your 3.14 eval job has completed with return code 1.
[No output]
i don't even know why the dict needs to be like that
i have another inkling of an update as i add a cli to botstrap in the next one
IM HERE TO LEARN HOW TO CHEAT BUT ITS AGAINST TOS SO IM VERY VERY SAD
not sure if i'll add cli first, port to botcore, or toml
probably port to botcore and add cli. Making it optional for the time being while working on it before its ready for all of the bots to be ported
that way dev for bots can depend on pydis_core[cli] which adds some commands for managing the config
mainly configuration sync
but i want to bake as much config that doesn't change into core so it doesn't need to be reduplicated on every bot
I have a good idea for how to do this while still allowing additional configuration entries per config object
and overrides (for whatever reason)
Is this python?
in core:
class _Channels(EnvConfig, env_prefix="channels_"):
announcements: int = 354619224620138496
changelog: int = 748238795236704388
mailing_lists: int = 704372456592506880
python_events: int = 729674110270963822
python_news: int = 704372456592506880
reddit: int = 458224812528238616
dev_contrib: int = 635950537262759947
dev_core: int = 411200599653351425
dev_log: int = 622895325144940554
meta: int = 429409067623251969
python_general: int = 267624335836053506
in bot (naming to bikeshed)
class _Channels(pydis_core.config.Channels):
attachment_log: int = 649243850006855680
filter_log: int = 1014943924185473094
message_log: int = 467752170159079424
mod_log: int = 282638479504965634
nomination_voting_archive: int = 833371042046148738
user_log: int = 528976905546760203
voice_log: int = 640292421988646961
or something like that
YAY!
could someone please assign me these issues? https://github.com/python-discord/sir-robin/issues/137
https://github.com/python-discord/sir-robin/issues/157 https://github.com/python-discord/sir-robin/issues/158 https://github.com/python-discord/sir-robin/issues/159 https://github.com/python-discord/sir-robin/issues/160
and bot#3415 bot#3418 bot#3420 bot#3402 bot#3405
reason is they show up in https://github.com/issues/assigned which is useful for me to be able to view
[bot] #3415 code snippet additional character support
[bot] #3418 Support upgrading existing test guilds with botstrap
[bot] #3420 Upgrade configuration to use a toml file over .env.server
[bot] #3402 Issues due to lack of check for when Attachment.content_type is None
[bot] #3405 Configured channels do not exist in server: [('rule_alerts', 1386490058739290182)].
I have pull requests for most of them already, mostly just want the issue tracker to reflect that
how did you get the Contributors role?
aight
i'm disqualified from the latter
cannot assign to bot#3402
but others assigned
added comment to that one and the sir robin one as well
done
sir-robin ones as well?
I did so much github ratelimited you :^)
.gh repo loki
can i enable the gh commands in #dev-contrib
...actually, can we just enable that in every channel
yea
yea seems reasonable
.gh repo loki
The repository should look like user/reponame or user reponame.
the log canary latency is firing meaning there is a delay in logs getting stored
i'm going to blame go gc
actually it might be the gateway that's experiencing the latency
I still blame go gc
Given the default user it would probably make sense to default to pydis but I'm not actually sure if that would be more or less user friendly
Thought Loki was a pydis thing anyways
maybe having a list of single-name aliases for common repos (perhaps a command that can add them a la OTNs), there's some stuff like
discord.py -> rapptz/discord.py
kubernetes -> kubernetes/kubernetes
etc.
which is talked about enough to warrant being able to bring up the repo without needing to remember what org/account it's under
yeah the parenthetical was a very optional part
I wouldn't really care if it's just a JSON file somewhere -- but I agree would be nice
could 100% get away with config options for it because there can't be that many or that need to be frequently added
I need to check how ghostty does it
No I can't take this anymore.
Wait_for_deletion on GitHub embed reply???
what
I need that trashcan
why
i'm confused
i think the cases where people use commands and then instantly want to delete the messages is something we should try limit where we can
it's just spammy
to those looking at the channel all it appears as is embeds popping up and vaporising without reason
Popping the wrong message
Plus the error handler already deletes itself which already has that behavior
yea but for valid responses i don't see why we'd support deletion
sir-lancebot#1710
ooo actually
I'll come back to this at some point lol

how the hell did you write that so fast
mermaid is pretty fast to write
chris has a claude implant in his brain
i just copied what i wrote initially and told claude to make it mermaid diagram
instant success
actually good use for LLMs
yeah agreeGe
here it is
(also great example of a deleteable button which also suppresses an embed)
(consistent ui on .gh wen
)
someday we should rewrite all our bots from the ground up
me and jc considered rewriting site in elixir one year as an april fools
been doing that on monty recently lmao
i think i started, was having a great time, then realised i'd be inevitably let down when we couldn't actually use it, and then stopped
not quite ground up because uh
there's a LOT and I do mean a LOT of edge cases with external apis that were previously solved and don't need to be repatched later
re:
One thing I will stipulate is: our aliased version must be the same repo name (e.g. Rapptz/discord.py must be discord.py, not discord, kubernetes must be kubernetes not k8s, etc.)
discordbeing rejected I fully agree on because it's ambiguous as to the intent, but I'd argue thatk8s(especially since single-name repos will only ever be done via a lookup into this dict, it doesn't fall through to somewhere else after) has a clear intent to resolve to kubernetes/kubernetes, I don't think there's any harm in allowingk8sas an alias for it
right but that's a separate issue anyway, since kubernetes will already redirect to kubernetes/kubernetes under this issue
I don't think there's a ton of cases where I wouldn't agree with "don't change the name" but k8s is so well known as k8s that I'd make the argument that an exception for it is warranted
we should also support k3s too then
-# and we should add support for redirecting flake8 to ruff /j
also why are codesnippets on bot but github info is on lance
i disagree that the stars solution is the way to go
i think that's nice, but we should support it in combination with explicitly set aliases
yeah but this way we only special case repos when they aren't the default
for example, i would probably be a bit confused if I ran .gh repo poetry and got a result back about Chinese linguistic works (though I appreciate the provided snippet does look for exact match, so this is far fetched)
its quite far fetched and can definitely be fixed afterwards
i suggest we just add it in as a step instead of failing out
would make a lot of sense to provide data even if its not what the user wanted: we can't read minds and its literally how search engines work (don't talk about AI)
but still support specific aliases set by us
yea
I LOVE AI!!!!
actually let's farm this whole operation out to claude
or even better, Fredrick
speaking of I need to fix Fredrick
which means the alias is basically just {'k8s': 'kubernetes'} and nothing else
dope
can we have claude rewrite the entire bot from scratch and deploy to prod without reading because claude can do no wrong
if we're aliasing repos we may as well just use the fully resolved name lol
no point doing several stages of resolution when we know what we want
fair fair
gotta keep the devops team on their toes with extra failure points
my point stands though lmao
the discord.py alias and other aliases don't need to be in there
also we should add caching to @marble shoal (and @stable mountain) for api requests
but if they're common and we know them we can save on api requests to github by resolving them from local data
this is a consideration when redoing the async redis cache vendoring: a cache that can be shared between lance and python would be really cool for shared caching
fair but also consider 5000 requests per hour
I'm different I guess, public bot vs pydis bot
5,000 requests is a limit not a target
oh i know
but we already have inefficiencies in the github code what's one more?
#requestingreview sir-lancebot#1699
async_rediscache i think we want to mvoe 1-for-1
but yeah we could add some sort of cache layer backed by redis seperately
the bots have a redis session attached
aiohttp-client-cache will support it outright
sorta.
there's some 304 implementation differences in my testing
here's my custom code
which also implemented ratelimit storing but I currently don't handle ratelimits lmao
including caching 404s and 410s as those are commonly used by github
I haven't added repo existence checking such as psf/owls#56 so caching 404s is a stopgap for that check
I should but I just... haven't
can we replace "sharding" with "caching" in "sharding is the secret in the webscale sauce"
get out
is this server on a relay or no
sad they renamed it to relays, happy that gtao doesn't crash when we edit roles anymore
no idea what the threshold is for relays
all large guilds are on relay now
yea
i know we were at one point — don't know if they have since changed that threshold
100k+ for relay iirc, because roles™
!server
oh features doesn't show up in here
most stuff is automatically upgraded when it's needed now instead of being a thing so "large guild" is contextual now
Click here to see this code in our pastebin.
invite
no :)
no?
well that's considerably more boring
the only user app i have is footgpt
(also the relay feature is irrelevant for relay now fwiw, when it got full rollout and auto upgrades to relay nodes they stopped applying the feature, but they dont remove features)
you can also jsut curl https://discord.com/api/v10/invites/python | jq to get features as well
lol funny
wtf why would i use a terminal
claude can do it for you
er sometimes they do remove features
because terminals are love terminals are life
yeah just checked and 3 day and 7 day thread features were removed
THREADS_ENABLED was not though
the only feature my bot doesn't have access to is RELAY_ENABLED
(compared to the ones that pydis has)
so yeah, very legacy feature
how come i never once put the timestamp on these
huh
how did i end up getting pinged in that😂
fffs I blame discord
it is the coolest new feature: random pings
(and its not even april!)
I've pinged 10 random people until now
I pinged a guy remember(other server) like 4 times
and I got my Hacktoberfest tshirt, yay!
IT WAS ONLY TWO MINUTES?
I'm waiting for files to download... Every second feels like an eternity ><
It says 1 hour 16 minutes remaining
The most important part of the update has been forgotten - updating the topic on the repo 😞
SEV 1!!!!!!
Requesting review on sir-robin#165
I think this might be more efficient than linking all of them
https://github.com/pulls?q=is%3Aopen+is%3Apr+author%3Aonerandomusername+archived%3Afalse+sort%3Acreated-desc+user%3Apython-discord
And yes, the six there are fully ready for review and integration
@thorny obsidian hello! Pinging as well as per silenced GitHub.
I've implemented most of the AOC issues with the exception of the automatic forum channel, which I'm holding for now due to the likelihood of merge conflicts.
I have:
- 25 to 12
- global leaderboard update
- always show leaderboard
- put name in the right place if in the top names on leaderboard
Cool, I'll review over the next few days
copilot has been delegated the task of making pytest 9.0 work
little does it know that after this i'm going to tell it to replace pytest-subtest with native subtests
why not use something local, might I suggest claude or cursor instead?
because i don't really want to pay for something or actually set this up
this was a good use case because updating all those patterns is tedious and annoying
copilot works, does it well, understood and ran our test suite and generated a pretty solid PR at the end of it
i don't want to go big on AI personally, I don't have copilot or AI completions in emacs or anything, but for things like this, it's nice
Cursor has a free teir, but I guess you pay for GitHub pro so might as well use it
Ill get github pro in the edu pack
if... my school stops blocking emails from github
which ones?
**```
.reddit
*View the top posts from various subreddits.*
**Subcommands:**
**`reddit daily [subreddit=r/Python]`**
*Send the top posts of today from a given subreddit.*
**`reddit subreddits`**
*Send a paginated embed of all the subreddits we're relaying.*
**`reddit top [subreddit=r/Python]`**
*Send the top posts of all time from a given subreddit.*
**`reddit weekly [subreddit=r/Python]`**
*Send the top posts of this week from a given subreddit.*
those
they work for r/Python
might be because the api key we use is a moderator on r/Python or something like that — no idea
they dont't work even for r/python
.reddit daily
Here are today's top r/Python posts!
I just published my first ever Python library...
After days of experimenting, and debugging, I’ve officially released numeth - a library focused on core Numerical Methods used in engineering and applied mathematics. \ - What My Project Does Numeth helps you quickly solve tough mathematical...
105
26
Prestigious_Bear5424
admittedly they don't work with .reddit daily Python — but I think that's because we depend on the subreddits search api, and that is gone
what I was trying #sir-lancebot-playground message
sir-lancebot-6c8fb677c5-mwknh sir-lancebot 2025-11-11 16:11:28 | ERROR | bot.exts.core.error_handler | Unhandled command error: 403, message='Attempt to decode JSON with unexpected mimetype: text/html', url='https://www.reddit.com/subreddits/search.json?q=r/python'
sir-lancebot-6c8fb677c5-mwknh sir-lancebot Traceback (most recent call last):
sir-lancebot-6c8fb677c5-mwknh sir-lancebot File "/build/.venv/lib/python3.13/site-packages/discord/ext/commands/converter.py", line 1326, in _actual_conversion
sir-lancebot-6c8fb677c5-mwknh sir-lancebot return await converter().convert(ctx, argument)
sir-lancebot-6c8fb677c5-mwknh sir-lancebot ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sir-lancebot-6c8fb677c5-mwknh sir-lancebot File "/bot/bot/utils/converters.py", line 108, in convert
sir-lancebot-6c8fb677c5-mwknh sir-lancebot json = await resp.json()
sir-lancebot-6c8fb677c5-mwknh sir-lancebot ^^^^^^^^^^^^^^^^^
sir-lancebot-6c8fb677c5-mwknh sir-lancebot File "/build/.venv/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 756, in json
sir-lancebot-6c8fb677c5-mwknh sir-lancebot raise ContentTypeError(
sir-lancebot-6c8fb677c5-mwknh sir-lancebot ...<7 lines>...
sir-lancebot-6c8fb677c5-mwknh sir-lancebot )
sir-lancebot-6c8fb677c5-mwknh sir-lancebot aiohttp.client_exceptions.ContentTypeError: 403, message='Attempt to decode JSON with unexpected mimetype: text/html', url='https://www.reddit.com/subreddits/search.json?q=r/python'
!remind 1h #dev-contrib message
Your reminder will arrive on <t:1762881240:F>!
Here's your reminder: #dev-contrib message
[Jump back to when you created the reminder](#dev-contrib message)
!remind 1h #dev-contrib message
Your reminder will arrive on <t:1762885184:F>!
There is an issue for that which has a proposed solution https://github.com/python-discord/sir-lancebot/issues/1499
https://www.reddit.com/subreddits/search.json?q=r/python
Gives the data no? Atleast when I go to it in my browser
hm yeah idk then
huh
Here's your reminder: #dev-contrib message
[Jump back to when you created the reminder](#dev-contrib message)
maybe
Thanks!!
@patent pivot on which repo should I open an issue about dependabot for all projects (a single tracking issue)
Infra or meta
regarding what
depends on what the issue is actually about
well open on either i guess, i can move it if it's more appropriate on a repo
@fallen patrol that's not the same issue
fragment didn't paste https://github.com/dependabot/dependabot-core/issues/11913#issuecomment-3129670582
right — but the workarounds mentioned are not for that comment
the workarounds seem to be the fact that dependabot won't even recognise a security problem for a dependency that is transitively included only in uv.lock
well hmm
i guess dependabot may then pick it up as regular dependency bumps
but we disable minor and patch version upgrades from dependabot
Either way I think we're probably fine just leaving it for now and hoping dependabot is fixed at some point
sounds good
wow sir-robin doesn't send check embeds to #dev-log 😭
nope i just broke it
that shouldn't be true
oh fiddlesticks
.github/workflows/status_embed.yaml lines 10 to 12
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true```
#requesting review on bot#3413 
merge commit
i can rebase smh i thought you were against that
it depends on the reviewer in some cases
except for using merge commits to merge into the main bot
fair
i put two of those other fixes in sir-lancebot#1699
oh my god. They just fixed cloudflare workers for making requests to Discord. https://github.com/discord/discord-api-docs/issues/7146
Joe you can use a filter worker on #dev-log again!!
I think point 2 in #voice-verification should be reworded to
-Been consistently active for 1 hour 30 minutes.
+Been consistently active for 1 hour 30 minutes in text chat.
Unless I am misunderstanding the requirements.
idk how to contribute tho
bot/exts/advent_of_code/_helpers.py lines 250 to 252
except aiohttp.ClientError:
# Don't retry, something unexpected is wrong and it may not be the session.
raise FetchingLeaderboardFailedError from None```
yea that should not be from none
to discord right?
yeah
...also why should we not retry on a ClientError? isn't that mostly what retrying is for? To still make a request if the network is flaky?
I can't type
I plan a larger change to the aoc handling code :^) but I didn't want to refactor what was already there with so little time before december
fixed thanks
works better on site
we do have some new internal workers though
fair
but still, you can make requests to github again
Btw @fallen patrol there are a bunch of places where it's assumed that AoC lasts for 25 days, did you look at that?
https://github.com/python-discord/sir-robin/blob/89f20b8f72c59a465335b2e23b25755721f60286/bot/exts/advent_of_code/views/dayandstarview.py#L55
bot/exts/advent_of_code/views/dayandstarview.py line 55
options=[discord.SelectOption(label=str(i)) for i in range(1, 26)],```
they were seperate so they could be reviewed seperately 😄
by design in order to not have a monolith
about to comment on gh for others but https://github.com/python-discord/sir-robin/pull/161 changes that insert(1, ...) statement a bit
if a user is linked and provided, we add an additional line to
allow viewing the top 10 PLUS the user
if the user is in the top ten, we don't want this additional line
closes #107
(this also fixes the leaderboard showing only 9 of the top ten if the user isn't in it)
(old example)
Unrelated thing: the feature I probably hate the most in Python is implicit boolean coercion. The ability to put something other than True, False (and maybe None) in an if.
For example, in this function: https://github.com/onerandomusername/pydis-eventbot/blob/6e899bb7b026eb1814dac4e87d25c93b02245dd4/bot/exts/advent_of_code/_cog.py#L373
there are three states:
(aoc_name=None, is_explict_name=False)
(aoc_name="", is_explict_name=False)
(aoc_name="...",is_explict_name=True)
``` and I _think_ it works out fine, but you have to drill down into `_helpers.fetch_leaderboard` to see if it handles an empty name and a `None` name the same
bot/exts/advent_of_code/_cog.py line 373
async def aoc_leaderboard(self, ctx: commands.Context, *, aoc_name: str | None = None) -> None:```
an easy fix would be disallowing an empty string as the name, it's probably a mistake when calling the command
but idk if it's worth it
i don't even know if dpy allows that but im not sure
oh, yeah. its not possible to the best of my knowledge
"" is not allowed as an argument?
the keyword arg means dpy is greedy and therefore ignores "" iirc
otherwise that would have pulled not in
!d not in
6.10.2. Membership test operations
The operators in and not in test for membership. x in s evaluates to True if x is a member of s, and False otherwise. x not in s returns the negation of x in s. All built-in sequences and set types support this as well as dictionary, for which in tests whether the dictionary has a given key. For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y).
For the string and bytes types, x in y is True if and only if x is a substring of y. An equivalent test is y.find(x) != -1. Empty strings are always considered to be a substring of any other string, so "" in "abc" will return True.
thanks for deleting my improper invoke. Very helpful to delete my example
lmfao #dev-log message maybe I'm wrong or pydis checks the ""
.src docs
Your input was invalid: Unable to convert docs to valid command or Cog.
Usage:```
.source [source_item]
!src doc
Look up documentation for Python symbols.
bot/exts/info/doc/_cog.py lines 306 to 318
if not symbol_name:
inventory_embed = discord.Embed(
title=f"All inventories (`{len(self.base_urls)}` total)",
colour=discord.Colour.blue()
)
lines = sorted(f"- [`{name}`]({url})" for name, url in self.base_urls.items())
if self.base_urls:
await LinePaginator.paginate(lines, ctx, inventory_embed, max_size=400, empty=False)
else:
inventory_embed.description = "Hmmm, seems like there's nothing here yet."
await ctx.send(embed=inventory_embed)```
that's not being run because of the falsey truthy statement yeah
symbol_name is "" including the quotes
because dpy just gives u the whole thing when its greedy
just in case it's year 2024 again 
revival of code support, mainly
Constanting so if the number of days is changed its an easy fix
magic values are bad
but i want to mix some of the support for roc and aoc
oh right i forgor
- there is a small part of me that holds out hope for a 25 day year again
it may not be next year but when it happens I'll be ready
Funny thing: apparently, every year Valve changes this line in Team Fortress 2 code https://github.com/ValveSoftware/source-sdk-2013/commit/b2705ba55b3b802b86ef2b2dbf97939c9d4fb685#diff-b0c1ffbebad7fe0367d1a110f9707d0bdce97c539b24c9ad73891a3d07ea006aR334
doesn't seem to load properly but it's ```diff
- // only setup for 2024 right now...need to figure out how we want future events to run and maybe remove the year
- static CDateBasedHoliday g_Holiday_Summer( "summer", "2024-07-01", "2024-09-16" );
- // only setup for 2025 right now...need to figure out how we want future events to run and maybe remove the year
- static CDateBasedHoliday g_Holiday_Summer( "summer", "2025-07-16", "2025-09-16" );
correct me if I am wrong, but joe once told me we needed contributions over a long period of time, not necessarily 40 PR's.
there is no set threshold or time period etc.
anyone can be nominated at any time and then core devs have a bit of a vote, it's nothing formal like the helper voting process is
yea
that's the same thing
there is no set threshold or time period, but obviously a longer one is more likely to inspire a core dev to nominate someone
ah
btw how many people have the role
!role Contributors
295488872404484098
#55cc6c
0.37 0.58 204
48
49
6442450944
48 pretty big...
it used to be more than cosmetic
contributor reviews used to count towards the approval policy
How do do manage that? Like do you add it to a list everytime someone gets the role?
Why was it removed?
yea
effort to maintain compared to how many contribs were actually leaving reviews
I mean you have 48 contributors, which is 48 times. I don't understand how that is hard to maintain? Is there something internally that im missing here?
contribs would leave the community etc and we had no way of really tracking that reliably, we didn't really want stagnant contributors on the list either because the review policy does mean something
yes, it's minimal effort to maintain, but when it's not actually being used then why even put in the minimal effort?
minimal effort is greater than zero effort
if it was minimal effort with some reward then fine, but it was effort with no reward because contributors did not review PRs frequently
i would actually leave reviews if that matters
(i have been)
well at least on prs that have been opened/active recently
I would, but my reviews would mean nothing anyways and wont count towards the process.
which is always appreciated — and obviously people will read and respond to reviews from anyone — it's just not something that counts to the policy
we also didn't want contributors to feel like there was an expectation of reviews etc for what is fundamentally a reward/cosmetic role
guess I should work down https://github.com/pulls?q=owner%3Apython-discord+is%3Aopen
Im looking at https://github.com/python-discord/.github/issues/18
Looking to see if it's possible
widget is disabled for here
invite isn't
i do it for https://jb3.dev/
just pull it in an action once a week or something
round down to nearest 10,000
cron actions exist to be abused
shields.io uses widgets ye
max interval is every 4 minutes. Why don't we do that. /j

max interval? or min lol
min*
looking at https://dev.to/rohan_sharma/heres-how-i-created-a-real-time-discord-badge-for-github-readme-4adg
Seems simple and we could integrate with python-discord/bot
arguably it'd be a cool thing if we did make the badge on some API, either a worker 🤓 or in site
Here's your reminder: ???
[Jump back to when you created the reminder](#dev-contrib message)
apparently one of the steps is a bot in the server, haven't gotten too far yet to be sure.
you can do it in one line of bash
$ curl -s https://discord.com/api/v10/invites/python\?with_counts\=true | jq ".approximate_member_count / 10000 | floor | . * 10000"
410000
honestly I'm sceptical of whether this is at all worthwhile, you put a bunch of work into creating your own shield endpoint or you have a ton of automated commits, when the member count of pydis rises comparatively slowly; wouldn't just updating it manually every 6 months be equally effective without falling into the xkcd1205 trap
yeah
it used to rise a lot faster
but now its very much not lmao
its 412519 right now
"400k+ members" would honestly probably last a year
longer than that lol
Yeah for like 2-3 years tops
I was being nice :P but yeah like, this doesn't feel like an automation problem
rather it's just an update to the readme
it's not but it'd be fun
joe@lovelace:~$ curl -s https://discord.com/api/v10/invites/python\?with_counts\=true | jq ".approximate_member_count / 1000 | floor | . * 1000" | numfmt --grouping
412,000
in which case the most fun would be constructing our own custom badge on site
be the change you want to see
custom badges could actually be fun because we could put them on repos
and can go beyond member count
*be the change request you wish to see
nooo that project dead
then kill shields.pydis.com right before its ready
this is either a new service or in site
stuff like https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fpython-discord%2Fbot%2Frefs%2Fheads%2Fmain%2Fpyproject.toml would be cool to somewhat standardise and put in repos
This https://discord.com/api/v10/guilds/267624335836053506 with bots auth token would return it I think.
member data,
just pull it from the invite
you don't even need authentication
you mean this?
i mean the code snippet i just posted
that has
the member data
from curl
with no authentication
// joe@lovelace:~$ curl -s https://discord.com/api/v10/invites/python\?with_counts\=true | jq "del(.guild.features)"
{
"type": 0,
"code": "python",
"expires_at": null,
"id": 0,
"flags": 2,
"guild": {
"id": "267624335836053506",
"name": "Python",
"splash": "bc7e6bf1ca419b9830ba15ebbcb96a9d",
"banner": "ed3be5b67371fe219d7006152087afdb",
"description": "We're a large community focused around the Python programming language. We believe that anyone can learn to code.",
"icon": "a_8a4f6b575c0af85165938367af61a903",
"verification_level": 2,
"vanity_url_code": "python",
"nsfw_level": 0,
"nsfw": false,
"premium_subscription_count": 32,
"premium_tier": 3
},
"guild_id": "267624335836053506",
"channel": {
"id": "267631170882240512",
"type": 0,
"name": "welcome"
},
"profile": {
"id": "267624335836053506",
"name": "Python",
"icon_hash": "a_8a4f6b575c0af85165938367af61a903",
"member_count": 412520,
"online_count": 38835,
"description": "We're a large community focused around the Python programming language. We believe that anyone can learn to code.",
"banner_hash": null,
"game_application_ids": [],
"game_activity": {},
"tag": "snek",
"badge": 0,
"badge_color_primary": "#008cff",
"badge_color_secondary": "#fdf300",
"badge_hash": "fd3549e1a1a692afda2a7b4cf6b6cad6",
"traits": [],
"features": [
"DISCOVERABLE",
"MEMBER_VERIFICATION_GATE_ENABLED",
"COMMUNITY"
],
"visibility": 1,
"custom_banner_hash": "774c3129f8d45bb55fc3048aea844c8b",
"premium_subscription_count": 32,
"premium_tier": 3
},
"approximate_member_count": 412520,
"approximate_presence_count": 38835
}
good lord thats a lot of json
well no hang on because it's being discussed here
the immediate fix is just putting 400k+ in the README and that settles that
if people want to have fun with shields then I'll facilitate it but it needs to actually be something somewhat useful
but thats not fun
yea which is why the shields discussion started
what is shields?
Concise, consistent, and legible badges
joe we should have a pydis stats api
basically the stat dashboards but publicly consumable
joe that was really fast thanks for adding it
this means shields can pull from that api
that repo needs TLC
do you know where we can get some
more importantly, the shield can have a members over time graph, or members joined in the last 24 hours, or or or I LOVE DATA
man I remember when 3.8 was bleeding edge
yea lol
i dont like the inevitable passage of time
june 2020 that repo came about
i should rewrite that site with apexcharts or something
there are a few public metabase dashboards iirc as well
also does this imply private-stats
we can make a CI in github that goes to https://discord.com/api/v10/invites/python?with_counts=true and then puts it in a badges repo
what is the reasoning behind this https://github.com/python-discord/public-stats/issues/46
what would you use instead
urllib
Your reminder will arrive on <t:1762936449:F>!
3AM EST 💀
8:34am our time though
yeah you guys have London time, right?
I've actually ended up in your part of br*tain a lot recently
notts specifically, langar airfield is where I've done a bunch of skydiving
oh i know langar
british skydive team did a skydive onto our campus that started at langar
lmao nice
i am even further north than nottingham at the moment though
so when are you joining the skydiving soc
have been in york since i graduated
ah yeah you're finished
i move to london end of this month
ooh exciting, what for?
and end my arc of Funemployment
software engineering at a public service broadcasting corporation
who has been in the news quite a lot the last couple of days lol
so you live in new york?
you're gonna work making software to stitch together video clips
or is there another york
bbc?
new york implies original york
why do you think york is "new" york
which is in northern england
i live in original york
York is a cathedral city in North Yorkshire, England, with Roman origins, sited at the confluence of the rivers Ouse and Foss. It has many historic buildings and other structures, such as a minster, castle and city walls, all of which are Grade I listed. It is the largest settlement and the administrative centre of the wider City of York distric...
I bet you think boston MA is the original boston 
it isnt?
(the north of england has the original too)
Boston is a market town and inland port in the borough of the same name in the county of Lincolnshire, England. It lies to the south-east of Lincoln, east of Nottingham and north-east of Peterborough. The town had a population of 45,339 at the 2021 census, while the borough had an estimated population of 66,900 at the ONS mid-2015 estimates. The...
@toxic wren take a trip to georgia
Emigrants from Boston named several other settlements around the world after the town—most notably Boston, Massachusetts, then a British colony and now part of the United States.
yeah the boston area is called new england
as a brit I love looking at US place names because they're all either borrowed or really funny
hilairious bit when establishing a new colony to go "ah i've travelled halfway across the globe, let's just call it the same as the old place"
I bet it was named by a guy called gary who went "It's raining here and it rained back in England so lets call it the same thing"
I did the obvious career move of quitting my software engineering job to become a climbing/mountaineering instructor, possibly adding skydiving to that list when I can
an inevitability
you either become an alpaca farmer or an adrenaline junkie, there's no other pathway
lmfao
you'd love my city
while googling to find this I found this article and the headline is mad enough that you need to see it
oh i remember this
infra commit worked
what an odd bug
at gets very unhappy when you pass it fractional minutes
"Hmmm yes I would like to be notified about this in 3.879462954674 minutes please"
oh joe you love golang right, here's something you'll find entertaining https://github.com/vcokltfre/jwt-error-demo (spurred from thinking about floating point lol)
hahahahaha
yeah classic
for better or for worse working with discord snowflakes for so long has made me instantly recognise integer boundaries and the errors they cause
yeah I caught this unreasonably quickly all things considered because of exactly that
metricity still has to store IDs as strings in the database because metabase and grafana can't handle bigints well
grafana can cast but the metabase query engine could not handle that automatically when we started using metabase
I pretty much handle IDs for anything I make now (discord or otherwise, I like and use snowflakes elsewhere) as strings and only convert to ints if I need to process them because I don't want to deal with this sort of issue, and I'm never working at the scale where this actually has any measurable impact on resource usage
we store 3 IDs per message and have 37,106,324 messages stored, which when I estimated it meant 890,551,776 bytes if using BIGINTs or 2,449,017,384 bytes for strings
maturing is realising that your hobby project will never outgrow postgres' TEXT type for every single field
table_name | pg_size_pretty | pg_total_relation_size
-----------------+----------------+------------------------
messages | 6551 MB | 6869499904
users | 550 MB | 576389120
threads | 164 MB | 172335104
channels | 120 kB | 122880
categories | 64 kB | 65536
alembic_version | 24 kB | 24576
(6 rows)
would be nice if they supported uint64 without extensions, maybe then I'd use numeric IDs lol, but I fear the day I construct a snowflake and see it returned as -92384568327456
24kb of alembic versions seems oddly high, is that storing like migration hashes for each migration?
fortunately 9223372036854775808 is in 2084
it's just one row, but that's probably around the size of the overhead for one table
I know this logically but I still fear it irrationally 
you've got to think liiiiike uhhh
postgres default page size is 8kb
index on that table is another 8kb
ah yeah, that makes sense
there will be other things but yea, the actual data size of that row will be considerably smaller (though still allocated as 8kb)
row_size_bytes
----------------
37
(1 row)
Aaanyways it's 1am so I'd better sleep because I plan on waking up then tossing a coin on whether I drive up to snowdon, climb it, then drive back down to swansea, just to get an extra logbook entry on a free day 
yeah i'm also going to hit the hay
!server
damn
!ping
You are not allowed to use that command here. Please use the #bot-commands channel instead.
aaaaaaaaaaaaaaaaaa why is python so inconsistent
it would simplify a lot of code to enable redirect to bot commands for all commands by default
!src server
Returns an embed full of server information.
including treating #sir-lancebot-playground for checks as if it were #bot-commands but only pointing to the one channel
right now commands for @stable mountain go to #bot-commands, @dusky shore goes to #sir-lancebot-playground, and @humble leaf is not apparent unless you read the source code
not sure what you mean. Some commands are redirected to bot commands because that's where they should be used, some commands are fine, some commands behave differently in specific channels
hm ur right
would need a custom context, but would be doable
could definitely simplify it a lot though once that's in
would take time but should increase the ui of the bot which imo is very important
There's a decorator that makes the redirect check, seems pretty simple
ah then it wouldn't even need a custom context
you mean show in the help embed where it can be used?
redirect output by default instead of saying "its not usuable in this channel"
eg rather than effectively a manual redirect, make it an automatic redirect by default
got sidetracked from my actual question:
can we add role counts for the Partners and Python community roles as well?
that's more of an admin decision I think. There's an argument here that the goal is to make people run the command in the bot channel in the first place, rather than run it anywhere and get a message/channel link
hm that's fair
its still... somewhat arbitrary what commands will be allowed where
partying
there might be an open issue for that
hmmm maybe not. I remember someone mentioning that another role would make the two columns have the same length lol
anyway, python community seems ok to me to add. partner is not necessary, they're all python community anyway
Source command is global for all bots.
Ping works only in #bot-commands for @stable mountain unless you are a staff member, partner, or community member. Its global for @dusky shore and @humble leaf.
Help works in any channel for robin and lance, including DMs, but doesn't work in dms for @stable mountain AND has output redirected to #bot-commands unless once again, same above roles.
char-info on bot is restricted to not work in #python-discussion only, works in all other channels, does NOT redirect output.
etcetra etcetra...
first click lmao
uuuh yeah there's no reason for the first one to not have the community role
none of them do
hmmm... I know there was a discussion some time ago about changing that, maybe nothing came out of it
also adafruit is not a python community either
I'll pass that on
I suppose adafruit is legacy from when the #partners channel existed
ah yeah, 2019 role
lmao nice
yeeeah, it's not very consistent
its fine
its like the discord api: eventually consistent but on a much larger timescale
hah yeah
i found out today that nonces allow you to determine a client's latency
so that's a fun event
what the vencord is this
there is still an internal one
partners is mostly cosmetic now + access to internal channels
same as python community
there is an internal partners chat + they can see incidents
yeah figured
there is purposefully no concrete rule on what commands should and shouldn't be made available generally
None of it.
useful in help channels but restricted? sure, PR welcome with justification
available everywhere and abused? restrict or add redirect
at the end of the day trying to build this big system of rules on what can happen where and who can use what commands and how things should be formatted is a surefire way to make things really doubleplusungood
command scoping is done best effort, corrected in PRs where appropriate/seen and if things need to be changed they need to be changed
i don't think it's the end of the world that things like !ping work on some bots everywhere but others only in #bot-commands, things don't need to be exactly the same across all projects, we are not in 1989 Germany
lmao
correct, it's 5 years before that
Is there anyway this github repo could be synchronized with the main plan9-labs repo?
it's 2am UTC, you gotta go to bed
all the empty stuff is necessary?
its provided exactlyt like that by discord
What's wrong? 
forwarded empty message?
ye
@fallen patrol
Here's your reminder: funemployment task for the day
[Jump back to when you created the reminder](#dev-contrib message)
we've fucked it all
Why, I've seen a few:
ClientConnectorError: Cannot connect to host site.web.svc.cluster.local:80 ssl:default [Connect call failed ('10.128.115.236', 80)]
Nothing drastic and everything seems fine now.
we heard of blue/green deployment and invented our own, brown deployment
thanks for the investigation
we don't have a site anymore .........
it's over
my favourite
lol
wdym the site loads for me
cached
Cmd+Shift+R does nothing though?
Mostly unrelated but a question:
https://github.com/python-discord/bot-core/blob/74072b3709d87dc811a4972aec1ef172101e49bf/pydis_core/_bot.py#L29-L34
- why
super().__init__()and notsuper().__init__(base)? - why that when
__cause__(akaraise Apple() from bananaexists)
pydis_core/_bot.py lines 29 to 34
class StartupError(Exception):
"""Exception class for startup errors."""
def __init__(self, base: Exception):
super().__init__()
self.exception = base```
well, just revert ig?
yeah that strtup error stuff is odd
no backups
no backups .....
idk, maybe there's some good reason, that's why I'm asking

46,107
366,354

