6db413d Suppress ResponseCodeErrors when fetching alts ... - jb3
#dev-log
1 messages ยท Page 25 of 1
[python-discord/bot] New branch created: jb3/bugfix/user-alts-response-code-error
Restores previous behaviour that allows the !user command to look up users who
are not in the guild.
When the alts feature was implemented we added a new API call to
/bot/users/{user_id}, which was fine, but it meant that if that 404'd and a
ResponseCodeError was raised then the bot would start returning erroneous
responses that implied a user does not exist, when they did exist, they were
just not in our site database.
GitHub Actions run 9922592903 succeeded.
GitHub Actions run 9922646810 succeeded.
GitHub Actions run 9922663375 succeeded.
GitHub Actions run 9922663647 succeeded.
GitHub Actions run 9922662326 succeeded.
GitHub Actions run 9922664675 succeeded.
GitHub Actions run 9922675343 was cancelled.
GitHub Actions run 9922674975 succeeded.
GitHub Actions run 9922674740 succeeded.
GitHub Actions run 9922685866 succeeded.
GitHub Actions run 9922692942 succeeded.
GitHub Actions run 9922694888 succeeded.
GitHub Actions run 9922695934 succeeded.
GitHub Actions run 9922695688 succeeded.
GitHub Actions run 9922696255 succeeded.
GitHub Actions run 9922697160 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #292 Update docker/login-action action to v3
GitHub Actions run 9922699297 succeeded.
GitHub Actions run 9922699555 succeeded.
GitHub Actions run 9922698959 succeeded.
GitHub Actions run 9922698685 succeeded.
[python-discord/forms-backend] branch deleted: renovate/motor-3.x
GitHub Actions run 9922717700 succeeded.
[python-discord/forms-backend] branch deleted: renovate/azure-k8s-deploy-5.x
GitHub Actions run 9922724199 succeeded.
GitHub Actions run 9922724466 succeeded.
GitHub Actions run 9922724621 succeeded.
GitHub Actions run 9922724821 succeeded.
GitHub Actions run 9922726580 succeeded.
GitHub Actions run 9922725528 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #292 Update docker/login-action action to v3
GitHub Actions run 9922726840 succeeded.
GitHub Actions run 9922727009 succeeded.
GitHub Actions run 9922726324 failed.
GitHub Actions run 9922733839 succeeded.
GitHub Actions run 9922733717 succeeded.
GitHub Actions run 9922734048 succeeded.
GitHub Actions run 9922734280 succeeded.
GitHub Actions run 9922734641 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #292 Update docker/login-action action to v3
GitHub Actions run 9922734941 succeeded.
GitHub Actions run 9922735228 succeeded.
GitHub Actions run 9922735636 failed.
[python-discord/forms-backend] branch deleted: renovate/major-github-artifact-actions
GitHub Actions run 9922741967 succeeded.
GitHub Actions run 9922742234 succeeded.
GitHub Actions run 9922742770 succeeded.
GitHub Actions run 9922743555 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #292 Update docker/login-action action to v3
GitHub Actions run 9922743943 succeeded.
GitHub Actions run 9922744220 failed.
[python-discord/forms-backend] branch deleted: renovate/sentry-sdk-2.x-lockfile
[python-discord/forms-backend] branch deleted: renovate/azure-k8s-set-context-4.x
GitHub Actions run 9922753546 failed.
GitHub Actions run 9922758238 failed.
This works, although it means the line won't be added to the embed, whereas adding a try-except inside the function would allow for something to still be displayed
[python-discord/forms-backend] branch deleted: renovate/docker-login-action-3.x
[python-discord/forms-backend] branch deleted: renovate/docker-setup-buildx-action-3.x
GitHub Actions run 9922807284 failed.
GitHub Actions run 9922918395 succeeded.
[bot] Branch jb3/bugfix/user-alts-response-code-error was force-pushed to `2b3cf22`
GitHub Actions run 9923063685 succeeded.
Connected!
GitHub Actions run 9923925482 succeeded.
I have a single comment. I'm okay with not actioning it, and I can approve the PR if you decide not to address it.
Can we consider handling this in self.user_alt_account?
Or, we could document in self.user_alt_account that a ResponseCodeError will be raised if the user is not found in the database (have I been using too much Java?) .
@vivekashok1221
discord.DeletedReferencedMessage don't have any available attribute for author, I'm not sure how to get the author in such a case
docs : discord.DeletedReferencedMessage
Ah my bad! we can directly pass author as a variable!
In that case I guess you could put the message ID. Mods can use this message ID to find the content and author of the deleted referenced message.
GitHub Actions run 9928556431 was cancelled.
GitHub Actions run 9928559520 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #241 chore(deps): update dependency ruff to v0.5.2
GitHub Actions run 9929322725 failed.
GitHub Actions run 9930735039 succeeded.
Connected!
GitHub Actions run 9930739921 succeeded.
GitHub Actions run 9930756823 succeeded.
GitHub Actions run 9930759872 succeeded.
[bot] Branch jb3/bugfix/user-alts-response-code-error was force-pushed to `55533d4`
Changed to this way in latest force push!
GitHub Actions run 9930913986 succeeded.
[bot] Branch jb3/bugfix/user-alts-response-code-error was force-pushed to `56cbae1`
[bot] Branch jb3/bugfix/user-alts-response-code-error was force-pushed to `10df677`
GitHub Actions run 9930921323 was cancelled.
GitHub Actions run 9930922552 succeeded.
Connected!
GitHub Actions run 9930943497 succeeded.
Hi, i woud like to work on this
- Closes GH-2451
The code might not be that clean, also i think that the annotations were wrong before, now they are surely wrong, do you care abou them?
Also, since this is my first contribution to this repository, let me know if i missed anything out.
- [x] I tested the code changes locally
- [x] I documented new functions
GitHub Actions run 9934062326 failed.
GitHub Actions run 9937510307 succeeded.
GitHub Actions run 9937517695 succeeded.
GitHub Actions run 9937522231 succeeded.
GitHub Actions run 9938139720 succeeded.
GitHub Actions run 9939192468 succeeded.
GitHub Actions run 9939199862 succeeded.
GitHub Actions run 9939207884 succeeded.
f9b1ff2 Update permissions given during &cj create - janine9vn
[python-discord/sir-robin] New branch created: cj11_permissions_updates
This is based off of feedback from last year, to ensure that channels and categories created have the appropriate permissions.
Prevents requiring admins to int e the necessary permissions.
GitHub Actions run 9942651943 succeeded.
I have identified numerous accessibility issues throughout the website. I believe addressing these issues could greatly improve the user experience of people with certain disabilities.
pydis_audit_screenshots.zip - Screenshots for clarity.
pydis_audit_issues.ods - Spreadsheet of issues found.
[pydis_audit_overview.odt](https://gith...
We'd rather not have people download potentially insecure files to triage this issue.
Please upload to an online document provider such as Google Docs or convert to a single PDF. I am editing those links out of the initial comment.
Connected!
GitHub Actions run 9943703253 succeeded.
GitHub Actions run 9945411483 succeeded.
GitHub Actions run 9945420394 succeeded.
GitHub Actions run 9945427904 succeeded.
Alright, here's a Google Drive link instead: https://drive.google.com/drive/folders/1PTQQnUwLcFOKL-rKFjxm2102wpW9BmI8
f8f5a3c Bump setuptools from 69.2.0 to 70.0.0 in the pi... - dependabot[bot]
d4078fe Bump setuptools from 69.2.0 to 70.0.0 (#1578) - dependabot[bot]
Connected!
Connected!
GitHub Actions run 9946430690 was cancelled.
GitHub Actions run 9946423817 succeeded.
GitHub Actions run 9946449291 failed.
GitHub Actions run 9946448778 succeeded.
GitHub Actions run 9946435888 was cancelled.
Connected!
GitHub Actions run 9946464661 succeeded.
GitHub Actions run 9946451636 succeeded.
GitHub Actions run 9946478685 failed.
GitHub Actions run 9946478696 was cancelled.
Connected!
Connected!
Connected!
GitHub Actions run 9946497610 was cancelled.
Connected!
Connected!
GitHub Actions run 9946509802 was cancelled.
GitHub Actions run 9946515214 succeeded.
Connected!
GitHub Actions run 9946531287 was cancelled.
Connected!
GitHub Actions run 9946566367 succeeded.
GitHub Actions run 9946552526 was cancelled.
GitHub Actions run 9946584026 succeeded.
Connected!
GitHub Actions run 9948065131 succeeded.
GitHub Actions run 9948342101 succeeded.
GitHub Actions run 9951328027 succeeded.
Can you rebase from main? Then this is good to merge and has met required approvals.
cc5fe81 Add redis top docker-compose for backend cache - ChrisLovering
[python-discord/forms-frontend] New branch created: add-redis-for-local-dev
[forms-frontend] Branch add-redis-for-local-dev was force-pushed to `5fab0cc`
[python-discord/forms-backend] New branch created: redis-member-cache
[forms-backend] Branch redis-member-cache was force-pushed to `1276d19`
I have not tested this, but it looks safe and good to me.
@jchristgit A dream come true, mongo is going bongo
If you put this part in an else: block, we skip the .get() call to Redis when force_refresh is True. TBH might not even matter since we were literally using Mongo here before and didn't have any issues but I thought I'd put this out here.
I can't say I'm a fan of initializing the redis client in constants.py (feels like we will be conflating configuration and resource initilization). I can live with it, though. However, I'd prefer if it's initialized somewhere more apt, like maybe in a new file redis.py.
91dc221 Simplify the logic for fethcign from member cache - ChrisLovering
I have not tested this, but it looks safe and good to me.
@jchristgit A dream come true, mongo is going bongo
[forms-backend] Branch redis-member-cache was force-pushed to `5023467`
Yeah I mostly just changed line-by-line here, I've simplified the logic quite a bit in https://github.com/python-discord/forms-backend/pull/297/commits/5023467ef1f47f97a0f45a91c4bc01509b2f04f8
This is basically just creating a connection pool, it doesn't actually make and calls to redis on this line. I did orignally have it in a middleware, but that didn't seem needed.
I don't have a strong feelign on wher ethis goes, this was just the easiest place.
GitHub Actions run 9973819326 succeeded.
46af39a Use redis to store the role cache - ChrisLovering
[python-discord/forms-backend] New branch created: redis-role-cache
This is on top of the changes in https://github.com/python-discord/forms-backend/pull/297 so should be merged after.
Looks good, though I have two questions:
- Is there a reason we put Python as a feature rather than using one of the Python base images (as described here https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/setting-up-your-python-project-for-codespaces#step-3-modify-your-devcontainerjson-file). I think since the images are prebuilt they should make creating a new codespace faster. I'm not sure if there are differences other than t...
[python-discord/bot-core] New tag created: v11.3.0
a4a961f Deploying to docs from @ python-discord/bot-cor... - ChrisLovering
GitHub Actions run 9982636228 succeeded.
Thanks for the PR! I haven't tested the code yet, but here are some comments.
A few more things I'd like to point out:
- I'm not sure what you mean by "the annotations were wrong before". Could you elaborate a bit on that?
Threadisn't a subclass ofTextChannelsoTextOrVoiceChannelshould be updated accordingly. Renaming it to something likeSilencableChannelalso seems reasonable.- The existing method names sound pretty inconsistent. This isn't your fault, but maybe they co...
Since this check duplicates part of L253, it could be moved to the start of the method instead.
This could be grouped with L338-345, which also removes the need for the 'not already silenced' check at L393-395.
Does this really need to be a separate method? It's 5 lines excluding the check (see other comment) and it's only used once so I think adding it directly to _unsilence is fine.
has_channel_overwrites = False
I would prefer sticking to the existing control flow instead of an early return here.
GitHub Actions run 9989191746 succeeded.
For threads we don't need overwrites so how can i group it with that block?
GitHub Actions run 9989657139 succeeded.
AFAICT the check on L332-333 will still work work on Threads so you can merge it with the existing if/else without breaking anything. Keeping the early return would prevent the actual overwrites from happening.
GitHub Actions run 9991755744 succeeded.
GitHub Actions run 9996695687 succeeded.
Connected!
GitHub Actions run 9997204621 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #241 chore(deps): update dependency ruff to v0.5.3
GitHub Actions run 9997312178 failed.
a6eb20a Bump pydis-core from 11.2.0 to 11.3.0 (#3130) - dependabot[bot]
61f6dc6 Bump pytest-subtests from 0.13.0 to 0.13.1 (#3129) - dependabot[bot]
GitHub Actions run 9997397901 was cancelled.
Connected!
Connected!
GitHub Actions run 9997427565 succeeded.
62643d2 Deploying to docs from @ python-discord/bot-cor... - wookie184
7078f09 Remove unnecessary S310 noqa - wookie184
0a19923 Bump pydantic from 2.7.4 to 2.8.2 (#249) - dependabot[bot]
GitHub Actions run 9997503186 succeeded.
e000542 Deploying to docs from @ python-discord/bot-cor... - wookie184
d1ef4fd Bump certifi from 2024.6.2 to 2024.7.4 (#252) - dependabot[bot]
93511e0 Deploying to docs from @ python-discord/bot-cor... - wookie184
e5023a0 Bump sphinx-autodoc-typehints from 2.2.1 to 2.2... - dependabot[bot]
6bad7a1 Deploying to docs from @ python-discord/bot-cor... - wookie184
The watched_users pop here remains, but can't the same issue occur if you're trying to remove a user and list the users at the same time? Maybe it's worth converting the iterator in prepare_watched_users_data into a list before looping over it.
I guess so, I'll do that.
For the other two dicts, does this definitely resolve the issue? Looking at on_message, you could theoretically have multiple consume_messages tasks. If one task clears a queue while another is iterating over it, won...
16a2f84 Ignore ruff ASYNC109 rule - wookie184
GitHub Actions run 9998054065 succeeded.
f9ad0f9 chore(deps): bump pillow from 10.1.0 to 10.3.0 ... - dependabot[bot]
Thanks for fixing this @l-melon!
We can leave making the date field optional and extracting from the file name to potentially another PR, this is great as-is so there's no point leaving it. Let's merge
1b5c072 Bump sentry-sdk from 2.2.1 to 2.3.1 (#1327) - dependabot[bot]
4f46f60 Bump django-distill from 3.1.3 to 3.2.4 (#1328) - dependabot[bot]
a4b830b Bump coverage from 7.5.1 to 7.5.3 (#1331) - dependabot[bot]
19d7612 Bump ruff from 0.4.5 to 0.4.6 (#1330) - dependabot[bot]
a5cbe49 Use Prometheus drop-in database engines - jb3
8eb4dc9 Timeline: Migrate to Markdown source files - in... - hedyhli
07e5006 Timeline: Remove files from old implementation - hedyhli
93c5ca6 Timeline: Move the new timeline.css in and have... - hedyhli
046199e Timeline: Use pydis blurple as default icon bac... - hedyhli
0626af3 Timeline: More muted heading links for entries - hedyhli
[python-discord/site] branch deleted: feat/timeline-from-yaml
GitHub Actions run 9998222577 succeeded.
5c347af chore(deps): bump idna from 3.6 to 3.7 (#84) - dependabot[bot]
551f5b1 chore(deps-dev): bump setuptools from 69.0.2 to... - dependabot[bot]
14c16fc chore(deps): bump fastapi from 0.104.1 to 0.109... - dependabot[bot]
GitHub Actions run 9998235225 succeeded.
This seems to undo the fix for https://github.com/python-discord/site/issues/1209, I think it will cause performance issues.
GitHub Actions run 9998631833 succeeded.
One thing to consider (that was discussed in #organisation) is how you can specify whether to ping mods or not. One option is to detect if e.g. @moderators is typed in a description field, and another is to have two different commands.
We were also going to wait to see whether message forwarding could be useful here, though i'm not really sure how that would work.
7569771 Fix case sensitivity bug in phishing button - vivekashok1221
3996fa6 Update regex to discard trailing ')' and lowerc... - vivekashok1221
ea10480 Skip adding phishing button if user already banned - vivekashok1221
69bc65b Use regex to detect Discord invite link - vivekashok1221
0799c76 Improve accuracy (and efficiency) of MockContext - wookie184
7d84cb8 Make watched_users a dict, not a defaultdict - wookie184
fb21018 Check if user is watched before sending message... - wookie184
36f335f Pass watch info through to functions to avoid K... - wookie184
bfd9e44 Fix: dict.values() -> dict.items() - wookie184
25acba4 Copy watched_users into list to prevent modific... - wookie184
[python-discord/bot] branch deleted: fix-watchchannel-bugs
GitHub Actions run 10005066620 succeeded.
Hello! Thanks for the PR. A small nit, please remove the commented out newlines which are located in the following places:
Connected!
GitHub Actions run 10005076571 succeeded.
Connected!
GitHub Actions run 10005109868 succeeded.
GitHub Actions run 10006888355 failed.
GitHub Actions run 10008061518 succeeded.
[python-discord/forms-frontend] branch deleted: add-redis-for-local-dev
504c15e Add redis to the project - ChrisLovering
30e712f Only bind to loop back address, rather than all... - ChrisLovering
30562f0 Simplify the docker compose build config - ChrisLovering
1276d19 Use redis for the discord member cache over mongo - ChrisLovering
5023467 Simplify the logic for fetching from member cache - ChrisLovering
[python-discord/forms-backend] branch deleted: redis-member-cache
[python-discord/forms-backend] branch deleted: redis-role-cache
GitHub Actions run 10014487816 succeeded.
GitHub Actions run 10014584483 failed.
GitHub Actions run 10014599311 succeeded.
a3e34d2 Update dependency ruff to v0.5.3 (#295) - renovate[bot]
[python-discord/forms-backend] branch deleted: renovate/ruff-0.x-lockfile
GitHub Actions run 10014597157 succeeded.
GitHub Actions run 10014614497 succeeded.
GitHub Actions run 10019914126 succeeded.
GitHub Actions run 10019914620 succeeded.
22f98ae Update dependency starlette to ^0.38.0 (#300) - renovate[bot]
[python-discord/forms-backend] branch deleted: renovate/starlette-0.x
dd28ea2 Update dependency uvicorn to v0.30.3 (#299) - renovate[bot]
[python-discord/forms-backend] branch deleted: renovate/uvicorn-0.x-lockfile
GitHub Actions run 10022030885 succeeded.
GitHub Actions run 10022033093 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #241 chore(deps): update dependency ruff to v0.5.4
GitHub Actions run 10022362664 failed.
GitHub Actions run 10022476824 succeeded.
de88e41 Update code jam judging page - janine9vn
[python-discord/site] New branch created: cj-judging-page-update
Update the code jam judging page to reflect current practices.
GitHub Actions run 10034019872 succeeded.
GitHub Actions run 10036832018 succeeded.
GitHub Actions run 10039128892 failed.
GitHub Actions run 10040531172 succeeded.
GitHub Actions run 10040545513 succeeded.
GitHub Actions run 10059042164 succeeded.
GitHub Actions run 10061595389 succeeded.
81e30ae Do not install recommended packages (#229) - jchristgit
[python-discord/king-arthur] branch deleted: slim-build
:x: Branch is in diverged status, ahead by 1 commits and behind by 1 commits. Please update the branch to reflect changes on main and try again, or merge locally.
e06e3a3 fix(deps): update dependency pydis-core to v11.... - renovate[bot]
[python-discord/king-arthur] branch deleted: renovate/pydis-core-11.x
[python-discord/king-arthur] Checks Failed on PR: #241 chore(deps): update dependency ruff to v0.5.4
GitHub Actions run 10073500425 failed.
GitHub Actions run 10073501953 was cancelled.
GitHub Actions run 10073505502 was cancelled.
GitHub Actions run 10073505823 failed.
GitHub Actions run 10073513899 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #241 chore(deps): update dependency ruff to v0.5.4
GitHub Actions run 10073532028 failed.
GitHub Actions run 10073543923 succeeded.
GitHub Actions run 10073550205 succeeded.
GitHub Actions run 10073552456 succeeded.
GitHub Actions run 10073595428 succeeded.
51906b8 fix(deps): update dependency sentry-sdk to v2.1... - renovate[bot]
[python-discord/king-arthur] branch deleted: renovate/sentry-sdk-2.x
GitHub Actions run 10073600042 was cancelled.
GitHub Actions run 10073634469 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.10.0
GitHub Actions run 10074086028 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.11.0
GitHub Actions run 10074106095 succeeded.
GitHub Actions run 10075122945 succeeded.
GitHub Actions run 10075131227 succeeded.
GitHub Actions run 10077005792 succeeded.
GitHub Actions run 10088839431 succeeded.
GitHub Actions run 10093875391 succeeded.
be23270 Fix the rules command now that the source file ... - ChrisLovering
[python-discord/king-arthur] New branch created: fix-rules
GitHub Actions run 10100318542 succeeded.
be23270 Fix the rules command now that the source file ... - ChrisLovering
[python-discord/king-arthur] branch deleted: fix-rules
GitHub Actions run 10100628414 succeeded.
GitHub Actions run 10100631221 succeeded.
[python-discord/bot-core] New tag created: v11.3.1
1b5df35 Deploying to docs from @ python-discord/bot-cor... - ChrisLovering
aa8f868 Update the feature type of 11.3.1 to ensure the... - ChrisLovering
b588e85 Deploying to docs from @ python-discord/bot-cor... - ChrisLovering
GitHub Actions run 10102422273 succeeded.
2e1dd0b Update rules to reflect that users should DM Mo... - jb3
[python-discord/site] New branch created: jb3/content/modmail-rules-update
GitHub Actions run 10103526975 succeeded.
GitHub Actions run 10103540646 succeeded.
GitHub Actions run 10103556816 succeeded.
GitHub Actions run 10106345827 succeeded.
GitHub Actions run 10110158483 failed.
GitHub Actions run 10111202111 succeeded.
[python-discord/king-arthur] New branch created: jb3/features/ldap-bootstrapping
- Add new dependencies for LDAP, FreeIPA and Keycloak interaction
- Add new configuration options for talking to Keycloak, FreeIPA and LDAP
- Add new constants to define enrollment parameters and requirements
- Add new directory APIs for working with FreeIPA, Keycloak and LDAP
- Add a cog for managing the syncronisation of enrolled users to LDAP
- Update the Grafana team syncer to sync both LDAP and GitHub users
GitHub Actions run 10112473509 failed.
GitHub Actions run 10112648174 failed.
Why not:
return LDAPUser(
uid=user["uid"][0],
employee_number=user.get("employeeNumber", [None])[0],
display_name=user["displayName"][0],
groups=parsed_groups,
)
maybe a continue to reduce nesting a bit?
Why not LDAPUser(uid=LDAPDN(member).rdns[0][0][1])?
Or at least
uid = LDAPDN(member).rdns[0][0][1]
found_users.append(LDAPUser(uid=uid))
This should also be possible (or collections.Counter if you want to get real fancy)
user_actions = [user.action for user in diff]
add_users = user_actions.count(LDAPSyncAction.ADD)
Actually, it might be a bit faster to use genexprs here. Since you're only using in once. But maybe you love sets
This is not the right way to log the error. It turns the exception into a string (likely with some incomplete information, like the key in a KeyError) and hides the traceback.
Instead, do logger.error("We screwed up!", exc_info=e)
Or is it different in Loguru?
That should work in loguru too.
logger.exception("We screwed up!") is an alias for that too, where it automatically adds exc_info based on context. (Python's logging module has the same)
Actually yeah, I missed the fact that loguru is used. But yeah the issue is similar
In [3]: logger.error(KeyError('debugging adventure'))
2024-07-26 17:22:20.344 | ERROR | __main__:<module>:1 - 'debugging adventure'
So the right replacement (according to the docs) would be
In [6]: logger.opt(exception=KeyError('debugging adventure')).error('Describe what happen...
If you do user.get("memberOf", ()), there's no need for if groups :slightly_smiling_face:
Perhaps
enrolled_roles = set(LDAP_ROLE_MAPPING.values())
...
role_ids = {r.id for r in user.roles}
if enrolled_roles & role_ids:
? (or role_ids.intersection(enrolled_roles) if enrolled_roles has to stay a list)
It probably doesn't matter performance-wise. But isn't & beautiful
[king-arthur] Branch jb3/features/ldap-bootstrapping was force-pushed to `1d1ddd2`
All review comments addressed in force push
It is the rdns format for DNs, I have abstracted the [0][0][1] to a get_cn function to hopefully make it clearer what is going on.
I originally expected there to be more attributes to put in and potentially dynamic haha. This is a better idea.
GitHub Actions run 10115007886 failed.
LGTM, but it's probably better if someone who's seen the codebase approves as well
307ea9c Move bonsai to new LDAP group in dependencies - jb3
455945d Document installing the LDAP group of dependenc... - jb3
3c8d87f Add new flag for enabling LDAP functionality - jb3
ffa16cb Expose a BONSAI_AVAILABLE flag from modules tha... - jb3
de325b6 Confirm that LDAP is enabled and Bonsai is avai... - jb3
GitHub Actions run 10116166998 failed.
GitHub Actions run 10116243447 failed.
[king-arthur] Branch jb3/features/ldap-bootstrapping was force-pushed to `88c1721`
GitHub Actions run 10116289139 failed.
GitHub Actions run 10116364206 failed.
[king-arthur] Branch jb3/features/ldap-bootstrapping was force-pushed to `3b975ff`
GitHub Actions run 10116453825 succeeded.
[king-arthur] Branch jb3/features/ldap-bootstrapping was force-pushed to `0bb3c88`
GitHub Actions run 10116625028 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10116732594 failed.
GitHub Actions run 10116743066 succeeded.
GitHub Actions run 10116751104 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10125620006 failed.
GitHub Actions run 10125630076 succeeded.
GitHub Actions run 10125738604 succeeded.
Currently, if we want to use bot core's paginator, and override the emojis, we need to add the following boiler plate module in the upstream client code.
from collections.abc import Sequence
import discord
from discord.ext.commands import Context
from pydis_core.utils.pagination import LinePaginator as _LinePaginator, PaginationEmojis
from src.settings import EMOJI
class LinePaginator(_LinePaginator):
"""
A class that aids in paginating code blocks for Discord...
[python-discord/bot-core] New branch created: bootstrap-paginator
ef10055 add boostrap_line_paginator_with_emojis util - shtlrs
GitHub Actions run 10133233073 succeeded.
GitHub Actions run 10134098531 failed.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.11.0
GitHub Actions run 10134100923 succeeded.
GitHub Actions run 10134099550 succeeded.
GitHub Actions run 10135043417 succeeded.
Sorry for the delay, i was busy doing the code jam. I tried to fix the typing issues but a lot of other errors persist from previous code, for example [see this](#dev-contrib message), a lot of things are unknown, also the Context annotation always doesn't have the bot type var. I'm using pyright in strict mode so maybe that's why but yeah, there are a lot of typing errors across all the codebase.
GitHub Actions run 10135071100 succeeded.
GitHub Actions run 10135386258 succeeded.
This should be logged separately because of the early return. (Also see comment on L346)
if TYPE_CHECKING shouldn't be necessary here since there aren't any circular imports going on.
I think it would be nice to include the parent channel as well. This is probably too long for a single line, but something like this should do:
log.info(f"Unsilenced thread #{channel.parent}/{channel} ({channel.parent_id}/{channel.id}).")
Almost there! Just a few more nitpicks to go.
Also: [discussion about naming in #dev-contrib](#dev-contrib message)
GitHub Actions run 10138467645 succeeded.
MessageableChannel is a type alias defined inside a TYPE_CHECKING clause in discord.py source, you can't directly import it, it doesn't exist at runtime
GitHub Actions run 10139792296 succeeded.
I can't to seem to find MessegeableChannel in the docs, so I have a feeling it's not meant to be used directly. discord.abc.Messegeable looks like a better choice.
GitHub Actions run 10141356931 was cancelled.
GitHub Actions run 10141362378 succeeded.
GitHub Actions run 10142562195 succeeded.
Why wouldn't we use a subclass of paginator that takes an additional init arg that it uses in paginate instead? Something like
class CustomPaginationEmojisLinePaginator(LinePaginator):
def __init__(self, *args, **kwargs) -> None:
self.pagination_emojis = kwargs.pop("pagination_emojis", ...) # dunno default
super().__init__(*args, **kwargs)
@classmethod
async def paginate(*args, **kwargs) -> discord.Message | None:
return await super().pag...
GitHub Actions run 10154345188 failed.
GitHub Actions run 10154387859 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10154435795 failed.
GitHub Actions run 10154438528 succeeded.
GitHub Actions run 10154631219 succeeded.
Hey how's this PR going? It would be very useful for a project I'm working on.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10155857691 failed.
GitHub Actions run 10155863442 succeeded.
[python-discord/king-arthur] New branch created: jb3-patch-1
8f1f458 Add additional logging to LDAP bootstrapper - jb3
[python-discord/king-arthur] branch deleted: jb3-patch-1
GitHub Actions run 10158972378 succeeded.
GitHub Actions run 10159018964 succeeded.
Suspect Issues
This pull request was deployed and Sentry observed the following issues:
- โผ๏ธ Unauthorized: Unauthorized: bad credentials.
arthur.apis.directory.freeipa in create_userView Issue
<sub>Did you find this useful? React with a ๐ or ๐</sub>
GitHub Actions run 10160556479 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10160568804 failed.
GitHub Actions run 10160583356 succeeded.
GitHub Actions run 10161765329 succeeded.
GitHub Actions run 10161777016 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10161801867 failed.
GitHub Actions run 10161813008 succeeded.
GitHub Actions run 10161815234 succeeded.
GitHub Actions run 10161826822 succeeded.
GitHub Actions run 10162966919 was cancelled.
GitHub Actions run 10162992081 succeeded.
Currently, we display the user's discord username rather than the LDAP uid in the password reset instructions, when it is the LDAP uid that is used for login. This PR changes the interaction message to include the LDAP uid instead of the discord username.
GitHub Actions run 10163138166 succeeded.
Looks good! All I would say is we should be a bit more clear in this log line on what "with XXX" means.
logger.info(f"Reset password for {user} with user ID: {uid}")
GitHub Actions run 10166702624 succeeded.
Ahhh, embarrassing. I had it as ...with uid: {uid}", but I had to fork and reclone the repo since pushing my changes failed due to lack of write permission, and I fudged this.
GitHub Actions run 10169595452 succeeded.
GitHub Actions run 10175350425 succeeded.
GitHub Actions run 10175351795 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10175339412 failed.
GitHub Actions run 10175343746 succeeded.
GitHub Actions run 10178514347 succeeded.
GitHub Actions run 10179273368 succeeded.
GitHub Actions run 10179952293 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.12.0
GitHub Actions run 10180030528 succeeded.
GitHub Actions run 10182636059 succeeded.
GitHub Actions run 10182642462 succeeded.
GitHub Actions run 10182620410 was cancelled.
GitHub Actions run 10182687401 succeeded.
GitHub Actions run 10182666568 succeeded.
GitHub Actions run 10188833413 succeeded.
GitHub Actions run 10189999653 succeeded.
If the thread is already locked, this will just schedule an unlock in the set amount of time. Failing is probably better to keep consistent with how it behaves with text channels.
I finally got around to testing this change and found an edge case: (un)silencing when the thread is already (un)locked.
My bad, logging this is handled in _silence() instead so this wasn't necessary.
Same as above: if the thread was manually unlocked before the scheduled time, there won't be any indication of it.
GitHub Actions run 10196323105 succeeded.
GitHub Actions run 10201078897 succeeded.
8e4645c Support slash-separated deployments in namespaces - jchristgit
[python-discord/king-arthur] New branch created: support-slash-separated-restarts
GitHub Actions run 10203423701 failed.
[king-arthur] Branch support-slash-separated-restarts was force-pushed to `914998d`
GitHub Actions run 10203512074 succeeded.
914998d Support slash-separated deployments in namespaces - jchristgit
:white_check_mark: Successfully fast-forwarded commits from python-discord:support-slash-separated-restarts onto main
[python-discord/king-arthur] branch deleted: support-slash-separated-restarts
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10203656364 failed.
GitHub Actions run 10203667679 succeeded.
GitHub Actions run 10203668367 succeeded.
GitHub Actions run 10203670996 succeeded.
GitHub Actions run 10203672754 succeeded.
GitHub Actions run 10203673799 succeeded.
GitHub Actions run 10203673904 succeeded.
60f1a44 fix(deps): update dependency pydantic-settings ... - renovate[bot]
[python-discord/king-arthur] branch deleted: renovate/pydantic-settings-2.x
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10204141768 failed.
GitHub Actions run 10204149622 succeeded.
[python-discord/king-arthur] branch deleted: renovate/kubernetes_asyncio-30.x
24ddded fix(deps): update dependency kubernetes_asyncio... - renovate[bot]
GitHub Actions run 10204154296 succeeded.
GitHub Actions run 10204154620 succeeded.
GitHub Actions run 10204155341 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10204177493 failed.
6efcbe6 fix(deps): update dependency sentry-sdk to v2.1... - renovate[bot]
[python-discord/king-arthur] branch deleted: renovate/sentry-sdk-2.x
GitHub Actions run 10204190748 succeeded.
GitHub Actions run 10204193493 succeeded.
GitHub Actions run 10204195789 was cancelled.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.5
GitHub Actions run 10204221627 failed.
GitHub Actions run 10204231208 succeeded.
GitHub Actions run 10204237568 succeeded.
[python-discord/site] New branch created: fix/resources-payment-tiers
c2413a1 Resources: Use kebab-case for keys of `valid_fi... - hedyhli
The YAML side uses snake case, whereas the HTML template and JavaScript use kebab case. This difference affects only Payment tiers right now.
Currently if the page has a payment tier filter active, reloading the page would lose the filter. A simple fix would be to use kebab case in valid_filters which will be used in JavaScript.
GitHub Actions run 10208318586 succeeded.
[python-discord/site] New branch created: fix/resources-ppg
05d15d6 Resources: Fix image for People, Postgres, Data - hedyhli
The discord link no longer works, I've pulled the image for light mode from: https://postgresconf.org/conferences and updated the image for dark mode to be similar to what it looked like before this change.
GitHub Actions run 10208589649 succeeded.
GitHub Actions run 10210312966 succeeded.
GitHub Actions run 10216020740 failed.
GitHub Actions run 10216068328 failed.
GitHub Actions run 10216110128 succeeded.
Looks like I managed to mess up during rebasing. It should all be fine now, and the code should be a lot simpler thanks to Rohan's changes. Please also see the new response file format.
GitHub Actions run 10217236509 succeeded.
GitHub Actions run 10217237589 succeeded.
GitHub Actions run 10217253740 succeeded.
GitHub Actions run 10217222467 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.6
GitHub Actions run 10219491112 failed.
GitHub Actions run 10220589755 failed.
GitHub Actions run 10221536628 failed.
GitHub Actions run 10221595108 succeeded.
As found in #1363, each keyboard-interactable element must have a visible focus indicator. The focus indicators for GitHub, Reddit, YouTube, would be suitable. It is recommended that site-wide, consistent focus indication is used.
Recommendations can be found: https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance.html
As pointed out in #1363:
Users with color blindness or who change web page colors may have trouble understanding what is clickable. There should be multiple ways that show content is clickable, such as color and underlining.
This affects the pages Events, Resources, Contributing, FAQ, Timeline, Rules & Code of Conduct.
As pointed out in #1363:
All interactable elements should be accessible from the keyboard alone. Pressing tab while focussed on โMerchโ should shift focus to the โMoreโ dropdown. The user should then be able to access the dropdown and use the arrow keys to select subitems.
This affects all pages.
As pointed out in #1363:
The "Sub-Articles" menu on the "Contributing" page is not interactable with the keyboard. All elements of the webpage should be usable by the keyboard.
As pointed out in #1363:
Elements like links and videos throughout the timeline are impossible to access with the keyboard, since focus jumps to the bottom of the page.
Pressing tab on the keyboard should navigate to the next interactable element.
As pointed out in #1363:
Many images on the events page lack a definition for alt text.
All images need alt text defined so that screen readers can present the information to the user. If an image is not necessary for a screen reader user, it should define alt="".
As pointed out in #1363:
It is not clear for screen reader users that the welcome video thumbnail is a playable video.
The alt text should inform the user that the content is a video, such as "Welcome video, click to play".
As pointed out in #1363:
There are multiple h1 tags, many jumps in sequence, and several subheadings that are not associated with the parent heading.
Headings convey important semantic information to assistive technology users, helping to understand the structure and organization of the page. Heading level 1 represents the main topic of the page, heading level 2 is a sub-topic of that main heading, heading level 3 as a sub-topic of the heading level 2, etc. Headings should be sequential...
As pointed out in #1363:
The color s for `` elements (#ff7990 foreground, #464951 background) is 3.59:1 , which is below the minimum of 4.5:1.
Users with low vision may find it difficult to distinguish this text. Tools such as the WebAIM Color Contrast Checker can be used to ensure the contrast ratios are sufficient for most people.
This affects the events, contributing, FAQ, Rules and code of conduct pages.
As pointed out in #1363:
The filter buttons on each card are cliickable, but not reachable from keyboard.
Everyone using the site should be able to access the same content. Pressing tab when fucus is on the card link should shift it to the filters instead of to the next card.
As pointed out in #1363:
There is no mechanism to skip past the navigation bar.
Repetative content across pages in a website, such as a navigation bar, should be easily skippable by keyboard users. Ideally, the first interactable element should be a โSkip to main contentโ link that goes to the h1 tag, or the equivalent where the main part of the page starts. For reference, check out Pythonโs Wikipedia page, where pressing tab the first time skips to the wiki title.
As outlined in #1363:
The โCheck it out!โ linkโs focus outline has a contrast ratio of ~1.66:1 , which is below the minimum 3:1.
The focus outline needs to be clearly visible in order to distinguish the focussed element.
[python-discord/site] Issue opened: #1388 Keyboard focus on resources page can go to collapsed items
As outlined in #1363:
Even when a filter category is collapsed, the tab key still shifts focus to filter items.
When a category is collapsed, focus should instead shift to the next category.
As outlined in #1363:
In the cards for the events, both the event name and icon are links to the same place.
Links to the same place should be identified in the same way. Consider combining the icon and the title into the same link, or marking alt=โโ so screen readers donโt read the same link twice.
As outlined by #1363:
Some elements get properly focussed with the keyboard, but this is not visually communicated to the user. Namely, the discord join link in the top bar and the embedded youtubbe video lack any form of focus indication.
Users who use a keyboard need to see what is currently in focus. Each focussed element should have an easily viewable way to distinguish it, such as a high- contrast outline or shadow.
As outlined by #1363:
The GitHub icon inside h1 has no text describing its purpose.
The link should describe where it will take the user. This can be defined with aria-label.
As outlined in #1363:
The button to go to a specific resource at the bottom left of each card lacks any description and just reads as "link" with screen readers. This means that people using screen readers will not know where links will take them. They would have to activate the link to find out, whereas sighted users could visually identify Github and Goodreads icons, for example.
Links should describe where they will take the user. The โaria-labelโ attribute can be defined for each li...
As outlined in #1363:
The table of contents is marked with two elements. The outer ul is unnecessary and potentially confusing.
A ToC should be marked as a navigation element with the tag. The outer could become to indicate that the unordered list is for navigation in the page.
As pointed out in #1363:
โHow do I start contributing?โ is marked as h1.
This would most logically be an h2, since itโs a subsection of โContributingโ and one level above the list of steps.
As pointed out in #1363:
โScheduled Eventsโ skips from h2 to h5.
Headings should follow a logical structure and should not skip levels. When they do, it can confuse users of assistive technology.
There are 3 h1 tags on these pages.
While not a strict requirement, itโs conventional to have a single h1 tag in a webpage that describes what the whole page is about. This is a common structure that many assistive technology users may be expecting. An example could be โWelcome to Python Discordโ. The other headings would become heading level 2.
As pointed out in #1363:
The headings for questions are level 4 when the heading above is level 2.
Headings should follow a logical structure and should not skip levels. When they do, it can confuse users of assistive technology.
As pointed out in #1363:
Each card is listed as h3, but there is no h1 or h2.
Create a top-level h1, then each section should be h2.
As pointed out in #1363:
Some links and buttons are vague, using terms like โLearn moreโ or โCheck it outโ.
The links should be understandable even outside of the placement context. An example would be โView timelineโ rather than โCheck it out!โ.
As pointed out in #1363:
While the selectable items in the filter section have an outline around the checkbox, this area is small and may be hard to notice.
The focus indicator should be larger, potentially outlining the entire item label.
As pointed out in #1363:
The Table of Contents is currently located to the bottom right of a typical browser screen. A keyboard user also must tab through two sections (โEventsโ and โPrevious Eventsโ) to reach it.
It could be more helpful for the table of contents to be near the top of the page, as well as being easily reachable through keyboard navigation.
As pointed out in #1363:
The links to projects includes all the text inside the card, including the description, language, stars, and forks.
The link text should only include information for where the link will take the user. This additional information should not be part of the link text.
As pointed out in #1363:
These pages lack a level one heading.
It's conventional to have a single top-level heading that signifies the overall purpose of the page.
As pointed out in #1363:
The table of contents is only focussed after tabbing through the entire article.
Keyboard users would likely have a better time if the table of contents was focussed before the rest of the page.
As pointed out in #1363:
The table of contents appears at the bottom of the page when zoomed in at 200%.
It would be more useful for it to appear near the top of the page.
As pointed out in #1363:
Python logos and other icons in the center line of the timeline are read as โlogo imageโ and other generic names.
While descriptive text is imperative to describe images to those who canโt see them, these images are purely decorative and add no value to someone not seeing the page. Use alt=โโ instead so the experience with a screen reader is less cluttered.
As pointed out in #1363:
The timeline is visually shown as a distinct section of the page, but this is not reflected in the structure of the page.
The interactive timeline heading should instead be an h tag, preferably an h2 tag with an encapsulating h1 tag.
As pointed out in #1363:
The table of contents lacks a heading.
This is an important section of the page, so it should be marked with h2 to alert assistive technology.
As pointed out by #1363:
The table of contents on the events page disappears when zoomed in at 200%.
Content should not disappear when zooming up to 200%. The table of contents should remain visible.
Thank you very much for the extensive audit!
I have went ahead and created issues for each of these items, matching the priority you put into the document. Everything except for the "Advisory" priority is something I would classify as a bug, since the page isn't working like it should.
The milestone https://github.com/python-discord/site/milestone/1 tracks all issues related to it.
c2413a1 Resources: Use kebab-case for keys of valid_fi... - hedyhli [05d15d6](https://github.com/python-discord/site/commit/05d15d62e27cd493b9f1ba5290a87fe2edcf61ce) Resources: Fix image for People, Postgres, Data - hedyhli [d405098](https://github.com/python-discord/site/commit/d405098a4fad333b78b90b66022a7a9e8762e3be) Bump ruff from 0.5.1 to 0.5.2 - dependabot[bot] [b59b24a](https://github.com/python-discord/site/commit/b59b24a798c0b67ab72fddad064510c634d1c934) Remove unnecessary S310 noqa - wookie184 [ef38732`](https://github.com/python-discord/site/commit/ef38732a028554db082587859f742fcc3e3f9e33) Merge remote-tracking branch 'origin/fix/resour... - jchristgit
[python-discord/site] branch deleted: fix/resources-ppg
[python-discord/site] branch deleted: fix/resources-payment-tiers
GitHub Actions run 10229073543 succeeded.
GitHub Actions run 10229066991 succeeded.
2ffe0db Bump pymdown-extensions from 10.8.1 to 10.9 - dependabot[bot]
I'm going to close this since all the individual items from the planning have been put into individual tickets now, thank you very much again :slightly_smiling_face:
GitHub Actions run 10229124227 succeeded.
GitHub Actions run 10230115529 succeeded.
I haven't found any other changing e-mail address. (I do not want to mailmap my old one)
[python-discord/site] branch deleted: mailmap
GitHub Actions run 10233998662 succeeded.
GitHub Actions run 10235379136 succeeded.
GitHub Actions run 10239368321 succeeded.
GitHub Actions run 10243421481 succeeded.
GitHub Actions run 10243424739 succeeded.
GitHub Actions run 10243428534 succeeded.
GitHub Actions run 10247466907 failed.
GitHub Actions run 10248746235 succeeded.
be21e44 Legacy Help Channels Access -> Archived Channel... - mbaruh
[python-discord/bot] New branch created: archived-access-rename
GitHub Actions run 10248900411 succeeded.
bb34af0 Legacy Help Channels Access -> Archived Channel... - mbaruh
[python-discord/bot] branch deleted: archived-access-rename
Connected!
GitHub Actions run 10249176349 succeeded.
GitHub Actions run 10271447863 failed.
Somebodu fix this please @DevOops I'm on mobile
Nice ping
GitHub Actions run 10271800990 succeeded.
@tjanks
GitHub Actions run 10278912164 succeeded.
GitHub Actions run 10278914873 succeeded.
GitHub Actions run 10296669092 failed.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.5.7
GitHub Actions run 10307013058 failed.
GitHub Actions run 10307313303 failed.
GitHub Actions run 10314391509 succeeded.
GitHub Actions run 10317895150 failed.
51c54fa Move open thread to ban appeals category - vivekashok1221
[python-discord/modmail-plugins] New branch created: move-ban-appeal
GitHub Actions run 10318902757 succeeded.
fb950cd [DROP COMMIT BEFORE MERGE] Use test appeal guild - vivekashok1221
dc2b395 Add missing await for coroutine - vivekashok1221
[modmail-plugins] Branch move-ban-appeal was force-pushed to `5f9c135`
I've tested the changes using the Bot Test Server as the main guild and my private test server as the appeals guild, and it works as expected (no screenshots because I closed the thread before I took any)
0948e47 docs: Correct "ignored categories" to "appeal c... - vivekashok1221
[modmail-plugins] Branch move-ban-appeal was force-pushed to `340b26a`
GitHub Actions run 10323833974 succeeded.
GitHub Actions run 10323907902 succeeded.
GitHub Actions run 10323940509 succeeded.
GitHub Actions run 10323958496 failed.
GitHub Actions run 10336131466 succeeded.
GitHub Actions run 10351661449 failed.
GitHub Actions run 10372748878 succeeded.
[python-discord/forms-backend] Checks Successful on PR: #296 Update dependency sentry-sdk to v2.12.0
GitHub Actions run 10373523346 succeeded.
GitHub Actions run 10374806694 succeeded.
GitHub Actions run 10374789000 succeeded.
Connected!
3f7e5f6 Log and retry OT renaming if Discord returns an... - ChrisLovering
[python-discord/bot] New branch created: log-failed-OT-name-rename
GitHub Actions run 10376255966 succeeded.
GitHub Actions run 10382071310 succeeded.
GitHub Actions run 10385691306 succeeded.
GitHub Actions run 10387832446 succeeded.
Hi @ChrisLovering! Thank you for the contribution to the bot project!
I have left a review for your work. Overall, I think your code looks good. I have a minor question.
What happens now?
Per our contribution guide, the Python Discord Developer team will review your code and get back to you with comments on what they think about the code. Generally, this will include technical questions, as well as sugges...
What does "please delete the ones that sound bad" mean? "Bad", as in, "might cause an error"?
Yeah, Discord frequentently updates their filter of allowed channel names
In the end, the greatest snowball isn't a snowball at all. It's fear.
Wouldn't it be better if we edited the channel names one by one in different try-blocks, storing any invalid names in a list, and then including only the invalid names in this message?
- In the current approach, if the first name is invalid, the other two names won't be used. However, I believe they will still be marked as inactive in the database, putting the valid names out of rotation for no reason.
- It will also eliminate the guesswork in identifying which names are invalid, especi...
yes, but this was a quick fix that is good enough, without rewriting a lot
Connected!
GitHub Actions run 10394090298 succeeded.
GitHub Actions run 10396322567 failed.
GitHub Actions run 10396390185 failed.
GitHub Actions run 10396439789 succeeded.
GitHub Actions run 10404174535 succeeded.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.6.0
GitHub Actions run 10404841760 failed.
GitHub Actions run 10404942244 failed.
GitHub Actions run 10414952964 succeeded.
GitHub Actions run 10418533436 failed.
@jchristgit I have just your response.
paginate is a class method, i won't be able to access the pagination_emojis instance attribute if I do it like that.
So in this case, you'd still have to pass it each time to the paginate method, which itself instantiates a LinePaginator
What about this?
def boostrap_line_paginator_with_emojis(pagination_emojis: PaginationEmojis) -> type[LinePaginator]:
"""Bootsrap a LinePaginator class with custom emojis."""
class _LinePaginator(LinePaginator):
@classmethod
async def paginate(cls, *args, **kwargs) -> discord.Message | None:
return await cls.paginate(*args, **kwargs, pagination_emojis=pagination_emojis)
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.6.1
GitHub Actions run 10424907033 failed.
What about this?
def boostrap_line_paginator_with_emojis(pagination_emojis: PaginationEmojis) -> type[LinePaginator]: """Bootsrap a LinePaginator class with custom emojis.""" class _LinePaginator(LinePaginator): @classmethod async def paginate(cls, *args, **kwargs) -> discord.Message | None: return await cls.paginate(*args, **kwargs, pagination_emojis=pagination_emojis)
Yeah that works, I just want to avoid arg...
GitHub Actions run 10447856286 succeeded.
GitHub Actions run 10451642121 failed.
GitHub Actions run 10452048490 succeeded.
GitHub Actions run 10452107941 succeeded.
[python-discord/king-arthur] New branch created: optional-env-vars
Allow loading the bot without all env vars, the relevant Cogs just don't load.
GitHub Actions run 10452280037 succeeded.
:white_check_mark: Successfully fast-forwarded commits from python-discord:optional-env-vars onto main
[python-discord/king-arthur] branch deleted: optional-env-vars
Suspect Issues
This pull request was deployed and Sentry observed the following issues:
- โผ๏ธ ExtensionFailed: Extension 'arthur.exts.directory.ldap' raised an error: TypeError: all() takes exactly one argume...
discord.ext.commands.bot in _load_from_module_specView Issue
<sub>Did you find this useful? React with a ๐ or ๐</sub>
GitHub Actions run 10452371138 succeeded.
GitHub Actions run 10452514736 succeeded.
GitHub Actions run 10453871578 succeeded.
GitHub Actions run 10453880801 succeeded.
GitHub Actions run 10471642103 succeeded.
Connected!
GitHub Actions run 10472877647 succeeded.
GitHub Actions run 10475619416 failed.
As a King Arthur user,
I want to receive long command output by e-mail,
such that I can read outputs that are too long for Discord.
Joe said e-mail credentials for King Arthur are already ready. This
functionality is an import smtplib away.
[python-discord/king-arthur] Checks Failed on PR: #244 chore(deps): update dependency ruff to v0.6.2
GitHub Actions run 10509922679 failed.
[python-discord/site] New branch created: jb3/resources/discord.py-masterclass
d0c6587 Add Discord.py masterclass resource - jb3
Adds a resource suggested in community meta.
I've scoped it out and believe that:
- It teaches good coding practices for the most part
- It makes good use of type annotations
- It covers a wide range of functionality
- It's content is appropriate and keeps in line with our community expectations
GitHub Actions run 10516690071 succeeded.
d0c6587 Add Discord.py masterclass resource - jb3
50bedf5 Merge pull request #1421 from python-discord/jb... - KeithTheEE