#dev-log

1 messages ยท Page 15 of 1

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/.github] New branch created: supress-grep-error
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: use-fixup-commit-blocker
#
[python-discord/bot-core] New branch created: fixup-commit-blocker
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: use-ruff-isort
oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/forms-backend] branch deleted: unittests-feature
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: reuse-fixup-blocker-workflow
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: run-fixup-blocker-on-pr-only
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: use-fixup-commit-blocker
regal archBOT
#
[python-discord/.github] New branch created: fixup-blocker-failing-in-forks
#
[python-discord/branding] New branch created: update-event-dates
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

I would be against changing the emoji, as it's there since it looks better than the unicode bin. I'm also not a fan of needing to pass in the constants everywhere they're needed.

One simple way around this for now would be to just create a wrapper here that passes in the necessary constants and we can just use that instead. In the future we may want to think of other ways we can have configuration for bot-core.

#

Yeah the Emoji cannot change since it has been set to the custom one for legacy purposes.

However, regarding the Emojis as parameter part, I'm also not a biggest fan but that was one of the solutions.

I don't understand why is the paginate method a static method in the first place.

The way I'd want to do this is to instantie the Paginator in the parent package's __init__.py module and have it as a singleton. The constructor would take in the Emojis that need to be used the entire lifet...

#

paginate is a classmethod, and it's there because it needs to run async code which can't be done in the __init__.

It is still a bit strange since it doesn't actually return the class, so it would probably make sense to just expose paginate as a function by itself which creates a class internally. The current class cannot just be made into a singleton though as it contains state specific to an individual pagination.

odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Also, would it be worth changing the message in L597 to also include the modification type? I feel like doing so might imply that editing/deleting other people's reminders have different permissions when they actually don't.

No you don't need to, as that message is destined to people who don't have the rights to do anything with a reminder.

The reason I asked you to make it explicit for adminds is because it will pinpoint the action they're about to do better.

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: run-fixup-blocker-on-pr-only
oak estuaryBOT
regal archBOT
#
[python-discord/.github] branch deleted: fixup-blocker-failing-in-forks
#
[python-discord/.github] branch deleted: events-speedrun
#
[python-discord/.github] branch deleted: supress-grep-error
#
[python-discord/.github] branch deleted: tag-speedrun-ignore-update-merged
#
[python-discord/bot] branch deleted: fail-ci-on-fixup-commits
#
[python-discord/bot] branch deleted: fixup-commit-blocker-test
#
[python-discord/bot] branch deleted: internal-dns-api
#
[python-discord/bot] branch deleted: kwzrd/unittest-parallel
#
[python-discord/bot] branch deleted: ruff-investigation
#
[python-discord/bot] branch deleted: newlines-filter-exclude-help-forum
#
[python-discord/bot] branch deleted: rule-config-fix
#
[python-discord/bot] branch deleted: swfarnsworth-automated-markdown-messages
#
[python-discord/bot] branch deleted: reminders-fetch
#
[python-discord/bot] branch deleted: feature/1903/fix-channel-inconsistencies
#
[python-discord/bot] branch deleted: feature/1903/sync-cooldown-roles
#
[python-discord/bot] branch deleted: remove-caching-util
#
[python-discord/sir-lancebot] branch deleted: command-match-errors
#
[python-discord/site] branch deleted: subclassing_bot
#
[python-discord/site] branch deleted: edit-on-github
#
[python-discord/site] branch deleted: easy-docker-migrations
#
[python-discord/site] branch deleted: smarter-resources
#
[python-discord/site] branch deleted: kyler/smarter-resources
#
[python-discord/site] branch deleted: lemon/smarter-resources/tag_filtering
#
[python-discord/site] branch deleted: #298-exemption-model
#
[python-discord/site] branch deleted: filter-rewrite
#
[python-discord/king-arthur] branch deleted: bump-dep
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/branding] branch deleted: update-event-dates
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: listcomp-rewrite
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: timeline-branch-copy
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/.github] New branch created: do-not-checkout-fork
#

Reasoning

Generally, when using the pull_request event as trigger for our CI, it uses the fork's CI context, allowing malicious users to tamper with CI.

We are switching to using pull_request_target as event, which ensures that CI is executed with our repo's context.

The main condition to using this is to not checkout nor execute the fork's code.

Solution

The approach was to add the fork as remote, but we only make a fetch operation instead of a checkout one, ...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Recently, a contrib had issues setting up redis on sir-lancebot, and they started running into connection problems.

Up until today, I ran into the same issue, and it was the fact that redis_use_fakeredis wasn't set in my .env variable.

After some debugging, I realized that it was a host issue, as it needs to be set to redis for the two containers to be able to talk to each other over the docker network.

Looking at the docs now, it's only mentioned in the extended guide of `...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
oak estuaryBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
oak estuaryBOT
regal archBOT
#
[python-discord/snekbox] New branch created: feat/158/multi-version
regal archBOT
regal archBOT
#

Closes #175
This is an alternative implementation to #178

Currently, this is a draft that just focuses on getting multiple Python interpreter versions into the image. Later, this PR will be updated with API changes as well. The goal for the API is for users to be able to pass an arbitrary path to an executable binary (e.g. a path to a different Python interpreter).

du -h --max-depth=1 /lang/python
93M	/lang/python/3.11
88M	/lang/python/3.12
181M	/lang/python

I observed...

regal archBOT
regal archBOT
#
[python-discord/site] branch deleted: update-timeline
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#

Sentry Issue: BOT-3KT

AttributeError: 'DMChannel' object has no attribute 'mention'
  File "bot/exts/filtering/_filter_lists/antispam.py", line 131, in process_deletion_context
    await deletion_context.send_alert(self)
  File "bot/exts/filtering/_filter_lists/antispam.py", line 192, in send_alert
    embed = await build_mod_alert(new_ctx, {antispam_list: messages})
  File "bot/exts/filtering/_ui/ui.py", ...
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot-core] New branch created: Bump-d.py
#
[python-discord/king-arthur] New branch created: bump-pydantic
odd spireBOT
regal archBOT
#
[python-discord/king-arthur] branch deleted: bump-pydantic
odd spireBOT
regal archBOT
#
[python-discord/king-arthur] New branch created: use-infra-md-rule-doc
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/king-arthur] branch deleted: use-infra-md-rule-doc
odd spireBOT
regal archBOT
#
[python-discord/metricity] branch deleted: message-sync-command
#
[python-discord/metricity] branch deleted: bump-various-versions
#
[python-discord/metricity] New branch created: reusable-workflows-in-CI
#
[python-discord/metricity] branch deleted: reusable-workflows-in-CI
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: snakes-cleanup
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: shenanigansd-patch-1
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
  • For grid size, I will start with a 4x4 but I might also add a 6x6 option later
  • The grid will be displayed as an image
  • .sudoku start to start, .sudoku [location] [number] to enter guesses. If the guess is correct, the board will be updated (most likely edit the original message). If the guess is incorrect, the bot will indicate it (perhaps a :x: reaction) and leave the board unchanged.
oak estuaryBOT
#

Doc item doc_item.symbol_id='flask.Flask.default_config' present in loaded documentation inventories not found on site, inventories may need to be refreshed.

regal archBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#

Hi ๐Ÿ‘‹

Thanks for opening up a PR to fix that.

However, I'm afraid tha that the issue wasn't assigned to you, and the person who opened it was told to feel free to open a PR to fix it.

Please make sure to receive confirmation before beginning to work on a PR so that it doesn't happen in the future, we don't want contributors' work to be wasted.

Sorry for that.

regal archBOT
#
[python-discord/bot] New branch created: remove-fixup-job
#
[python-discord/bot] branch deleted: remove-fixup-job
odd spireBOT
oak estuaryBOT
regal archBOT
#
[python-discord/.github] New branch created: interpolate-commit-messages-var
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#

Hello

It has come to my attention that Python Discord . Com still has no Dark Theme switch. I was saddened by this and, head hanging down, trotted to this pull request to express my feelings of sadness.

django-simple-bulma recently had my PR merged that added a flag to skip adding JS, which I think should help with implementing this. What do you think?

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: bump-to-pydis-core-10
oak estuaryBOT
regal archBOT
#
[python-discord/bot] New branch created: fix-import-error
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix-import-error
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
#
[python-discord/site] New branch created: update-timeline-rev-2
odd spireBOT
regal archBOT
#

I think the approach can be enhanced a bit.
We can fetch 3 names (number of attempts) for each channel.
We iterate over each channel, and try to rename it three times, then exit, that way we can increase the chance of a successful rename OP.

number_of_names_to_fetch = MAX_ATTEMPS * len(CHANNELS)
channels = [get_or_fetch_channel(channel) for channel in CHANNELS]
names = iter(api_client.fetch_names(params={"random_items": number_of_names_to_fetch}))

renamed = set()
failed = ...
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

@shtlrs Good morning

Do you know why git fails in the fixup blocker CI?


Run commit_messages=$(git log origin/main..fork/update-timeline-rev-2 --format="%h %B" --grep "^fixup" --oneline)
  commit_messages=$(git log origin/main..fork/update-timeline-rev-2 --format="%h %B" --grep "^fixup" --oneline)
  if [ -n "commit_messages" ]; then
      echo -e "$RED Error: Make sure that all 'fixup' prefixed commits are squashed before merging."
      echo -e "$RED Commits that need fixin...
#
[python-discord/site] branch deleted: update-timeline-rev-2
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

I've picked up this PR again, and in my testing, the process crashes with code 135 (SIGBUS). To trigger this, the code must write to the shared memory buffer. Merely creating the shared memory object is not enough.

What I've been stuck on is understanding what's going on when just the shared memory object is created. Here is the CPython code for it.

First it calls shm_open, and it has the `...

regal archBOT
#

It seems like no memory is consumed by just using ftruncate:

python -m snekbox '
import os
import _posixshmem
try:
   fd = _posixshmem.shm_open("test", os.O_CREAT | os.O_EXCL | os.O_RDWR, mode=0o600)
   os.ftruncate(fd, 52428800 * 5000000)
   print(os.stat(fd))
finally:
   _posixshmem.shm_unlink("test")
' --time_limit 0
os.stat_result(st_mode=33152, st_ino=2, st_dev=60, st_nlink=1, st_uid=65534, st_gid=65534, st_size=262144000000000, st_atime=1693165871, st_mti...
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] New branch created: cj-perms-update
regal archBOT
#

This corrects some permissions issues from last year:

  • Adds Sir Robin to individual team channels
  • Give the Event Lead roles manage_channels permission for the category
  • Adds Sir Lancebot and Python to team channels and the category overall, just to be sure

Why do we have to override permissions on the individual channels when it's being added to the category is a reasonable question you might ask when looking at this PR. The answer lies in the hell that is the Discord channel permis...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] branch deleted: cj-perms-update
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
#
[python-discord/sir-robin] New branch created: pr/cjpaste
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: cj10-frameworks-update
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: cj10-frameworks-update
odd spireBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
#
[python-discord/sir-robin] New branch created: use-ruff
odd spireBOT
regal archBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot-core] New branch created: test-bases-in-bot-core
regal archBOT
#
[python-discord/sir-robin] New branch created: bump-bot-core
odd spireBOT
regal archBOT
#
[python-discord/snekbox] New branch created: enforce-filesize-limits
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
regal archBOT
#
jb3
[python-discord/snekbox] branch deleted: enforce-filesize-limits
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/snekbox] branch deleted: feat/158/multi-version
regal archBOT
regal archBOT
#
jb3
[python-discord/snekbox] New branch created: jb3/3.12-ignores
#
jb3
[python-discord/snekbox] New branch created: jb3/refactor-eval-deps
#
jb3
[python-discord/snekbox] branch deleted: jb3/3.12-ignores
#
jb3
[python-discord/snekbox] branch deleted: jb3/refactor-eval-deps
#
jb3

Right now, our eval dependencies are pulled in using a script embedded within the deployment file, and all dependencies are listed there. This gets a bit messy the more dependencies we want to add, especially if we want to add version markers.

This PR splits out the dependencies into a new file under requirements/ and moves the dependency install process to it's own init container instead of being a task that executes within the snekbox container after it starts. This also allows for gre...

odd spireBOT
regal archBOT
#

Description

Change the .rfc command to work in channels like #python-discussion

Reasoning

Currently, the .rfc command only works in #sir-lancebot-playground. However, the .rfc command should also be able to be used in other relevant channels like #python-discussion

Would you like to implement this yourself?

  • [x] I'd like to implement this feature myself
  • [x] Anyone can implement this feature
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/snekbox] New branch created: update-eval-deps
odd spireBOT
regal archBOT
#

Adding an inode limit would limit the number of files/directories that can exist in the tmpfs we use for file IO. Given we already have file size limits, a maximum number of files we'll read, and a timeout, it shouldn't be too important, but it may be worth putting a limit to be safe. Currently it seems to be limited by the cgroup memory limit using (allowing for about 50_000 files with the current config).

This can be done by passing the nr_inodes argument here:
https://github.com/pyt...

#
[python-discord/snekbox] branch deleted: jb3/shared-mem
#
[python-discord/snekbox] New branch created: test-init-container-in-CI
regal archBOT
#
[python-discord/snekbox] New branch created: wookie184-fix-readme-link
regal archBOT
#
jb3
[python-discord/snekbox] branch deleted: test-init-container-in-CI
#
[python-discord/snekbox] branch deleted: wookie184-fix-readme-link
regal archBOT
#
[python-discord/snekbox] New branch created: share-deployment-dep-script-with-ci
regal archBOT
oak estuaryBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: trigger-fixup-on-pr-target
#
[python-discord/site] New branch created: document-static-previews
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: trigger-fixup-on-pr-target
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

The >>> or ... at the start of some lines is the code input, and it indicates that you are in the Python REPL.

This sentence feels a bit clunky, maybe this would be better:

To enter the REPL, run `python` in the command line without any arguments. The `>>>` or `...` at the start of some lines are prompts to enter code, and indicate that you are in the Python REPL. Any other lines show the output of the code.
odd spireBOT
regal archBOT
#

Also take a look at CI, looks like there's some trailing whitespace somewhere that needs removing

The trailing whitespace is after the empty ... and >>> lines, otherwise they won't get syntax highlighted in Discord

Oh interesting, try changing the codeblock language to python-repl, seems like it doesn't need the space then.

That seems to work, thanks

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
#
[python-discord/site] branch deleted: document-static-previews
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
regal archBOT
#
[python-discord/snekbox] branch deleted: share-deployment-dep-script-with-ci
#

The uses of send_to_paste_service need to be changed now that it handles the errors that can be ranged (the old function worked by potentially returning None instead).

Also, it returns a PasteResponse now so you need .link to get the link from it rather than using the returned value directly

https://github.com/python-discord/sir-robin/pull/91/commits/f166d325803f3c621807a3bbeade7ca106046c97

odd spireBOT
regal archBOT
#
[python-discord/snekbox] New branch created: include-install-script-in-final-image
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/sir-robin] New branch created: add-ping-team-command
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Relevant Issues

Closes #1353

Description

Used @whitelist_override(roles=(Roles.everyone,)) to allow the .rfc command in all channels

Did you:

odd spireBOT
regal archBOT
regal archBOT
#

We should add an example here. How does SQL enforce data integrity? Which forms of bad data does it help against? For instance, in JSON (unless you write your own validation routine, which takes a lot of time and care), you can omit a key or set someone's age to "581 years" and it won't bat an eye. If you're unlucky, you will only catch it later when your app crashes. In an SQL database you would say age is a small integer and add a check constraint to ensure that age is between 0 and 120.

#

I think we can expand on this a bit: how does horizontal scaling help SQL databases more than JSON? For instance, we could write that SQL databases can hold their indices and hot data in main memory allowing upgrading of main memory size for good performance gains, while JSON files have no built-in way to index data, so the main option you would have is loading the entire document into memory, which is a lot more inefficient.

odd spireBOT
odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT