#dev-contrib
1 messages · Page 22 of 1
yeah, better to catch something late than not at all
done! documented just the new HTML files I added in the PR for now
The reason I asked is, I thought the event management system was to be a prospective feature for one of our bots.
If we get such a thing it would've been possible to have the site pull events information from discord's end (or vice versa) to prevent hardcoding event details (dates, branding, description) on the site's events page.
For instance, a command can be used to set up the dates for a new event, say PyWeek - March 17-24th, the bot then sends an API request to the site and the site can reflect these dates for the new event on the events page. When the events page is requested at a time after March 24th, PyWeek 37 then shows up under "Previous events". This removes the chore of having to update the static page whenever an event starts/finishes.
Thought I'd just make the change while ti was fresh in my head bot#2959
Nice, I'll give it a look later
Might be worth asking in #event-planning
true, though I'll just be pinging Kat but in a different channel
I think she'll know best what to do with the issue. (FTR the last ref before today appears to be here: #leads message)
ah cool
I'm catching up on pydis stuff today
I am interested in this idea a lot. Could you draft up how you imagine the systems interacting and/or create an issue for it?
(We'll still need some substantial work for our Code Jams, but for smaller events like PyWeek and what not I do like this idea a lot to save of the tedium of editing/copying/shuffling around html files)
@timid sentinel I brushed the dust off bot#2669 , there was a small change remaining
That's very creative!
@cold island Hey Zig, all good? I've been assigned to bot#2938 last week. Thought I'd start working on it now that I have some free time
Say, is the description you gave at the issue all of your requirements for it?
I'd like for any complementary info/ideas of how it should shape up to be if you have anything to share
Hey, no I think that's all, including what I replied to mina below
The nomination logic is in
!source nominate
Adds the given user to the talent pool.
I see, thank you! That saves some time and digging
Sure, let me know if you need any other info
bot/exts/recruitment/talentpool/_cog.py lines 329 to 334
if ctx.channel.id != Channels.nominations:
if any(role.id in MODERATION_ROLES for role in ctx.author.roles):
await ctx.send(
f":x: Nominations should be run in the <#{Channels.nominations}> channel. "
f"Use `{BotConfig.prefix}tp forcenominate` to override this check."
)```
Then, the context menu should redirect the helper to the nominations channel, yeah?
The context menu command should be available for any message, but the feedback for a successful/failed result should be in the nominations channel
I see
I should be done by... tomorrow morning, I think? with something functional. Then I can ping you for review at GitHub?
I'll get to it when I finish shower and dinner
I don't know when your morning is, but sounds good 😄 It might take me a bit to go over it though
You don't need to rush it, there's no set deadline or anything
I mean, I've been sitting on it for an entire week
I gotta make up for that 🥴
But yeah, I'll be getting something going by that time. See ya! 🫡
Really, if the plan was to pull an all-nighter for this, it's not necessary haha. Your update that you've started working on it is already plenty (and appreciated)
I removed my blocking review from https://github.com/python-discord/bot/pull/2439 just needs to resolve a small merge conflict
closes #126
Notes:
Help button can be used by anyone
Delete button can be used by author and moderators
I would have used https://bot-core.pythondiscord.com/main/output/pydis_core.utils.interactio...
Hah, funny, if you edit an eval to remove the command, it still asks if you wanna rerun
print(0)
@wise marten :white_check_mark: Your 3.12 eval job has completed with return code 0.
0
looks to be a fun side effect of how we do the rerun checks. I don't think it's something we need to change.
!source
A re-run of the lint workflow of site#1262 has passed, can someone with the perms trigger another netlify static build?
https://app.netlify.com/sites/pydis-static/deploys/65f994705cd2500008ac04ce
Start building the best web experiences in record time
done
thanks Chris 
no worries, we're limitted on seats on netlify, otherwise more people would be given access
ah I see
hey there. I am struggling with converting a kivy app to .exe and am looking for someone to help me. I have been stuck in this area for some time now and am really lost. please someone help me.
Take a read of #❓|how-to-get-help. This channel is for discussing Python Discord projects.
@vocal wolf sir-lancebot#1197 will become possible to wrap up once sir-lancebot#1458 is merged
Alright. Thank you!
Hi! i can help you with that
hey @crude gyro, is site#662 (frontpage logos) still high-priority, and are you still going to work on it?
I took another look at it today - for the "avoid hacky filtering" part, django can be easily fixed to use /static/images/events/logos_dark/django.png (which you made as part of the work for dark theme).
but for linode, I couldn't find an official asset that has the green 'L' black & white. perhaps we could just use a logo that contains only the text "linode"?
other than that and the baseline issue (which I'm not personally experiencing since I'm not on Windows), the sponsors section should be resolved now as I've added the new grid layout as part of the implementing dark theme.
oo, nice catch
to answer your question, this is not on my radar currently, no
I had totally forgotten it
we shouldn't use a logo that only contains the Linode text, but it should be easy enough to create the asset we need
but it's great that it's already mostly resolved
were you considering completing any part of this yourself, @rapid igloo?
e.g. the not using the hacky css filtering aspect
I could make you that Linode asset
I was looking into how feasible a fix would be, as it was labelled high priority. since you're no longer on it, then yeah sure thing, it's just the django baseline issue I'm not quite sure of
here's how it looks like with the dark mode linode logo and without using filtering
definitely happening in that picture
(missing bulma logo is fixed in another pr)
both Django and linode logos are floating a few px above the baseline
and netcup is maybe one px below?
I mean this is pretty nitpicky polish stuff but just adjusting them until they're perfectly lined up with the font up or down a couple pixels - in some way that's highly browser compatible - is the job, imo
Linode font is a bit tiny too
is this the one you meant could just be the text?
yeah
yup
I think this alignment is alright now? but wouldn't this be too hacky and be misaligned depending on the browser, screen, zoom level
yes that alignment looks very good
zoom level, maybe. browser, hmmm.
screen size, I hope not. worth testing.
alright I'll test it on my few browsers with that ^ configuration then
we don't need to accommodate every zoom level
we just want it to look good for most people
who will be on a common and popular browser at 100% zoom
webdev is rarely perfect, just try to achieve good enough
right. I understand, I was mostly hoping if we could come up with a more robust solution 
from my testing so far it's pretty much perfectly aligned on multiple browsers and zooms
background-position-y
okay great! now I'll just hope it's also fixed for windows
oops, sorry for the ghost ping
this should be fine
looks great, @rapid igloo
.github/dependabot.yml lines 2 to 6
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"```
are there any specific reasons we have dependabot check for updates daily (for all our repos), and to also be notified of semver patch bumps?
it's possible to have dependabot only PR minor & major updates, it makes the PRs less frequent. 
What if there's a bug fix that's released under a patch version and not a minor/major one ?
right, fixes are under patch by convention
is that the same reason for "daily"? so we can always get on top of all the fixes that might affect the projects as soon as they come out
I don't have the historical reason for the daily part
ah I mean, why we would choose to stick to daily rather than change
What would you have it changed to ?
it can also be weekly/monthly, so perhaps weekly?
https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval
but I do understand keeping up to date on fixes is important, our bots are used quite heavily
The review cost is going to be the same, since it'll get reviews "randomly" since there's no predetermined availability of coredevs/contribs.
And if version n is released then another n+1 isi released afterwards, dependabot will recreate the PR IIRC.
So having these come as soon as possible allows us to better merge and integrate the changes whenever someone is available in that timeframe
fair point 👍
done - site#1269
would love to hear your thoughts regarding how useful it actually would be or whether I've overlooked any part of the events management process I'm not aware of when writing it.
:pwhich font is tthe texts, fr
it uses the system font
hey, do we have this icon in the emoji server? https://primer.style/foundations/icons/skip-16
if not, could we have it added as :IssueNotPlanned: for sir-lancebot#999, please
Done
Semi-related, if anyone needs a way to convert SVG to PNG in multiple resolutions I found a script I wrote for that. It uses Inkscape for conversion (imagemagick's rasteriser is not as good).
thanks Mark, I'll also need its ID
Sorry I don't have permissions to get its ID
@vale ibex or @cold island can (it is in server 3)
hmm if the emoji is added everyone can send \:IssueNotPlanned: to get it right? if I'm not mistaken
No permissions to send messages
ahh
I gave you permissions and added a spam channel

👌 thanks
meta#224
hmm, that's fairly invisible in dark mode, have we considered using the grey icon that github uses in dark mode?
meta#188
I'm not sure if it's possible to get the exact one github uses, but what we could do is do a color drop on the svg
https://primer.style/foundations/icons/skip-16
(the color is rgb(132, 141, 151))
.color rgb 132 141 151
that color also looks alright in light mode
yeah that seems good, I think the current one is only black because that's the default svg fill colour
Here's the updated icon for anyone in the emoji server that can change it
meta#224
Nice
Nice
Nice
Nice
Nice
Nice
Nice
Nice
Nice
Nice
Nice
Nice
Nice
Nice
no
Not nice
@atomic ivy old reply but we do have an issue for this opened by kat herself https://github.com/python-discord/bot/issues/2102
(I stumbled across both the issue and this message recently)
nice
no dont start it again 
Nice?
are discord file previews supported on all platforms now? I know on web they definitely work.
bot#1621 proposes to truncate code snippets that go over 2000 chars and/or 15 newlines, and mentions file previews as an alternate solution.
currently the bot provides no response when the chars/number of lines go over the limit
not supported on mobile, at least not yet
aw man
they show up as a file that you'll have to download?
yep
@last patio 
!source
Hello. I have some free time as was wondering if there are any unassigned issues I can work on?
👋
There are quite a few, you can browse them all in github when they have no one assigned, or no one who says they want to be assigned.
Example, bot#2918, bot#2922, bot#2963, etc.
i'd love 2922 to be done!
2963 should probably be higher priority though
oh no i misread it, i don't think it's as urgent as i thought
Alright, I'll take a look at 2963 then 😄
assign yourselves, that way it's clear who claimed what
yea was trying to just couldn't get GitHub mobile to
Hello guys so basically the carrot is a carrot the cucumber is a cucumber and that’s it
If you need any help, lemme know 
hello @hoary haven thoughts
Lanaguage leak
hey i like that
epic bot#2989 is open now
what os you using?
which os are you on?
yeah
Anyway, if you're on macOS, try running it like this DOCKER_DEFAULT_PLATFORM=linux/amd64 docker compose up --build
Sonoma 14.2
well its working, can you tell me what does it do cuz its not documented in pydis doc ?
ah there we go another error
it forces docker to use amd64, instead of arm. Since you have an arm host docker will use that by default unless specified
Do you have postgres running on your host or another compose project?
Ah wait, no 6379 is redis. That error is saying that something is running on port 6379 so it can't bind to that port for bot's redis
i see
i don't remember installing redis on my machine
what does docker ps output?
nothing below that?
nope
hmm so something is running on that port then
does lsof -i :6379 -S output more info? can't remember what that outputs
Yea, looks like redis server is already running on that port
well what can i do now? any ideas?
i might very well be wrong.
but redis binded to 127.0.0.1:6379 might not be really necessary.
https://github.com/python-discord/bot/blob/9356bb8f539c5939c26a1fab4bfb8e1278dae1f1/bot/__main__.py#L19-L33
https://github.com/python-discord/bot/blob/9356bb8f539c5939c26a1fab4bfb8e1278dae1f1/bot/constants.py#L380-L388
https://github.com/python-discord/bot/blob/9356bb8f539c5939c26a1fab4bfb8e1278dae1f1/docker-compose.yml#L99
suggests the bot doesn't use specifically 127.0.0.1:6379 but rather redis:6379 within the docker composed managed network
thus, try commenting/removing https://github.com/python-discord/bot/blob/9356bb8f539c5939c26a1fab4bfb8e1278dae1f1/docker-compose.yml#L30-L31 and report back if it all works?
edit: highlighted the wrong lines in the last link, updated.
did a git blame, the commit that added it has this commit message
Expose the redis port to the host
Useful for those that run redis with docker-compose but not the bot.
The bot on the host won't have access to the Docker network in such
case so the port must be exposed.
https://github.com/python-discord/bot/commit/8b5c1aabf58eb3c794cc61173bd7500a696a8376
so yeah, just comment them out if you ain't running bot from your box directly
thanks ry, chris and flying whale
Hello, ik that i should open an issue on github but I'm unable to do so right now.
The Bot responded with two messages to a command, you may want to look into it
#bot-commands message
I think that was during its restart, should be fine now
yes, thanks for the report
during the restart, kubernetes will spin up a second pod and we'll have two sir robins for a moment
during this ancient ritual, they will fight to see which one is the stronger one in a battle to the death
these battles are decided within seconds, and happen multiple times a day
kubernetes is really brutal
.xkcd 350
@outer oasis I just pushed it as fishhook version 3.0, so the version will probably need to be bumped in the version lock file for the bot
is there a way to test the rich_embed filter ? ̆
Could be "solved" with Recreate strategy if that's applicable to the bot 🤔
yes
So, is it worth changing? Seems to be more appropriate for an application only one intance of which could run 🤔
im online the rest of the day if you have time to help me get it pushed to the bot
#dev-log message thanks!
Hi!
Lets take a look
yea
as far as my local testing, i ran a x86 ubuntu vm and pip was able to properly install keystone and capstone (macos has problems but the bot is ubuntu right?)
Hi, need a review on snekbox#207
aw wait crap
You only published a wheel for Python 3.11
Snekbox evals on Python 3.12
I guess we'll find out
the C code does not need any weird dependencies, it just defines one function tbh
@vale ibex/@tawdry vapor - is Snekbox capable of building C and ASM extension modules from source for an eval dep?
It should have a wheel though
Can you get 3.12 wheels published?
I imagine it would need gcc, so no
ill need to install 3.12 on my vm
Assumed as much. I can suggest cibuildwheel
BTW, is make build the best/only way to build snekbox locally for testing? I'm at 500s just for pyenv 😭
if you want to make the whole docker image, yea
Take a look at https://github.com/pypa/cibuildwheel
it should use the remote cached image for a lot of it
if you need to do a cold build, then yea it will take a while as the image builds Python from source

Doesn't only Compose use the cache
you could docker compose build first and then try make build
that might bring a lot of the cache down to your machine

using that now to build wheels
@outer oasis https://pypi.org/project/fishhook/#files i used cibuildwheel locally to build these, gonna setup a proper build system later
nice
@vale ibex are available to sign off on
?
yeah
based
I've also made a small CI improvement snekbox#208
since I noticed your CI passed even though pip errored
I've been doing some PRing too
chilaxan/fishhook#7
It's a bit dense so feel free to ping me in OT if you have questions
i will def ping you when I dig into that, thanks so much
hi
@outer oasis just used the CI stuff you added yesterday, finished setting it up and used it to push a release, thanks so much!
I have not used Github Actions much, if i want it to only run when I make a new release, I should change ```yaml
on:
pull_request:
push:
branches:
- main
release:
types:
- published
to ```yaml
on:
release:
types:
- published
``` right?
🎉
Yeah
sweet
i tend to push small modifications a lot - but not full releases, so i figure its better to only push to pypi on release
The publish step is skipped if it’s not a release
.github/workflows/python-build-publish.yaml line 51
if: github.event_name == 'release' && github.event.action == 'published'```
oh i missed that
Yep
But yeah, you don’t really need to build every possible wheel on every PR
It makes sense to disable all that
yea
thanks so much tho, gonna read up and learn more about how I can use Github Actions
👍I’m happy it helped
do you know how often the bot env rebuilds (and would pull the 0.3.2 release?)
i added some code to attempt to stub out the deprecated dependencies, prob not the best solution, but it fixes the bug since the dependencies are only needed in more obscure cases by capstone
and capstone from its wheel is covered by simpler and non-deprecated code lol
| @stable mountain doesn’t do the evaluating itself, it sends your code to Snekbox
Both @stable mountain and Snekbox use GitHub Actions to update themselves automatically after you merge a PR
Snekbox has the eval dependencies pinned to exact versions, so when you update your project you need to make a PR like I did to update that pinned version, and then post the link here and ask for a core dev to approve it
(I am not actually a core dev)
requirements/eval-deps.pip line 6
fishhook~=0.3.1```
this is a fuzzy dependency, so it should cover 0.3.1 - 0.4.0
snekbox#207 was the one I made, for reference
All you have to do is type the new version number in and submit the PR
Oh oops
My bad
I thought they were all exact
Uh….
i think the technical name is compatible release
nah they are all set like that
I think on purpose
@vale ibex Snekbox doesn’t automatically refresh deps on its own, right?
What should @violet terrace do when they want to show off their newest updates?
tbh in the past i have just waited, and eventually the update would push, no need to bother anyone or anything
while it's a fuzzy dep we also have a volume that stores the user_base that the deps are installed into, so it would requie us to do a fresh deployment for the dep to actually be updated
if we redeploy, it would also upgrade so long as the dep is met iirc
Would a M-x restart snekbox do that?
Would it be bad if I were to do that?
maybe, no
I kinda want to try it, just out of curiosity
But not right now
Right now I have to go eat
bot#2938 for context,
I've been taking a look at the existing logic on the recruiting cog, and I'm trying to decide the best way to approach this feature. Thing is, I can't seem to find the appropriate place for it to go. As per Discord.py's documentation, the command would need to be set under discord.app_commands.CommandTree, but it would seem awkwardly out of place on the cog.
I'm not totally familiar with the codebase, so I haven't taken a full look around to check, but where would you suggest introducing me it?
[I'm on mobile so i might not be of much help but] check out https://github.com/python-discord/sir-lancebot/pull/1197
Actually, https://github.com/python-discord/sir-lancebot/pull/1176 might be of more use to you
Taking a look, much appreciated
I'm having some trouble with tests for snekbox #205. It's working fine when I send an API request that mimics the one constructed by the eval request, but not when I run a test with the same code. It seems that str.encode() is returning different values when encoding what appears to be the same code, with the one in snekbox returning b'with open(b"\xc3\x83.txt", "w") as f:\n f.write("test")' while the one in the Eval bot returns b'with open(b"\\xc3.txt", "w") as f:\n f.write("test")'
It's also displaying the original code slightly differently in the logs, with the eval bot command showing a \xc3 while the test prints a à character instead. Maybe something is wrong with the string-in-a-string situation?
snekbox#205
maybe try turn the string into a raw string? something like ```py
code = dedent(
r"""
with open(b"\xC3.txt", "w") as f:
f.write("test")
"""
).strip()
this is just me having a guess but i suspect that it's most likely that -- the test is interpreting the escaped byte whereas we just want to ship it off to snekbox
testing it out in an interpreter is giving this:
>>> from textwrap import dedent
>>> dedent(
... r"""
... with open(b"\xC3.txt", "w") as f:
... f.write("test")
... """
... ).strip()
'with open(b"\\xC3.txt", "w") as f:\n f.write("test")'
which looks like what you are looking for?
Yes, that was the problem! Thank you!
diff --git a/bot/__main__.py b/bot/__main__.py
index 42b3c0c9..78fcba9f 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -55,6 +55,7 @@ async def main() -> None:
async with aiohttp.ClientSession() as session:
bot.instance = Bot(
+ proxy="http://username:password@proxyurl:port",
guild_id=constants.Guild.id,
http_session=session,
redis_session=await _create_redis_session(),
(END)
turns out i had to do this silly me haha
severe case of RTFM
hmmm. requests to localhost running over a proxy kind of seems counterintuitive to me
i think my issue was that aiohttp didn't have my proxy settings to send requests to the internet (Discord)
File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 557, in static_login
data = await self.request(Route('GET', '/users/@me'))
with this, discord.py will pass the proxy settings to aiohttp.ClientSession
ahhhhh
then why have that manually created ClientSession then?
since it can create it FOR YOU
I'm not sure what you mean by your question. Is discord.py "it"?
(gimme a minute to type)
Using the close post button gives a confusing message from the bot
it gives the appearance of a bug which can be disconcerting for people looking to help
the ClientSession I'm referring to here is the one use by discord.py to send requests to discord
It's initialized here: https://github.com/Rapptz/discord.py/blob/master/discord/http.py#L798-L802
discord/http.py lines 798 to 802
self.__session = aiohttp.ClientSession(
connector=self.connector,
ws_response_class=DiscordClientWebSocketResponse,
trace_configs=None if self.http_trace is None else [self.http_trace],
)```
(Same message as !close but no indication of why it closed)
I kinda mispoke when I said "pass the proxy settings to aiohttp.ClientSession"
What I should have said is that the "proxy settings/URL will be passed to the ClientSession.request() method (which discord.py uses to send requests to Discord)" ( https://github.com/Rapptz/discord.py/blob/master/discord/http.py#L632 )
discord/http.py line 632
async with self.__session.request(method, url, **kwargs) as response:```
The session initialized here is used by us to send requests to, idk, other services like github, etc (https://discordpy.readthedocs.io/en/stable/faq.html#how-do-i-make-a-web-request)
(your question also made me realize that my local instance of the bot cannot make requests to github, etc- which I've now fixed)
@slow robin Please read our rules. We're not a job board
Looks like .emoji info is broken. Are there any errors being generated? For example, faulty inputs generate a response, but valid inputs don’t:
.emoji info 
Yeah there was an error on sentry, I've turned it into a GitHub issue
sir-lancebot#1513:
naive datetimes 😩
!ban @astral cipher Seems like you're only here to advertise.
:incoming_envelope: :ok_hand: applied ban to @astral cipher permanently.

Hey people! I just discovered about this server. I want to learn python from scratch. I do have various sources. What I do not have is a partner who is already associated with python. Lemme know if anyone is interested. I just want to ask a lot of questions. (I hope I am not breaking any server rules here by adveritising this lol)
resources*
For such common do switch to #python-discussion
@uncut zodiacHello, I am a beginner in Python. I have been learning it for a month now. I believe we can be great study partners.
Hi, this channel is for discussing Python Discord's own open source projects, not advertising your own
hi! my bad you can delete! is there somewhere i should post, its not really a project, just some old rubbish i found on a hard drive 🙂 i thought dev contrib meant contribute to development. that was my mistake
no worries. we don't have any place for advertising on this server, you would be better suited posting it on somewhere like r/Python which does support project showcases and the such
oooo no, i never go on reddit. ableist place, very unwelcoming to autistic people. tbf i never go on any social media at all or go outside ever. also tbf its not even worth bothering with, its like 15 years old or something. ah get rid of it ! 😄
r/Python abides by the same PSF COC that we do, and the same diversity statement. you will find that it's dissimilar to the experience which you've described
my problem is with the website, its like going on hitlers website or something, just because one bit of it says its nice to autistic people doesnt mean its right to visit it. see godwins law there straight away. no i mean the website allows the use of slurs against my kind extremely casually so there is no way i will ever visit it again. sure its useful to some its just not my thing
ok, that's your call. regardless, we don't have a place for advertising on this server
ok thanks, i deleted it ^
hikari is a better option
When user leaves the server and has open help post, there's currently a nice notification that tells others that they left the server. Should the channel also close soon after that? If not immediately, maybe after a few minutes or so?
Hi, so I actually wrote the ticket with the idea for this feature. My original idea called for the post to be closed; but in discussion about it there were concerns that it could interrupt if other people were having a good discussion irregardless of the presence of the OP.
In the case of your specific circumstance; the post violates the server rules so if a mod notices it they might swing by and close it. Otherwise it'll just time out naturally
I should also point out that the feature just got implemented like... Yesterday @cursive relic
Which actually makes me really happy because there definitely was some debate over how often this happens... So that it happened within 12 hours of implementation is lovely
I read about this a bit from GitHub but didn't remember about the details, the feature is indeed useful (even if it happens rarely). I do get the point of keeping the post open, which does make sense now that I think about it, having it open shouldn't cause really any disturbance especially with the new notification of user leaving. Also if there happens to be discussion anyways after OP leaves, it's nice for others to be able to continue the discussion either way.
Glad that the feature got tested here that soon 😅
We don’t offer DMs
See #❓|how-to-get-help
This is the wrong channel, please create a post in #1035199133436354600
!pypi pandas
Would anyone be interested in having the first pypi release added to this or does that feel like useless information?
Something like:
Current: date First: date
On somewhat the same topic.
Is there anyway to change / customise the discord timestamp from the Long Date format :D> to %d %b %Y (day shortmonth year)?
<t:1543392060:D> -> 28 Nov 2018
https://discord.com/developers/docs/reference#message-formatting-timestamp-styles
all possible timestamp styles you can find here
I think this could be nice extra information, it gives a bit of perspective on if the package is very new or something that have existed for a while. While that might not be that important information, I think it could be somewhat useful
i plan on remaking the resources page since its very cluttered and hard to navigate. i plan on having a big selection on the mainpage that will ask "beginner/advanced" which then will be like curseforge mods page
Please raise an issue with the proposed changes and why you think they are needed. if you start work without that, we cannot guarantee that whatever you work on will be merged.
okey 🫡
@tame pebble Thing
Thanks
(idk how but i have completely missed hedi's review, i will take care of it)
...
lol
!remind 2d
Your reminder will arrive on <t:1715639345:F>!
Yeah
nothing happened :)
that's the way it do even tho it be
I'm trying to set up sir-lancebot for development, but pydantic yells at me when I try to run it. I cloned the project, installed the dependencies, and made /.env
$ poetry run task start
Traceback (most recent call last):
File "<frozen runpy>", line 189, in _run_module_as_main
File "<frozen runpy>", line 148, in _get_module_details
File "<frozen runpy>", line 112, in _get_module_details
File "/home/user/Projects/python/sir-lancebot/bot/__init__.py", line 8, in <module>
from bot import log
File "/home/user/Projects/python/sir-lancebot/bot/log.py", line 14, in <module>
from bot.constants import Client, GIT_SHA, Logging
File "/home/user/Projects/python/sir-lancebot/bot/constants.py", line 97, in <module>
Client = _Client()
^^^^^^^^^
File "/home/user/.cache/pypoetry/virtualenvs/sir-lancebot-68i5Ys5H-py3.12/lib/python3.12/site-packages/pydantic_settings/main.py", line 84, in __init__
super().__init__(
File "/home/user/.cache/pypoetry/virtualenvs/sir-lancebot-68i5Ys5H-py3.12/lib/python3.12/site-packages/pydantic/main.py", line 171, in __init__
self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for _Client
token
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.6/v/missing
very interesting!
i don't know that we pull in the .env file by default unless you are running in Docker (in which case docker pulls it in), if you source .env the file can you run the bot?
yeah looking locally, i think this would be where you have configured the .env file but not loaded the variables from it
in the docker setups we explicitly have docker do it with: https://github.com/python-discord/sir-lancebot/blob/main/docker-compose.yml#L21-L22
docker-compose.yml lines 21 to 22
env_file:
- .env```
Ah alr, what about w/o docker?
try source .env before you run the poetry command
if still no luck, do source .env, then run echo $CLIENT_TOKEN and can you confirm if it outputs the discord bot token you've configured
Oh it was user error lol, I put BOT_TOKEN instead of CLIENT_TOKEN
Works now, thanks!
hahaha all good, glad that's fixed 🙂
i also forgot i think we do load .env with pydantic, so yes should work without needing to source, which it sounds like it has in your case
Here's your reminder: @tame pebble Thing
https://github.com/python-discord/sir-lancebot/pull/1484
[Jump back to when you created the reminder](#dev-contrib message)
!remind 2d
Your reminder will arrive on <t:1715812993:F>!
Me when my alarm goes off
FYI to core devs and contribs, policy bot has moved home to https://policy-bot.pydis.wtf/, should be seamless, all PRs should start linking to the new URL, if you click the link at the bottom of your PRs it will also push an update to github to force from pythondiscord.com -> pydis.wtf, if you experience any weirdness with it please let me know but should be more or less invisible, all old URLs will redirect to the new domain.
Done
Thank
@timid sentinel sorry about that, the changes I made after the force push are
- renamed
ROLL_EMOJItoDICE_ROLL EMOJI - Removed the comments that explained those emojis as it's not as useful
fwiw I usualy forcepush teh change, then then forcepush teh rebase as a seperate action
that way github has the two diffs,t he first being the useful one for reviewers
how do you force push a change if you haven't rebased ? Aren't they correlated ?
Or, if you haven't modified the history in some way
if I want to modify a commit in a PR, I forcepush that
and then separately forcepush a rebase onto main
Here's your reminder: !remind 2d
[Jump back to when you created the reminder](#dev-contrib message)
!remind @tame pebble 2d
Your reminder will arrive on <t:1715998177:F> and will mention 1 other(s)!
Thanks man!

@tame pebble
Here's your reminder: See referenced message.
[Jump back to when you created the reminder](#dev-contrib message)
https://github.com/python-discord/bot/pull/3056
pretty small change on this one if anyone is looking for a low-hanging PR with one approval already
hey apparently i got unassigned fro bot#2679 while waiting for new version of pinnwand but i see Chris added it few days ago can you assign me again?
is that looking alright?
Not sure if this is right place but https://paste.pythondiscord.com/ has severe asyncio blocking problems.
It can take upwards of 30s to download 4kb worth of data.
I haven't really looked into the issue but it seems that this is happening because although Tornado is async, and the routes are coroutines, everything else is sync (including the calls to the database).
interesting, can you get an example of this?
we've just migrated the database to a new method of database access so would be good to verify that's not related
Ya so interestingly it can take between 1.5s best case and 30s (worst I've seen)
As for the database stuff
Looking at the codebase it appears to be all sync
This was taken earlier when I first realised the issue
But even really 1.5s would be considered quite slow for a small paste/data to be downloaded
SQLAlchemy does have a asyncio version
Again even though I haven't delved too deep into the issue this sorta behaviour would be what you'd expect when a coroutine/task/future is streaming data but gets blocked at each chunk
We use async drivers
So it's not that
There's nothing blocking in the code base
Due to the async nature
If I am looking at the correct codebase it looks like you don't?
The problem, like Joe said, is that it might be related to a cluster migration we had
And we're suspecting network latency
Which part are you talking about?
i think best start is to just benchmark the queries
if the queries take a long time, async isn't going to fix anything
this also really doesn't seem like a problem async would solve
I mean it would unless you are using a shit tonne of workers
Lets say I need to stream 10 chunks of data
Everytime the future yields back to the event loop and processes another waiting coroutine, if a singular coroutine blocks for 1s each yield, I have to wait for each chunk by a minimum of 1s which result in a 10s page load
looking through logs on our side, i cannot at all see any requests taking this latency
pinnwand is responding in milliseconds
The route maybe be returning the streaming response within ms ya
The HTTP connection doesn't close at this point though
testing with curl on the pinnwand server, it's giving me the full response in milliseconds
Idk tornado either but it's creating a streaming future by the looks
Ya idk then but even if you are having problems somewhere else along the line (I don't see any use of an async database driver) unless I am dumb and I wouldn't not change that
I concur with Mysty, if using tornado, you really should be using async drivers and asyncio.to_thread where applicable to prevent any potential blocking.
Just for general good practice.
I will also say, this is not our service lol
we run pinnwand and fork it to add some small modifications to enable different db drivers for Postgres, we otherwise have no additional modifications
any improvements really need to be added to the upstream pinnwand which is a little inactive
maybe its a conn pool that takes some time to open
There are a few PRs on bot that are waiting on a second review, from oldest to newest:
bot#2973
bot#2999
bot#3005
bot#3017
(if we get them all merged we'll be sub 100 open issues :O)
PR #3000 HELL YEAH!
cc @sharp crag #python-discussion message #bot-commands message
vivek has cooked before you could, it's fixed now
I don't always cook, but when I do, it's to show up robin
hullo chums, two small PRs from yours truly that would love your review, already have one approval on each of them. both changes i've tested fully locally whilst building them and are working fine
https://github.com/python-discord/bot/pull/3063
https://github.com/python-discord/bot/pull/3064
I would also appreciate reviews with this PR:
https://github.com/python-discord/bot/pull/2973
specifically whether you think the new embed + button is verbose, and any suggestions for a better UI/UX.
While we're at it, sir-lancebot#1148 from 2022 still needs review
how do I import a csv file to my sql workshop through python?
can someone help me with a django problem i'm a begginer
check out #❓|how-to-get-help 🙂
literally shaking and crying rn
the very reason I pay for my internet connection
:incoming_envelope: :ok_hand: applied timeout to @hallow aspen until <t:1716763137:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
#bot-commands message
bot#2679
actually should it support multiple files cause would i send multiple code blocks?
I don't know if this was discussed (I don't see so in the GitHub issue), but how is paste expiration gonna be handled?
what needs discussing here?
if a paste gets posted, we attempt to fetch it, if it exists, we relay. if it doesn't/is expired, we abort
if a paste expires, but it was posted before, what happens to that message?
nothing -- we keep it up
if a paste existed and was shared, it is reasonable enough to assume that at the point the paste became public
we are not relaying hidden pastes, only ones people are knowingly sharing into the discord server
the expiry is a measure of data minimization, not a privacy or security one
fair point
its same as if you were to paste a gist link and then remove it
so again shoud it support multiple file highlights?
Hi! I'm diving into cpython#119886, which aims to correct the behavior of follow_symlinks argument in os.link. However, there is a serious problem currently:
In WASI linkat has no such option and the only behavior is !AT_SYMLINK_FOLLOW (i.e., Not follow symbolic links), but the default value of that argument is True. So we must do one of the following two:
- Modify the default value of that argument into
False. - Leave that default value
Trueand modify test code a lot.
Which one is preferred?
Hello,
I think there's a confusion here.
This server is for python related projects, but we're not the core python contributors.
We're a community that offer help with projects that use python, but we are not really involved in the development of python itself.
You can have a look at our projects here if you'd like: https://github.com/python-discord/
We welcome contributions to all of our projects
I'm so sorry for that. btw are there other servers for python itself development? Thanks
There is nothing to be sorry about, do not worry
I am not sure to be honest
Quite a few cpython core Devs hang out in #internals-and-peps
Looks like they've lost access to the domain https://github.com/aio-libs/aiohttp/discussions/8434
the bus is merciless
Want to learn django. Where to start?
Sup everyone!
I just learned if, elif, & else statements.
Coding used to make no sense, until i thought about things as parts to whole. Lots of small parts, some inside other parts. I got it from looking at software architecture images.
Also, thinking about coding as data & algorithms helped things make sense.
Hope this helps someone ❤️💻❤️
I think the wider perspective gave me an answer to the question: "What is this for??"
Hi, happy to hear about your learnings. But this is absolutely the wrong channel for that, this is contribution discussion for our internal projects
Hi, I want to start contributing to open source projects but wanted to ensure that my skills woul be up to par before anything. What would yall recomend?(dunno if this is the right channel for this)
Hello!
It is indeed the right place.
We have a couple of projects that are open to contribution and we welcome all efforts
!contribute
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
- Sir Lancebot - our fun, beginner-friendly bot
- Python - our utility & moderation bot
- Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
Have a read at this, then browse the issues we have and ask to get assigned.
The projects that's commonly need to contribution are site, bot and sir-lancebot
@timid sentinel annoyingly adding that package doesn't actually stop the warning from appearing 😂
I see it often in my personal projects
It's working as intended https://github.com/python-poetry/poetry/issues/8809
So the PR you have done will be needed at some point when they remove the plugin, but doesn't stop the warning itself until then
it's good to have that plugin explicitly installed though
there is a config entry, and an env var you can set to stop the warning fwiw
yeah agreed, I think we should merge this PR
probably not worth ignoring the warning tbh
yeah, it'll fix itself eventually
So, moderation action commands take a user id... But is there any way that the bot could accept an action as a reply instead of the moderator supplying the user id? See: #python-discussion message
I feel like the bot could be improved here.
The reason for requiring a user id was to avoid accidental infractions.
If we were to allow replies to work like this, then it's highly likely at some point a mod will reply to the wrong message and infract an innocent 3rd party.
Since all it takes is for someone to send a message just before the mod left clicks and someone else's message to pop up under their mouse cursor.
I specifically don't want reply-infractions to work. It's not uncommon for me to start replying to someone's python question and halfway through I need to infract someone else. I don't want to accidentally infract the person I was originally replying to
Oh yeah lol I didnt run that
!remind 1h this
Your reminder will arrive on <t:1719073971:F>!
Here's your reminder: this
[Jump back to when you created the reminder](#dev-contrib message)
Our https://pythondiscord.com landing page seems to be in need of a little update. I'm not sure what would go there since the 2024 CJ doesn't seem to be ready yet, but maybe you here in #dev-contrib have some ideas?
we may just have a design/have previously left that area empty
that is what was in my memory
There's a version where the intro video is centered somewhere in the git history
I think I opened a PR that recentered it after the 22 cj
So, usernames in certain languages cause text to be changed and right justified. That messes up bot commands in mentions.
I'm not sure there's a great solution for that... It's just... Surprising
!rule 5 @outer oasis
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
There's nothing we can do about how Discord displays RTL text anyways
But it handles bot commands fine if you invoke the bot correctly
hmmm i think this is sort of implemented backwards
the issue specifies ```
When a deleted message is logged in #message-change-log, also add a link to the message it was replying to
from my understanding and reading of this, say we have:
Message A
Message B [Reply to Message A]
what we are looking for is when Message B gets deleted we additionally say in the log "was a reply to Message A"
i'm confused about the wording here
this log is only logging things that remain in discord, i mean it's definitely useful, but the original issue is saying to log what a deleted message itself was replying to, not what has replied to it right?
ahhh i see it looks like both of these are implemented
either way i'm somewhat concious of iterating over messages in a channel every time a message is deleted hunting for replies (https://github.com/python-discord/bot/pull/3106/files#diff-d9ff4f39b138e1dd403812c31e758bb59c2052e71d3559f78267c0deb1da0fc0R595-R602) though I could be being overly paranoid
yeah! thats what i was thinking, although I'm using async but it can be really inefficient way to deal with lots of messages, also there aren't any methods in discord.py which can provide us contents to the replies
I think I would rather stick with what the issue described as well for now. You also don't need any API requests for it: Get the ID of the replied message, check if it's in the cache, and get the content from it if available
are we pulling content or just putting the ID and reference? replied messages will still be up right?
turning message delete embeds from carrying one messages content to carrying one and maybe another one seems like it's going to confuse compared to just putting the jump link in for what it was replying to
if that gets deleted, there will be a separate log for it
Ah right yeah, we don't need the content
Got confused about the scope of the issue
Basically just link to the replied message then
Agreed
alright then ill remove the gather_reply() thing
Why does discord not show the server icons only a few of them? Discord on a desktop. My mobile discord has no issue.
That seems like a question for Discord, rather than a channel for discussing Python Discord projects
Okay
Hi there ! is there any update on this
I've done a small review, related to formatting.
Hi, could someone review my PR ?
thanks for your response! I have pushed the changes you suggested :)
Guys, any beginner-friendly open source going on right now? I'm kinda of interested in this kind of experience
You can participate in the Code Jam and team up with other members (see: #announcements ), which is not quite the same but somewhat similar
Other than that, you can find our repositories and the contributing guidelines in the channel's description - it's very rare for there to ever be things "going on" in open source, maybe excluding events like Hacktoberfest
Hi, requesting review on https://github.com/python-discord/quackstack/pull/82
lgtm
needs review(currently at one approval): https://github.com/python-discord/bot/pull/3073
bot#3074 @timid sentinel do you remember why you marked this as a draft?
I think I was going to have a look to see if there were any more chances worth making, but I think it's good as is, merged
ah nice
hey i would like to ask a question
is there someone who has much knowledge about python
I imagine there are many people with knowledge about Python on this server
Did you have a specific question?
!rule ad
Hi can anyone review this https://github.com/python-discord/bot/pull/3106
Sorry, got a bit busy with life and all that
I'll try to review it tomorrow or the day after
!remind 12h
Your reminder will arrive on <t:1720839771:F>!
Here's your reminder: Hi can anyone review this https://github.com/python-discord/bot/pull/3106
[Jump back to when you created the reminder](#dev-contrib message)
I've left a few comments.
thanks im checking them out!
:incoming_envelope: :ok_hand: applied timeout to @tawdry meadow until <t:1721133455:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
Micro pull request python-discord/bot-core#254
not sure if I'm supposed to bump the version or if that'll happen separately
Thanks, I'd noticed that was missing before but never PRd it
Not sure exactly how we do it, I'll leave it for @vale ibex to sort out 😌
AFAIK a core-dev has to manually bump the version and upload to pypi
it be done
big diff
!rule ad
I was trying to add snekbox to my compose.yaml and I got this :?
No such image: pythondiscord/snekbox-venv:latest
got the same with ghcr.io/python-discord/snekbox
Try ghcr.io/python-discord/snekbox:latest
Error response from daemon: No such image: ghcr.io/python-discord/snekbox:latest
services:
snekbox:
container_name: snekbox
hostname: snekbox
privileged: true
image: ghcr.io/python-discord/snekbox:latest
pull_policy: never
ports:
- "8060:8060"
init: true
ipc: private
tty: true
environment:
SNEKBOX_DEBUG: 1
PYTHONDONTWRITEBYTECODE: 1
volumes:
- .:/snekbox
- user-base:/snekbox/user_base
volumes:
user-base:
well, yea pull_policy: never
that means it will never attempt to pull from the internet, and will only look locally
Ah that makes sense lol, I copied the snekbox repo's compose.yaml
Yeah, that's because it has the build section to build it locally
thank you
HI all
hello
idea i'm throwing out there, from @lucid orbit: have !topic command somehow prompt OP to confirm on a topic before it actually sends the message? otherwise people in chat might just watch the topic get refreshed a dozen times before it gets finalized. something to think about
would require us moving from !topic to /topic and doing it via slash commands if we want ephemeral messages but this is very doable
What is happening in here?
What do you mean ?
!contribue
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!
Projects to Contribute to
- Sir Lancebot - our fun, beginner-friendly bot
- Python - our utility & moderation bot
- Site - resources, guides, and more
Where to start
- Read our contribution guide
- Chat with us in #dev-contrib if you're ready to jump in or have any questions
- Open an issue or ask to be assigned to an issue to work on
You will find all the info you need for contribution here
Okay Thanks.
Then what is the difference between Open source category and this one?
Not sure i get the question
In open source category you contribute also and here also
the open-source projects category is for python-related third-party programs that use this discord as a conversation host
Okay
the development category, which this channel is in, is for improvements to python discord itself - and the stuff that supports it, like the website and various bots
Okay thanks appreciate that.
just to be sure, this is wrong, right?
- yes,
anyshould betyping.Any - I'm not sure if
OrderedDictis the correct typehint either (I thinktyping.TypedDictwould be better?)
And for everyone: is it just me or is the naming for _set_silence_overwrites / _unsilence unintuitive? _silence_channel / _unsilence_channel would be much better IMO
bot/exts/moderation/silence.py lines 231 to 232
async def _set_silence_overwrites(self, channel: TextOrVoiceChannel, *, kick: bool = False) -> bool:
"""Set silence permission overwrites for `channel` and return True if successful."""```
`bot/exts/moderation/silence.py` lines 313 to 315
```py
async def _unsilence(self, channel: TextOrVoiceChannel) -> bool:
"""
Unsilence `channel`.```
i'll look into it, this was already there 😭
perhaps typing rewrite for the Bot source code?
You don't need to fix everything you come across. Keep your PR limited to a predefined scope or it'll never end
yeah ik, but this is relevant to what I'm doing, silence and unsilence system
what you're doing is adding thread support to the silence system, not fixing type hints
well i already needed to change some typehints from TextChanneOrVoice to the new SilenceableChannel so not a big deal? it's in the same function too
That's still directly part of adding thread support
I mean it should be fine, not so much out of scope, but given that it seems like typings is not something for this repo i can leave them wrong if fixing them is an issue 😐
It's not an issue, I'm just trying to spare you the trouble and make it easier for people to review your PR
Fixing type hints is very much appreciated, didn't mean to say otherwise
ooh are you working on silencing for threads/forum posts?
Yes: bot#3122
woot woot
Hello, your message was removed for violating rule 6
Hello im new I want to contribute to the statistics.py is this channel only for the projects related to discord?
this channel is specifically for our projects
gotcha do u guys have a channel for other porjects ?
maybe #web-development ?
Not a general channel. If #web-development is related to what you want to do you can discuss it there
#web-development is naturally for web development
Every channel has a description for what it's for
Hello, easy PR to review https://github.com/python-discord/bot/pull/3141
Since the #dev-branding channel is no more, I want to repost my suggestion / plea to stop frequently changing the server's icon in an effort to make it / this server more recognizable.
I forget this server exists 99% of the time, even though it's always visible in my server list, because I can't effortlessly pick it out. With good branding comes easy recognition, and the current system voids that premise entirely.
Accessibility was also another concern of mine, as the main non-themed logo has poor contrast. For a visually impaired person, it could look like a blue blur with no defining features.
Here is my design and suggestion which has been approved for use and resale (on merch) by the Python Software Foundation trademark team.
Right now I don't think we're interested in a larger brand shift to a logo as drastically different as that. That's not to say we can't find other ways to improve contrast on the current logo, I don't think from memory we've had much feedback from those who are visually impaired regarding the current logo design.
There have been conversations about changing the branding less frequently or in ways which preserve easy recognition (i.e. keeping the first frame static/only changing half the frame for the first frame) which I'll ensure we explore in a staff meeting. The blue Python logo is our brand and is not just what we use on Discord but is our online presence everywhere, hell, I have a COVID mask and a jumper of it, Theelx has a dress of it. I don't think right now we want to make a drastic shift from that but I will raise this internally and link to this post so we have a talk about ways to improve things.
We heard your concerns and discussed it internally, and the staff decided that we wouldn't make any changes to our branding-changing practices. Continuing to petition us on this point won't have any effect.
I'm genuinely not seeing any valid reason to be denying this feedback this sternly and without any further polling/surveying from your community. Your statement where you say "I don't think.." in regards to other feedback demonstrates this.
The reasons given thus far have been very personal to current staff. It makes this matter feel like like a 'Staff vs Me' issue, when the reality of it is I'm speaking for a broader population. I always have been, because I definitely wouldn't be putting this much effort in if it was a small scale issue.
The lack of other feedback on the matter, and also lack of anyone else entering this conversation - considering the server's size - also raises concern.
Is leaving feedback accessible in itself? Going through the server's info channels and website, it doesn't seem to mention "feedback" and only references this channel in the context of specific contributions. Now that I'm realizing this, I feel like I can see the issue as clear as day.
Our annual survey included a question about the frequency of our branding change, and a large majority supports the current frequency.
Specifically about the frequency? Was there an "other" option or something for people who'd rather not have it change?
It's also less about the frequency, and more about design choice. Like how I've suggested before that the base logo could remain the same, and it's only the background that changes.
I just looked over the survey responses on that question for 2023.
57% says it changes just often enough.
12% said it changes too often.
The rest were write-in responses, most of which were variations of "don't care" or complaints about the pride branding.
Two people said that the logo changes makes it hard to find the server.
One person said the logo changes don't make it hard to find the server because the shape stays the same.
@tepid niche You raised the topic in #community-meta which led to a conversation there. You then raised the topic in dev-branding which led to another conversation which involved every one of the (at the time) Directors at some point. It was then raised internally, and we discussed it more. It was then brought to a staff meeting, where we discussed it more, then voted on it.
I think we've done our due diligence to properly consider a suggestion made by a community member.
At some point, you need to accept our response even if it disappoints you.
Alright. I'm just not a fan of the your team's process
Fun fact I lost the server 4 times in the last hour and in the middle of this conversation 
ctrl+k "dev-contrib" should help if you're on desktop
Really?
Didn't mean to make it sound like I'm immediately shitting you down, I'm just saying our blue is the entire brand we're built on. I'd rather we investigate ways to make that accessible than switch the hundreds of locations where we currently use blue branding to something violently different. I get the visual impaired thing, I'm incredibly colourblind myself and have struggled with things like this my entire life. I'll let the other people here continue this discussion, I was just voicing a mostly personal opinion that a large branding shift is not in the interest of the community at large when it comes to its place within the wider Python community, but am not at all ruling anything out.
I'm more saying I don't believe the proposed design is something to adopt, I'm not at all offering views on anything external to that.
:incoming_envelope: :ok_hand: applied timeout to @novel nova until <t:1723990359:f> (10 minutes) (reason: burst spam - sent 8 messages).
The <@&831776746206265384> have been alerted for review.
You spammed numbers, don't know why you're surprised
nah i was lagging
or my discord was
Couldn't think of a reason why that would happen after reading the code, especially the post isn't renamed again with a second lock, and this is the only place that would send the help channel closed message in https://github.com/python-discord/bot/blob/f1c7b0be71b6d10632625d81a6b150bd4d6fc7c5/bot/exts/help_channels/_channel.py#L45C11-L45C27
bot/exts/help_channels/_channel.py line 45
async def _close_help_post(closed_post: discord.Thread, closing_reason: _stats.ClosingReason) -> None:```
Hey, apparently there's a bug in our #mailing-lists.
!raw #mailing-lists message returns: https://paste.pythondiscord.com/KQYWYW3ULZN3AZE3R6EV7MLC5A
Which includes: https://python-oracledb.readthedocs.io/en/latest/release\_notes.html#oracledb-2-4-1-august-2024 (not the backslash escape)
Discord interprets that as https://python-oracledb.readthedocs.io/en/latest/release/_notes.html#oracledb-2-4-1-august-2024 (backslash is turned into slash... for some reason)
so opening this link from discord does not work
We make an attempt to escape Markdown, and our regex may be too naive https://github.com/python-discord/bot/blob/5aa4af0531510df5a59b7f3a2ae4366dff76d9a1/bot/exts/info/python_news.py#L31
bot/exts/info/python_news.py line 31
r"|(?P<markdown>(?<!\\)[_|])", # matches unescaped `_` and `|````
Hmm no, I think the regex is fine. We do want to escape this. The escape should work, but Discord covers the back slash into a forward slash as you point out. I'm not sure there is anything we can do about this directly.
A workaround is to make the link a markdown link like [thing](https://). All we have is raw text, so we'd have to detect URLs in it ourselves.
Please open a GH issue so we can keep track of this.
bot/exts/info/python_news.py line 12
Are you trying to report a problem?
is that a glitch?
No, that's the actual content of that line
We should probably redirect the webhooks from #dev-branding (dev-branding) to here
They're in #dev-log
removed the webhook from the archived channel now too
@vale ibex
I made a pr and I hope it gets approved, I really tried to make it good! I basically cloned the repo, changes it, then forked the original, and uploaded the changes! I spent a while reading the contribution guild lines and --I think it passes---
I spot a lot of changes in this PR that will break our linting rules, could you install the pre-commit hooks locally and run them
Hello, this channel is for discussion about our open source projects: https://git.pydis.com/
Also please follow rule 4 while in the server
Also you may want to read the top part of #voice-verification , spamming to reach your message count will result in a temporary voice ban
this channel is for discussion about our open source projects: https://git.pydis.com/
yo i need help on git hub can yall join a 2 min call
which python discord repo did you need help with?
not discord repo
i need help with setting up my ssh
ah, this channel is for discussing Python Discord repositories specifically
I'd suggest reading #❓|how-to-get-help
ight
hi, where is the source for the !kindling command?
It's not a command
The bot tries to find tags when commands do not exist
it's a fallback strategy, in some way
and for the tag, you can find it here https://github.com/python-discord/bot/blob/main/bot/resources/tags/kindling-projects.md
hm i came across that as well, but i see no source for the aliases? i.e !kindling and !project are valid "tags" but !projects is not, i wanted to fix that
I was checking sir-lancebot uwu command for fun, but i have a question:
await clean_content(fix_channel_mentions=True).convert(ctx, text)
Why is this function called if the return value is not used, what am i missing?
- not using the returned value
- using the returned value
likely an oversight when it was written, feel free to open a PR to fix it
- that is not on topic for this channel
- we will not help you bypass cloudflare or other captcha/anti-bot protections, if they are blocking you it is clear you're not supposed to be doing that
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
its actually in the error handler https://github.com/python-discord/bot/blob/13927ec4791a3f87193724ea3d1ac24143a8684c/bot/exts/backend/error_handler.py
Yeah, but it uses the tags cog
hi, this channel is for discussing this server's projects, not for discussing Python projects in general.
Thanks for the clarification! Could you point me to the appropriate channel
we don't really have a channel for showcasing or asking for help with community projects (here's why)
you might wanna try posting on the r/Python subreddit
Ok, thanks
i was having a latex battle with someone else today and we ended up spamming a channel because we had to repeat some commands due to errors. do y'all have any feeling how much longer this might be stalled? https://github.com/python-discord/sir-lancebot/issues/1062 it seems to be waiting on this other issue https://github.com/python-discord/bot-core/pull/137 for about 2 years and i wonder what happened
or would it be reasonable to delegate latex functionality to a different bot instead of homebrewing the refresh function?
the refresh function will also be used in !eval if I'm not mistaken so I think it makes sense to keep it
i'm not sure what can be done about the stale PR though
Hi everyone
Here's your reminder: check site#698
[Jump back to when you created the reminder](#dev-contrib message)
lmao
!rule ad
This channel is for discussing this server's projects
!rule violation
The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.
So this is the reason why the prs are so stalled
😭
I am having an issue with senkbox, I am unable to run anything here's the full error message:
https://paste.pythondiscord.com/ER4Q
talking about nsjail returning 255.
the only guide I been following is CONTRIBUTING.md
Could you run docker compose pull, then docker compose up --build, then make a request to eval, and send the full terminal output, including the commands run
I forgot to mention that I am using wsl, if that affects what i am doing
this is the request that been posted to /eval
{
"input": "Hello, world!",
"args": ["main.py"],
"files": [
{
"path": "main.py",
"content": "VGhpcyBpcyB0aGUgY29udGVudCBvZiBmaWxlMS50eHQu"
}
],
"executable_path": "/usr/local/bin/python"
}
(I have two jsons I use to test, but no matter what both fail with the same error)
Does it work if you don't specify executable_path? The path you're specifying in this json isn't valid
that's sounds vaild. I would be so disappointed on myself after this
yeah I am disappointed
thanks chris
np, fwiw the valid paths are are /snekbin/python/3.12/bin/python
you can replace 3.12 with 3.13, 3.13t or default
I will keep that in mind. I greatly appreciate it
hello, am trying to import "speech_recognition" and its not working, I tried looking for a solution but all i could find were out dating or not working. Can I get assistance please.
is the import correct?
Spelling seems to be incorrect - can you recheck
Seems like it should be SpeechRecognition
you are missing an 'i'
I didn't even notice
thank you very much
👍
@topaz depot, @gloomy moss, this channel's purpose is to discuss this Discord server's projects.
See #❓|how-to-get-help to understand how to get help with your own code.
I'm looking for some reference, what settings do python discord repos use? for stuff like branch protection rules, PR merge method, etc
We only protect the main branch. We're not too consistent with our merge method - sometimes we create merge commits and sometimes we rebase. We rarely squash.
We also use PolicyBot on most repos (the one pictured above does not have it). https://policy-bot.pydis.wtf/
#bot-commands
I've implemented a Typst-rendering cog for @dusky shore as per my feature request (issue #1623): https://github.com/RundownRhino/sir-lancebot/tree/typst-command.
Looks like I am supposed to get someone to look at my issue before I make a draft PR, though.
EDIT: The issue is now approved; I've made a PR.
OP of this help thread left the server, but the bot didn't say so. https://discord.com/channels/267624335836053506/1303296323713241159
hi im here to help if u want any help
What kind of help did you need?
Folks, please take it to #1035199133436354600
Hey guys! I made a python module for managing CSVs and using their data within other apps. The need arose while I was doing something else, and I couldn't find anything similar, and my hope is that this can be useful to anyone else. I'd love if anyone had any pointers on what needs improvement.
https://paste.pythondiscord.com/H7FQ Here's the py
and I have a readme i can share if it will let me
here it is with the readme
https://paste.pythondiscord.com/WHSQ
Post such programs in stack exchange website for review. They have Experts who will review your code and give suggestions.
@vale ibex got pinged that you merged bot#3194
Wanna go ahead and merge the duplicate sir-lancebot#1627 ?
chris is on a pr merging spree, huh. merged another of mine, too
yeah
This channel is for discussing this Discord server's projects, so your message is off-topic.
@atomic ivy Well, where do I launch my Python projects on GitHub
nowhere on this server
you can try posting in the r/Python subreddit
@atomic ivy okey, thank you
Who implemented this?
This was a pain to find lol, commit e5fbddbe5
"oh it can't be too hard using git blame to find"
yes it can if you do it wrong like I did! 
Why do you ask?
Quick bug fix if anyone wants to review https://github.com/python-discord/bot/pull/3207
Fixes a bug where in the following message:
discord.gg/python
discord.gg/djs
The newlines would be ignored, and the bot would end up checking the invite discord.gg/pythondiscord and therefore bloc...
I agree
Hello Want some help
python-discord/branding#201
Ale fajny bober 🥺🥺


🦫
thanks @woeful basin for the PR!
Before I thought this feature was slightly annoying. But now that Discord increased reaction sizes, it's very annoying! It more than doubles the size of a short message. Maybe we could leave the reactions for clearly christmas-related words like christmas and santa, but remove the trigger for tree? Trees are very common in programming
Can we get plotly installed in snekbox?
snekbox#226 up for review
Thanks! I just realized that another dependency is needed to export the pngs
How do we nicely get data in and out of plotly?
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x='sepal_length', y='petal_length')
with open('./foo.png', 'wb') as out:
out.write(fig.to_image('png'))
like that
I added it to the PR
new version causes fig.to_image('png') to hang forever
look ma im famous
I can do that in a follow up
Or — is everything else already sorted?
I didn’t actually check 
I think of the requirements file as append only so that it can be like cryptocurrency ||/s||
Yes the other dependencies were sorted. You've introduced chaos to our orderly list of dependencies
my lawyer will see you now https://www.burwick.law/newclient
My sincerest apologies
I have promptly rectified my transgressions
I'm going outside, but I assume everything will be okay
we are going to make it
!e import plotly
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | import plotly
004 | ModuleNotFoundError: No module named 'plotly'
@patent pivot when is it going to happen
!e import plotly
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | import plotly
004 | ModuleNotFoundError: No module named 'plotly'
!e import plotly
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | import plotly
004 | ModuleNotFoundError: No module named 'plotly'
I blame freethreading
lmfao it's getting there
this has definitely got worse
i don't know why
ETA 13 minutes i'd guess
!e
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x='sepal_length', y='petal_length')
with open('./foo.png', 'wb') as out:
out.write(fig.to_image('png'))
:warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
@patent pivot FUCK
!e
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df.head(10), x='sepal_length', y='petal_length')
with open('./foo.png', 'wb') as out:
out.write(fig.to_image('png'))
:warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
In [12]: %timeit fig.to_image('png')
24 ms ± 352 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
on my machine
:white_check_mark: Your 3.12 eval job has completed with return code 0.
hi
!e
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df.head(10), x='sepal_length', y='petal_length')
with open('./foo.png', 'wb') as out:
out.write(fig.to_image('png'))
:warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x='sepal_length', y='petal_length')
fig.write_image('./foo.png')
:warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x='sepal_length', y='petal_length')
:warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
oh wait is it just loading the iris dataset that's the problem lol
!e
import plotly.express as px
df = px.data.iris()
:warning: Your 3.12 eval job has completed with return code 0.
[No output]
no
!e
import plotly.express as px
df = px.data.gapminder().query("country == 'Canada'")
fig = px.bar(df, x='year', y='pop',
hover_data=['lifeExp', 'gdpPercap'], color='lifeExp',
labels={'pop':'population of Canada'}, height=400)
with open('./foo.png', 'wb') as out:
out.write(fig.to_image('png'))
:warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
I guess plotly is a memory hog.
oh yea i knew that, but didn't realise it was that bad lol
!e
import plotly.graph_objects as go
animals=['giraffes', 'orangutans', 'monkeys']
fig = go.Figure([go.Bar(x=animals, y=[20, 14, 23])])
with open('./foo.png', 'wb') as out:
out.write(fig.to_image('png'))
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 6, in <module>
003 | out.write(fig.to_image('png'))
004 | ^^^^^^^^^^^^^^^^^^^
005 | File "/snekbox/user_base/lib/python3.12/site-packages/plotly/basedatatypes.py", line 3772, in to_image
006 | return pio.to_image(self, *args, **kwargs)
007 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
008 | File "/snekbox/user_base/lib/python3.12/site-packages/plotly/io/_kaleido.py", line 143, in to_image
009 | img_bytes = scope.transform(
010 | ^^^^^^^^^^^^^^^^
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/IUVM2OVH5634NTDSVDQRD46E6U
amazing lol
wait
LMFAO
okay
this will never work
it needs fucking headless chromium
plotly generates its images by booting a chrome instance and taking a screenshot LOL
LOL
!e
import plotly.graph_objects as go
animals=['giraffes', 'orangutans', 'monkeys']
fig = go.Figure([go.Bar(x=animals, y=[20, 14, 23])])
with open('./foo.png', 'wb') as out:
out.write(fig.to_image('pdf'))
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 6, in <module>
003 | out.write(fig.to_image('pdf'))
004 | ^^^^^^^^^^^^^^^^^^^
005 | File "/snekbox/user_base/lib/python3.12/site-packages/plotly/basedatatypes.py", line 3772, in to_image
006 | return pio.to_image(self, *args, **kwargs)
007 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
008 | File "/snekbox/user_base/lib/python3.12/site-packages/plotly/io/_kaleido.py", line 143, in to_image
009 | img_bytes = scope.transform(
010 | ^^^^^^^^^^^^^^^^
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/N4G3647UBTP6IRE5LMXVHIIT6I
yea no this could be a no-go unfortunately
it probably wouldn't be worth it, but I'm curious: what if there were a headless chromium process running in the snekbox container that's just always ready?
mmm
it would just be hell to integrate
every lib uses headless things in a slightly different way, but enough to make that a headache
stuff like kaleido is not using chrome
it's booting headless chrome through the chrome embedded framework
it sets its own flags, expects it to run in a certain way, etc.
it's like how spotify is technically chrome embedded framework under the hood but obviously is very much it's own application with its own resources
think of it as chrome vs. chrome sdk i guess
but like sdk on steroids
HELL YEAH GOAT!!
go Figure i gues
This channel is for discussing Python Discord repositories, not for advertising your own repositories, which is against our #rules
PR needing review! bot#3205
is there a place to "advertising your own repositories"?
Not in this server no, we have a rule against advertising
If it comes up naturally in a conversation then it's fine. EG someone asking about a solution to a problem that your project solves, then it could be brought up
!e
import sys
#pip install PyQt
from PyQt5.QtCore import QUrl
#pip install PyQtWebEngine
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage
from PyQt5.QtWidgets import QApplication, QLineEdit, QPushButton, QVBoxLayout, QWidget
class Browser(QWidget):
def init(self):
super().init()
self.initUI()
def initUI(self):
self.setWindowTitle('Web Browser')
self.setGeometry(100, 100, 800, 600)
self.url_field = QLineEdit(self)
self.go_button = QPushButton('Go', self)
self.go_button.clicked.connect(self.navigate_to_url)
self.view = QWebEngineView(self)
layout = QVBoxLayout(self)
layout.addWidget(self.url_field)
layout.addWidget(self.go_button)
layout.addWidget(self.view)
self.show()
def navigate_to_url(self):
url = self.url_field.text()
if not url.startswith('http'):
url = 'http://' + url
self.view.setUrl(QUrl(url))
app = QApplication(sys.argv)
browser = Browser()
sys.exit(app.exec_())
dose this look right ??
I'm working on abbreviating the automatic messages when someone posts code incorrectly. I also want to remove the
feature, and have it so that the message can only be dismissed by doing what it says. is that alright?
I don't know if we should remove the trashcan