Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 10, 2022

It does not happen anymore, I've tested this locally using: PYTHONDUMPREFSFILE=ex.txt ./python.exe -m test -R : -v test_enum

Refs #30472

CC @ethanfurman and @pablogsal
And CC @corona10 as my mentor.

https://bugs.python.org/issue46301

@sobolevn sobolevn requested a review from ethanfurman as a code owner January 10, 2022 09:06
@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting review labels Jan 10, 2022
@sobolevn sobolevn added 🔨 test-with-buildbots Test PR w/ buildbots; report in status section skip news labels Jan 10, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @sobolevn for commit 9b858f5 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jan 10, 2022
@sobolevn
Copy link
Member Author

Looks like the CI failed for some unrelated reasons:
Снимок экрана 2022-01-10 в 13 10 32
https://buildbot.python.org/all/#/builders/470/builds/379

I will try to apply test-with-buildbots again once all others will finish.

@sobolevn
Copy link
Member Author

Ok, buildbots take quite a long time to work (1h+). I hope that retriggering a single failing one is not so important. Other Refleak tests pass. So, I don't want to waste extra resources 🙂

@sobolevn sobolevn requested a review from pablogsal January 10, 2022 17:08
Copy link
Member

@ethanfurman ethanfurman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the solution.

While it pains me to say it, please fix the formatting.

# `_convert_` uses a module side effect that does this. See 30472
with support.swap_item(
sys.modules, MODULE, _ModuleWrapper(sys.modules[MODULE]),
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use Black formatting on enum code, please. Continuation lines should be eight space indents, and each closing ), ], and } should line up as if it were code and not syntax, with the final line (if it introduces a block) only indented the normal four spaces. In other words:

a_long_list_comprehension = [
        x
        for x in spam(eggs, ham)
        if x not in some_previous_group
        ]

and

with yada(
        arg1, arg2, something_else=None,
    ):
    # body of code

COMPLEX_A = 2j
COMPLEX_B = 3j

class _ModuleWrapper:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this. Please switch over the other _convert_ tests to use it, which will allow the removal of the setUp() methods in those tests.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@sobolevn
Copy link
Member Author

sobolevn commented Jan 10, 2022

Done! Code formatting is very important I (as a maintainer of ~10 different linters) can totally relate 😊

Thanks for the review!

To make bot happy:

I have made the requested changes; please review again

@ethanfurman
Copy link
Member

I have made the requested changes; please review again

I think you forgot a period. ;-)

@ethanfurman ethanfurman merged commit 582286d into python:main Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants