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

Fix or ignore all warnings #55

Merged
merged 3 commits into from
Aug 13, 2023
Merged

Fix or ignore all warnings #55

merged 3 commits into from
Aug 13, 2023

Conversation

diazona
Copy link
Owner

@diazona diazona commented Aug 12, 2023

I fixed the source of one warning related to the code in this project, and ignored some others that are issued by setuptools/distutils code. I think ignoring is the right call there because the whole purpose of this project is to process legacy configuration so we are naturally going to use some deprecated features, but I wouldn't mind having that double-checked.

I noticed a warning being issued by this line of code during testing,
so I'm fixing the line that writes out a file to make the encoding
explicit. This achieves the goal that no code in this project itself
issues any warnings.
@diazona diazona added this to the Initial release milestone Aug 12, 2023
@diazona diazona self-assigned this Aug 12, 2023
@diazona diazona marked this pull request as draft August 12, 2023 23:53
@sjlongland
Copy link
Collaborator

Yep, the idea of this project is people will be able to run the old setup.py one last time… and finally retire it from service.

So if setuptools/distutils squawks… no big deal. I think some of the warnings were file encoding issues… if memory serves, Python historically used ISO-8859-1 (aka latin1) encoding, and moved to UTF-8 with Python 3.

@diazona diazona force-pushed the fix-warnings-in-test/1/dev branch from 14804a5 to cf0935b Compare August 13, 2023 02:50
A warning about the deprecation of distutils in Python 3.12 appears in
CI when running under Python 3.11 with old versions of our dependencies.
(Most likely it's related to using old setuptools, but I can't reproduce
it locally so I can't be sure.) This warning isn't relevant to us
because we can import the vendored version of distutils from setuptools
itself, so I'm setting the warning filter up to ignore it.
@diazona diazona force-pushed the fix-warnings-in-test/1/dev branch from cf0935b to 8fc58ac Compare August 13, 2023 03:10
These warnings are issued outside of our code base. I believe they're
mostly related to outdated setuptools functionality appearing in our
tests (plus the one random warning from pyparsing). But since we have to
handle old configuration directives - in fact that's the whole point of
the package - there's nothing that makes sense to do about the warnings
other than ignoring them.
@diazona diazona force-pushed the fix-warnings-in-test/1/dev branch from 8fc58ac to e91713b Compare August 13, 2023 03:15
@diazona diazona marked this pull request as ready for review August 13, 2023 04:52
@diazona diazona requested a review from sjlongland August 13, 2023 04:52
@diazona diazona assigned sjlongland and unassigned diazona Aug 13, 2023
@diazona
Copy link
Owner Author

diazona commented Aug 13, 2023

This one looks ready. I got rid of all the warnings I saw showing up in CI, not because it was really necessary to do so, but I figured I might as well get them all as long as I was looking into warnings in the first place.

We could configure pytest to upgrade all (unignored) warnings to errors if we want to, although it certainly doesn't have to happen as part of this PR.

@diazona diazona enabled auto-merge August 13, 2023 04:54
@diazona diazona merged commit b294e90 into main Aug 13, 2023
@diazona diazona deleted the fix-warnings-in-test/1/dev branch August 13, 2023 04:59
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.

2 participants