EG like this, maybe namespaced https://github.com/python-discord/sir-lancebot/tree/main/.github/workflows#L52-L56
#dev-contrib
1 messages · Page 4 of 1
that way you can do this https://github.com/python-discord/sir-lancebot/tree/main/.github/workflows#L105
.github/workflows/lint.yaml lines 52 to 56
- name: Setup python
id: python
uses: actions/setup-python@v2
with:
python-version: '3.9'```
.github/workflows/lint.yaml line 105
${{ steps.python.outputs.python-version }}-\```
Oh lol
it's just so that you can grab the exact version of python lower down in the workflow
Sure that sounds fine (will GitHub propagate it?)
I can make it a general output
yea might be useful
I’m out and about atm, but if you PR it I should be able to review it
Yea I'll have a play
Awesome
Sick scale tips: fork it so you can test your changes
Has to run in actions though, haven’t figured out how to do it locally
Devops has write perms to all my projects by default
oh lol
Very good people, very efficient
I stole all this from python 🧌
If you go back far enough, there is probably an actual author credit to you
I wonder if poetry will ever fix that bug I submitted a fix for
hmmm this is very weird
cough any poetry maintainers here
I am guessing the pre-commit-cache is also caching the python version
and not respecting the pythonLocation env var
Is this the tests on actions?
Oh lol
I have pytohn verison pinned to 3.10
so the cache has 3.10.5
but now it's trying to use 3.10.6
Ohhhhhh
setup python uses 3.10.6, but the cache has 3.10.5
Shouldn’t the cache miss then
Or did I forget to encode python version
I remember there’s a key I forgot to ever add
setup-python/action.yaml line 84
${{ inputs.python_version }}-${{ inputs.dev }}-${{ inputs.working_dir }}\```
it's there
Hm
ahhhhhh
it's using the input
not the actual python version
IE input = 3.10, actual =3.10.6
you have accedss to it further up
Actually we can export it
setup-python/action.yaml line 61
- name: Setup python```
Yeah
export it from this
Alright that sounds like a good place to export it for the cache and the output
time to read up how to export props from a workflow lol
oh, it's the echo thing
Export a bar or something
Yup
It’s documented thoroughly
In a million page document
setup-python/action.yaml lines 29 to 32
outputs:
cache-hit:
description: "Was there a cache hit for the python cache."
value: ${{ steps.python_cache.outputs.cache-hit }}```
your repo has been graced by Biosite Systems OSS team
HassanAbouelela/actions#6 should do it
I don’t think you pushed any code lol
Awesome just some doc and version bump stuff
Version bump in root Readme and caches, and doc updates in the setup python Readme
Oooh I should do GitHub docs
caches?
I encode the action version in the cache keys to prevent cache mishaps
It probably doesn’t matter here though
lol which bug?
The one in your last commit
ahhh yea
lol
give me admin, i can create it 
I see no issues
If I haven’t fucked anything up
very cool
CI runs fine using that hook 🎉
But it's not a real test since it was a cache-miss due to the version bump
The tests do check that caching doesn’t error
ahh cool cool
I’ll add a regression test for that but later
I think I’ll just use your described setup lol
hah ye
Any chance you're able to look over it? Still have absolutely no clue what's going on
running the tests locally I get a nicer traceback
so I'm guessing resolved isn't getting set in your setup?
msg.reference.resolved also needs to be a MockMessage, with a MockMember as the author
fwiw, if you do poetry run task test and get the 3 failures, you can do poetry run task retest just to run those 3 again
I mean idk
When I run the tests as poetry run task path_to_file.py everything passes, which is what I don't understand
poetry run task path_to_file.py doesn't sound valid
That's not a task
The tests are definitely not passing though. I'd suggest using the test and retest tasks.
Or run it in pycharm, it’s a very gud runner
I’ll be home soon, so I’ll take a look too
this is the relevant test traceback
this is what needs changing
Lemme try fixing it
alternativly, you can set the message object such that this if statement runs```
if msg.type != MessageType.reply and not msg.reference:
continue
If I wanted to do this, I'd need a MockReferencedMessage
Since I'd need the .reference
So I guess the best thing to do is pass reference=None so this runs
Yeah, that works
Just a question of whether we want tests to ensure that reply mentions aren't counted
If we don't care about adding that test, then all I need to do is reference=None
If we do care, then we need a new MockReferencedMessage class
The message that this message references. This is only applicable to messages of type MessageType.pins_add, crossposted messages created by a followed channel integration, or message replies.
New in version 1.5.
It's a relatively simple model, and you can probably auto mock most of it's fields
If you want to set it up, go for it
If you don't, don't
I'm not that familiar with mocks, but don't mind learning
We don't have a particularly strong policy on testing, at least for bot, so it's entirely up to you
Sure, take your time
!d r
Inventories refreshed
Anyone know why django is complaining about a model I created? The field I believe it's complaining about is:
last_updated = models.DateTimeField(
help_text="The date and time this data was last fetched.",
auto_now=True,
)
With the traceback:
django.db.utils.ProgrammingError: syntax error at or near "None"
LINE 1: ...timestamp with time zone NOT NULL, "name" varchar(None) NOT ...
^
But I took that field straight from another model. Makemigrations was fine, the exception happened during migrations
Full migration: https://paste.pythondiscord.com/facilafowe
Startup log and traceback: https://paste.pythondiscord.com/oxizakosiy
Actually it's complaining about this one
name = models.CharField(
help_text="The tag's name.",
primary_key=True,
)
Alright it's because I'm an idiot, max_length is a required argument
Am I safe to assume that all tags in the bot repository are safe and won't be used for XSS or other exploits?
(I'm rendering them on site)
@vale ibex remember the test failure on site from a while back which I couldn't explain?
Failure
Traceback (most recent call last):
File "C:\Github\PyDis\site\pydis_site\apps\api\tests\test_infractions.py", line 103, in test_list_all
self.assertEqual(infractions[0]['id'], self.voiceban_expires_later.id)
AssertionError: 24 != 28
Still no repro though
I hate the coverage requirement on site
I added one feature, and suddenly the entire coverage dropped 10% from a 100
How little code is there on site
Coverage failure: total of 100 is less than fail-under=100
Thank you coverage, very cool
The only "miss" is a stupid partial :P
What the fuck, apparently a skipped unittest counts negatively towards your coverage. Why do the unittests themselves count towards the coverage anyway
Hahaha the tests are continuing to troll me
- [<Tag: Tag object (first_tag)>, <Tag: Tag object (second_tag)>]
+ [<Tag: Tag object (second_tag)>, <Tag: Tag object (first_tag)>]
Hey @fossil veldt, I'm looking at your replies in bot#2234 and I'm still confused. If the issue is fixed by rounding the microseconds, then why do we need the new field? and if the new field is calculated in one place, and the inserted_at field in another, then doesn't that mean that one of them is incorrect?
Well so the rounding can potentially fix some of it, depending on network latency, the more robust option would be the new field that we opted for. Though the rounding doesn't hurt for future applications of that humanize datetime function in general.
I can remove the rounding and modifications to humanize datetime if you feel it's out of scope though
To make it clear, it is not required for the infraction duration fix specifically due to our new field
So the real fix is calculating expiry - last_applied?
yeah, and also sending the expiry as a calculation based on last_applied
which required moving the calculation from the individual commands to the post function, and also needed to refactor the d.py typehints since originally the type autoconverted to the final datetime, it is now a delta
inserted_at is essentially not used for the infraction displays anymore, though it could in the future or just for database reference
inserted_at would be the time the entry was inserted into the database side, last_applied is calculated by the bot before the post
Did you modify the infraction search embed? I don't think I saw it in the PR
hm.. where is that?
There's a command !infraction search
It displays infractions, and one of the things it shows is the time it was added
bot/exts/moderation/infraction/management.py line 242
@infraction_group.group(name="search", aliases=('s',), invoke_without_command=True)```
hm... no I did not
I will add that now 😅
Would it make more sense to do the rounding on the relativedelta rather than the start and end separately?
yeah I think it makes more sense now that you say it
no worries. But that leads to a follow up question of how exactly we should add it
well I can just change the current inserted_at to last_applied in management.infraction_to_string
that should make it use the new last_applied field for the delta calculations
I think that the creation time is more interesting actually, maybe with an indicator that the duration was edited
Which is an issue because atm you can't tell if the duration was edited because last_applied and inserted_at don't match
In the embed, it probably makes sense to calculate the duration as expiry - inserted_at, because if we prolong a one day mute by two days, it will be three days total
well that would be different
wait would it?
hm...
Thanks for your patience btw, you picked a pretty involved PR as your first one 🙃
It can be different in some cases yeah
what paths actually lead to an infraction being re-applied?
A mistake by a mod or an appeal are usually the reasons
Or a very poor reaction by the person being infracted
like what function paths
Command: infraction edit
Edit the duration and/or the reason of an infraction.
Source Code
bot/exts/moderation/infraction/management.py:126
!src i a
Command: infraction append
Append text and/or edit the duration of an infraction.
Source Code
bot/exts/moderation/infraction/management.py:87
I tried to just mute someone again in the test server but it didn't let me
You have the option to DM the member the details of their infraction with
!src i resend
Command: infraction resend
Resend a DM to a user about a given infraction of theirs.
Source Code
bot/exts/moderation/infraction/management.py:63
e.g if they didn't get it the first time or if we want to update them on any changes we made
hm..
well currently I didn't update last_applied in infraction_edit, so it's only modifying expires_at, if requested
If I added the updating of last_applied together with the new expires_at, the log would only show the latest time
i.e. a 7 day infraction being edited on day 5 to 1 day would show 1 day when queried again after that
is that acceptable behavior or do we need the original infraction delta as well?
I think maybe it's fine to just only keep track of the last_applied in conjunction with the expires_at of the latest change?
right, which is why I'm saying ^
do you only want to display the original duration, updated, or both?
just the updated, I think that's how it is now
but last_applied should be updated when editing the infraction yeah
hm... the issue is using inserted_at with the new expires_at would result in potential mismatching again
About this, if inserted_at and last_applied were identical in the beginning, we could add an indicator if the infraction has been edited by checking if they're different. e.g by adding *(edited)* to the duration/expiry fields
yeah I think that's possible, I can set both inserted_at and last_applied in the original post then
since currently inserted_at is pretty much a useless field
That might require a change on the site repo
ah, is it not settable?
I'm not sure, don't think it is, since it's currently being set on the site
I don't actually see anything preventing it from being set, so you should try just sending it in post
though uh
we still don't have the original infraction time for displaying both original and modified
we can tell if the infraction is edited, the new delta, and the original application time
Then what do you mean by original infraction time?
the original infraction application time at inserted_at
and the new delta from last_applied to the new expires_at
so we no longer know how long the original infraction delta is for
yeah I think that's fine, that's how it is atm so we're not losing anything. There's an issue to expand the infraction schema to save editing history, but atm I think that's good enough
I might make the current unpacking of DurationOrExpiry types into origin and expiry times into a function within time.py though
If we're doing it in management.py as well it's starting to be pretty repetitive
yeah that's fine
Say we have datetimes:
start = datetime(2022, 8, 13, second=5, microsecond=500_001)
end = datetime(2022, 8, 13, second=6, microsecond=499_999)
The current behaviour is get the difference and display:
diff = relativedelta(end, start) # relativedelta(microseconds=+999998)
diff.seconds # 0
Your behaviour to round them first:
start_round # Rounds up: datetime(2022, 8, 13, second=6)
end_round # Rounds down: datetime(2022, 8, 13, second=6)
diff = relativedelta(end, start) # relativedelta(microseconds=0)
diff.seconds # 0
Correct behaviour of rounding after getting the diff:
diff = relativedelta(end, start) # relativedelta(microseconds=+999998)
rounded_diff # relativedelta(seconds=+1)
rounded_diff.seconds # 1
And looking at that manually it makes sense, the difference is 999998 microseconds which is about a second.
ah okay, so I might do this instead?
def round_delta(delta: relativedelta) -> relativedelta:
"""
Round a relativedelta to the nearest second.
Resulting relativedelta objects will have microsecond values of 0.
"""
if delta.microseconds >= 500_000:
delta += datetime.timedelta(seconds=1)
delta.microseconds = 0
return delta
Is the microseconds setting there a potential mutation of the argument? 
since relativedelta doesn't seem to have a .replace()
is this for any edit or only duration edits?
if editing reason only, should we still update both the last_applied and expires_at with a new calculation?
nah no need

how come it says I can't run the command?
is this a site thing?
you can only run it in mod channels
It's to avoid leaking infraction data in public
okay I added an edited indicator and timestamp as such, does that seem right?
Looking at the source I think the delta += datetime.timedelta(seconds=1) will create a new delta anyway so shouldn't be any mutation issues.
What you posted looks good though
yeah I was just wondering about the delta.microseconds = 0 part
apparently it doesn't actually mutate in a function like that? Even if the iadd doesn't run
I'm not sure why though
It doesn't implement __iadd__ so it falls back to essentially delta = delta.__add__(datetime.timedelta(seconds=1)), making delta a different relativedelta to the one passed, so when you later do delta.microseconds = 0 it's only modifying the new delta, which is fine.
Side note: just noticed this is a thing and wtf why
In [87]: relativedelta(second=1) + relativedelta(seconds=1)
Out[87]: relativedelta(seconds=+1, second=1)
yeah uh...
there's also microseconds and microsecond
all the attributes have plural versions?
I have no idea what it is
but like if the microseconds is not over 500k, the if condition doesn't run and the iadd never happens
therefore the delta.microseconds = 0 actually changes the parameter object
is that acceptable or should I do a deepcopy?
ah true
I don't really mind
could do a copy just to be safe
I can alternatively always iadd something to not have to do deepcopy stuff
def round_delta(delta: relativedelta) -> relativedelta:
if delta.microseconds >= 500000:
delta += datetime.timedelta(seconds=1)
delta.microseconds = 0
return delta
def round_delta(delta: relativedelta) -> relativedelta:
round_up = delta.microseconds >= 500000
delta += relativedelta(seconds=round_up)
delta.microseconds = 0
return delta
I dunno if it's really more readable than a copy though
I think a copy would be more explicit
copy.copy should be enough rather than copy.deepcopy though right?
I guess it doesn't matter
Either is fine
have it as this rn
def round_delta(delta: relativedelta) -> relativedelta:
"""
Round a relativedelta to the nearest second.
Returns a new relativedelta with microsecond values of 0.
"""
delta = copy(delta)
if delta.microseconds >= 500000:
delta += relativedelta(seconds=1)
delta.microseconds = 0
return delta
@vale ibex is ```py
content = COMMAND_REGEX.search(linkify_tag_ref, content):
meant to be .sub?
yea lol
I updated the comment when I noticed
I copied the line from your code and didn't change the func call
Noice
I only recently discovered re.sub works with func repls too
very cool
!cban 905177072522125363 14d please don't use our server as an ad board
:incoming_envelope: :ok_hand: applied ban to @nova pumice until <t:1661628178:f> (13 days and 23 hours).
Speaking of, do you know any way to get the links to show up properly
Because they are in a codeblock, they just look like a codeblock
yea, I think in our css code block has higher prio that hyperlink
atleast in text colour
What future do you need
yea, the code css is higher than a
I want to type hint a DurationOrExpiry which is imported from bot.converters and it's circular
I could mark it as important in those sections, a bit hacky though
yeaa
Yup that's fine
Actually would it be that bad if a elements had the highest priority in general
yeah
yea that's what I'm thinking too
I'll just do it for tag pages for now, we can do more later if we decide to

Yeah it's still using code, it's still red
also, might be worth trying to clear cache and reloading
I did manage to break the github logo again though, which is nice
The styles had already loaded (I could see the !important in the styles page), but it didn't seem to do anything
huh
I'm trying to create a fiddle to test it
Doesn't change here either
lmfao what the fuck chris
Oh it's because we need to specify explicitly if applies to the children
Yea ```
code {
color: red;
}
a, code {
color: blue;
}
ahh cool
is this better
nice nice
New cropping algorithim
Seems to mostly kind of work 🤡
We still end up with some weird cropping like this here and there, thoughts @vale ibex?
Most things go to full sentences though
looks good
I opted not to include the ellipsis after all because basically everything is trimmed
the oddity you describes could be solved by putting something like Show more on a new line underneath, which links to the full tag
Hm, interesting
only if there is more to show
The show more could link to the tag
or if we wanted to be smart, could unfurl and rerender the whole tag
Can the codeblock background be a tiny bit darker?
It would be difficult to do that in a good way because the location where the cropping happens and the links exist are in completely different languages haha
Possibly, but this is what's provided by bulma and used throughout the codebase
ah, then the latter could be possible then right? if the js already has the full text
if a tag is cropped, we show something like show more at the end, clicking it removes the cropping
I imagine we'd need to re-render the tag for full md support
Nah it's already rendered will MD support
It would make the code a bit more involved, since we'd have to store the removed elements and keep track of the cropped changes
But it should be possible if we wanted
Let me see what that looks like
yea if it's too much work, this is already pretty nice
I'll leave it for now, we can get back to it later with the other improvements
sounds good
Right now I need to figure out the tag groups thing, it sounds like it would be really complicated for this system
That would read them out, but the code to display the listings is already a hack on the existing system
It would require quite a bit more logic to get it to display properly
ahh
Off the top of my head, the database might have to store the category, then the get_page_listings would need to return groups too, and the breadcrumbs system will actually need to work properly so that requires special casing the get_category function too
Since that relies on the tag actually existing on disk
@cold island
noice
Why are we using an external highlighter, when the markdown library we're using has support
Oh well whatever
This is an interesting page https://deploy-preview-763--pydis-static.netlify.app/pages/tags/ytdl/
Not sure I can do anything about it though
yea, ideally we'd want to wrap that text
but obviously wrapping this code block would be good, but we don't want to for other tag codeblocks 😅
it's probably fine
Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.
For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:
The following restrictions apply to your use of the Service. You are not allowed to:
1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service; (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;
3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; (b) with YouTube’s prior written permission; or (c) as permitted by applicable law;
9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
could just blockquote it?
It would require the change to be made to the tag, the site only renders the content from the bot repo directly
Do @propertrys work in django models
I don't see any issues yet, so I think they do
the fields return normal objects from instances, don't think there should be any issues
Awesome, I'll use them to implement your URL suggestion then
yeah i mean the tag itself
Ah gotcha
Is there a way to make a view return and tell django to check the next URLs instead of this view?
Basically, we have:
/pages/tags/...
if .. is a tag group, I want to return from this view, and go to the one managed by
/pages/...
Actually, maybe not
It would be more effort to get that other view to work for this properly
Why do django templates not have set, so annoying 😔
Or better yet, why does a with need to be closed
Tag groups are live now https://deploy-preview-763--pydis-static.netlify.app/pages/tags/very-cool-group/
Just need to do tests again :P
@vale ibex this is an uhhh interesting tidbit, the static builds are still failing occasionally because... they time out while talking to the site
We might want to extend the timeout on that step as well
I'm still getting that occasional infraction test failure, and it's always due to the ID being off by a bit. It seems that the difference is not really consistent.
So far I've had at least three different assertions fail: line 103, 104, 105. I'm consistently getting failures now (8 times in a row so far with no fix), and I have no idea why.
Environment:
DATABASE_URL=postgres://pysite:pysite@localhost:7777/pysite
METRICITY_DB_URL=postgres://pysite:pysite@localhost:7777/metricity
SECRET_KEY=suitable-for-development-only
STATIC_ROOT=./staticfiles
DEBUG=1
Running on host with command: poetry run task test
I managed to get a debugger into it
It seems the issue is... site#741
If your database access is quick enough, the insertion times will all be the same, which will create just a completely random order
I'll try to explicitly specify the time so this isn't so fragile
That seems to have fixed it, I'll push it in a separate PR
site#764
infractions? 
my site pr didn't break anything did it
Haha no dw this issue is almost as old as the infraction system
Just became a lot more prevalent recently because we sped up database access
(Btw if you haven't recreated your database since site#741 do so, you'll get so much sweet speed)
Like 5-10x speed improvement 😛

Can anyone help me resolve this error when I run py -m pip install disnake? ``` error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for yarl
Failed to build aiohttp frozenlist multidict yarl
ERROR: Could not build wheels for aiohttp, frozenlist, multidict, yarl, which is required to install pyproject.toml-based projects
This channel is for questions relating to this servers open source projects, not for general help
That being said, that error is one of the simpler ones, you just need the build tools, the error message already explains what you need do to [do to get them]
oh okay sorry
no worries
How do I only run one specific test? I know about retest but that doesn't work once the test passes (I'm editing the test so need to keep rerunning)
The test I'm wanting to run is tests.bot.rules.test_mentions.TestMentions.test_ignore_reply_mentions, where test_mentions.py is the file, TestMentions is the class, and test_ignore_reply_mentions is the test function
For now I'm doing poetry run task test tests/bot/rules/test_mentions.py which runs all the tests in that file (which is much better than all tests)
Bot tests are pretty quick in general, but to run a specific test:
path/to/file.py -k <name> which checks if name is in the test name
Or press the run button beside the test in pycharm, and experience the best test UI known to man
Ah yes, beautiful:```
============================= test session starts =============================
collecting ... ERROR: not found: C:\Users\tizzy\bot\tests\bot\rules\test_mentions.py::TestMentions::test_ignore_reply_mentions
Haha is this from the command or pycharm
Configure the default test template to use the project root as a workdir
Then the run button should work
Awesome
it is possible to only run some tests in bot?
whenever I try it just fails on the mocking thing or something
How are you running
uh
I just clicked the pycharm run next to the function
Read ~5 messages up (I just had this issue too)
Configure the workdir to the root
Do it on the run template so it’s configured for all future runs
Pycharm sometimes picks up unittest as well, so I do it on those two and autodetect
wait by root you mean the bot module or actually the root?
The folder where the pyproject file is
Actual root
hm...
I.e. in my case it's C:\Users\tizzy\bot
What's the function you're testing?
Works fine for me 🤷
Testing started at 18:26 ...
Launching pytest with arguments tests/bot/exts/moderation/infraction/test_utils.py::ModerationUtilsTests --no-header --no-summary -q in C:\Users\tizzy\bot
============================= test session starts =============================
collecting ... collected 5 items
tests/bot/exts/moderation/infraction/test_utils.py::ModerationUtilsTests::test_get_active_infraction
tests/bot/exts/moderation/infraction/test_utils.py::ModerationUtilsTests::test_notify_pardon
tests/bot/exts/moderation/infraction/test_utils.py::ModerationUtilsTests::test_post_user
tests/bot/exts/moderation/infraction/test_utils.py::ModerationUtilsTests::test_send_infraction_embed
tests/bot/exts/moderation/infraction/test_utils.py::ModerationUtilsTests::test_send_private_embed
================== 4 passed, 1 skipped, 5 warnings in 3.20s ===================
Process finished with exit code 0
PASSED [ 20%]PASSED [ 40%]PASSED [ 60%]SKIPPED (Current time needs to be patched so infraction duration is correct.) [ 80%]
Skipped: Current time needs to be patched so infraction duration is correct.
PASSED [100%]```

What's the full log?
Oh and do the test functions start with test_? Otherwise unittest doesn't detect that it's a test function
^
/Users/ionite/Library/Caches/pypoetry/virtualenvs/bot-xxxVP0Vd-py3.9/bin/python /Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm/_jb_pytest_runner.py --path /Users/ionite/repos/Py-Dis/bot/bot/exts/moderation/infraction
Testing started at 1:28 PM ...
Launching pytest with arguments /Users/ionite/repos/Py-Dis/bot/bot/exts/moderation/infraction --no-header --no-summary -q in /Users/ionite/repos/Py-Dis/bot
============================= test session starts ==============================
collecting ... collected 0 items
============================ no tests ran in 0.00s =============================
Process finished with exit code 5
Empty suite
Launching pytest with arguments /Users/ionite/repos/Py-Dis/bot/bot/exts/moderation/infraction`
That second bot should be tests
I think you're in the wrong dir?
tests should be somewhere in that fp
Probably should be /Py-Dis/bot/tests/bot/exts/moderation/infraction
hm..
when I run the file it does
Testing started at 1:32 PM ...
Launching pytest with arguments /Users/ionite/repos/Py-Dis/bot/tests/bot/exts/moderation/infraction/test_utils.py --no-header --no-summary -q in /Users/ionite/repos/Py-Dis/bot
============================= test session starts ==============================
collecting ... collected 9 items
which yeah I guess that one has the tests path
Are you clicking the run button in the tests dir
Send a screenshot of your run configuration
(Not the template one)
That module name seems to be wrong
The target in the second screenshot doesn’t look right
Is it autogenerated when you press the run button
yeah
I mean I guess for now you can manually fix it by correcting the fp
No clue why it's not generating correctly in the first place though
yeah weird
whatever though I'm happy with 1 file working
I was just waiting for all unit tests to run trying to test 1 thing
so this is considerably less painful 🥲
lol
I deleted and remade mine
Fair enough
Not sure if there's a way to update
Will Sir Lancebot run on Python 3.10 eventually as well?
yup
Cool
!d os.wait
b'py\n\nos.wait()\nWait for completion of a child process, and return a tuple containing its pid and exit status indication: a 16-bit number, whose low byte is the signal number that killed the process, and whose high byte is the exit status (if the signal number is zero); the high bit of the low byte is set if a core file was produced.\n\nwaitstatus_to_exitcode() can be used to convert the exit status into an exit code.\n\nAvailability: Unix.\n\nSee also\n\nwaitpid() can be used to wait for the completion of a specific child process and has more options.'
!d str
b'py\n\nclass str(object=\'\')``````py\n\nclass str(object=b\'\', encoding=\'utf-8\', errors=\'strict\')\nReturn a string version of object. If object is not provided, returns the empty string. Otherwise, the behavior of str() depends on whether encoding or errors is given, as follows.\n\nIf neither encoding nor errors is given, str(object) returns type(object).__str__(object), which is the \xe2\x80\x9cinformal\xe2\x80\x9d or nicely printable string representation of object. For string objects, this is the string itself. If object does not have a __str__() method, then str() falls back to returning repr(object).'
3.10 side-effect? I didn't think anything changed with strings/bytestrings
I think it may just be the cache
!d r
Inventories refreshed
ah the results from redis are broken
Yea, looks like redis is sending raw bytes and the bot isn't encoding
This wasn't happening in dev
so might be a migration thing
!d str
b'py\n\nclass str(object=\'\')``````py\n\nclass str(object=b\'\', encoding=\'utf-8\', errors=\'strict\')\nReturn a string version of object. If object is not provided, returns the empty string. Otherwise, the behavior of str() depends on whether encoding or errors is given, as follows.\n\nIf neither encoding nor errors is given, str(object) returns type(object).__str__(object), which is the \xe2\x80\x9cinformal\xe2\x80\x9d or nicely printable string representation of object. For string objects, this is the string itself. If object does not have a __str__() method, then str() falls back to returning repr(object).'
kk gonna drop the doc cache
the things in the cache should be fine, it's just returning the bytes for some reason
Yea, it's a global setting now
but might actually cause an issue if they're bytes in the cache on upgrade
oh so it caches strings now?
I don't think redis differentiates that
second invocations too?
Ah, nope
!d threading.Thread.join 🔨 blame on redis?
b'py\n\njoin(timeout=None)\nWait until the thread terminates. This blocks the calling thread until the thread whose join() method is called terminates \xe2\x80\x93 either normally or through an unhandled exception \xe2\x80\x93 or until the optional timeout occurs.\n\nWhen the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join() always returns None, you must call is_alive() after join() to decide whether a timeout happened \xe2\x80\x93 if the thread is still alive, the join() call timed out.\n\nWhen the timeout argument is not present or None, the operation will block until the thread terminates.\n\nA thread can be join()ed many times.'
bot#2249
Hey I want to document this in the async-rediscache guide and aioredis one, could you summarize where the change is exactly
Looking at the diff it seems to be something we removed?
I don’t entirely understand
aiordis <1.3.X did this by default
Gotcha, thanks
with the move to redis-py, it returns bytes by default now instead
well, iirc string in used to be string out
but now it always returns bytes, regardless of how you put it in there
I’ll investigate tomorrow too and try to provide the info
Correct
you could probably run it on 3.9 if you really wanted to
but you'd need to have build tools installed
so probably better to just use 3.10 :P
bot-core will refuse to install so you’d have to bump down its version
what should I do if my PR was forked when it was 3.9?
rebase/merge main, and then remake your venv
No more Union and Optional 
hm?
those weren't deprecated though were they?
No need for them I mean 😄
oh also um
do you think I can add a fix for bot#2247 in my infraction duration PR?
wdym
since if I make another fork there will a large amount of conflicts depending on which one gets merged first due to the extensive argument name changes in the infraction duration PR
Sorry, I don't follow
How is the issue related?
It's a string change in the antispam cog
well it still ends up as an infraction
yeah but it doesn't conflict with your PR
ah, were you thinking it would just be a change in the reason for the auto mute?
yep
I guess that would work, I was thinking of something more complex in recognizing auto-mutes on the infraction side
if it's just adding the moderators have been alerted to the actual reason string then it shouldn't have any conflicts
Was optional replaced? What’s the new syntax
just union none I guess
-> str | None
Hmm I think I’ll stick with optional lol
yeah sometimes it's actually longer than optional
Union and optional were marked as changed rather than deprecated
The 3.9 changes were deprecations tho
I guess cuz | ultimately is just sugar for Union?
and Optional was sugar for Union[x, None] anyways
It is, but by that same argument generics wouldn’t have deprecated their alternatives
wouldn't be a python release if it didn't break backward compatibility with something
It didn’t break backward compat haha
We can still use the same types we’ve been using since 3.7
Just there are better ways now
I probably had like 7 ML related libraries broken by the collections.abc switch in 3.8

Haha
!rule 9
Installing dependencies from lock file
Package operations: 91 installs, 0 updates, 0 removals
• Installing pyparsing (3.0.9)
• Installing wrapt (1.14.1)
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at ~\AppData\Local\Programs\Python\Python39\lib\json\decoder.py:355 in raw_decode
I keep getting this error when trying to setup the 3.10 poetry env
It also says \...\Python39\... so not sure why it seems to be using 3.9 even though it's set to use 3.10 as the base
Wait your poetry is a bat? Huh
Mine is an exe? 
I think your pycharm env is not synced with your shell env?
When I switched to 3.10 I removed the old env, selected no interpreter in pycharm, did poetry env use 3.10 poetry install, and then selected the new poetry env by adding existing in pycharm
PS C:\Users\tizzy\bot> poetry env use 3.10
Traceback (most recent call last):
File "C:\Users\tizzy\.poetry\bin\poetry", line 17, in <module>
from poetry.console import main
File "C:\Users\tizzy\.poetry\lib\poetry\console\__init__.py", line 1, in <module>
from .application import Application
File "C:\Users\tizzy\.poetry\lib\poetry\console\application.py", line 3, in <module>
from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo' ```
My poetry got broken at some point in the process
All poetry commands give that
Uh...
Reinstall poetry maybe? Did you use the new script
Introduction Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Poetry offers a lockfile to ensure repeatable installs, and can build your project for distribution.
System requirements Poetry requires Python 3.7+. It ...
get-poetry.py is deprecated if you used that
That works for the install but still same error
For any poetry command? Even outside pycharm?
Nvm, needed to restart the terminal
PS C:\Users\tizzy\bot> poetry env use 3.10
'python3.10' is not recognized as an internal or external command,
operable program or batch file.
EnvCommandError
Command python3.10 -c "import sys; print('.'.join([str(s) for s in sys.version_info[:3]]))" errored with the following return code 1, and output:
And I still have this```
PS C:\Users\tizzy\bot> poetry install
Installing dependencies from lock file
Package operations: 91 installs, 0 updates, 0 removals
• Installing pyparsing (3.0.9)
• Installing wrapt (1.14.1)
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at ~\AppData\Local\Programs\Python\Python39\lib\json\decoder.py:355 in raw_decode
351│ """
352│ try:
353│ obj, end = self.scan_once(s, idx)
354│ except StopIteration as err:
→ 355│ raise JSONDecodeError("Expecting value", s, err.value) from None
356│ return obj, end
357│
Uh, okay try setting it to the full path of your python executable
The documentation says you can just use minor version if python is in $PATH
Which is what I've always done, weird it doesn't work for yours 
Yeah, it is in path
Maybe it's because I have both 3.9 and 3.10 in path
There's also this ig PS C:\Users\tizzy> python -V Python 3.9.5 PS C:\Users\tizzy> py -V Python 3.10.0
From the path ig
PS C:\Users\tizzy> gcm python
CommandType Name Version Source
----------- ---- ------- ------
Application python.exe 3.9.515... C:\Users\tizzy\AppData\Local\Programs\...
PS C:\Users\tizzy> gcm py
CommandType Name Version Source
----------- ---- ------- ------
Application py.exe 3.10.15... C:\Windows\py.exe```
That shows where they're installed ig
Was that from windows store?
(Get-Command python).Path
Please
I apparently don't have these installed so it wouldn't be from windows store
Also what's the one to see if py recognizes your versions?
py -0?
PS C:\Users\tizzy> (gcm python).Path
C:\Users\tizzy\AppData\Local\Programs\Python\Python39\python.exe```
Yeah, and that shows 3.9+3.10
py --list also shows both?
AppData
So you unchecked "Install Python for all users"?
Yeah, might just need to give the specific path to Poetry
Yeah I most probably did
Same error as above
Specifying the entire fp seems to have worked?```
PS C:\Users\tizzy\bot> poetry env use C:\Users\tizzy\AppData\Local\Programs\Python\Python310\python.exe
Using virtualenv: C:\Users\tizzy\AppData\Local\pypoetry\Cache\virtualenvs\bot-6mLjCNeK-py3.10
Looks like it
poetry install still fails though, and is using 3.9
Try
poetry config experimental.new-installer false
No difference
They redid their package installer?
From python-poetry/poetry#4210
Ah wait no that works for poetry install
Thanks
Things are installing
But in 3.9?
No clue 🤷
It doesn't say what py version
Just "Installing dependencies from lock file"
Are you using pyenv btw?
I think if you do poetry --version it should show the python version?
Ah nice, back to this```
PS C:\Users\tizzy\bot> poetry --version
Traceback (most recent call last):
File "C:\Users\tizzy.poetry\bin\poetry", line 17, in <module>
from poetry.console import main
File "C:\Users\tizzy.poetry\lib\poetry\console_init_.py", line 1, in <module>
from .application import Application
File "C:\Users\tizzy.poetry\lib\poetry\console\application.py", line 3, in <module>
from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo'
Uh
So apparently...
Latest version of poetry is just missing dependencies for python 3.10.0 to 3.10.1 versions
pip install cleo tomlkit poetry.core requests cachecontrol cachy html5lib pkginfo virtualenv lockfile
I'm sorry what
It's no longer giving that error```
PS C:\Users\tizzy\bot> poetry --version
Poetry version 1.1.7
Huh, did you do the pip install?
Yeah
But it doesn't show python version so still no clue if it's using 3.10
Just do py --version?
However this does```
PS C:\Users\tizzy\bot> pip -V
pip 21.1.2 from C:\Users\tizzy\bot\venv\lib\site-packages\pip (python 3.10)
So I'm assuming it is 3.10
I like how this is casually a thing buried in a closed issue though 😂
Ah, wonderful ModuleNotFoundError: No module named 'botcore'
Guess I need to do poetry install again
Ah, beautiful```
PS C:\Users\tizzy\bot> poetry install
Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 0 removals
Installing the current project: bot (1.0.0)
Yeah, I'm still not even seeing what actually caused it
I think PyCharm is using a different venv to my PyCharm terminal
Yeah that happens
Remove your current one and delete (-) it on the interpreter list
And then click add new interpreter
Go to poetry, and do add existing interpreter
And the folder should show up...?
So I did it a roundabout way but I think it's good
Ugh ModuleNotFoundError: No module named 'async_rediscache'
But if I poetry install then it says that everything's already installed
poetry update -vv ?
So I've just done this, but now PyCharm seems to be stuck on the scan
The folder did show up this time but it's just seemingly infinitely scanning
And for some reason it has two tasks doing that

Uh
Set no interpreter, quit pycharm, then start pycharm and put it in the current interpreter...?
So now there's only one, but still seems stuck
Uh..
But the shell is working? You're in the correct poetry version?
The shell poetry env name matches the pycharm one?
Yep
No clue if this has anything to do with it
00:03 Plugin error: Plugin 'Poetry' (version '1.1.4') is not compatible with the current version of the IDE, because it requires build 211.* or older but the current build is PC-213.6777.50
Tbh I would just close the project, then delete the entire .idea folder in it, then restart and let it reinitialize
Gonna try this
Didn't work & now I can't even use the project lol
I have to wait for it to finish scanning, which it never does
It might be the case that your poetry env is corrupted. I’d delete the environment, update python to 10.6, and recreate the pycharm project as well
Wdym by recreate the pycharm project?
What you did here
Right
I guess I'll try that
Apparently uninstalling python takes a really long time lol
Right, all done
Now we try again
It's.... still stuck
I've created an entirely new poetry env and still the exact same issue
It just forever stays on this
you reinstalled poetry already right?
Maybe delete the install poetry folder in Local/and then reinstall, not sure 
Yep
Already done this numerous times
Left it running overnight in case it was just talking an absurd amount of time but it's still not finished
At this point we’ve reinstalled everything, so I guess reinstall windows? No that’s a joke
Have you tried the builtin “fix IDE” option
I guess I can try that
The "restart option" section of that seems to have actually fixed that lmao
Even though I've restarted the project myself numerous times
But the libraries pycharm shows in venv still don't match pip list
So this fixed the infinite "Scanning installed packages" but stuff still doesn't match
Which environment is selected in settings
Poetry (bot) [3.10.6]
Hm, try importing a package in the python interpreter?
Or remove and add it again (the environment)
>>> import botcore
botcore
<module 'botcore' from 'C:\\Users\\tizzy\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\bot-6mLjCNeK-py3.10\\lib\\site-packages\\botcore\\__init__.py'>```
venv folder still hasn't updated though
I've done that already numerous times
Currently when I run tests I getpy from async_rediscache import RedisCache E ModuleNotFoundError: No module named 'async_rediscache'
Which oddly looks like it might be correct since there's not async_rediscache folder in site-packages
Huh
After manually installing async_rediscache the test works 🤷
So for some reason poetry install didn't install that
arg = <MagicMock name='mock.created_at' id='2237042899456'>
E TypeError: Cannot parse single argument of type <class 'unittest.mock.MagicMock'>.
..\AppData\Local\pypoetry\Cache\virtualenvs\bot-6mLjCNeK-py3.10\lib\site-packages\arrow\factory.py:267: TypeError```for some reason `arrow.get(mockmessage.created_at)` is giving this error -- the actual code being `arrow.get(incident.created_at)`
this is main?
The test is from main, yeah
I'm on a different branch though
incident-archive-msg-improvements
Yeah, that's what broke the tests
And I've spent ~3hrs trying to fix them with the biggest issue being the poetry thing from yesterday that still isn't fixed
well it appears to fail on github as well, so I don't think it's related to your poetry?
Yeah, poetry is something else
yeah your env is like the most cursed I've seen it
I still have this running infinitely, and PyCharm's venv doesn't match the linked /pypoetry/Cache/virtualenv/bot-.../
I usually have to do a bit of fiddling every now and then but nothing like yours 😅
if you just use pycharm to make a brand new unrelated poetry project for 3.10.6
does it work normally?

🤷
Via poetry install iirc
hm
It was created through pycharm
oh? 
From the "Add interpreter"
oh but the folder was already there?
🤷
I think I originally did a new one, then set interpreter to nothing and did existing
So the top option?
yeah
and after you delete the venv the existing should be empty
(restart pycharm after deleting)
I mean if your new projects are working fine then it's just something bork with this specific venv?
This yeah?
yeah, if you click existing its empty right?
Yes
okay yeah
It's installing everything atm
hopefully it works and you can escape the pycharm poetry env mismatch purgatory 
I mean I've done this a few times now so I doubt it
Yeah, still not matching
From the looks of it PyCharm is using its own env instead of the poetry one still
I.e when I right-click venv and select "open in explorer" it opens C:\Users\tizzy\bot\venv\Lib\site-packages and not ...\pypoetry\Cache\virtualenv\bot-....\Lib\site-packages
wait do you have an in-project venv?
wait you reinstalled poetry earlier right
Yeah
can you run poetry config --list
from cleo import Application as BaseApplication
ModuleNotFoundError: No module named 'cleo'
```wooo
lmao what
Time to reinstall the dependencies again lmao
aren't you on 3.10.6 now?
Because why would a project come installed with its dependencies 🤷
that dependency issue was only for 3.10.0-3.10.1 iirc
Who tf knows lol
PS C:\Users\tizzy\bot> pip -V
pip 21.1.2 from C:\Users\tizzy\AppData\Local\pypoetry\Cache\virtualenvs\bot-6mLjCNeK-py3.10\lib\site-packages\pip (python 3.10)
I don't even have 3.10 installed 🤷
ah
So I'm assuming that just doesn't include the minor version
can you cd to C:\Users\tizzy\AppData\Local\pypoetry
is there a poetry executable in there?
No
hm
wait what do you mean
but you have 3.10.6 installed?
I have 3.10.6 installed, not 3.10
I did have 3.10 but Scaleios said to update to 3.10.6 and try, so I did
Just gonna manually install the poetry dependencies
PS C:\Users\tizzy\bot> poetry config --list
cache-dir = "C:\\Users\\tizzy\\AppData\\Local\\pypoetry\\Cache"
experimental.new-installer = false
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.path = "{cache-dir}\\virtualenvs" # C:\Users\tizzy\AppData\Local\pypoetry\Cache\virtualenvs
if you do (Get-Command poetry).Path?
my working theory is your pycharm and shell are trying to use completely different versions of poetry
PS C:\Users\tizzy\bot> (gcm poetry).Path
C:\Users\tizzy\.poetry\bin\poetry.bat
you installed with this earlier right?
Yeah
I already had the tizzy\.poetry though I think not sure
I dunno what's going on anymore
something is broken with your poetry though
maybe just delete the whole .poetry folder before installing again, I remember I saw that on a few comments on the poetry issue
PS C:\Users\tizzy\bot> poetry self update
Updating to 1.1.14
PermissionError
[WinError 5] Access is denied: 'C:\\Users\\tizzy\\.poetry\\lib\\poetry\\_vendor\\py3.9\\msgpack\\_cmsgpack.cp39-win_amd64.pyd'
Yeah lol
yeah get rid of that whole .poetry directory and install again
completely cursed
also close pycharm when you do that
and reopen pycharm after you reinstall
it only reindexes poetry paths on startup
So I've deleted .poetry
Now this?
yeah
it's gonna somehow resurrect a zombie version of 3.9 
I really hope not 😢
3.9 is gone
This installer is deprecated. Poetry versions installed using this script will not be able to use 'self update' command to upgrade to 1.2.0a1 or later. It is recommended to use https://install.python-poetry.org instead. Instructions are available at https://python-poetry.org/docs/#installation```
Ah nice
PS C:\Users\tizzy> (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
Retrieving Poetry metadata
The latest version (1.1.14) is already installed.```wtf lol
I deleted the .poetry but apparently it's still installed
Yeah poetry isn't a valid command in the terminal 🤷
Wtf is going on
Right, I had to delete pypoetry from appdata/local and appdata/roaming
Okay, it's reinstalled PS C:\Users\tizzy> poetry --version Poetry version 1.1.14
Now to setup the env in PyCharm
Okay so if you just do self update does it error
I assume you mean poetry self update, and that says I'm using the latest version
Okay... That's an improvement 👀
Yeah the path makes sense now
I always had an exe
I don't know how you have a .bat as poetry before

Maybe not actually
I think it's just taking its time
Since the text underneath is updating
Yep, it's working 😄
🎉
And it installed everything properly (last time it didn't installed async_rediscache)
Well check if your unit tests work I guess
And if it's using 3.10 and dependencies correctly
Was it supposed to work?
E TypeError: Cannot parse single argument of type <class 'unittest.mock.MagicMock'>.
..\AppData\Local\pypoetry\Cache\virtualenvs\bot-6mLjCNeK-py3.10\lib\site-packages\arrow\factory.py:267: TypeError```
self = <arrow.factory.ArrowFactory object at 0x0000022F93228B80>
args = (<MagicMock name='mock.created_at' id='2403377807024'>,), kwargs = {}
arg_count = 1, locale = 'en-us', tz = None, normalize_whitespace = False
arg = <MagicMock name='mock.created_at' id='2403377807024'>```
It seems to be passing a magicmock instead of that datetime from .created_at
This is the full log: https://paste.pythondiscord.com/raturebope
I don't think so, but I equally have no clue why it's not
bot#2031
The github one is up 2 date, except from stuff I did trying to fix the tests that didn't work
Should probably undo the edits actually since they don't work
Also this thing is broken too? Lol
From what I can tell this should never have been merged into main (the 3.10 PR)
But obvs the tests have to work first for that to happen so 🤷
The tests are working on the exact main version though I think
The test seems like it is working as intended. You have updated make_embed to use incident.created_at
but in the other tests, you don't update incident.created at to be a datetime
incident being from the message
But I have for the one I'm running
async def test_make_embed_content(self):
"""Incident content appears as embed description."""
current_time = datetime.datetime(2022, 1, 1, 0, 0, 0, tzinfo=datetime.timezone.utc)
incident = MockMessage(content="this is an incident", created_at=current_time)
reported_timestamp = discord_timestamp(current_time)
relative_timestamp = discord_timestamp(current_time, TimestampFormats.RELATIVE)
embed, file = await incidents.make_embed(incident, incidents.Signal.ACTIONED, MockMember())
self.assertEqual(
f"{incident.content}\n\n*Reported {reported_timestamp} ({relative_timestamp}).*",
embed.description
)```
What is the test that's failing?
yup :D
async def setUp(self):
self.current_time = datetime.datetime(2022, 1, 1, tzinfo=datetime.timezone.utc)
async def test_make_embed_actioned(self):
"""Embed is coloured green and footer contains 'Actioned' when `outcome=Signal.ACTIONED`."""
embed, file = await incidents.make_embed(MockMessage(created_at=self.current_time), incidents.Signal.ACTIONED, MockMember())
self.assertEqual(embed.colour.value, Colours.soft_green)
self.assertIn("Actioned", embed.footer.text)```
What was the setup function?
Nvm, it's not async
the setup function gets called before every test
there is an async setup if you need one
Nah I don't
I just need to add created_at=self.current_time to all of the MockMessage()
Nah it's not
It changes
There's 3 different messages
I guess I could assign each one but that seems overkill
Yea, setup is just there to remove code duplication from your tests
if there isn't duplication then it doesn't need to be there
The current_time is needed in more than one test class, so would it be worth making it a constant in the file?
There is a module wide setup function that exists, similar to how there are test specific setup functions
So just def setUp() but outside the classes?
I think it's setUpModule
Is there a preference to whether it goes at the top or bottom of the file?
but I'm also not sure how that works with variable scoping
so it might just be better to create a screaming case constant
Yeah
Okay
Now moderation tests about the rediscache are failing 
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_unsilence_role - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been initialized ...
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_skipped_already_unsilenced - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been ...```
How do I fix that? @vale ibex
Uhhh, what version of redis-py is installed?
or async-rediscache
This should be initialised by the super class
Could you try doing poetry install --remove-untracked
and then running tests again
I'll try that when I'm back on my laptop
1.0.0rc2
This didn't change anything
Err
Now I've got even more tests failing (for the same reason)
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_skipped_already_unsilenced - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been ...
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_unsilence_role - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been initialized ...
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_preserved_other_overwrites_voice - async_rediscache.session.RedisSessionNotInitialized: the redis session has not...
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_removed_notifier - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been initialize...
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_restored_overwrites_text - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been in...
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_restored_overwrites_voice - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been i...
FAILED tests/bot/exts/moderation/test_silence.py::UnsilenceTests::test_sent_correct_message - async_rediscache.session.RedisSessionNotInitialized: the redis session has not been initialized ...```
just to be sure, could you delete any __pycache__ folders you have ?
I don't seem to have any


