The get_or_fetch_channel util has missing return types, namely discord.abc.PrivateChannel and discord.Thread.
These are needed to ensure type hinting is correct in upstream projects.
1 messages ยท Page 14 of 1
The get_or_fetch_channel util has missing return types, namely discord.abc.PrivateChannel and discord.Thread.
These are needed to ensure type hinting is correct in upstream projects.
likely not worth the version bump here, to reduce conflicts. If you leave the changelog there, and remove the release line, it'll find itself into next release's changelog
async def get_or_fetch_channel(
bot: Bot,
channel_id: int,
) -> discord.abc.GuildChannel | discord.abc.PrivateChannel | discord.Thread:
- :bug:`187` Fix :obj:`pydis_core.utils.channel.get_or_fetch_channel`'s return type to include :obj:`discord.abc.PrivateChannel` and :obj`discord.Thread`.
Ugh, pycharm is driving me crazy with this.
GitHub Actions run 5512410362 failed.
- :bug:`187` Fix :obj:`pydis_core.utils.channel.get_or_fetch_channel`'s return type to include :obj:`discord.abc.PrivateChannel` and :obj:`discord.Thread`.
Sorry, missed this on my first comment
GitHub Actions run 5512454717 failed.
4c1060a Update get_or_fetch_channel's return type (#187) - shtlrs
Thanks! I've reverted the commit that made self.stop() async in this PR
Tested, LGTM. Also, I dedicate this PR in honor of @AbooMinister25
Connected!
GitHub Actions run 5515990447 succeeded.
GitHub Actions run 5516648634 failed.
GitHub Actions run 5521273449 succeeded.
The get_or_fetch_channel in pydis_core requires passing the bot instance to the function, which the implementation here does not. I assume the usages will need changing.
Also the lock file needs updating.
926b6b7 Additional potential symbols in valid invites (... - mbaruh
3c0e58b Drop redirect usage from URL references (#1016) - jchristgit
GitHub Actions run 5521410387 failed.
pinnwand-deployment
GitHub Actions run 5521406406 succeeded.
Connected!
GitHub Actions run 5521442955 succeeded.
GitHub Actions run 5521474719 failed.
GitHub Actions run 5521896352 succeeded.
GitHub Actions run 5522190901 failed.
pinnwand-deployment
bc3a07e Support sending multiple files to paste service... - ChrisLovering
One minor comment, but this looks great!
After pasting your code, **save** it by clicking the Paste! button in the bottom left, or by pressing `CTRL + S`. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
"After pasting your code, paste it ..." reads a little strangely to me, I think "save" still makes a bit more sense here even though that's not what the button is called. I don't really mind though.
Yea, pointing it out, the sentence seems repetitive, I've applied that change in https://github.com/python-discord/bot/compare/799d343e24faee34f812ad124e6d3cb43dff69a5..a0913e8c501f1be3c35800d3fb4d31d3cabea34f
GitHub Actions run 5522268014 succeeded.
GitHub Actions run 5522435353 succeeded.
0994d88 Use the new pydis_core send_to_paste_service fu... - ChrisLovering
01cbce4 Remove unneeded paste service constant - ChrisLovering
d961f5e Mock _lexers_supported_by_pastebin in test to e... - ChrisLovering
638c61e Bump bot-core to 9.9.2 - ChrisLovering
a0913e8 Update paste tag for new paste service - ChrisLovering
GitHub Actions run 5522554310 succeeded.
Connected!
GitHub Actions run 5522574005 failed.
The
get_or_fetch_channelinpydis_corerequires passing the bot instance to the function, which the implementation here does not. I assume the usages will need changing.Also the lock file needs updating.
Well spotted, thanks ! It's been dealt with in 2a6119854bcc6a229cd9c284bbcb280d78d1521d
Also, the bot-core version change has been reverted in favo...
b617ce1 Allow the url used for the paste service to be ... - ChrisLovering
GitHub Actions run 5523427774 failed.
GitHub Actions run 5523456947 succeeded.
Why do you have a constant here if it's already available in BaseURLs?
Shouldn' this be
paste_url=BaseURLs.paste_url
4e41856 Fix warning ignore - jchristgit
GitHub Actions run 5524298332 was cancelled.
GitHub Actions run 5524301099 succeeded.
Summary: The logo image for "Getting Started with Kivy" and "Kivy" resources on the Python Discord resources page is not displaying. The image source URL (https://raw.githubusercontent.com/kivy/kivy-website/master/logos/kivy-logo-black-256.png) returns a "404 not found" error when accessed directly.
Link: https://www.pythondiscord.com/resources/
Environment: win10, browsers: chrome, firefox, edge
Step to reproduse:
1. Navigate to the Python Discord re...
Summary: The link to the "SoloLearn" resource on the Python Discord resources page is broken. When the link (https://www.sololearn.com/Course/Python/) is clicked, it redirects to a page on the SoloLearn website that displays "Oops, 404 Error!"
Link: https://www.pythondiscord.com/resources/
Environment: win10, browsers: chrome
Step to reproduse:
1. Navigate to the Python Discord resources page (https://www.pythondiscord.com/resources/).
...
Summary: The "Panda3D" resource on the Python Discord resources page has two identical links leading to the same Discord server (https://discord.gg/9XsucTT). However, the icons used for these links are inconsistent. The first link uses an external link icon, while the second link uses a Discord icon.
Link: https://www.pythondiscord.com/resources/
Environment: win10, browser: firefox
Step to reproduse:
Summary: The "People, Postgres, Data" resource on the Python Discord resources page has two identical links leading to the same Discord server (https://discord.gg/Ujw8m8v). However, the icons used for these links are inconsistent. The first link uses an external link icon, while the second link uses a Discord icon.
Link: https://www.pythondiscord.com/resources/
Environment: win10, browser: firefox
Step to reproduse:
Summary: The "Kivy" resource on the Python Discord resources page has two identical links leading to the same Discord server (https://discord.gg/djPtTRJ). However, the icons used for these links are inconsistent. The first link uses an external link icon, while the second link uses a Discord icon.
Link: https://www.pythondiscord.com/resources/
Environment: win10, browser: firefox
Step to reproduse:
The new paste service offers the ability to select specific line when someone sends a link to a paste service with a selected line. In such cases, you can replace the selected line with a code block like its already done for github etc.
Althrough i still did not find a way to select more than one line
In such cases, you can replace the selected line with a code block like its already done for github etc.
I'm not sure I follow what's exactly meant here.
Are you asking whether it's possible to highlight a specific line range like in Github ?
AFAIK, pinnwand allows to highlight a single line and not a range.
Are you asking whether it's possible to highlight a specific line range like in Github ?
Yes, i couldnt find a way to select more than one line
But still if only 1 line is possible it could send codeblock with only one line anyways.
Connected!
GitHub Actions run 5539363842 succeeded.
GitHub Actions run 5542135999 succeeded.
Summary: The main content section of the page contains an empty title.
URL: https://www.pythondiscord.com/pages/
Environment: win10, browser: firefox
Step to reproduse:
Expected Result: The tag should contain relevant and descriptive text that provides a main heading for the page.The tag should contain relevant and de...
GitHub Actions run 5545872358 succeeded.
aa01202 port reaction_check in a new messages util - shtlrs
Summary: The iframe element, which contains a YouTube video, in the Code Jams section of the Events page is wider than its parent div container. This causes the iframe to overflow, shifting it behind the Code Jams section.
URL: https://www.pythondiscord.com/events/
Step to reproduse:
Expected Result: The iframe should fit within...
This is more of an RFC regarding the approach than anything else. Continuing with it or using another solution will be determined later.
It is another step towards having one single reusable core component to our bots instead of duplicate definitions all across them.
Amongst others, LinePaginator is a class used by all of our bots, so bot-core should be its home.
The class has 2 main dependencies
GitHub Actions run 5550875742 succeeded.
GitHub Actions run 5550877855 succeeded.
GitHub Actions run 5550886355 succeeded.
GitHub Actions run 5552203616 was cancelled.
GitHub Actions run 5552213761 succeeded.
f271f46 Update code for new linter rules - ChrisLovering
Connected!
GitHub Actions run 5552460095 succeeded.
GitHub Actions run 5552438821 failed.
GitHub Actions run 5552476035 succeeded.
578204f import LinePaginator from bot-core - shtlrs
GitHub Actions run 5552848539 succeeded.
This works in conjunction with bot-core#189
It serves as an example of how the new client code consuming bot-core's LinePaginator would look like.
GitHub Actions run 5552869263 failed.
a490773 Bump to an alpha version for releasing to pypi - ChrisLovering
e5678fc Bump to an alpha version for releasing to pypi - ChrisLovering
af7a384 Mark bug fix as major to highlight it's release... - ChrisLovering
GitHub Actions run 5554210412 failed.
If this is using defaults, wouldn't it be better for the paginator to use those settings by default? Meaning, you wouldn't need to explicitly send it settings for it to work, only when you want to use something custom. This will save another import and function arg every time you want to you the paginator.
The entire problem lies within the trashcan. It's the thing that causes problems for contribs, since that emoji is only available in our server.
So if you don't pass those to the paginator when you're running bot, the paginator will crash since you can't use that emoji.
GitHub Actions run 5556178171 succeeded.
531fd39 Update doc generation to remove pydantic warnings - ChrisLovering
dabe64f fixup: Use args over attrs and add comment abou... - ChrisLovering
GitHub Actions run 5557449643 succeeded.
Connected!
e7726e0 Fix broken link to sololearn's Python course - jchristgit
GitHub Actions run 5562133190 succeeded.
9c1d9ef Fix broken image links for kivy - jchristgit
GitHub Actions run 5562147834 succeeded.
I'm sorry I can't test this, but i know you're the greatest of machines and thus, i put all my test in your work.
Same comment here, thanks.
cff304e Fix empty <h1> tag on page listing - jchristgit
GitHub Actions run 5562182730 succeeded.
GitHub Actions run 5562247489 succeeded.
a10b199 Fix broken link to sololearn's Python course (#... - jchristgit
GitHub Actions run 5562359759 was cancelled.
096665e Fix empty <h1> tag on page listing (#1033) - jchristgit
GitHub Actions run 5562361074 was cancelled.
coverage: 100.0%. remained the same when pulling https://github.com/python-discord/site/commit/1bf97cc4fca53c54c60195a987f7e4177be5fba4 on fix-double-link-panda3d into https://github.com/python-discord/site/commit/0d029fdcbb551abc6cf4e600fb8f50cafe17ae69 on main. ๐ช ๐ช ๐ช ๐ช
2227c8d Fix duplicated links in resources (#1034) - jchristgit
GitHub Actions run 5562364626 was cancelled.
GitHub Actions run 5562488908 succeeded.
pinnwand-deployment
GitHub Actions run 5562490490 succeeded.
Connected!
GitHub Actions run 5566243909 succeeded.
Summary: In the "Contributing" section of the Python Discord website, the column, which contains a link to the GitHub repository "Site", is shorter in height than the other two columns. This results in an inconsistent visual layout.
URL: https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/
Environment: windows 10, display resolution: 1024x768, browsers: Chrome, Firefox
Step to reproduse:
Summary: In the "Sub-Articles" section of the Contributing page, when the dropdown menu is expanded, some section names are cut off at the right edge of the page. This requires users to horizontally scroll the page to read them completely, which can lead to a poor user experience.
URL: https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/
Environment: windows 10, display resolution: 1920ั 1080, browsers: Chrome, Firefox
Step to reproduse:
I already made pull requests but I didn't realize it would close if I removed my fork from my repository.
GitHub Actions run 5566908377 succeeded.
I can't find the file where the styles for cart and all child classes are located in the browser says that the styles are from bulma but I don't see it at all.
GitHub Actions run 5569023159 succeeded.
GitHub Actions run 5569214703 succeeded.
pillow-opencv-for...
GitHub Actions run 5569599153 succeeded.
GitHub Actions run 5573536224 succeeded.
GitHub Actions run 5573667724 succeeded.
Looking through the bulma docs there doesn't seem to be a native way to do this.
This issue suggests doing similar to what you've done here.
I agree with this approach.
GitHub Actions run 5574772960 failed.
GitHub Actions run 5580971820 succeeded.
download-images-i...
Summary: The timeline entry titled "We're on the Teaching Python podcast!" on the Python Discord timeline page contains a broken link. The link, which is intended to direct users to a specific episode of the Teaching Python podcast, instead leads to a page that says "Site Not Found"
URL: https://www.pythondiscord.com/timeline/
Environment: windows 10, browsers: Chrome
Step to reproduse:
Connected!
Connected!
Connected!
Connected!
GitHub Actions run 5586272898 succeeded.
Connected!
GitHub Actions run 5587395095 succeeded.
Summary: The name "Python" is inconsistently capitalized in the descriptions of the tags "class", "mutable-default-args", "precedence", "relative-path", "repl", and "scope". In these tags, "Python" is written with a lowercase 'p' ("python"), which contradicts the standard convention of capitalizing the first letter of the language name. This inconsistency is not observed in the descriptions of other tags.
URL: https://www.pythondiscord.com/pages/tags/
Environment: windows 10, browsers: ...
GitHub Actions run 5590767198 succeeded.
GitHub Actions run 5590829922 succeeded.
fe41870 Move commit model into its own file - jchristgit
Let's stick to the standard scheme - otherwise we might as well just have a single models file.
GitHub Actions run 5590867587 succeeded.
64296e3 Fix link to teachingpython episode - jchristgit
Also removes a superfluous space. Closes #1043.
GitHub Actions run 5591061811 failed.
add-git-crypt-for...
GitHub Actions run 5591451209 failed.
add-git-crypt-for...
GitHub Actions run 5591462940 failed.
add-git-crypt-for...
GitHub Actions run 5591490835 failed.
add-git-crypt-for...
GitHub Actions run 5591495025 failed.
add-git-crypt-for...
Connected!
1b47538 Update cryptography to fix security advisory - jchristgit
GitHub Actions run 5591649070 succeeded.
Connected!
Connected!
GitHub Actions run 5591867880 failed.
add-git-crypt-for...
GitHub Actions run 5591885491 failed.
add-git-crypt-for...
GitHub Actions run 5591935362 failed.
add-git-crypt-for...
6b8c168 Remove sentry-env - ChrisLovering
The sentry dsn is now in forms-backend-env instead
GitHub Actions run 5592023252 succeeded.
GitHub Actions run 5592037290 failed.
add-git-crypt-for...
GitHub Actions run 5592030051 succeeded.
GitHub Actions run 5592057175 succeeded.
add-git-crypt-for...
GitHub Actions run 5592093472 succeeded.
add-git-crypt-for...
48ae34e Update cryptography to fix security advisory (#... - jchristgit
GitHub Actions run 5592147324 failed.
GitHub Actions run 5593189767 succeeded.
add-git-crypt-for...
GitHub Actions run 5593194767 succeeded.
add-git-crypt-for...
GitHub Actions run 5595552423 succeeded.
GitHub Actions run 5596465775 failed.
GitHub Actions run 5597137061 succeeded.
add-git-crypt-for...
GitHub Actions run 5597821032 succeeded.
add-git-crypt-for...
GitHub Actions run 5597973555 succeeded.
add-git-crypt-for...
GitHub Actions run 5598096011 succeeded.
add-git-crypt-for...
GitHub Actions run 5598246936 failed.
add-git-crypt-for...
GitHub Actions run 5598252932 failed.
add-git-crypt-for...
GitHub Actions run 5598265041 failed.
add-git-crypt-for...
GitHub Actions run 5598298135 failed.
add-git-crypt-for...
GitHub Actions run 5598308687 failed.
add-git-crypt-for...
GitHub Actions run 5598317117 succeeded.
add-git-crypt-for...
GitHub Actions run 5599797657 succeeded.
download-images-i...
GitHub Actions run 5599806477 succeeded.
download-images-i...
GitHub Actions run 5599841011 succeeded.
download-images-i...
Looks & works great.
I guess that for the upload error thing, we can just handle that better client-side if it ever annoys us.
name (:obj:`str`): The name of the file to upload. Defaults to ``""``
I'm wondering here whether we should block the entire upload upon the encounter of one invalid file.
GitHub Actions run 5599860256 succeeded.
download-images-i...
The pyproject file will be updated when the new version is released.
GitHub Actions run 5599897458 failed.
GitHub Actions run 5599926509 failed.
GitHub Actions run 5600099597 succeeded.
download-images-i...
GitHub Actions run 5600108258 succeeded.
add-git-crypt-for...
GitHub Actions run 5600113450 succeeded.
download-images-i...
GitHub Actions run 5600141219 succeeded.
add-git-crypt-for...
GitHub Actions run 5603034260 succeeded.
add-git-crypt-for...
c0779c8 Bump sentry-sdk from 1.26.0 to 1.28.0 (#2676) - dependabot[bot]
926b6b7 Additional potential symbols in valid invites (... - mbaruh
0994d88 Use the new pydis_core send_to_paste_service fu... - ChrisLovering
01cbce4 Remove unneeded paste service constant - ChrisLovering
d961f5e Mock _lexers_supported_by_pastebin in test to e... - ChrisLovering
GitHub Actions run 5605208319 failed.
GitHub Actions run 5605215678 failed.
GitHub Actions run 5605336739 failed.
GitHub Actions run 5607237648 succeeded.
I think doing this would complicate things, as we'd still need to indicate to the user that some of the files failed, and then the client would need to figure out what to do with that info and how to show it to the user.
d087bec fixup: correct docstring wording in paste_service - ChrisLovering
b0ec506 Support sending multiple files to paste service... - ChrisLovering
e76052f Don't swallow exceptions in post_build - ChrisLovering
d48cb8b Add type hints to paste_service pydantic models - ChrisLovering
d087bec fixup: correct docstring wording in paste_service - ChrisLovering
b52f1ab Merge pull request #188 from python-discord/pas... - ChrisLovering
GitHub Actions run 5609556161 succeeded.
GitHub Actions run 5609938388 succeeded.
GitHub Actions run 5611047346 failed.
pyyaml was only used back when we loaded constants from the yaml file, wasn't it ?
I don't see any usage of it in bot, so I'll send a PR to delete it from the dependencies.
We have a couple of unused dependencies that dependabot is trying to bump.
This is useless & a waste of time and effort.
I've searched for the import names of the removed packages.
Then I found deptry, which I later used to confirm my findings.
Closed in favor of #2685
GitHub Actions run 5611486627 succeeded.
We use lxml as the parser for parsing xml files using BeautifulSoup in two places https://github.com/search?q=repo%3Apython-discord%2Fbot lxml&type=code
Yup, this is good to remove now that we don't use yml for constants,
This is needed by coloredlogs for windows coloured logging. https://coloredlogs.readthedocs.io/en/latest/readme.html?highlight=colorama#optional-dependencies
It's weird that it's an explicit one & not a transitive dependency
Ok, I saw that one. I just didn't think that it would be an extension that required a package.
Yea I think we've got it this way around as we only want it installed on windows hosts, hence the markers, rather than marking it as an extra on colored logs so it installs for everyone
Yea, it requires you to choose the parser and install separately. https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser
Fixed in the forcepush. 9743c5b
GitHub Actions run 5611728698 succeeded.
Understood.
I've restored them both.
Sadly python-frontmatter has PyYaml as a dependency, so we don't tactually drop PyYaml entirely but this diff is still worth it since we don't depend on it directly.
GitHub Actions run 5611960734 succeeded.
GitHub Actions run 5613226416 succeeded.
GitHub Actions run 5613375264 succeeded.
GitHub Actions run 5613379989 succeeded.
GitHub Actions run 5613706761 succeeded.
Connected!
If that's the case, it might be better to just use https://emojipedia.org/wastebasket/ instead, to avoid all those problems.
You mean use it in our server as well ?
Tbh, I didn't consider that as an option, as I thought it was put in place on purpose.
If we were to use that, then we wouldn't be needing the pydnatinc model, import & extra parameter indeed.
Yea, not sure why we decided on the custom emoji instead of this unicode one. We also have the option to use https://emojipedia.org/stop-sign/ too. Using a unicode emoji would remove a lot of hassle.
Actually, now that I think of it, not only is it going to remove that hassle. But also, when it comes to making the ErrorHandler Cog part of bot-core, it will remove alot of not so pretty instantiation that would've been necessary to load it.
I'm all in for removing it, a waste basket or a stop sign will do the same thing. We might want to stick with the waste basket though as it's the one that resembles what we have already the most. The stop sign implies that you can't interact with th...
GitHub Actions run 5622406827 succeeded.
cf3eb92 expose pagination utils from pydis_core names... - shtlrs
76505e4 import LinePaginator directly from pydis_core - shtlrs
GitHub Actions run 5624277271 failed.
GitHub Actions run 5624730695 failed.
Hi @Xithrius, are you still interested in this? We can also do it in tandem if you like.
87f0b15 Clean up pragma intended for Python 3.10 removal - jchristgit
GitHub Actions run 5625473047 succeeded.
Local testing with httrack for broken links results in these errors being printed to the console:
Traceback (most recent call last):
File "/home/jc/.cache/pypoetry/virtualenvs/site-_f36zgtP-py3.11/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/jc/.cache/pypoetry/virtualenvs/site-_f36zgtP-py3.11/lib/python3.11/site-packages/django/core/handlers/base.py", l...
627c58e Soft fail for upstream error on fetching tag co... - jchristgit
GitHub Actions run 5625638864 succeeded.
GitHub Actions run 5625868676 succeeded.
Sentry Issue: SIR-LANCEBOT-AD
AttributeError: '_Client' object has no attribute 'github_bot_repo'
File "bot/exts/core/extensions.py", line 156, in list_command
url=Client.github_bot_repo,
Unhandled command error: '_Client' object has no attribute 'github_bot_repo'
GitHub Actions run 5629878888 succeeded.
Connected!
73e684d Properly capitalize "Python" in tags - jchristgit
Closes python-discord/site#1044.
I'm in awe because of the amazing work !
GitHub Actions run 5630889391 succeeded.
4f97c3f Properly capitalize "Python" in tags (#2690) - jchristgit
Connected!
GitHub Actions run 5631855738 succeeded.
e750a1e Re-enable the reddit autoposter - ChrisLovering
GitHub Actions run 5638439100 succeeded.
I'm curious, why wasn't r/python accessible anymore at some point ?
c4c83f8 Re-enable the reddit autoposter (#1332) - ChrisLovering
I'm curious, why wasn't r/python accessible anymore at some point ?
The Reddit protests
https://www.reddit.com/r/Python/comments/146zye6/rpython_will_black_out_on_june_12_at_0000_utc/
Connected!
Connected!
bf24674 Don't use classvars for constants in reddit cog - ChrisLovering
7b4afbd Don't use a class for static methods in quiz cog - ChrisLovering
9933c63 Don't use mutable types in constants.py - ChrisLovering
31179db Typehint all BaseSettings attrs - ChrisLovering
GitHub Actions run 5638570593 succeeded.
GitHub Actions run 5638578793 succeeded.
GitHub Actions run 5638606655 succeeded.
GitHub Actions run 5641029119 failed.
GitHub Actions run 5642575242 succeeded.
13ad834 Fix link to teachingpython episode (#1048) - jchristgit
GitHub Actions run 5642613396 was cancelled.
efd6c47 Bump rapidfuzz from 3.1.1 to 3.1.2 (#2689) - dependabot[bot]
Connected!
GitHub Actions run 5642738496 failed.
GitHub Actions run 5642741223 succeeded.
@dependabot ignore this major version
Bumping to 2.X will require more changes than dependabot can do.
Connected!
This Pr does the following:
GitHub Actions run 5643995404 succeeded.
GitHub Actions run 5644818084 succeeded.
Hi everyone, is there a way to help out with getting this pull request merged?
GitHub Actions run 5647697029 succeeded.
It's probably a rare occurrence but it happened today (https://discord.com/channels/267624335836053506/1133167276401643630) where a user who had an open help thread got banned in a different channel. This left the people helping confused for a bit as to where the user went. It would be a nice feature if the bot would automatically close any open help thread (with a message indicating user has 'decided to pursue opportunities at other servers' or similar). That way the people helping don't hav...
That's a nice idea.
However, I feel that, like you said, it's quite the rare case to happen. (that they happen to have an open help thread).
The thing is that the threads are not necessarily cached, so we'll very probably end up with cache misses which Increases the number of API calls we'd need to make to fetch that thread for that owner.
If we consider having a lot of bans throughout the day, this will get us rate limited when we don't necessarily need to.
Any check for channels would only need to be done if banned user had Help Cooldown role. So we don't add overhead to all bans, only when we actually know user had the channel open.
We're thinking about removing the help cooldown role in the near future, so there is the potential that users could have multiple help posts open.
Open threads should be in the bot's cache, so something like this should do the trick.
help_forum = guild.get_channel(constants.Channels.python_help)
for post in help_forum.threads:
if post.owner_id == banned_user.id:
await help_channels._channel.help_post_closed(post)
Connected!
GitHub Actions run 5655520117 succeeded.
LGTM.
Now that bot-core can support multiple files, we should update the snekbox cog, in another PR, so that it uploads the text file outputs alongside all of the other outputs, rather than creating many pastefiles
e8f15fa Bump more-itertools from 9.1.0 to 10.0.0 (#2694) - dependabot[bot]
Connected!
GitHub Actions run 5655586149 succeeded.
LGTM, 1 nit pick but don't care if it is done or not
lambda ๐ข
@lock_arg("phishing", "interaction", attrgetter("message.id"))
Needs from operator import attrgetter
bd15932 Bump emoji from 2.6.0 to 2.7.0 (#2693) - dependabot[bot]
Connected!
Open threads should be in the bot's cache, so something like this should do the trick.
Ah yes that's true, even on bot restart, right Chris ?
In that case, that should be fine to have.
ce9c9be Add BotBase.wait_until_bot_started which can be... - ChrisLovering
โฆs until all extensions are loaded.
GitHub Actions run 5655866498 succeeded.
This current throws TypeError: object NoneType can't be used in 'await' expression
This .set method is not coro, so you shouldn't await it since calling it returns None.
9e92fa5 fixup: Don't await synchronous functions - ChrisLovering
This currently throws
TypeError: object NoneType can't be used in 'await' expressionThe
.setmethod is not a coro, so you shouldn't await it since calling it returns None.
Hah yea, my bad. Fixed in a fixup
We should also include that the post was closed due to the OP being banned in the close message
so that we don't get people saying the bot is bugged since it closed a post early.
b327ac0 fixup: Don't wait until app commands are synced... - ChrisLovering
550e9be fixup: Only hold process_commands until extensi... - ChrisLovering
Wouldn't it be better to put the condition check and the awaiting in wait_until_extensions_loaded like you had before, and reuse it in the 2 callsites ?
The docstring isn't quite true here as that's not the purpose of the async method.
If you're referring to _sync_app_commands as the other call site, I don't think that's relevant, since that function is only called after creating the task, so there's no point in check the task exists.
What do you mean, this is exactly what it's doing? It waits for the extension task to be complete (all extensions are laoded) and then processes commands.
Processing commands is what it's intended to do, so that's what should go in the summary line.
The checks inside it are "business rules" / custom behavior we add to it, which is an implementation detail.
So you can make it a multineline docstring and in the description, you say that it runs some validation, e.g. waits until extensions are loaded.
2da733d fixup: Update BotBase.process_commands docstrin... - ChrisLovering
GitHub Actions run 5657579258 succeeded.
b8636d2 Bump pydantic to v2 and install pydantic-settings - ChrisLovering
4977141 breaking: Use new BaseSeetings class var to set... - ChrisLovering
79e9258 breaking: Ensure all pydantic-settings constant... - ChrisLovering
46bf3cc breaking: use new model_validator over deprecat... - ChrisLovering
46b2ed4 breaking: replace deprecated parse_obj_as with ... - ChrisLovering
All commits starting with breaking: are breaking changes from Pydantic and will be squashed into 1 commit before merging.
Other commits are kaizen style commits that I noticed while working on this PR.
This is in a draft state as I've ran into this issue which I don't have time to deal with right now.
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for . Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implemen...
GitHub Actions run 5658357290 failed.
GitHub Actions run 5659647492 succeeded.
GitHub Actions run 5660592665 failed.
GitHub Actions run 5662824739 succeeded.
492e52b Create separate message for warnings without du... - swfarnsworth
Create separate message for warnings without duration, expiry, or "to appeal this infraction ..."
Since warnings involve no change in permissions, the DM that users receive said "Duration: Permanent \ Expires: Never", which some interpreted to mean that we hold a permanent grudge. This is not intended, so this commit creates a separate template that omits those fields. Some users also thought they could appeal a warning to have it removed from the record, but this is not the case, so this...
GitHub Actions run 5663246774 succeeded.
GitHub Actions run 5665202326 succeeded.
GitHub Actions run 5667453522 failed.
@dependabot ignore this dependency
Being done in https://github.com/python-discord/sir-lancebot/pull/1321
GitHub Actions run 5668602909 failed.
Required investigation
I have not investigated if @field_validator("", mode="before") works the same as @validator("", pre=True) as far as the "*" is concerned to run the validator on all fields. relevant commit: 46bf3ccAccording to their docs, it looks like a wildcard will do the job.  - dependabot[bot]
GitHub Actions run 5717719055 succeeded.
GitHub Actions run 5717734075 was cancelled.
GitHub Actions run 5717734698 succeeded.
8d41c1d Added the option for registry_plugins_only (#3247) - sebkuip
1f3bd0e Update changelog and updated all the links to n... - Taaku18
960a36e Lints: update to setup Python v4 (#3243) - SpencerIsGiddy
e919304 Remove python 3.8 and windows/macos lint check.... - Taaku18
f2a434b Fix replies in dms not being sent (#3239) - RealCyGuy
8d41c1d Added the option for registry_plugins_only (#3247) - sebkuip
1f3bd0e Update changelog and updated all the links to n... - Taaku18
960a36e Lints: update to setup Python v4 (#3243) - SpencerIsGiddy
e919304 Remove python 3.8 and windows/macos lint check.... - Taaku18
f2a434b Fix replies in dms not being sent (#3239) - RealCyGuy
ff741af Move plugins to use cog_load for startup - ChrisLovering
GitHub Actions run 5727081303 succeeded.
61aa7b8 Bump ruff to 0.0.281 - ChrisLovering
6501521 Bump sentry-sdk from 1.28.0 to 1.29.0 (#1337) - dependabot[bot]
GitHub Actions run 5727242863 succeeded.
Connected!
GitHub Actions run 5727272249 was cancelled.
Connected!
Connected!
Connected!
GitHub Actions run 5728640914 succeeded.
GitHub Actions run 5728625679 was cancelled.
GitHub Actions run 5729198119 succeeded.
80959ab Fix a typo in bot.md (#1058) - Nipa-Code
27e4732 Bump taskipy from 1.11.0 to 1.12.0 (#1057) - dependabot[bot]
3675022 Bump ruff from 0.0.280 to 0.0.281 - dependabot[bot]
8a1f07a Merge pull request #1060 from python-discord/de... - jchristgit
1ec8b68 Bump sentry-sdk from 1.28.1 to 1.29.2 - dependabot[bot]
80959ab Fix a typo in bot.md (#1058) - Nipa-Code
27e4732 Bump taskipy from 1.11.0 to 1.12.0 (#1057) - dependabot[bot]
3675022 Bump ruff from 0.0.280 to 0.0.281 - dependabot[bot]
8a1f07a Merge pull request #1060 from python-discord/de... - jchristgit
1ec8b68 Bump sentry-sdk from 1.28.1 to 1.29.2 - dependabot[bot]
45855fe Capitalize Python outside of tags (#1046) - jchristgit
bbb4f57 Bump ruff from 0.0.281 to 0.0.282 (#1062) - dependabot[bot]
GitHub Actions run 5736898187 was cancelled.
GitHub Actions run 5736914502 succeeded.
GitHub Actions run 5737629087 succeeded.
Connected!
Connected!
GitHub Actions run 5737918347 succeeded.
Connected!
Connected!
GitHub Actions run 5738012660 succeeded.
Connected!
GitHub Actions run 5738053682 succeeded.
GitHub Actions run 5739075581 succeeded.
Connected!
Connected!
GitHub Actions run 5749347281 succeeded.
Connected!
GitHub Actions run 5750491296 succeeded.
Connected!
GitHub Actions run 5762019148 succeeded.
GitHub Actions run 5762504659 succeeded.
Connected!
d0b792b Soft fail for upstream error on fetching tag co... - jchristgit
80959ab Fix a typo in bot.md (#1058) - Nipa-Code
27e4732 Bump taskipy from 1.11.0 to 1.12.0 (#1057) - dependabot[bot]
3675022 Bump ruff from 0.0.280 to 0.0.281 - dependabot[bot]
8a1f07a Merge pull request #1060 from python-discord/de... - jchristgit
efd6c47 Bump rapidfuzz from 3.1.1 to 3.1.2 (#2689) - dependabot[bot]
d66c6de Bump deepdiff from 6.3.0 to 6.3.1 (#2673) - dependabot[bot]
a171406 Bump ruff from 0.0.277 to 0.0.280 - dependabot[bot]
3007011 Ignore RUF015 linting rule - ChrisLovering
9aa28c8 Remove unused noqa directive - ChrisLovering
GitHub Actions run 5768879592 succeeded.
Connected!
GitHub Actions run 5768877257 failed.
the new discord handling for URLs doesn't embed links with titles

GitHub Actions run 5771006792 succeeded.
GitHub Actions run 5774152940 succeeded.
Connected!
GitHub Actions run 5768877257 succeeded.
dc4b073 Bump more-itertools from 10.0.0 to 10.1.0 (#2707) - dependabot[bot]
GitHub Actions run 5777743025 succeeded.
Connected!
GitHub Actions run 5777742249 failed.
GitHub Actions run 5781463542 succeeded.
Add a .rfc command with an RFC ID parameter that would respond with some information regarding the relevant RFC.
This command would be useful in a situation where a relevant RFC would help contribute to the current conversation.
A possible implementation of this would get the plaintext representation of the RFC, from https://www.rfc-editor.org/rfc/rfc{id}.txt, and some basic information about the RFC, such as the catego...
After several months of procrastination, here is an unfinished draft of my updates to the Timeline. For staff members, there is a Notion doc called "Updating the Timeline (February 2023)" and an internal project channel which may be helpful while you review.
This is up to date up to March 2023. I'd imagine there have been some more timeline worthy events since then, I will need to write and include them in this PR. I will do that very soonโข.
In...
GitHub Actions run 5792059942 succeeded.
This may be sacrilege, but I wouldn't be opposed if the events team isn't timeline worthy. (Kat don't kill me. I'll send you :cookie:s)
I remember looking at the public stats, but I don't think I was able to discern the specific day we reached this milestone. Some help would be appreciated :)
Once again, not entirely sure about this addition. WDYT?
Hmm, I don't think this is worthy to be included on here.
I think we're good to just put Jan 1st
GitHub Actions run 5794733146 succeeded.
Update your poetry version @jchristgit !
19th according to grafana
One minor comment, other than that all looks good.
It would probably be unlikely in practice, but if the invite is not valid this will raise a BadArgument error which isn't handled. We could probably add a global error handler for interaction callbacks at some point, though i'm not sure exactly how that would work.
Probably fine to just catch the BadArgument here for now and tell the user it failed.
my poetry version works. my poetry version has worked for the past months. dependabot's poetry version needs to be updated, not mine. my poetry version works.
GitHub Actions run 5796144301 succeeded.
GitHub Actions run 5805128299 succeeded.
Looks like it was renamed, changing https://github.com/python-discord/sir-lancebot/blob/15a96502cbaf34183caf207953cf287f59dd1d8f/bot/exts/core/extensions.py#L156 to Client.github_repo should fix it.
The constant is defined here: https://github.com/python-discord/sir-lancebot/blob/15a96502cbaf34183caf207953cf287f59dd1d8f/bot/constants.py#L94
This sounds alright to me if you'd like to work on this.
I think the embed could be improved a bit from the example you posted, generally RFCs have an "abstract" section so it would be good if we could extract that section to include in the embed rather than just the start of the document which might not be that useful.
How would you plan on getting the metadata (e.g. authors, publish date, title)? Would you just parse them from the document? If so, is the format consistent enough for t...
Why did CI fail? I don't know. My sister does not know. My brother does not know. My cat does not know. Not even my hamster knows, because I have overfed it and it exploded.
Actually, I know exactly. There is too much entropy. We have 4 + 2 + 5 + 1 = 12 CI checks and I have no idea what half of them are doing. What is "sentry-release" and why is it in my pull requests? I just want a big green check mark that says "Tests passed, 100% coverage". For deploy preview, I just want a goddamn Make...
@MedAliMarz Hi, did you make any progress on this?
GitHub Actions run 5811465597 succeeded.
d0b792b Soft fail for upstream error on fetching tag co... - jchristgit
f4b4528 Clean up pragma intended for Python 3.10 removal - jchristgit
80959ab Fix a typo in bot.md (#1058) - Nipa-Code
27e4732 Bump taskipy from 1.11.0 to 1.12.0 (#1057) - dependabot[bot]
3675022 Bump ruff from 0.0.280 to 0.0.281 - dependabot[bot]
GitHub Actions run 5812038587 succeeded.
GitHub Actions run 5812237585 failed.
Connected!
Adds information for the Code Jam 2023.
Contact Kat in the Code Jam Planning channel to confirm in the details are correct.
subreddits: tuple[str, ...] = ("r/Python",)
GitHub Actions run 5812329385 succeeded.
Content looks great, just some boring formatting suggestions, sorry.
Maybe "at least one" to be more clear (although this is already made clear on the frameworks page)
In particular, if you'd like to use a graph/plot creating library similar to Matplotlib or a machine learning framework/model, double check with us before deciding to use it.
In the docs they seem to capitalise like this in sentences.
<p>
Pillow is a fork of the Python Imaging Library (PIL). The Python Imaging Library adds image processing capabilities to your Python interpreter.
This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.
also fwiw the empty lines don't cause line breaks in the resultant page. I assume a <br> would do that if wanted, thoug...
SciPy is a collection of mathematical algorithms and convenience functions built on NumPy.
a168ff0 Clarify a framework rule and formatting - janine9vn
Yeah, I was lazy and ripped it straight from Pillow's github, formatting and all. I wasn't intending there to be linebreaks
GitHub Actions run 5812887284 succeeded.
Just noticed, the month in the list on https://www.pythondiscord.com/events/ can be changed from TBD now.
Otherwise all looks good.
GitHub Actions run 5813871564 succeeded.
a084550 fixup: Don't use mutable types in constants.py - ChrisLovering
GitHub Actions run 5813921682 succeeded.
I think the embed could be improved a bit from the example you posted, generally RFCs have an "abstract" section so it would be good if we could extract that section to include in the embed rather than just the start of the document which might not be that useful.
Some RFCs, such as RFC-1, do not have an abstract section. A possible fix to this would be to check for the existence of the abstract section and send the first few lines of the RFC if it isn't found.
How would you plan on...
It seems like there's an API for RFCs at https://datatracker.ietf.org/api/, which could make this easier
https://datatracker.ietf.org/doc/rfc{id}/doc.json returns JSON data of the RFC.
GitHub Actions run 5817448186 succeeded.
Connected!
#1342
Closes #1342
Added a .rfc utility command by using the JSON interface for RFCs at https://datatracker.ietf.org/doc/rfc{id}/doc.json, where {id} is a placeholder for the RFC ID.
I didn't test this yet, I wast just passing by :P
It looks good overall, thanks.
It would be better to cache the data of an RFC into a dict, so that people who make the same request again would hit the cache instead of sending out the request.
You could make a simple pydantic model if you'd like to give your needed data a better structure, but it's not necessary.
You could factor this out into its own method (that remains private to the cog) which does the formatting of the data.
async def rfc(self, ctx: commands.Context, rfc_id: int) -> None:
This will keep it more explicit, instead of guessing what a query is, or reading down to understand that a query is the id of an rfc
The API offers to search by document name, rfc id, etc, but we're only allowing search by id (maybe it could be a good idea to search by name ?), that's why I made the suggestion.
"""Retrieves RFCs by their ID."""
It would be better to cache the data of an RFC into a dict, so that people who make the same request again would hit the cache instead of sending out the request.
You could make a simple pydantic model if you'd like to give your needed data a better structure, but it's not necessary.
Should the cache just store everything until the bot restarts, or have a mechanism of "flushing" the queue?
I'd say just store in memory until the bot restarts as I don't think this command will have a high throughput.
It's better that we only store the data we need instead of the entire response's body, which is why I suggested grouping them in a pydantic model.
Adding some logs would help us collect data just in case.
GitHub Actions run 5818851249 succeeded.
Adding some logs would help us collect data just in case.
Should the logs be sent every time a new item is added to the cache? or when it hits a certain point?
I'd say just when fetching an RFC.
So something like
log.info(''Fetching RFC %s'', rfc_id)
This will allow us to see how much it is used. I don't think it'd matter to find out which rfcs are queried the most, and even if it would, a simple log parsing would do.
GitHub Actions run 5820215997 succeeded.
Connected!
60b2306 add workflow to block fixup commits - shtlrs
This is only a test for the moment, but the idea is to block commits that have the fixup prefix, and make sure the authors squash those commits before merging.
GitHub Actions run 5820314983 failed.
GitHub Actions run 5820347121 succeeded.
GitHub Actions run 5820374179 succeeded.
GitHub Actions run 5820441801 succeeded.
GitHub Actions run 5820485206 succeeded.
GitHub Actions run 5820513970 succeeded.
GitHub Actions run 5820540934 succeeded.
GitHub Actions run 5820561282 failed.
GitHub Actions run 5820571626 succeeded.
GitHub Actions run 5820600548 was cancelled.
GitHub Actions run 5820605232 was cancelled.
GitHub Actions run 5820610593 succeeded.
This is because we will be merging your submission into our <code>summer-code-jam-2023</code> repo at the end of the jam,
I think ?
Looks greyt, thanks !
GitHub Actions run 5823951838 succeeded.
Putting this up for grabs again.
Also marking as a good first issue, not completely trivial, but if anyone knows some discord.py they could probably give this a go. The edit function is here: https://github.com/python-discord/bot/blob/113b4e33c04dfbc9e827046c3cf4992f9ef4bed5/bot/exts/utils/reminders.py#L453
GitHub Actions run 5827549877 succeeded.
I would like to implement this.
@n0Oo0Oo0b Sure thing, it's yours !
Sorry for the delay here. If discord.py has documentation on the two topics but not their combination then I feel it would be better to contribute it upstream?
1f2a31f add workflow that blocks fixup commits - shtlrs
We want to block all commits that are prefixed with fixup as these are intended to be squashed, and authors can sometimes to do so.
The following wokflow will be a reusable one that all our other repos can call.
117a23b use external workflow to block fixup commits - shtlrs
GitHub Actions run 5831335279 was cancelled.
Looks good to me! Let's get this merged!
d819659 fixup: useless whitespace removal - shtlrs
GitHub Actions run 5831400741 failed.
Latest changes look good as well!
83db106 fixup: yet another useless whitespace removal - shtlrs
GitHub Actions run 5831526069 failed.
The workflow that blocks the fixup commits has been added here. (And needs a review :D)
https://github.com/python-discord/.github/pull/19
Closing this.
Thanks @jchristgit For the quick review
ref: ${{ github.event.pull_request.head.ref }} # To ensure we have an attached HEAD
fetch-depth: ${{ github.event.pull_request.commits }} + 1 # Ensure the fork point is checked out
ref: ${{ github.event.pull_request.head.ref }} # To ensure we have an attached head
This one is very old, and hasn't gotten any attention.
I'll close it in favor of opening up a new one that updates to pydis_core v10.x
Great work.
Would you like to do the same thing as 3a279b3d3faa679684a5b1bb5abda925abf16c38 for Colours and Emojis, I don't think these are things that anyone will ever configure, i don't even see the use of configuring them. (Might as well look into other classes that we ourselves do not quite setup)
Connected!
GitHub Actions run 5833783110 succeeded.
Great work.
Would you like to do the same thing as 3a279b3 for
ColoursandEmojis, I don't think these are things that anyone will ever configure, i don't even see the use of configuring them. (Might as well look into other classes that we ourselves do not quite setup)
I didn't touch colours as it has the validator, but that just seems to convert hexstrings into ints, so that might be some...
GitHub Actions run 5833981115 succeeded.
b156a95 Bump pydantic to v2 and install pydantic-settings - ChrisLovering
38ad2c4 Use new Pydantic v2 logic for constant loading - ChrisLovering
292fba7 Replace deprecated functions with new pydantic ... - ChrisLovering
505c377 Use a custom type coercion function as pydantic... - ChrisLovering
97fa616 Don't use a BaseSettings instance for constants... - ChrisLovering
GitHub Actions run 5833993831 succeeded.
GitHub Actions run 5834003236 was cancelled.
GitHub Actions run 5834013206 succeeded.
Connected!
GitHub Actions run 5834151829 succeeded.
5ffc84b Add tearDown feature to unittests - janine9vn
Follows in the footsteps of setUp and adds tearDown
GitHub Actions run 5837859564 succeeded.
GitHub Actions run 5837893915 failed.
download-images-i...
GitHub Actions run 5837897137 succeeded.
download-images-i...
GitHub Actions run 5837966440 succeeded.
download-images-i...
GitHub Actions run 5837978064 succeeded.
download-images-i...
Related message in #community-feedback: #community-meta message
GitHub Actions run 5839226222 succeeded.
bab243c use the organisation's fixup commit blocker wor... - shtlrs
This uses the organisation's fixup commit blocker workflow.
The purpose is to make sure all commits prefixed with fixup need to be squashed before merging.
GitHub Actions run 5840242616 was cancelled.