#dev-contrib

1 messages · Page 25 of 1

toxic wren
#

wdym like a guideline on how to use AI in the server

#

!rule 10

stable mountainBOT
#

10. Do not copy and paste answers from ChatGPT or similar AI tools.

toxic wren
#

that works

toxic wren
snow yacht
#

To me "answers" implies something else

#

I mean when people come on voice and ask for assistance with their project/scripts or w/e which is slop they don't understand

patent pivot
#

that is probably something to be written as a policy on site or an extension to the asking questions guide -- if that's something people feel is necessary then opening an issue on the meta repo is a good idea and staff will discuss it

patent pivot
snow yacht
#

I ended up writing the following to do the message separation a bit more ergonomically:

with ordered_messages as (
    select id, created_at, ROW_NUMBER() over (order by created_at) - 1
    as message_index
from messages where author_id = '158020687850766338'),
base_time as (
    select created_at as start_time from ordered_messages where message_index = 0
),
adjusted_values as (
    select om.id, greatest(om.created_at, bt.start_time + om.message_index * INTERVAL '15 minutes') as new_timestamp
    from ordered_messages om
    cross join base_time bt
)
update messages
set created_at = av.new_timestamp
from adjusted_values av
where messages.id = av.id

still not quite happy with it though

snow yacht
toxic wren
#

!source exec

stable mountainBOT
#
Bad argument

Unable to convert 'exec' to valid command, tag, or Cog.

toxic wren
#

!source eval

stable mountainBOT
#
Command: eval

Run Python code and get the results.

Source Code
toxic wren
#

Is this is the change needed in bot#3390 ?

dusky shoreBOT
fallen patrol
#

Hm

#

IMO command name should be exec and alias should be eval

celest charm
#

eval should be like exec but if the input is not a single expression, it permabans you

toxic wren
toxic wren
toxic wren
dusky shoreBOT
toxic wren
#

Works!

vital escarp
#

Hi guys , i wanted to help with the open source projects , any guidence (im a newbie)?

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
vital escarp
#

thanks!

lime stream
#

What is python

dim pelican
brittle needle
#

Hi guys, i am exploring preview environments for django/fastAPI during development, i have few question and would love insights from the folks who have done this in thier workflow

rapid swallow
brittle needle
#

@rapid swallow thank you

wise marten
#

I have noticed, that the eval command gives a redo button when the non-code portions of the message are edited

#

often times I include an explanation around the code that should run (which is in a codeblock).
However, if I make a typo, then edit it, it prompts me to rerun

#

I wonder, what would be strategy to stop that from happening? I mean, how would you check programatically?

fallen patrol
#

Run prepare_input on both of the contents before comparing

#

Or no, after comparing

#

If before.content != after.content and prepare_input(before.content) != prepare_input(after.content): ...

#

Checking the first one because we don't need to run two regexes if it wasn't content that changed

vital escarp
#

Can someone help me set up docker in desktop cause ive done installed and set up wsl but for some reason it says its version its too old for docker. Dm me private please!

fallen patrol
small jetty
#

hi, i have some experience programming. Would anyone be interested if I try adding a !lint command to the bot which I guess would use something like ruff, run it on a code snippet and give the output of ruff?

toxic wren
#

I don't know if you will use this but, coderabbitai is free(The Pro tier is free) for OSS projects like the Python Bot and Sir Lancebot.

Background: Code rabbit is like GitHub Copilot and summarizes, and review PR's. This gives context for reviewers and contributors. It can also be configured for the repositories specific needs(ex: the exact format on how to write code). It also gives reviews in your IDE.

Btw I am not from code rabbit or associated with them, I just came across this and thought it would be cool for projects like this.

patent pivot
toxic wren
patent pivot
patent pivot
toxic wren
toxic wren
small jetty
stiff path
#

Hello guys i want to start python how i can be better fast ?

toxic wren
toxic wren
#

I have a question for the snekbox. I want to use snekbox for my project(running python code in a website(code will run on the server side, api maybe?) How do I do this and set it up?

patent pivot
#

we just need to bundle it as a dependency

#

in the same way we already have added numpy and similar

#

and then just need to check the entrypoints get mounted to the jail

toxic wren
#

Im building snekbox and it's been 10 minutes and its not done yet

#

probably my computer being slow

#

stuck on step 27 of build

#

@vital escarp !contib

#

!contrib

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
modest ruin
#

can someone rate my code?

#

i started python 5 minutes ago

toxic wren
timid sentinel
#

Doesn't specifically mention ruff but only because it's from before ruff existed :)

#

A good start would be coming up with a specification for how the command would be implemented, and the user interface for it (e.g. how could it support passing options for the linter) and posting that on the issue

small jetty
#

Oh it seems neither ruff nor black have a Python API... That might make things tricky.

small jetty
stable mountainBOT
#

bot/exts/utils/internal.py line 231

async def eval(self, ctx: Context, *, code: str) -> None:```
patent pivot
small jetty
#

ah i'm not that familliar with nsjail.

toxic wren
#

If I add snekbox to a website(for running code) would it still be a static site(Hosted with Cloudflare pages/github pages) or dynamic?

fallen patrol
#

I've had a black format command for a while on Monty

timid sentinel
#

iirc the snekbox endpoint lets you specify the path to the executable you want to use, could this be as simple as adding the package you want to the requirements.txt and then just working out the path to pass for the executable?

patent pivot
vale ibex
#

If ruff provides a pre-built executable it would be even more trivial

patent pivot
#

it just requires us to expose entrypoints (or check they're exposed), you can pass the path to the executable in to snekbox alongside files that snekbox will put in an execution dir

fallen patrol
vale ibex
#

iirc it should be a case of putting it in /snekbin somewhere and then specifying that path when calling the api

patent pivot
#

yea

fallen patrol
#

Remember to set the env var to have ruff not write a cache

vale ibex
#

it'll be a tmpfs inside the nsjail container anyway so shouldn't matter

harsh hill
#

looks like there hasnt been much contribution to sir lancelot this year

fallen patrol
outer oasis
fallen patrol
#

Remember WPC: Write Performant Code

harsh hill
fallen patrol
toxic wren
patent pivot
toxic wren
#

Guys, How would a !stats command be for showing contribution stats of the bot, lancebot, site, snekbox, etc in a certain timeframe.
Something in this format:
Showing stats for the Last 10 months:
Issues Opened: 10
PR's Opened: 15
Issues Closed:5
PR's closed: 2
Total Commits:100

Something like that?

patent pivot
#

like the details on https://www.pythondiscord.com/ ?

toxic wren
#

though we could add those too

#

Ill check the Github API docs

#

if it's possible

patent pivot
#

we already get that from the GitHub API

#

those stats on the homepage are pulled from the GitHub api

toxic wren
#

This shows:
Lang, Stars, and forks

#

I want to show:
PR's opened in a timeframe, Issues opened in a timeframe, PR's closed in a timeframe, Issues closed in a timeframe and total commits in a timeframe

#

so the command is like this !stats <timestamp_start> <timestamp_end>

fallen patrol
#

Yeah seems cool

#

Hmmmm

patent pivot
#

uhhh

#

can you open an issue for this

toxic wren
patent pivot
#

i'm again not sure if implementing this in discord is very useful given you can get more useful statistics straight out of GitHub with your own queries and have them be presented in a much better way

fallen patrol
#

Consider: recognition within discord

patent pivot
#

not sure what you mean

toxic wren
#

I mean like if you were to show someone stats for bot in Discord it would be cool

#

Like all the contribution efforts

#

from the community

patent pivot
#

I think doing that via numbers doesn't really do it justice, highlighting individual features is what does that justice and we have the auto-embedding of issues and PRs

patent pivot
#

and also, being completely transparent, our repos are a lot less active than they used to be and I'm not sure it very well highlights the development efforts of our community projects if you focus solely on the most recent issues and PRs

toxic wren
#

its just a number statisitc

toxic wren
harsh hill
#

wait a sec... am i only able to contribute to sir lance if i purchase Ona (formerly Gitpod)?

#

i forked it and cloned it to pycharm but then i actually read the contribution page on pythondiscord.com

toxic wren
#

Issue opened: bot#3394

dusky shoreBOT
harsh hill
#

ope

#

they have a free plan. maaaaaan this is why my ADHD ass needs to read the instructions before grabbing the hammer

royal prawn
#

can you share the exact page with the exact instructions

#

been a while since i've done anything with lancebot, but i did not interact with gitpod

cold island
#

git pod is one method to work with sir lancebot, you don't have to use it. Can run everything locally

#

What you need is under the requirements section

royal prawn
#

yeah i used the docker path iirc, back in the poetry days

harsh hill
#

poetry?

fallen patrol
#

!pypi poetry

stable mountainBOT
#

Python dependency management and packaging made easy.

Released on <t:1758466309:D>.

royal prawn
#

another package-etc manger, like uv

toxic wren
fallen patrol
#

Package manager slightly misnames it due to all of the other tools that exist

toxic wren
#

!pypi uv

stable mountainBOT
#

An extremely fast Python package and project manager, written in Rust.

Released on <t:1759602233:D>.

toxic wren
#

in Rust

fallen patrol
#

@harsh hill you don't need to use gitpod

toxic wren
#

why does everything need to be in rust

fallen patrol
#

You can literally clone the repo, run docker compose up, and boom running bot
-# after adding bot token

outer oasis
toxic wren
fallen patrol
patent pivot
#

i have nothing else to add

#

I think you could use slightly more polite and less pedantic ways

toxic wren
fallen patrol
royal prawn
#

meh
did not perceive as even slightly hostile

harsh hill
#

okay i got the venv installed and ill just say thats as far as im going to go rn. thats wayyyy out of my league haha

#

ill be back for you sir lanceBOT. wait for me senpai

fallen patrol
#

fair

#

and that's totally fine

harsh hill
#

now im just blasting baroque music in my ear while going thru tutorial hell. lets get this bread and grind Pluie

tame pebble
#

The reason why I'm asking is that we'd also like to simplify this as much as possible

#

and make it even more accessible

harsh hill
#

for sure! vocab (knowing what venv and precommit and push, etc.,), how to navigate pycharm(the difference between the terminal and the text editor. do they work together or are they separate?) and simply just like... how do you run code, read code, how is it divided into different files in the project...

#

all sorts of stuff

#

its not you, its me

fallen patrol
#

would this be your first ever contribution?

harsh hill
#

yee

fallen patrol
#

Before i forgot but @celest charm got me interested in seeing about adding basedpyright to @stable mountain

#

And I'm down to submit the pull

fallen patrol
# harsh hill yee

I don't have the contributing docs in front of me atm but which part of getting a local copy of sir lancebot are you having trouble with? Maybe I can help walk you through it.

The tldr is

  • clone the repo
  • open in an IDE/editor
  • install dependencies
  • install git hook
  • create discord application and discord server
  • add bot to server
  • add token to new .env file in editor
  • add other configuration variables
patent pivot
#

so it's much more an advisory thing

#

there are things we'll need to undoubtedly silence/ignore because there are things we can contextually assess to be impossible that the typing system cannot, and at this point we don't wish to constrain contributors to having to add a pile of typing stuff

#

so importantly at this stage not part of the main lint pipeline and not part of pre-commit/commit hooks

tough berry
#

Hey everyone! I just launched Digamma Prime — a symbolic framework for auditing ML models.

It uses metrics like φ and Δφ to compare models by behavior, not just accuracy.

Docs, CLI, and tutorials are live: https://github.com/Cerene-Salt/Digamma-Prime-Framework

Would love feedback or collaborators — especially around visual modules and dashboards!

GitHub

This project will contain Epe Piancé´s library, a mathematician and computer scientist. - Cerene-Salt/Digamma-Prime-Framework

#

I did it with the help of Copilot.

toxic wren
#

Read the description for more info

fallen patrol
#

!d disnake.Role.colour is this on my end?

stable mountainBOT
fallen patrol
#

Seems its the inventory configuration here

#
#

there's a second API in there for some reason

#

these two commands !d removedoc disnake
!d setdoc disnake https://docs.disnake.dev/en/latest/objects.inv

#

should fix it

oblique cairn
#

!d removedoc disnake

toxic wren
stable mountainBOT
#

I'm just typing a very long message..

toxic wren
oblique cairn
oblique cairn
#

(see above)

toxic wren
#

makes sense

toxic wren
#

still typing......

outer oasis
#

Poor @stable mountain

toxic wren
#

its gonna be permanent

royal prawn
#

shen what did you do

outer oasis
toxic wren
outer oasis
#

M-x rollout restart bots/bot or whatever it is

outer oasis
#

me here

toxic wren
outer oasis
wise marten
#

Python has been stuck typing for a while in multiple channels... I sent this message 14 minutes ago

toxic wren
#

its calling the wrong API

#

and its stuck in a loop

#

allegedly

wise marten
#

i c

fallen patrol
#

Lmfao

#

@late hedge we did it again we broke @stable mountain

#

First ruff and now pydis

outer oasis
fallen patrol
#

(and yes, disnake once broke ruff CI)

outer oasis
#

y

fallen patrol
#

Off topic

royal prawn
#

why has no one fixed this yet
do i have to ping devs oops in the dev oops channel

outer oasis
#

They're the ones with permission to restart the bot

royal prawn
#

heaven forbid the former oopser do it

outer oasis
#

@fallen patrol a restart is all that's needed to get it to stop, right?

fallen patrol
#

It's also typing in #bot-commands

fallen patrol
outer oasis
royal prawn
#

<@&409416496733880320> pybot has been typing in multiple channels for a while, may need restarted.
some commands, like !docs, also appear to be failing

outer oasis
fallen patrol
royal prawn
#

i noticed. this does demo the problem, though

outer oasis
#

directions, thuri, directions

cold island
#

If the only problem is that it's typing then it's not really urgent, someone will get to it

outer oasis
#

!docs is dead

fallen patrol
#

!d

stable mountainBOT
#
All inventories (`0` total)

Hmmm, seems like there's nothing here yet.

fallen patrol
#

Yeah it's a little more urgent I think

royal prawn
#

apparently there may be other problems
i no have sentry access so cannot give full details

fallen patrol
#

Lol

#

This is why I need to rewrite the docs command on monty

#

It works but it doesn't sometimes

outer oasis
#

Last Sentry event was 6h ago

#

you don't say

rustic venture
#

doesn't the Python bot have any kind of sane timeout, maximum retries and maximum redirects that it follows when doing lookups and retrieval for the !d commands?

cold island
#

doesn't seem so

fallen patrol
#

I didn't think you had access

outer oasis
outer oasis
royal prawn
#

i technically have access to pydis's sentry, but i'm not on any of the teams, so i can't see anything

fallen patrol
#

Wait you used to be devops?

outer oasis
#

yea

outer oasis
fallen patrol
#

O.o

#

Why did you leave?

cold island
stable mountainBOT
#

bot/exts/info/doc/_batch_parser.py line 111

async with bot.instance.http_session.get(doc_item.url, raise_for_status=True) as response:```
stable mountainBOT
#

bot/exts/info/doc/_cog.py line 410

@lock(NAMESPACE, COMMAND_LOCK_SINGLETON, raise_error=True)```
fallen patrol
#

it got stuck either in redis or in refreshing the inventories

#

and based on the state of !d

stable mountainBOT
#

bot/exts/info/doc/_cog.py line 216

await self.item_fetcher.clear()```
`bot/exts/info/doc/_inventory_parser.py` lines 89 to 90
```py
timeout = aiohttp.ClientTimeout(sock_connect=5, sock_read=5)
async with bot.instance.http_session.get(url, timeout=timeout, raise_for_status=True) as response:```
fallen patrol
#

wow

#

its still going

wise marten
#

Wao

celest charm
#

there's a timeout for each individual socket.read() and for connecting, but not for the total request time

cold island
#

be the change etc.

timid sentinel
fallen patrol
#

Wait a moment

#

@timid sentinel are you able to dump some logs from yesterday, and are you able to check if python broke the urls on its own or if someone modified the values?

#

It looks fixed now, but there was another broken package as well

timid sentinel
#

There is nothing interesting in the logs, I don't think anything changed recently.

#

It seems disnake had the wrong base url in january #bot-commands message

#

But not in November 2024 #bot-commands message

#

So I'm guessing something happened between then. logs don't go that far back and I probably don't have access to whatever channel the command was run in if it was manual

toxic wren
#

Umm.. guys Python 3.14 dropped a stable release. should we make the bot use 3.14 instead of 3.13?

#

nvm Ill just open an issue

wind ruin
#

I'd also wait until most whitelisted libraries support 3.14 before updating eval tbh

timid sentinel
#

Yeah we'll need to wait for dependencies, and we'll also probably want to wait for 3.14.1 to help ensure any major bugs are ironed out.

toxic wren
#

bot#3397

dusky shoreBOT
timid sentinel
#

!e 3.14 import sys;print(sys.version_info)

stable mountainBOT
timid sentinel
#

Already there it seems

#

though needs updating

toxic wren
toxic wren
#

or are we waiting for general publics issues?

fallen patrol
#

@timid sentinel do you have logs around 1424854698460184700 about whether or not there was a concurrent documentation invoke?

patent pivot
#

also I think it's probably a better idea to look at it at a higher organisation level and push multiple of our projects to newer python versions where we can

#

what's the situation with the docs command? is this just because the dissnake endpoint was configured wrong or something

patent pivot
#

ahh gotcha thanks

#

so fixing the URL has actually fixed the immediate problem?

timid sentinel
#

yeah I think it should have

patent pivot
#

why was the original problem the !d discord though?

#

oh was this whilst dissnake was hijacking the discord namespace

timid sentinel
#

hmmm

#

It may have been a temporary outage of the discord.py docs?

#

which I think could trigger the same issue

patent pivot
#

hmmm yeah

fallen patrol
#

Not in the past 3 years.

fallen patrol
#

huh. No it didn't #bot-commands message maybe

#

odd

timid sentinel
#

!d discord

stable mountainBOT
#

In order to work with the library and the Discord API in general, we must first create a Discord Bot account.

Creating a Bot account is a pretty straightforward process.

timid sentinel
#

!d disnake.discord

stable mountainBOT
timid sentinel
#

disnake's "discord" is just a page in the docs, which is valid, it seems like the docs command just handles it weirdly sometimes

patent pivot
#

yeah

toxic wren
#

snekbox#244

dusky shoreBOT
royal prawn
#

it would not surprise me if that gets blocked by third-parties until 2026

royal prawn
#

migrating to 3.14

toxic wren
#

thats why they wait

royal prawn
#

alright i stand corrected. my own major environment members (coverage, hypothesis, jinja2, matplotlib, numpy, pandas, pillow, pytest, ruff, scipy and sympy) already got successfully resolved for 3.14

fallen patrol
#

wait did i comment on the wrong issue

patent pivot
stable mountainBOT
#

Dockerfile line 45

RUN /build_python.sh 3.14.0rc1```
`bot%2Fexts%2Futils%2Fsnekbox%2F_cog.py` line 90
```py
SupportedPythonVersions = Literal["3.13", "3.13t", "3.14"]```
patent pivot
#

I appreciate the enthusiasm from both of you generally with contributions here but this caused a bunch of issue noise for 2 lines of changes and I think maybe just stepping off the gas a touch and thinking a bit more slowly / asking Core Devs might be better

#

for example we've now closed that bot issue when there are actually bot changes necessary, and the snekbox issue mentions bot when snekbox has nothing to do with bot and is a completely separate and independent project

fallen patrol
#

I mean fwiw at the time of that issue that change wasn't in snekbox, which to me is a different project from the bot, I also don't see the issue with well, making issues: its a pretty good way of tracking things that need to be done!

Enough discussion happened here that it seems to have needed an issue anyhow. eg these #dev-contrib message #dev-contrib message definitely make it sound like it needs time before full support

patent pivot
#

Sure, maybe it needed issues, but either way it at least needed an issue in both places instead of one issue that was then edited to fundamentally change scope and then eventually closed.

#

I've made the snekbox changes now anyway. Anyone else is free to pick up the reordering of the literal and remove the extra bit of copy about it being pre-release.

fallen patrol
#

yeah didn't mean the issue in bot needed to be closed

#

just that it also needed one in snekbox

patent pivot
#

one that actually describes the snekbox changes instead of a copy paste from bot would've been better for that

fallen patrol
#

yeah. I didn't open that.

patent pivot
#

I know, just replying to your comment, I agree issues are great for tracking things that need to be done but if they're fundamentally misspecified and talk about the wrong things it's about as useful as having no issues

fallen patrol
#

fair

patent pivot
#

Any issue that proposes refactoring/changing something should include some sort of guidance to where those changes would be, like the GitHub links I posted above.

fallen patrol
#

ye

#

in some cases it may just be a feature request though

patent pivot
#

yea but that's not refactoring or a change

fallen patrol
#

im arguing an apples to oranges please ignore me

patent pivot
#

if something's brand new sure, else you link where the thing needs adding or changing

#

feature requests are either enhancements or brand new things, the former still has the same rules

#

snekbox CI should be done in 20 mins or so, so bot will start using 3.14.0 when !eval 3.14 ... is used, the copy just needs removing and the default version changing

#

depending on what's cached and what needs rebuilding because the python versions changed it might be 50 minutes left in snekbox we'll see

fallen patrol
#

why do we build the python versions for snekbox?

#

rather than using prebuilts?

patent pivot
patent pivot
#

hahaha 3.14.0 test suite fails in CI

patent pivot
subtle remnant
#

hello! can someone here suggest me beginner repo that i can contribute to

#

i have knowledge on ml,fastapi,mongodb,firebase,nlp stuff

tame pebble
#

We usually tag issues for people who don't know the repos with ' good first issue'

#

!contribute

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
subtle remnant
#

i checked the repo most of the good first issue have been taken or done with a pr

#

should i create a new issue by myself

#

how do i start

tame pebble
# subtle remnant should i create a new issue by myself

Yeah good first issues can be taken, but if you feel they have just been picked up and ignored, you can try posting a message here and we will look into and and maybe reassign, because it does happen.

You don't really need to work on good first issues per se, if something picks up your interest and do some research to understand how things currently work and propose something, you can of course request to be assigned, but that can be too much to dive into right from the start.

You can always create issues if you notice something is wrong/could use improvement/have ideas of course.

subtle remnant
#

uhhh

#

i would like to be anonymous

tame pebble
#

it was just to know about the assignment, didn't mean it to sound like exposing you, sorry

patent pivot
#

@toxic wren they're just spam issues, generally from people who are new to GitHub and don't entirely understand things. core devs see and delete them when they're opened, if the user closes them there's no need to really try interrogate why they were opened, there generally is no reason other than spam

oblique cairn
#

Hey @lilac merlin, this channel is for contributions to repositories of the Python Discord organizations, not any random projects.

patent pivot
#

!eval 3.14 ```py
import sys
print(sys.version_info)

stable mountainBOT
patent pivot
toxic wren
patent pivot
patent pivot
toxic wren
patent pivot
#

do you know what emacs is

toxic wren
patent pivot
#

the PR was opened from emacs and had a title of --- because i configured something wrong

#

i did not mean to title the PR just ---

#

not a very descriptive title

toxic wren
#

oh ok

patent pivot
#

i don't know what you mean by "an emac"

#

the software is called emacs

#

it is a text editor, like vscode

toxic wren
toxic wren
#

so I used "an emac"

#

instead of emac

patent pivot
#

yea i use the software

toxic wren
patent pivot
#

doesn't look too old

toxic wren
patent pivot
#

"Emacs is the extensible, customizable, self-documenting real-time display editor" 🙂

toxic wren
patent pivot
#

similar to vim you can have it look however you want

toxic wren
fallen patrol
#

Yay snekbox supports pi-thon now

patent pivot
#

!e ```py
import sys
print(sys.version_info)

stable mountainBOT
patent pivot
#

!e 3.14t ```py
import sysconfig
print(sysconfig.get_config_var("Py_GIL_DISABLED"))

stable mountainBOT
toxic wren
toxic wren
#

bot#3403 attachment uploading?

dusky shoreBOT
toxic wren
#

bot#3196 shouldn't this be a snekbox issue?

dusky shoreBOT
patent pivot
#

snekbox doesn't know anything about !timeit, !timeit is literally just a template that the bot applies before sending it off to snekbox for eval

#

anything that is actually about how code runs, available versions, the execution environment, etc. goes on snekbox

anything about the frontend to that (the !eval command, features like !timeit) need to go on bot because that's actually where the commands are

#

the logic to rerun commands (and the current problem where !timeit reruns use !eval) is something that is entirely on bot

#

snekbox has no idea

dusky shoreBOT
fallen patrol
#

what needs to be done to have support to allow internet access in snekbox if allowed with an evaluation request? eg providing "permissions": {"network": true} in an API request and having the environment allow that

#

because I have a usecase for allowing network access in a specific snekbox container as a still otherwise controlled and restrained environment

patent pivot
#

fairly trivial

#

I'd imagine the macvlan stuff would just need setting

#

there might be some filtering necessary to make sure your jailed procs can't then access snekbox API themselves or other services running locally or in a private network

fallen patrol
#

neat, is this something that could be considered for upstreaming? (as in, I plan to implement this either way for my own use)

patent pivot
#

seems fine to have upstream, but obviously documented with the caveat that snekbox itself cannot handle that network filtering

fallen patrol
#

ye

patent pivot
#

if an eval process can access snekbox API then it can cause a denial of service quite easily

fallen patrol
#

in my case I don't really care about that, I just need to download a few files from the internet every so often and parse them safely in an environment
code is controlled anyhow

patent pivot
#

if going upstream it probably needs an issue to specify what the interface looks like for users

fallen patrol
#

.repo python-discord/snekbox

patent pivot
#

I think there's a chance that because we can't necessarily protect it well then we shouldn't add it upstream so we need to discuss that

fallen patrol
#

.repository python-discord/snekbox

#

ok.

patent pivot
#

snekbox right now is very hard to make dangerous

patent pivot
#

none of the config options we expose would allow for any sort of compromise or resource exhaustion

fallen patrol
#

Fair

patent pivot
#

allowing network immediately adds a lot of risk of internal network pivoting and snekbox API access means people can launch infinite denial of service problems against snekbox, and we can't really add protection against those

fallen patrol
#

wonder if we can add RFC1918 IP filtering somehow to nsjail

patent pivot
#

nsjail outsources most of that to macvlan and the interface there is fairly simple and low level

patent pivot
#

in my mind it'd be easy with netns

#

like ip netns exec jailns iptables -A OUTPUT -d 10.0.0.0/8 -j REJECT

#

or something

#

but I don't think it'd be easy to achieve from solely nsjail

fallen patrol
#

fair

#

if it were to be added it could probably require an environment variable in configuration to ensure the environment is secured

fallen patrol
#

bot#3408

dusky shoreBOT
fallen patrol
#

oh so close

#

@patent pivot I don't see a reason to surface the issue to the user because this could possibly be a ratelimit has been reached vs anything else

#

we don't want to surface 404s, 401s, 403s, but we could surface 429 as a marker to the devs

granted, it logs as an error in that case. I don't see a log of when this happened but I'm sort of interested about it

patent pivot
#

we don't need to surface error specifics but we should say the results are incomplete

#

anytime we present incomplete information we should tell the user or retry

fallen patrol
#

i mean, not necessarily

#

there's a lot of detection that would need to go on then

patent pivot
#

what do you mean

fallen patrol
stable mountainBOT
#

bot/exts/info/code_snippets.py line 284

continue```
fallen patrol
#

at the very least it shouldn't stop the one half because of that private repo link

patent pivot
#

I feel if it's a transient error code we should note and tell the user that

#

permanent error codes obviously less important

#

obviously the ideal would be to retry but that's probably overcomplicating it

fallen patrol
#

Could I take a look at the source logs/what caused this specific issue? bot#3404

dusky shoreBOT
patent pivot
#

there's actually not a lot useful

#

that's all sentry is surfacing

#

& in the actual logs

fallen patrol
#

huh

fallen patrol
#

or was that not even logged?

#

even just the date those timestamps were from means I could figure out the message through snowflake searching

patent pivot
fallen patrol
#

ah yeah

#

that is an intentional break the bot string

#

<https://github.com/onerandomusername/monty-python/blob/main/../../../../wntrblm/nox/blob/main/README.md#L1>

#

it normalises to a completely different path and 404s because of that

#

bot#3315

dusky shoreBOT
fallen patrol
#

I can submit a fix if desired

#

right now it has this sort of bug

stable mountainBOT
#

../../../../rate_limit line 1

{"resources":{"code_search":{"limit":60,"remaining":45,"reset":1760365703,"used":15,"resource":"code_search"},"core":{"limit":60,"remaining":45,"reset":1760365703,"used":15,"resource":"core"},"graphql":{"limit":0,"remaining":0,"reset":1760368260,"used":0,"resource":"graphql"},"integration_manifest":{"limit":5000,"remaining":5000,"reset":1760368260,"used":0,"resource":"integration_manifest"},"search":{"limit":10,"remaining":10,"reset":1760364720,"used":0,"resource":"search"}},"rate":{"limit":60,"remaining":45,"reset":1760365703,"used":15,"resource":"core"}}```
patent pivot
#

do we authenticaate those requests

fallen patrol
#

you don't

#

which is why a 403/404 is more possible for python codesnippets: you only get 60 requests in an hour

patent pivot
#

well that's good at least lol

fallen patrol
#

i auth mine but it doesn't have any permissions other than upping the ratelimit

patent pivot
#

yea i'd just be worried that it'd allow for some nasty permission escalation into private repos

#

like <https://github.com/onerandomusername/monty-python/blob/main/../../../../repos/python-discord/admin-tasks#L1> or something

fallen patrol
#

it doesn't

patent pivot
#

i think only arthur has real permissions

#

M-x github add jb3

radiant merlinBOT
#

:white_check_mark: Successfully invited jb3 to the staff team.

fallen patrol
#

this is my scope

#

literally just: exists

#

oh wait

#

lemme check

fallen patrol
#

I fixed this on my bot last night

fallen patrol
#

ok yeah just tested, without that there's nothing that isn't public aside from it showing public details of the logged in github user which i wouldn't consider a security hole since that is public knowledge anyhow

#

you can't get anything private

patent pivot
fallen patrol
#

bot#3409

dusky shoreBOT
fallen patrol
#

I haven't tested this exact fix on @stable mountain but I tested it within Monty and ported the fix over

#

so if it doesn't work that's on my port

patent pivot
#

okay fixed the stochastic snekbox tests a little bit I thnk

patent pivot
#

!e 3.14j ```py
import sys

data = []

for number in range(0, 100_000):
data.append(number * 2)
if sys._jit.is_active():
print(f"JIT activated on round {number}")
break

stable mountainBOT
fallen patrol
#

Huh

toxic wren
#

Hello,
I want to make most of the general use commands into slash(/)( !commands are also there) commands. Does anyone want to work with me on this. I can work alone if needed.

royal prawn
#

to clarify, you mean adding slash functionality, right? not switching to slash-only?

patent pivot
#

if we're doing that can we open an issue to discuss priorities and implementation

#

it's going to be an absolute pain to review if that's all done at once

#

I suggest breaking it down into commands that are best suited to become hybrid commands (particularly ones where autocomplete is possible) and then open a PR for each individual cog prioritising the commands that make most sense

#

at least for this iteration no commands that are helper+ or moderator+ should be moved

patent pivot
tame pebble
#

!help

stable mountainBOT
#
Command Help

HelpForum
!help-forum close
Make the help post this command was called in dormant.
!help-forum
A group of commands that help manage our help forum system.
!help-forum title <title>
Rename the help post to the provided title.

tame pebble
#

docs could be one maybe

#

@patent pivot i suggest an ai command that sends a troll email to volcy, signed with "Love, claude"

patent pivot
patent pivot
patent pivot
#

@toxic wren I'm suggesting each cog rather than each command

#

I might reword this issue a bit -- but I can assign you to it if you want to take it

patent pivot
patent pivot
#

like !eval and !timeit are part of the Eval/Snekbox cog (can't remember exactly what it's called)

#

we should use that as a unit of migration

#

(though we won't migrate those two commands)

toxic wren
#

ok, is't the codebase for the commands made pre-slash. Will it still be possible to migrate?

patent pivot
patent pivot
#

also we won't need to migrate the help command I wouldn't have thought -- the command works as is for text commands and the idea of slash commands is that typing a / becomes your new help command (as all commands are displayed there to the user)

#

Bella is right that migrating docs is something that instantly improves the user experience and works better as a slash command

#

I'll have a look through for others when I'm at a laptop

toxic wren
#

Ok, Ill start working on !docs later today or tomorrow.

fallen patrol
fallen patrol
toxic wren
#

!src docs

stable mountainBOT
#
Command: docs

Look up documentation for Python symbols.

Source Code
toxic wren
#

!contrib

stable mountainBOT
#
Contribute to Python Discord's open source projects

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

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
toxic wren
#

!docs aiohttp

stable mountainBOT
#

Common data structures used by aiohttp internally...

toxic wren
#

!src tag

#

!src tags

#

probably should do this in #bot-commands

toxic wren
#

are all the docs not in the bot repo?

#

!docs aiohttp does not work on my local version

stable mountainBOT
#

Common data structures used by aiohttp internally...

fallen patrol
#

#bot-commands message

#

use that command

#

what the heck

cold island
outer oasis
cold island
#

It's in redis iirc

vale ibex
#

Yeah, it's cached in redis

fallen patrol
#

its in redis????

#

I swear that used to be in the database

patent pivot
#

the symbols cache is yeah

fallen patrol
#

!src docs

stable mountainBOT
#
Command: docs

Look up documentation for Python symbols.

Source Code
patent pivot
#

the inventory links are stored in the database

fallen patrol
#

oh yeah the symbol cache which is redisable

#

but the inventories need persistence

outer oasis
# toxic wren are all the docs not in the bot repo?

No
You have to go to each website and find the URL for the Sphinx “inventory” file, and then run !docs setdoc with the URL, and that will download all the symbols and put the URL in the database for future reference.

For example:
!docs setdoc disnake https://docs.disnake.dev/en/latest/objects.inv

#

Meta: a list of a the ones we have could be added to the bot docs to give contributors a starting point

fallen patrol
#

hmmm

#

sorry for the sentry issues

stable mountainBOT
patent pivot
#

that's a dump of what we currently have in the bot documentation storage

outer oasis
#

Tanks

toxic wren
fallen patrol
#

.src src

dusky shoreBOT
#
Command: source

Display information and a GitHub link to the source code of a command, tag, or cog.

Source Code
stable mountainBOT
#

bot/exts/core/source.py line 20

@whitelist_override(channels=WHITELISTED_CHANNELS+(Channels.community_meta, Channels.dev_contrib))```
stable mountainBOT
#

bot/constants.py lines 313 to 322

# Whitelisted channels
WHITELISTED_CHANNELS = (
    Channels.bot_commands,
    Channels.sir_lancebot_playground,
    Channels.off_topic_0,
    Channels.off_topic_1,
    Channels.off_topic_2,
    Channels.voice_chat_0,
    Channels.voice_chat_1,
)```
outer oasis
#

Nice comment

toxic wren
#

huh /docs worked and then I restrted bot and now it's gone

#

I got it on video

#

but I deleted it

#

😭

#

Here's a chat log

#

now it does not even work /docs isnt even a command now

#

oh and I ended up making another command called docs_slash because hybrid seems to not be working? Probably will try to make hybrid after separate command works.

toxic wren
oblique cairn
#

There's an existing issue for this, regarding .latex

tame pebble
fallen patrol
#

Which is waiting on one of the devops members of pydis to approve ...

#

That seems a little overarching, requiring devops to approve every release seems flawed

patent pivot
#

seems fine

#

changes a matching file

patent pivot
#

I suppose we actually need to add python help to the whitelisted channels

#

latex should work fine

fallen patrol
patent pivot
#

yea at the time we started this poetry did not support this

#

fixed

fallen patrol
#

Poetry still doesn't support it

#

At least poetry now sorta allows using a different backend

patent pivot
#

you used to have to install it as a global plugin and now you can have it be project specific

#

mark built something excellent for snekbox

#

fixed

patent pivot
#

also takes snekbox CI time from like 30-40 minutes to like 3-4

fallen patrol
#

Why are they pre built custom rather than using PBS?

patent pivot
outer oasis
#

Why does only PyDis get more than one Python version?

patent pivot
#

for this specific case where we've got a fairly select few versions and pyenv builds them easily with pretty simple direct access to the flags we may as well just build them ourselves — and we're doing it on a schedule anyway

patent pivot
#

downstream users can do what they want, or just copy our version (and our image is public anyway)

#

right now there is no rhyme nor reason to why a version appears in snekbox

fallen patrol
#

Now I gotta make an image builder repo lol but actually probably better than what I have now

#

I think snekbox should support python versions

#

Or it needs to be documented very cleanly how to add a new tool + use it

outer oasis
patent pivot
#

for reference -- the python-builds repo is just what snekbox already does but pulled out into a separate repo

patent pivot
fallen patrol
#

Python builds doesn't add snekbox, yeah?

#

Cause I am slightly confused about wait NVM I forget that python is python and not rust. Python isn't a self contained binary, it requires the stdlib lol

patent pivot
#

no, python-builds is generic but does build into a snekbox format, so the binaries are dumped into /snekbin/ and have an ELF runpath of /snekbin/

toxic wren
#

Should we make the paste bin DM's for invocation of !eval on non-snekbox channels opt-in?

#

Ive seen lots of people complain

patent pivot
#

and it's probably not worth having as an opt-in, we either have it or we scrap that, it's not something worth tracking and we don't hold the context long enough to have a delete button that people can opt-in to post-redirection (and I think adding that would be massively overcomplicated)

toxic wren
#

I got DMed by the bot a few minutes ago and remembered this

patent pivot
#

i found one complaint with a bit of searching, I think generally we shouldn't roll things back based solely on one complaint of new behaviour. if people are that pressed they can ignore/block the bot but generally it remains a useful (and requested) feature

toxic wren
#

wait what why?

thorny obsidian
#

It's often dropped without any other context to people with questions. So it creates a not-great environment.

toxic wren
thorny obsidian
#

In-person, it would be rude to just walk in to a group and ask a question. On the internet that's not the case, but the change in expectation is not always clear. We'd rather people explain rather than just drop a link and then get no help

thorny obsidian
#

It's off putting and not welcoming

toxic wren
#

can I have the config?

#

btw I am new to emacs

patent pivot
toxic wren
fallen patrol
#

Does pydis still participate in hacktoberfest?

cold island
fervent sage
outer oasis
#

Oh hai Alec

#

What do I actually get from Hacktoberfest anyways?

patent pivot
#

well there's no shirt anymore iirc lol

fallen patrol
patent pivot
#

ah they are incentivizing crap again

#

excellent

fallen patrol
#

I was only wondering cause I noticed I'd made some pulls to pydis this month and was wondering if I could get the hacktoberfest-accepted label on them

patent pivot
#

oh yeah that's fine

fallen patrol
#

Thanks joe

patent pivot
#

i added to 3409 as well

fallen patrol
patent pivot
#

can i get myself a free shirt here let's see

fallen patrol
#

You are a maintainer at pydis so your pulls don't count

patent pivot
#

devastating

fallen patrol
#

Not seeing what you expect here? Hacktoberfest profiles only show contributor activity, not maintainer activity (we calculate this after Hacktoberfest ends). Profiles update once every 15 minutes if you're loading the page often, or once every 6 hours in the background.

#

I have 40 pending pulls that I made to my own repos so they won't count once they check that which is hilarious

fallen patrol
patent pivot
#

yea go for it

#

if it lets you just review request me when you submit

#

i can't remember if you can or not as a non-maintainer

#

either way I'll look out for it

fallen patrol
#

Sounds good. Lemme get a test bot configured again, pain

#

Iirc it's been a while, botstrap should make it easier

patent pivot
#

yea botstrap does make it not so bad

fallen patrol
#

why does @radiant merlin and @slow bone have the presence intent?

#

Its missing fakeredis and a lot of other variables

patent pivot
#

probably same with big brother though less sure why that's necessary

fallen patrol
#

(I'm already preparing a MR to site due to a broken link + bot uses python 3.13 now)

#

eh tbf you could probably fix the broken link on your end

patent pivot
#

huh

#

interesting

fallen patrol
#

ye

#

hey joe you mind if i submit a pull to fix that and the python 3.12 -> 3.13 for bot?

patent pivot
#

go for it

fallen patrol
#

I'm collecting the changes locally before I pr it

patent pivot
#

nice nice

fallen patrol
#

good lord

patent pivot
fallen patrol
#

discord that's impressive:

#

you gave me a 403 to fetch a webhook with admin

#

oh

#

because the IDs are hardcoded in botstrap..... hm

patent pivot
#

huh

#

that sounds

#

against the idea of botstrap lol

fallen patrol
#

its because I wasn't working with big brother

#

when i got this line i thought that botstrap completed because "its just a warning"

#

its actually fatal

stable mountainBOT
#

botstrap.py lines 54 to 60

log.warning(f"Couldn't find key: {item} in dict: {self.name} ")
log.warning(
    "Please make sure to follow our contribution guideline "
    "https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/ "
    "to guarantee a successful run of botstrap "
)
sys.exit(-1)```
patent pivot
#

lol

fallen patrol
#

changed it to fatal so i don't forget for now

#

now i just get this lol

#

do templates include emojis?

patent pivot
#

hmmm

#

they might not actually

fallen patrol
#

i mean

#

fwiw I didn't use the template

patent pivot
#

ah lol

fallen patrol
#

or well, I did.... 3 years ago

patent pivot
#

looks like just channels, roles, perms and some settings

fallen patrol
#

are emojis stored in a github repo somewhere?

#

cause we could upgrade to app emojis

green oriole
#

I was looking for code that I wrote a while ago but I couldn't find it, maybe someone would remember better

It was to I believe check code jam qualifiers, it did some very cursed stuff to load the code by embedding it in a larger snippet, does that ring a bell to anybody?

#

There's no way it's the next PR I check lmfao

#

Oooh it was on forms

#

Thank you for y'all's magical brain waves

fallen patrol
#

I see conflicting information on this guide:

Note: This script will overwrite the .env.server file. We suggest you put any configuration not generated by this script in to .env instead

In your .env.server file, set urls_site_api="http://localhost:8000/api". If you wish to keep using http://web:8000/api, then COMPOSE_PROJECT_NAME has to be set.

#

To configure the bot manually, you will only need to set inside the .env.server file the values for the channels, roles, categories, etc. that are used by the component you are developing.

tame pebble
#

and the bootstrap script doesn't set the emojis, iirc

tame pebble
fallen patrol
#

aight I'll add it to my pr

#

how can i add an adomination to a page on the site?

tame pebble
#

to the contribution docs ?

fallen patrol
#

yeah

fallen patrol
#

thanks

tame pebble
#

If it's multiline, i think you need to denote it with ---

#

There should be another example in the same file

fallen patrol
#

pain

#

I have a really old test guild

#

i'm sure its fine

#

Pydis Core Developers -> Core Developers
Domain Lead -> Domain Leads
Moderation Team -> Mod Team

#

but just for test server

#

what could be going on here?

tame pebble
fallen patrol
#

I did.... 3 years ago

#

:^)

tame pebble
#

Yeah that's invalid

#

use the new one

fallen patrol
stable mountainBOT
fallen patrol
#

🤔

#

on my test server it deleted my message and dmed me as well

#

which was confusing UI

#

is this no longer used on @stable mountain?

cold island
#

you can upload txt files now

#

is your clone out of date?

fallen patrol
#

Nope

#

my most recent commit is 88574889

#

is this file disabled in prod?

#

or no, I see

#

so apparently Attachment.content_type seems to be just from the file extension

fallen patrol
#

-# if you're wondering, that is the tr binary from gnu coreutils

patent pivot
#

lol yea i thought it was

#

hmmm

#

that's probably not intended but also isn't inherently harmful

#

uploading a UNIX binary is kind of pointless because to run it you'd need to set the +x bit when you download it

#

whereas .exe etc automatically have execution available

fallen patrol
#

or ./tr

patent pivot
#

not without the execute bit

fallen patrol
#

oh good .exe is still blocked

patent pivot
fallen patrol
patent pivot
#

yea

fallen patrol
#

the same binary, with .txt appended

patent pivot
#

elf my beloved

fallen patrol
#

so let me see...

#

huh okay

#

can't recreate that locally

#

breaking attachment types was somewhat difficult lmao

fallen patrol
#

...can i submit a pull to quiet bot strap?

#

@tame pebble used the new guild:

#

this would be in the template needing an update

patent pivot
#

but presumably yeah it's just third party loggers being set to debug

fallen patrol
#

except because its botstrap I haven't configured anything yet

#

I decided for fixing stuff on the contributing guide i would return to the roots of a confused new developer trying to set up the bot for the first time and would see how easy it is to use

patent pivot
fallen patrol
#

its difficult lol

#

there's at least a few other things that can be fixed/provided in botstrap

#

i will create an issue for this lol

#

-# oh the things I'll do for a t-shirt

stable mountainBOT
#

README.md%3Fplain%3D1 line 1

# oh no```
fallen patrol
#

except for that text not being decoded

#

that.... hm

#

@timid sentinel with patch

tame pebble
#

@patent pivot can you show me where that founders role lies in the role hierarchy in pydis ?

#

I will add it to the template

#

it shouldn't matter tbh

patent pivot
#

uhhh I think it's below admins above mods

fallen patrol
patent pivot
tame pebble
patent pivot
#

no problems bby

fallen patrol
#

holy shit there's 18250 people with the announcements role????

#

and lol the cloudflare bot being here

#

-# oh wait no thats a cloudflare employee

timid sentinel
patent pivot
#

!role Announcements

stable mountainBOT
#
Announcements info
ID

463658397560995840

Colour (RGB)

#000000

Colour (HSV)

0.00 0.00 0

Member count

18249

Position

43

Permission code

6442450944

fallen patrol
#

used it to get the role order

tame pebble
timid sentinel
#

oh

#

I think I just misread the code

fallen patrol
#

@tame pebble it needs to be synced

tame pebble
#

I did sync

fallen patrol
#

aside from one tiny error

tame pebble
#

Did it again now

fallen patrol
#

@patent pivot hey joeeeee can you run uv lock and commit the change to bot :^)

#

thoughts on adding the following

#

🥲

#

if not that can we add the --locked flag to ci

timid sentinel
#

yeaaaah we should probably do that...

fallen patrol
#

if we update the flag to --locked this would be caught in ci too

#

and we don't need the pre-commit config

#

not sure if the dockerfile should use --locked or --frozen

#

looks like everything uses locked in the documentation from astral

#

...so this would already sort of catch it

#

ye that works without adding another hook

#

your call wookie lol

timid sentinel
#

too much power

#

adding the hook would actually lock the file though while changing to --locked would just error right?

fallen patrol
#

@patent pivot noticing lance and site as well, was there a reason that you went with --frozen over --locked for uv?

patent pivot
#

consulting a higher power, chris is telling me now

timid sentinel
#

I'd probably just go belts and braces and change to --locked as well as adding the hook.

fallen patrol
#

lmfao

#

i got an error

#

lmfao

patent pivot
#

yea we should add the hook

fallen patrol
#

because uv just released a new version

patent pivot
#

but we should use frozen in docker

#

but locked for local dev

#

i will relock now

fallen patrol
#

and locked in ci

patent pivot
#

yea

#

main is now updated relocked

patent pivot
#

chris has pointed me to something we did for polonium ```yaml
- id: uv-check
name: uv lock check
description: Checks the validity of the uv.lock file.
entry: uv lock --check
language: system
files: pyproject.toml
pass_filenames: false
require_serial: true

stable mountainBOT
#

.pre-commit-hooks.yaml line 11

- id: uv-lock```
fallen patrol
#

siiiigh

#

bot#3415

dusky shoreBOT
timid sentinel
#

lol

fallen patrol
#

also that trashcan not working,,,, did I do that?

#

-# I swear I'm not hacktoberfest farming

#

bot#3416

dusky shoreBOT
fallen patrol
#

@patent pivot could I please have the hacktoberfest-accepted label added to bot#3416, bot#3413, site#1566?

patent pivot
#

added 👍

fallen patrol
#

thanks! if you want me to go ahead now, I can make a pull for lance + site, unless I should hold off until bot#3416 is merged

dusky shoreBOT
patent pivot
#

i am going to uhhhh

#

merge

#

d

fallen patrol
#

sounds good

timid sentinel
#

hold up

timid sentinel
patent pivot
#

uh oh

#

UH OH

#

IT'S OVER FOR ME

timid sentinel
#

to be fair uv also messed up EDIT: it makes sense in the uv precommit repo because that's how it installs uv, tho would be more efficient to just install it directly without python

#

language: python will make it initialise a python environment for no reason I think

patent pivot
#

ahhh

#

i assumed we'd added chris's one

#

skimmed that

#

hmmm

fallen patrol
#

....listen its not my fault I broke ci twice

#

ci is just... breakable

patent pivot
#

i do think this will work fine, even if it won't automatically relock ```yaml

  • id: uv-check
    name: uv lock check
    description: Checks the validity of the uv.lock file.
    entry: uv lock --check
    language: system
    files: pyproject.toml
    pass_filenames: false
    require_serial: true
fallen patrol
#

why not auto-relock?

#

this is what I get with this config:

#
    - id: uv-lock
      name: uv lock check
      description: Checks the validity of the uv.lock file.
      entry: uv lock --check
      language: system
      files: ^(uv\.lock|pyproject\.toml|uv\.toml)$
      pass_filenames: false
timid sentinel
#

I think what was merged but just with language: system is perfect

fallen patrol
#

(require_serial isn't needed afaict)

#

the extra arguments while I know we don't have a uv.toml it probably doesn't hurt to check it

patent pivot
#

i will update to language: system

#

changed

fallen patrol
#

number of times I've made joe commit directly to main today: two

fallen patrol
#

forum channels now seem to be supported in templates!

fallen patrol
#

thank you

#

@tame pebble now the only two errors from the new template are about rule_alerts and nomination_discussion

patent pivot
#

rule_alerts is a problem because it's a thread under mod-alerts and so we don't have it in the template -- but could add it to fix those errors

fallen patrol
#

oh

#

its that open issue

#

gotcha

#

hm

#

should map rule_alerts to mod_alerts somehow

fallen patrol
#

oh bet

#

like Webhook and _Webhooks

#

....botstrap doesn't work for your internal test guild, huh

#

because of the webhook handling

fallen patrol
#

changes so far:

  • httpcore filter
  • response caching (so each endpoint is only hit once)
  • flag updating (adds the message content intent automatically)
  • assert we're in the guild, provide an invite link if we're not
  • log fatal errors as fatal
fallen patrol
toxic wren
fallen patrol
#

Its a long url to print in a console

toxic wren
fallen patrol
#

but that link is specifically for the CONTRIBUTING.md files in bot, lance, and site

#

hmmm.... I could add support for upgrading existing guilds with botstrap

#

....might as well

#

...eh no that's different

patent pivot
#

yea short URLs are a worker

fallen patrol
#

bot#3418

dusky shoreBOT
patent pivot
#

worker not happy with slashes in short paths it seems lol

#

i forget how this works

#

i was sure we had a bot that could manage this

#

no i'm hallucinating that

#

i thought it was in arthur's cloudflare extensions

#

in theory it has an API key that can write to KV zones

fallen patrol
#

yeah probbaly

patent pivot
#

ah i did it for a bot in anotehr project and that's what i'm misremembering

fallen patrol
#

oh cool... discord made new apps default to public...

patent pivot
#

classic

fallen patrol
#

now i really want to add a cli to botstrap

#

lol

#

like fix-app

#

I wonder if sir lancebot has something like botstrap

patent pivot
#

nah it doesn't from memory

#

but we also don't have the hard dependencies on channels like we do for bot for most of lance

outer oasis
#

yeah

#

Lance is way less picky

patent pivot