Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PYTHONWARNDEFAULTENCODING=1 and fix violations #10935

Merged
merged 4 commits into from
Jun 21, 2023

Conversation

nondescryptid
Copy link
Contributor

@nondescryptid nondescryptid commented Apr 22, 2023

Updated attempt to check encoding warnings as in #10328, as dependencies have been updated in the past 6 months.

(Zac edit: now also fixes #7781)

testing/python/fixtures.py Outdated Show resolved Hide resolved
@Zac-HD Zac-HD changed the title Committing changes made in issue 10328 Enable PYTHONWARNDEFAULTENCODING=1 and fix violations Jun 20, 2023
@Zac-HD Zac-HD force-pushed the 10328 branch 6 times, most recently from 3c6606e to fa9c498 Compare June 20, 2023 07:50
@Zac-HD Zac-HD requested a review from The-Compiler June 20, 2023 08:26
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Nice work, I didn't think anyone would have the endurance to do this one :)

I suggest merging this quickly to avoid conflicts and regressions.

src/_pytest/helpconfig.py Show resolved Hide resolved
Copy link
Member

@The-Compiler The-Compiler left a comment

Choose a reason for hiding this comment

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

Amazing work, thanks @Zac-HD and @nondescryptid! I noticed a couple of small things, but I agree we should aim to merge this quickly (and I'm looking forward to turning this warning on for my own project finally!).

src/_pytest/pytester.py Outdated Show resolved Hide resolved
testing/test_parseopt.py Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@Zac-HD Zac-HD force-pushed the 10328 branch 2 times, most recently from 8841734 to f6b995e Compare June 21, 2023 17:41
@Zac-HD Zac-HD requested a review from The-Compiler June 21, 2023 17:49
Copy link
Member

@The-Compiler The-Compiler left a comment

Choose a reason for hiding this comment

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

Thanks again! IMHO this deserves its own changelog entry to make downstream projects aware that they can now use this, but that could be done in a follow up PR too.

@nondescryptid
Copy link
Contributor Author

Oh my goodness. @The-Compiler So sorry about not responding earlier to your request for changes. I didn't receive notifications for this and only realised this had been merged when I was looking through my account's commit history and wondered why I had a commit to pytest. Massive thanks to you, @bluetech and @Zac-HD!

@The-Compiler
Copy link
Member

All good, no worries! We got it all merged, and it still was a good starting point :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pytest debug option "--debug" has problems to write non ASCII characters
4 participants