#dev-contrib
1 messages ยท Page 165 of 1
Oh, then you wouldn't totally repurpose it. ๐
I think it's fine then, if you're willing to perform those additional parsing.
Yes, that's why I was confused about your approach.
I just realised how vague my initial message was
sorry about that! I'll go ahead w/ it then
What is sir-lancebot#1013? Seems like someone opened a PR for no reason
Looks like they're changing the uptime message to use Discord's relative timestamps?
I see no issue made for it though, plus they seem to have removed the pull request template stuff
That too
I do like the idea though, using that feature seems great here
Generally, this has violated all our contribution rules (no issue, no communication, missing template, failing lint)
Let the core devs handle it, weโll work it out
Yeah I wasn't gonna do anything about it, I sent it here so core devs could figure it out
loll
wow smh one of those was mine
what I mean by that is there was a bunch of just straight up spam
oh yes it was great to watch
@blazing magnet @magic arch @thorny obsidian thing https://github.com/python-discord/sir-lancebot/pull/1014
already on it 
for some reason I couldn't find kat's username in the review list until now lol
@magic arch if https://github.com/python-discord/sir-lancebot/pull/1013 isn't updated within the next like, day, I'll just close it
ty for giving them the contributing guidelines
:D
Just curious, why are "most" and "why" capitalized here? https://github.com/python-discord/sir-lancebot/blob/8b4b786e24243ba2ec5931b2b161f18edc526b1b/bot/resources/utilities/py_topics.yaml#L43
bot/resources/utilities/py_topics.yaml line 43
- Which Package do you use the Most and Why?```
I added it to my review haha

dang already had that comment set myself too
Ah ok mb
@blazing magnet k re-review
why are we knocking these two out btw? https://github.com/python-discord/sir-lancebot/pull/1014/files#diff-e9841e019daf514c2ac2918b2c484e0cfbbd39f04fd1388e25e1087aa6bef90aL35-L36
No worries, that is a good thing to point out. I was just too fast, haha
Low-quality, especially "how are you" gets a ton of complaints for not being a "real topic" and I can kind of agree
boom take my comments
Whoa another capitalization mistake
Yup, blame the anonymous person who submitted it
I do not know
love the amount of immediate activity on this though
I guess topics are everyone's favorite thing on this server haha
they are a pretty big topic
something even happened for the black's github webhook
maybe GitHub is just going through some stuff right now, it happens
hmmmmmm
status page shows webhooks all good though so idk
you can check if they are firing from the webhook logs
uhhhh
cloudflare hsa banned us
uhh
i think they've just banned workers
Wow
cloudflare ip ranges
ooh how fun, now what?
@gleaming jay https://github.com/python-discord/sir-lancebot/pull/1014
temp or perma
ha, guess we can't speak too highly of CF now 
lol
bye bye cloudflare

cloudflare haven't done anything tbh
it's just we're on shared IPs because workers
we'll just have to hold on a bit unfortunately for the workers to free up
just blame them anyways
also fun fact apparently i get the auto merge button on github mobile
even though I shouldn't for pydis prs
I think you should cuz you're on staff, aren't you?
nope, I can review and all that but no pushing to protected branches
at least I don't think so
Oh
Oh hmm
if someone who actually knows can confirm this that'd be great, plus maybe it's worth testing to see if that's broken
Only devops, core devs, and admins can merge to main
yeah so I definitely shouldn't have the auto-merge button
@clever wraith hey this is your carrier pigeon reminding you of this PR's existence: bot#1929
Lol
it is working ๐
yep
Nice!
to clarify, the cf wall on discord banned cf workers?
(Still) looking for approvals (or not) on sir-lancebot#989 and sir-lancebot#1000, thanks! (sorry if I've been annoying about this)
Wait what, why did #1000 go before #989, I sent #989 before #1000, is that a bug? Or is that supposed to happen?
There's an open issue for that, sir-lancebot#743, basically the problem is that the issues/PRs are passed to a set at some point in making that embed, so they lose their order
Ohh I see, thanks!
Looks like there's a lot going on in sir-lancebot#778, might be fixed in there
Never mind, it's not, I think it's stalled until that PR is merged though
yes, sir-lancebot#978
sigh i get that number wrong all the time
968 I think is what you're going for
sir-lancebot#968 ye
.bm
yes
I also have this issue lol
To clarify it can't actually merge, mostly a visual thing
What's the point of a button if it doesn't work?? ๐
Have you met the gh mobile ui? ๐คฃ
I do have the GH app on mobile (android) but never came across that kind of thing so idk
@tender ridgerys it is using it, which is why I dismissed the review.
oh, not here anymore, will ping on github
ah the edit clears that up
what lol
you not seeing i rewrote with an api + akarys not seeing you not seeing that i rewrote with an api + you not seeing akarys not seeing you not seeing that i rewrote with an api
ah lol
Wait Akarys left the server? :(
Nice ping
Feature request: a !tut command that will link to the python tutorial.
ex: !tut for => https://docs.python.org/3/tutorial/controlflow.html#for-statements
!d tut-for not exactly easily discoverable but you should be able to get them with docs
4.2. for Statements
The for statement in Python differs a bit from what you may be used to in C or Pascal. Rather than always iterating over an arithmetic progression of numbers (like in Pascal), or giving the user the ability to define both the iteration step and halting condition (as C), Pythonโs for statement iterates over the items of any sequence (a list or a string), in the order that they appear in the sequence. For example (no pun intended)...
I've noticed a handful of people having issues with https connections to paste.pydis.com, @patent pivot the cloudflare man, any thoughts on what might be causing this the past few days?
Seems like I'm being blocked from using the pasting service l. As request from Ben I'm posting more information
i've noticed it to - i'm not sure but it certainly doesn't seem to be on our end
I'm using a Motorola phone
what is under advanced here?
cert authority invalid is a weird one that should never happen
yeah so Tizzy was reporting a Fortinet thing earlier
we don't use Fortinet anywhere in our stack and I have no idea where it would be injected
do you have an anti-virus/firewall on your phone? are you on a network that has Fortinet?
Right, I suspect your school is using Fortinet then and Fortinet has for some reason blocked us
I'll have a look into it, since it's odd that both yourself, Tizzy and Hemlock were having problems getting onto paste.pythondiscord.com
Alright
I haven't had issues with it personally but yeah, noticed a few people the past few days particularly in pygen mentioning this
I suspect Fortinet has blocked us for one reason or another, and so all users of that, either directly or indirectly are being affected
Is it possible for you to contact them and resolve the issue?
yeah, I'm going to talk to Fortinet now
Thanks!
Phishing for python knowledge! ๐ฅ
alright, submitted a lab re-evaluation request, hopefully shouldn't take too long
lmao
lmaooooo
idk why its funny
i think because of the cf banning cf and then this
their block reason makes sense
yeah
it could be seen as phishing
wouldn't be surprised if toptal did something
toptal didn't do anything
it was an automated flag
based on the content of something on the hastebin
i'm surprised hastebin[.]cc isn't flagged vs hastebin[.]com
if it went to manual review, it would have been ignored, but not every flag can go to review, so most are automatically filtered
makes sense
I wish Joe's domain lead role said "cloudfare man" haha
That would be cool imo
And maybe even be able to ping that role
It's working now. Thanks!
๐
Shouldn't robots.txt disalow access to our user-uploaded content?
eh
doesn't really work like that
robots.txt is for scrapers - not firewall assessments
(and we don't have a robots.txt on hastebin, lol)
Oh true lol
That would be a huge vector for abuse ๐
Malicious sites would just be like "nah you shouldn't look at us, we're a good site"
@eternal owl what will be occurring with this? https://github.com/python-discord/bot/pull/1568
oh, I forgot about that, I need to add a command cooldown so we don't get rate limited, will do it soon, thanks for reminding xith!
@vocal wolf
once you think it's done, remember to remove the drafting phase
will do
nais
najs
@patent pivot You said "privately" twice at the end of this comment in case you didn't notice: #dev-log message
hey @cold moon do you have some spare time at some point to resolve the issue on site#608? there's been a migration merged since your PR, so there are multiple leafs nodes now and django doesn't like it
user-agent: Big-bad-NSA
disallow *
Is there a mergeable bot PR?
Otherwise you can't merge it anyway
Yea I made one
I can't merge it right now, but if I was to commit on that branch, I wouldn't be able to approve and merge it when ready
Alright cool, let's see what KS says, since my pr still needs reviews anyway so not a huge rush
And my pr isn't really testable until the prolem resolves, since you can't start site in its current state
Unless you edit migrations
How does github do the thing where you can merge main before merging but can still merge
You know, the thing
You can update the branch
Yea
Which creates a commit
That's just git merge main
But you can still merge the PR
Without merging main?
No, after
You said you don't want to fix it because then you can't approve
OK I see how the question is confusing now
I meant approve not merge
Yea, the issue is that there are two migrations based on the same parent node
So it needs a code change to resolve
Right but a merge commit is also code changes, for example with merge conflicts
The merge commit that gets added doesn't have you as an author, since it pulls in the commits from main
So you're not counted as a commiter
The only part I disagree with github on is that of you resolve conflicts you can still count as a reviewer
Since during that resolution you can do whatever you like
Sure, will do it later today
did you just rebase?
ok just remove your last commit and then do the literal changes again
that sounds the easiest way to fix this
or you do a soft reset and remove all the unrelated changes
scratch that, you probably did a merge with main and squashed two commits or something similar
git reset --hard HEAD~2 if you want to do the former, or use --soft if you wanna do the latter
then you can just edit the changes
np, you already have the correct commit changes here https://github.com/python-discord/bot/pull/2054/files
so you can just reset hard if you want
even if you mess up the hard reset, there is reflog ๐
When I go to push a commit I made, it's showing these other commits and I don't know why
I only want to be pushing the top one
CC @fallen patrol is this because of what I did for pushing to your repo instead of pydis'?
did you switch your branch before you made your commits?
it doesn't look like you did
and you fixed issue 2053 while based off of my fix branch
Eh fuck
So... how do I fix this?
I did do a git checkout origin/main, then I used PyCharm's interface to create a new branch
I assumed that would work, but apparently not
you basically want to move some commit to a different branch right?
Idrk tbh
I think I created the branch on arl's repo instead of pydis'
Honestly have no clue though tbh
isn't arl's repo one of the remotes, so it should be okay ig
I basically just don't know how to get rid of the other commits when pushing
remove those commits from this branch or make a new branch on pydis repo and remove them?
git checkout -b origin/branch-name arl-remote/branch
may work
and then rebase to remove the commits
fatal: 'arl/fix-issue-2053' is not a commit and a branch 'origin/fix-issue-2053' cannot be created from it
I guess I need to use the commit hash instead?
uhh, the origin can be removed from first argument, not sure about the second one
lemme check
Umm, that should have worked https://stackoverflow.com/a/48840672/14863850
ah ok
fetch arl's remote first
and then run it again
git fetch --all should do the job
by rebase you can just do git rebase -i HEAD~{n} where n is the last commit number you want to remove, according to your screenshot, you want to remove 2->5 so you can do HEAD~5 and then replace the the pick with drop
you may get some conflcits but that should work ๐ค
So git fetch --all then git checkout -b origin/fix-issue-2053 arl/fix-issue-2053 then the rebase?
origin shouldn't be needed, but yeah
Okay thanks
Lemme try
Hmm, still same error
(bot-6mLjCNeK-py3.9) C:\Users\tizzy\bot>git checkout -b origin/fix-issue-2053 arl/fix-issue-2053
fatal: 'arl/fix-issue-2053' is not a commit and a branch 'origin/fix-issue-2053' cannot be created from it
Same without the origin/
can you check if that branch exists? and the remote is there
testing locally, oe sec
I don't really know how to check tbh
I mean I haven't pushed at all so I guess that's why?
What commit do I rebase from?
oh well well this is getting pretty confusing, not sure if I am doing it correctly, how big is your commit
It's tiny
Can redo it in like 20 seconds
So if I have to lose it it's not a big deal
maybe that would be better, i don't think i would be able to fix this
So how would I "start over"?
if you are okay with that, or wait for someone else to help you out
i think i know a way but i don't want to complicate it more and then mess up, (undo merge, so it removes those "extra" commits got from main, and then do the rebase to remove the commits from arl, and then merge again)
I mean I'm more than happy to just restart
As I said, it's like 20secs of edits
It's a tiny PR
I just need to know how to not mess up again
maybe don't merge with main branch until you are ready with the current code
basically when you merge with main, it adds in some commits according to the history
so to the timline changes
so if you want to remove a commit from 1 week behind which is actually your 2nd last commit on your branch, you would need to go very behind to remove it once you merge with main
i see joe's empty commit which was done on main
I've got no clue what you're saying at this point
uhh, i will just stop lol, ignore me
make a new branch from main, copy in the patch
I mean that's what I originally did
I checked out main, created a branch, implemented the fix, committed, went to push
What does your main look like?
uhh well then i dunno how that messed up
reset main, it maybe messed up?
also looks like that branch points to arl's repo, so i don't think its checkout out from pydis repo main
look at the second line here...
oh well gtg, good luck with that ๐
I have no clue lmao
could you checkout main and git log
git checkout origin/main?
is your main not tracking origin/main?
could you do git branch -vv
(bot-6mLjCNeK-py3.9) C:\Users\tizzy\bot>git branch -vv
* (HEAD detached at origin/main) ece780ab Merge pull request #1721 from python-discord/enhance/backend/time-util-refactor
fix-bot-2034 d30776a1 [origin/fix-bot-2034: gone] Infraction mod-log improvements
fix-issue-1924 d5dc9ca4 fix: make editing follow the same duration rules
fix-issue-2053 5bd9e1ae Add missing arguments to `notify_infraction` call
incident-archive-msg-improvements 1e0c0cfe [origin/incident-archive-msg-improvements] Fix tests
main 56fe0d5c [origin/main: ahead 4, behind 33] Merge branch 'fix-issue-1924' of https://github.com/onerandomusername/bot into main
alright git checkout main
then git reset --hard origin/main
That should leave you with a main branch that is up to date with origin/main and no extra commits
you can then branch from that and apply your fix
๐
Hopefully after this bot#1951 will stop breaking things 
This is the 3rd PR fixing issues with it lol
https://github.com/python-discord/bot/blob/main/bot/exts/backend/error_handler.py#L252 this function doesn't do anything with InWhitelistCheck despite claiming to
bot/exts/backend/error_handler.py line 252
async def handle_check_failure(ctx: Context, e: errors.CheckFailure) -> None:```
InWhitelistCheckFailure seems to be a subclass of ContextCheckFailure, which is handled
It's a bpo thing
The way it works is by using page headings
But list methods don't have page headings
So there's no way to programmatically find them
One of the staff here opened an issue on bugs.python.org about it. The only way it can work is if the psf adds those headers
lists explicitly don't expose the symbols in the index we use, tuples and others aren't really documented directly
We have raised a bug report on https://bugs.python.org/
there's only https://docs.python.org/3/library/stdtypes.html#common-sequence-operations for all sequence types
Specifically https://bugs.python.org/issue45762
I don't think it's that big of an issue to link to it manually, something like that would have to be hardcoded with the url, names and how the things should be looked up (as there isn't even a good way to get them out of the html), while the current system is completely automatic
bpo?
bpo = bugs.python.org
ah that's why it didn't make sense
!d list.sort also I don't see the issue, what's missing?
sort(*, key=None, reverse=False)```
This method sorts the list in place, using only `<` comparisons between items. Exceptions are not suppressed - if any comparison operations fail, the entire sort operation will fail (and the list will likely be left in a partially modified state).
[`sort()`](https://docs.python.org/3/library/stdtypes.html#list.sort "list.sort") accepts two arguments that can only be passed by keyword ([keyword-only arguments](https://docs.python.org/3/glossary.html#keyword-only-parameter)):
*key* specifies a function of one argument that is used to extract a comparison key from each list element (for example, `key=str.lower`). The key corresponding to each item in the list is calculated once and then used for the entire sorting process. The default value of `None` means that list items are sorted directly without calculating a separate key value.
As is stated in the bpo, list.sort is the only one with the headers
None of the other methods (e.g. list.append) have headers
Is this supposed to happen with the !server ?
It used to be formatted in a highlighted string iirc, but yeah people asked for that info
Itโs only in certain channels, namely: here and bot-commands
What does the features mean? Just the general features in server?
Itโs the features enabled for this server in the discord backend
I see
Youโll need to refer to discordโs docs for specifics
i'm tempted to revert the PR which made that available in all public channels
it just complicates the embed with information which is only going to grow as discord adds new features
wdym?
seems like it's still limited to just these https://github.com/python-discord/bot/blob/main/bot/exts/info/information.py#L180-L185
bot/exts/info/information.py lines 180 to 185
if ctx.channel.id in (
*constants.MODERATION_CHANNELS,
constants.Channels.dev_core,
constants.Channels.dev_contrib,
constants.Channels.bot_commands
):```
That just added #bot-commands
I added it there so that people stopped using it here to see that info - now I think we should just remove bot commands and dev contrib
we've already talked about how cluttered that embed is
and it has just generated questions here
Ah right, I miss understood your message
I read it like we enabled it in all public chanels
but yea, we can remove the public channels that are in there
are there any valid use cases to see those features?
an optional arg would work if people actually want it, though I doubt there are many valid uses for that beyond being curious
for staff or for public
for public there aren't any afaik, for staff maybe to see if we have a certain feature? but we also have eval access
so
either
yea, the only use I can see is if we are wondering if they've given us access to a specific feature at some point
so we can probably keep it in core dev or smth just for that
yea
though I think having it in the #-spam channels is nice, don't want to have the same problem where we run commands in a discussion channel
Sure
!server
neat
@exotic ember what button is site#645 changing?
I can't spot any differences between the deploy preview and the production site
I've managed to find a drop down called sub-articles on the contributing pages, but that looks fine to me even on small view ports
So I'm not sure if this is the right one, or what should be tested, since it's not specified on the PR, nor the issue
wait we have deploy previews
okay I phrased that wrongly
I know we merged deploy previews
but some part of my brain lacks the attention to actually realize the comment is there linking to it
https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/
Set the viewport width to 360x800, then try to click the Sub-Articles text (not the arrow)
A guide to contributing to our open source projects.
bad commit message :blobsweat:
๐
You merged it lmfao
!remind 6h #community-meta message
Your reminder will arrive on <t:1643112460:F>!
Lists in the python docs don't expose the symbols that we use for the docs command. We have raised a bug in bpo https://bugs.python.org/issue45762
hi
so uh, i just changed a line https://github.com/python-discord/bot/pull/2059
hii. For future reference, you need approval from a python discord core developer (people with the @Pydis Core Developer role) before working on an issue.
I've left a comment in my review ๐
@vale ibex I see you've now had the joy of trying to find stuff in the logs
I'm making the PR now
wasn't so bad lol, just had to filter out some things
It should cut the spam 10-fold
more annoying part was grafana refreshing every 5 sec which scrolls back to the top lol
it makes sense for a dashboard that watch lists
but ofc that's not our use case of trawling logs lol
It may or may not have been half the motivation for All App Logs
That and fixing all our flaming infra
sir-lancebot#1016
please wait until you are assigned to the issue before raising a PR
Hey guys, I'm making this announcement to inform you of a problem with our AoC logging system which negatively impacts all our logging output. I propose we reduce the logging output. All those in favor stay silent. All those against send your home address, contact details, and complaints to complaints@chrisjl.dev.
Signed,
Yours truly
Issue approved
Hey guys, I'm writing this follow up announcement to inform you that I'm making the executive decision to assign myself to the issue
Signed
- Me again
lol
watcha up to
your lint action
Wait this is actions
lmfao
Just gonna remove isort, ez
_distutils_hack this is a good sign
lmfao
Did you rerun
ye
just to see if it was ephemeral
but it was not lol
what's changed?
Ah, I'm guessing pip install poetry now has a new version?
we should probably pin that version
Did 1.2 release?
hjasihjdh
hype
hm
No I'm not seeing an update
This isn't even poetry related
It's precommit which is doing this
oh, I had assumed pre-commit used the poetry python env
and that was missing setuptools
Not for isort, no
Ah
we pin isort to 5.8.0, so that shouldn't have changed
maybe we can bump that up to latest and see if it fixes it?

I mean.. isort itself hasn't had an update in like half a month, so yeah lol
Latest is
5.10.1
failing all actions
oh lol
Okay lets see if there are any other changes that need to be made if we bump that version
Going to add it to my PR
We don't even include isort in our poetry config
Why
Oh, I thought that was just a flake8 rule, didn't know it fixed
Would putting setup tools into the dev deps work here?
See my last commit lol
Our last working action was 4 days ago
I wonder what's changed since
Ok, yeah I didn't expect that to work
well, that was our last action in total lol
It seems to be a bug with python packaging in general
Yeah just meant we should look for changes within the last 4 days lol
That is, even if you have setuptools installed, it won't be accessible during certain builds
what's the difference
ill rebase one of my prs to main
that'll drop our period from 4 days to 2 hours tops
trigger an action
Sounds good
Did it
yeah cache
Wait why was lance not cached
damn it we should encode cache date into the name
I'll add it to my setup-python action
It's not clear why lance has a missing cache though
Up until I made the bump PR, .pre-commit-config had not changed
Do we have an org-wide storage limit on cache?
might have just been pushed out, since it's been 4 days
Afaik the limit is only per repo
Not sure then
Otherwise cache misses will be infinite on bigger orgs
precommit-0-Linux-/home/runner/work/sir-lancebot/sir-lancebot/.cache/pre-commit-cache-3.9.10-a5c2422f4ab1f919b208ee0f5ee072ceb9c51fce08af3df0cde53ccdeb3463ab
precommit-0-Linux-/home/runner/work/sir-lancebot/sir-lancebot/.cache/pre-commit-cache-3.9.9-a5c2422f4ab1f919b208ee0f5ee072ceb9c51fce08af3df0cde53ccdeb3463ab
Python version changed
Does it?
that could explain other things then
Why did the version change
we pin to 3.9.*
Can look into it later, in a work training call atm
Yea, it didn't
It's happened before too
Not sure what causes it, that cog doesn't have much logging
Should there be more?
Also I opened a issue x time ago, how can I find it because I don't remember what it was about
Yes, we should have logging to tell us something didn't work
I'm not sure the cause here, so can't speak to where that logging should be
Could you link the src?
.src reddit
Your input was invalid: Unable to convert reddit to valid command or Cog.
Usage:```
.source [source_item]
.src Reddit
Your input was invalid: Unable to convert Reddit to valid command or Cog.
Usage:```
.source [source_item]
huh, could have sworn the cog was reddit
I can look it up when I get to laptop
Utilities
bookmark
challenges
cheatsheet
colour
conversationstarters
emoji
epoch
githubinfo
issues
pythonfacts
realpython
reddit
stackoverflow
timed
wikipedia
wolfram
wtf_python
.src Reddit
Your input was invalid: Unable to convert Reddit to valid command or Cog.
Usage:```
.source [source_item]
no clue
.int e print(bot.get_cog('reddit'))
None
.int e print(bot.get_cog('Reddit'))
None

Well, that's not good lol
The cog list function reads them from the constant, not necessarily what's loaded
.cog load Reddit
.cogs load Reddit
:x: Extension bot.exts.utilities.reddit is already loaded.
.int e bot.reload_extension("bot.exts.utilities.reddit")
[No output]
.src Reddit
weird
that's likely why it didn't webhook a message then
wonder what caused it to be unloaded
.uptime
I started up 3 days ago.
since it posted 2 days ago, and hasn't rebooted since
This isn't the first time the reddit cog failed to post mysteriously, perhaps it just takes the weekends off?
Moderation cog ๐คก
is there an on_unload event or similar?
could be useful to log state on that case
I wonder if it's caused by discord causing us to relogin every evening
Yeah we use it in aoc
def cog_unload(self) -> None:
"""Cancel season-related tasks on cog unload."""
so the cog was just not loaded?
Yes, but it should've been
hmmmmm
I wonder if it's somethinng that we need to do with the login method of the bot
So have ext unload write to a cache, have the cog unload pop it. If it hasn't popped in 30 seconds, panic
To detect unexpected unloads, have a task which checks ext list from bot.cogs, and compare it to an internal cache of loaded cogs
Do we patch the login method ourselves
we do in python, not in lance
the issue could be that we don't unset bot._guild_available on logout
So when we reconnect to the websocket every night, bot.wait_until_guild_available won't reflect the cache
A fix would be to unset that Event at the start of login()
Yea, all the bot._guild_available wait_until_guild_available stuff is ours
hmmm, not sure if that is fired on ws reconnect
it might be
non relevant to current discussion, but is there any plans yet of changing the lib from dpy to something else?
yes, we will need to eventually
we are currently waiting to see what becomes the defacto standard
or at least waiting to see if one will become one
since all the forks/libs out there have only recently become relevant, so we want to ensure that the one we pick will be maintained well.
I see, is there any uh top x list that you are looking for
I mean, is there a list of possibilities that are like "ranked"
right, that makes sense
We are in now rush to swap, since what we have works for now
Thx for for the info ๐
once a new defacto standard appears, we will switch to it
if external forces make us choose before that, then we will have a core dev discussion on which one to pick
I see
I can pin this down in the d.py source
so it might be good to patch disconnect() to also clear that Event
The other option could be to drop Discord.py's loggers to info over night, and see what it's doing
!src reddit
Unable to convert 'reddit' to valid command, tag, or Cog.
and there were talks about merging the cogs or something
I don't remember exactly because this was about a year ago
Yea, it was moved over the lance a few months ago
The cog name is capital
^
.src reddit
Theres a command? lmfao
.reddit top
Here are the top r/Python posts of all time!
Lad wrote a Python script to download Alexa...
โ
12337โ
โ149โ
iEslam
This post has:
9777 upvotes, 967 downvotes and 452 comments!
โ
9229โ
โ444โ
Krukerfluk
I redesign the Python logo to make it more modern
โ
7861โ
โ271โ
jessjwilliamson
Automate the boring stuff with python - tinder
โ
6719โ
โ337โ
backprop88
Just finished programming and building my own...
โ
6617โ
โ472โ
janky_british_gamer
Here's your reminder: #community-meta message
[Jump back to when you created the reminder](#dev-contrib message)
@mint nebula hey, i transferred your issue to the bot repo. bot#2060
did you want to take a shot at it?
(still needs approval though; if you want to wait before starting any work on it)
Are you looking for approval from anyone specific?
If the change is just to add Claimant: <name> to the bottom of the embed or whatever, that's pretty inconsequential
Giving it my scale seal of approval
also to change the behavior of the pin
can we pin that embed itself, as opposed to the claimant's first message?
sorry, I don't have the time to rn
both users and @stable mountain sometimes delete that first message
It's worth mentioning that we don't store a reference to that embed at all, so a new redis cache would be needed
channel.history :D
Right, but what's the benefit of pinning the embed
I'd say the opener message is far more useful to have easily accessible than that embed, if available
We don't need a cache, can't you just call pin wherever you call send
I'm referring to the embed issue
why do we need a new cache though
Ah, I see
the embed would be edited as soon as they claim
oh, wait, yeah
the available message is sent when the channel moves to the available category
this is 100% a different issue and needs separate discussion
Yea, so we'd need to store the reference to it somewhere
ok
i would be opposed to pinning the embed
pinning is not mentioned in the issue i realize now
Its nice to be able to quickly see the claimants message
i would only be up for that if we only do it when the opener message is deleted
That seems like a lot of work, I'm still not clear what the motivation is
Yea, me neither
Also, can we send a new embed with the claimant name to solve the cache issue
Or rather, it's a way to more cleanly keep that record
It's what we do currently for the available one
I thought we sent a new seperate embed on channel claim
I don't follow
what do we do currently
Sending a new embed after pinning the message seems like better ux too
especially if the opener message is long
Yeah
channel goes to dormant, send dormant embed, channel goes to available send available embed
so we'd just add an in use embed to that
I would be a little opposed to including more content in the embed though, other than author name
So it'll be a pretty small embe
!embed Claimed by: Mr. Christopher
Claimed by: Mr. Christopher
!embed Claimed by: Mr. doctor
Claimed by: Mr. doctor
much better
What are you a doctor off
But yea, we can shove the occupied emoji in there as an thumbnail
say who claimed it
no need for description
easy
would you categorize this as a "first good issue?" bc then i could give it a shot. that also means it might take a month :)
hah yea already have
it's just going to be putting a ctx.send in the claim_channel call
im new tp coding in python so do i download python or use vs code
Hey! This channel is for discussing our server's projects such as our bot and website. Your question would be better off in #python-discussion, or take a look at #โ๏ฝhow-to-get-help to open a help channel. ๐
you would just need discord.gateway as that handles all events
although it miight need to be debug, not sure what level it logs incoming events at
are there any that look like a standard to you personally yet?
That's still the general aim, although I'm definitely fine hearing alternatives
@vale ibex Voice mute PR should be OK now.
@gritty wind found the issue btw sir-lancebot#1017
Also bot#2061
What does the status: waiting for author mean? Does it mean there is no author for it? https://github.com/python-discord/sir-lancebot/pull/929
It means we're waiting for the author to do something
it's the opposite of ready for review
oh I seee
@placid ermine you can just embed the image, so that the backgoround is always dark
oh good idea
&latex ```latex
\section{First Section}
\subsection{A subsection}
\begin{equation}
L' = {L}{\sqrt{1-\frac{v^2}{c^2}}}
\end{equation}
```
command I used if you want it for testing
'ight
This is now using an API?
Yea
wait @placid ermine what does a jpg format look like from the API?
Since jpg doesn't support transparency, it might already have a decent background
lemme see
aaaAA the post request succeeds but then the get fails with jpg for some reason
lol
also just noticed that we're sending the payload with the GET request too
I imagine this isn't needed
yeah i noticed too
looks good ๐
Just out of interest, how long does making that background take?
Do we need to be worried about it blocking the event loop?
694 ยตs ยฑ 7.11 ยตs
yeah
ok i never finished setting up bot last time i poked in here, so trying again
i'm up to this step https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/#with-docker
A guide to setting up and configuring Bot.
docker is running
time="2022-01-26T13:21:37-05:00" level=warning msg="The USE_METRICITY variable is not set. Defaulting to a blank string."
services.metricity.environment.USE_METRICITY must be a string, number or null```
Did you do docker-compose up --build first?
i didn't..
also i'm fairly certain that last time i set up bot successfully (on a different machine) i didn't do that, and it just โจ worked โจ
Hmmmm
Maybe this section? https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/#optional-working-with-metricity
A guide to setting up and configuring Bot.
I think I have mine set to false
added USE_METRICITY=false to .env and got
services.metricity.environment.USE_METRICITY must be a string, number or null```
so same thing except for the warning from before
Have you set USE_METRICITY to anything in your .env?
didn't earlier, and tried it just now set to false
and it's still giving error?
Is it there twice?
no it's not there twice
could you tell me what docker --version and docker-compose --version output?
I'm stumped, I'll leave it to the docker lord Chris
We use a special syntax in the docker compose to set a default
my suspicion is that you're on an old compose version that doesn't support it
Docker version 20.10.7, build f0df350
Docker Compose version v2.0.0-beta.6
from docker-compose.yml
Yea, that's the default, it's not changed
i will unselect docker compose v2
i'll do what you said first
same error as before
switching to
docker-compose version 1.29.2, build 5becea4c
looks like it's working
Very weird, I'm looking at the changelog and that shouldn't be broken in v2
should i care about this?
So I've just bumped up to compose v2 and it works just fine, however I get Docker Compose version v2.2.3
rather than 2.0.0-beta.6
so it might have been a bug in an old beta
Yea, that's fine to mark as don't show again
We use compose volumes to share code changes, so we don't need to rebuild images all the time in dev
i just unselected this checkbox
it's not very performant in wsl2
Yea, I selected it and got v2.2.3
oh lol
ok ty. i'm gonna add some emoji snowflakes to the config.yml
and then in a bit try to run bot again but locally
๐
what's the right way to stop a container? other than using the UI button in the docker application?
ctrl+c in the terminal you started it in
error i got running poetry install
https://paste.pythondiscord.com/izujixavuc.lua
tried it 1x with a venv activated and 1x without
as far as i can tell i do have setuptools installed though
Try poetry shell first, then poetry install?
heh, this is the issue we fixed in the github actions yesterday, didn't expect anyone to see it so quickly locally. You're gonna have to do $env:SETUPTOOLS_USE_DISTUTILS = 'stdlib'
This is an upstream issue in virtualenv, there's a good writeup here https://github.com/pre-commit/pre-commit/issues/2178#issuecomment-1002163763
oki oki. it's running though w/ some errors lol. we're almost there
now that discordpocalypse is over for now
https://paste.pythondiscord.com/zoloqurura.yaml
i figure some things i can ignore
but not that bottom part?
i also don't really know what i am doing with webhooks. i just made one and chucked the same webhook ID in the config.yml
i gave my bot the "Admin Bots" role
edit: i just realized i still had my bot on the staff server so i kicked it
looks like you're missing a bunch of config values
the errors there suggest missing channels and webhook ids
https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/#configure-the-bot should get you through this
The "Optional config.yml" file there has a ๏ฟฝ character for everything you need to populate
no i had done that, though idk if i did the webhook IDs incorrectly or something
Can you send me the full config.yml?
#pedagogy message At the end of this message there are some topics that might be worth adding to .topic. You could open an issue on Lance or I could do it
could you inv me to the guild?
Speaking of issues I'm still waiting on approval on sir-lancebot#989 and sir-lancebot#1000 (maybe)?
I don't have anything off the top of my head. The big thing to mention is the Events tab, @Announcements role, aaaaand... maybe the !subscribe command?
Can you? AFAIK it's not available through the API
Hey, this channel is for discussing development for python discord projects. See #โ๏ฝhow-to-get-help
ok
Ah, looks like they finally added support in November. Yeah, we can pull from the scheduled events tab. We'll have to add a check for only public events
If the event is tied to a private voice channel, yes. Only people who can see the channel can see the event
No, not necessarily. I don't trust Discord enough to have it be the source of truth
If an event needs to be created I can just make a PR
You don't need to create a custom event creation modal. If a non-Discord Events Tab event needs to be created, I can just manually PR it
Yeah, we can try pulling events from the Discord Events Tab.
Nice small PR to fix an issue @hoary haven encountered with the example config.yml file in the bot contrib guide.
site#646
Looks good! I would slightly reword it to, although the second sentence is quite long now. Feel free to adjust further.
An integral part of the Python Discord experience are the community-wide events we run. Whether it's competing in our yearly Code Jam, joining our Advent of Code leaderboard, or learning about APIs via a collaborative digital canvas, there's an event for you to join!
Head over to the Discord server and
!subscribeto the@Announcementsrole to be notified of future events - meanwhile, you can check out the scheduled events tab on the Discord server or read on for further information.
Alright issue opened sir-lancebot#1018
thoughts?
rather than having that, we could have just kept the pinned bot message, it tells the samething...
hello mina
anyway, that looks nice 
wdym?
i'm not changing any pinning behavior
just adding a new message that's sent
oh i left that out of the screenshot, but yeah claimant's first message is still pinned
nvm nvm, i literally forgot how the pinned message looks
the system message for pinned message does not state the author of the message
yeah, i thought it did ๐คฆ
(bonus for moderators we'll be able to find the appropriate channel belonging to someone when they cross-post)
i think our other embeds have proper punctuation so maybe i need to add a . at the end
Channel; claimed: By mina.
The extra message may detract from the actual question, but I suppose it won't be much more detracting that the system pin message already is.
we also have the option of doing a regular message instead of an embed. then users that ever lose their help channel can use the discord inbox (I bring this up bc the help channel guide has a section on how to find your channel again)
embeds are more highlighted IMO, but in this case it doesn't really matter though as users mostly delete there help messages early, so yeah regular message may work ๐
hmmm, i'd rather fix that in another thing
we could add a command for users to be mentioned in their open help thread to be able to find it
idk if users who don't know how to use discord's search will be using a bot command like that (or checking their inbox)
more like mobile sucks
then again yeah
the inbox feature is pretty easy to use but for some reason i didn't know about it until way after learning how to use from: and mentions:
but i think i'll go with the embed. will PR soonโข๏ธ
what is our max character count per line for docstrings?
It varies per project, but we don't have a different line limit for docstrings to other lines
In the project root, open up the tox.ini file and it'll be the max-line-length value
oki
bot#2062 github wanted mark to review but ofc anyone is welcome
Yeah those are just auto review requests for code owners, they are requested for the review but don't have to in order to merge
@molten perch @sleek steppe ooh thanks guys!
Yeah here's a guide for signing commits: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification
Gotta say, it looks pretty great in the help channels
pretty chuffed myself 
.bm signing gh commits
voice gate is currently down due to the voice_mute changes in site & bot. I'd appreciate some reviews on these two bug fix PRs
bot#2064 site#647
To any core devs reading, these two PRs can be merged separately if needed, as it's already in a broken state
is github down for anyone else?
https://twitter.com/githubstatus/status/1486861850310500354 they just said they're looking into it
That's weird, everything is working for me on GitHub. Is this the dashboard or am I being dumb?
Yep, that's the one
Ok, but why is it broken for everyone but me, I'm confused...
No clue, tis the nature of GitHub sometimes
Okey dokey ๐
And finally here's a status incident to keep track of it: https://www.githubstatus.com/incidents/xvk42jkm6fzk
@cold moon @exotic ember @patent pivot @gritty wind
I'm not sure which one of you worked on the redirects app in our site the most, but judging from the blame you were all at least somewhat involved?
I'm hitting a wall trying to get it to redirect the old resource pages (like /resources/videos) to the new page with GET parameters.
e.g., I want to redirect /resources/videos to /resources/?type=video, and it just.. doesn't seem to work. Does it just not support that?
# This just redirects to /resources
resources_videos_redirect:
original_path: resources/videos/
redirect_route: "resources/?type=video"
# This still just redirects to /resources
resources_interactive_redirect:
original_path: resources/interactive/
redirect_route: "resources:index"
redirect_arguments: ["type=interactive"]
I think the redirect app is the right place for redirects that maintain backwards compatibility, and cf workers are for convenience redirects
I've added a couple of redirects we missed in migration, I'm unsure of the internals though unfortunately
I'm guessing that these arguments are forwarded to my view, instead of being added to the URL itself. But perhaps I could just.. allow those arguments into my view method and add them to the request from there. that seems somewhat reasonable.
All of my work was exclusively tied to static builds, so it was mostly hacking the app to make it work for that
Fwiw, I think the redirects system is very complex, and difficult to work with, at some point we should deprecate it
Even if it breaks backward compatibility to some extent
@patent pivot could you pull data at all about traffic to those paths?
!remind 5h
Your reminder will arrive on <t:1643493543:F>!
Hello. I'm trying to compile Python3.8.9 from source on Windows 10 but getting compiling errors. I've tried a couple of version of python so far and got the same error below:
fatal error RC1116: RC terminating after preprocessor errors
Can anyone here help?
There is an issue for this https://bugs.python.org/issue45220
Hey this channel is for discussion of python discord (this server) projects, not general python.
For help with this, try #โ๏ฝhow-to-get-help
sorry
Is there another discord server to discuss general python internal? Like compilation?
@gritty wind
Afaik not on discord. We do help with stuff like that, just not in this channel
we don't really store that data - but we should - let's set a long term goal to get rid of redirects that are unused and build something simpler for redirects that are used
maybe we have the site push used redirects into a table we can pull data on or something
Yeah that sounds simple enough to do
Would be too hard to put StatsD into site?
This would make more sense for stats than custom table
It's not too hard, in fact it already does write there with some gunicorn stats, but I'd rather get more in detail stuff. I think storing a path and IP hash with referrer is much more valuable than numbers.
i think we need a table with auto-increment pk, we'll then store the hash of the requesting IP, the path they are trying to access and the referrer that sent them, maybe also IP geoloc (to country)
in theory we can still do that with a cf worker if we want
on this note though - we never did plan to add more redirects to this - it was more there as a compatibility measure during dewiki - i'm against adding anything new to it in most situations
so in that respect - it is deprecated
yes but that's stupidly annoying to aggregate
why use a hacky solution like that when we have a database which we can plug directly into metabase and get all the data immediately without annoying hacks
Hey, I was wondering if there's any reason why Lancebot doesn't have the bot-core dependency? If there isn't one, I'd be happy to add it ๐ .
Here's your reminder: @cold moon @exotic ember @patent pivot @gritty wind
I'm not sure which one of you worked on the redirects app in our site the most, but judging from the blame you were all at least somewhat involved?
I'm hitting a wall trying to get it to redirect the old resource pages (like /resources/videos) to the new page with GET parameters.
e.g., I want to redirect /resources/videos to /resources/?type=video, and it just.. doesn't seem to work. Does it just not support that?
[Jump back to when you created the reminder](#dev-contrib message)
- On pydis bot why put stuff on config-default.yml, why not just
.py?
- I don't see a requirements.txt where can I find what needs to be installed?
-
We use
config-default.yml(andconfig.yml) for configuration, as yml is an easier syntax for configs rather than python files. See https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/#configyml -
We use poetry (https://python-poetry.org/) which is a dependency manager which makes it a lot easier for development. The dependencies are listed in
pyproject.toml. See https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/ for a guide on how to contribute to the pydis bot.
Why not use pipenv?
We were using pipenv previously but it didnโt work for mac users
we used to use pipenv but switched to poetry some time back in 2021
five years to lock too, which while it didn't happen frequently was still annoying
heyo, could i get another staff/contributor approval on sir-lancebot#1010
I noticed that in line https://github.com/python-discord/sir-lancebot/pull/1010/files#diff-47a148f59f4de510e9f4ba896d15cda1cc3ebd8fdae689a023798c4016bdf828R89 you're catching a bare exception, but referring to a 400 error. Maybe it can be a more specific exception?
Run Python code and get the results.
?
bot/exts/core/internal_eval/_internal_eval.py lines 96 to 98
except Exception:
# 400 (Bad Request) means there are too many characters
log.exception("Failed to upload `โinternal eval`โ output to paste service!")```
I think in the case of int eval we just don't want sentry issues opened for int eval code
the snekbox command probably handles it better
hmm... it doesn't
Unfortunately poetry has slowed down a lot too (1.2 is kinda faster but weโll see). I think itโs just something weโve gotta live with sometimes :P
Tbf we only lock like every other month lol
@placid ermine hmm what does it mean to use the image as a mask here?
https://github.com/python-discord/sir-lancebot/pull/1010/files#diff-47a148f59f4de510e9f4ba896d15cda1cc3ebd8fdae689a023798c4016bdf828R47
without the transparency mask the transparent pixels just appear black
Are there any known ratelimits for the API?
I'm wondering if a per-user cooldown is needed here
hmmmm
It might be a good idea to contact them
I don't expect the usage to be huge, but I don't know what kind of load they're expecting
@short snow said another server uses it
Does the other server have 300K users ๐
i mean, 300k users aren't using our bots
i dont think we'll use it more than a math server, even with more members
Yeah thatโs very true
We should still check with them though, a programming server shouldnโt compromise on program ethics ๐
fair enough
Yeah I think it's just good manners to at least give them a heads up
@placid ermine would you like to send them an email, or should someone else?
i am not sure which server it was, but that's how i got to know about the API
i'd prefer the latter if that's okay
Sure
It's because no possible error could justify aborting the entire operation. Uploading is non-critical functionality. It would suck if the user didn't get any output just because the pastebin upload failed.
Logging could be improved if you want though
is the little arrow in the the dropdowns on https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/ supposed to rotate? If not, maybe it should - it looks a little weird to close a dropdown by clicking a down arrow
A guide to setting up and configuring Bot.
also, the second dropdown doesn't slide out, it just kinda exists once you click. is that supposed to happen?
I wonder if the speed of the slide scales with how long the dropdown is
would explain why it's so fast
it's not that it's fast, it's just not sliding at all
it does slide, the dropdown is just so ridiculously long the part you see animates instantly
oh maybe you're right
also the animation is ease-out, which starts fast and slows down towards the end
Has anyone suggested developing a configuration wizard for the bot?
Alright, I'll look into that, thanks ๐
are you proposing something interactive?
Yeah, with like buttons and stuff ๐
I finally got around to setting up my own test-server.
And thought it would be handy to have something you could use in to add the channel IDs etc to the config file. As well as check that the channels, roles, bot, etc. all have the right permissions.
But I recognise this is a challenging task.
this is SmartConfig btw https://github.com/Akarys42/smartconfig
it's not a configuration wizard
Just a reminder that bot#1602 (the !timeit command) is ready for review ๐


241,483
