-
Notifications
You must be signed in to change notification settings - Fork 266
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
MNT: improve warnings #485
Conversation
Thanks, @tacaswell. This generally looks good to me. There seems to be some difficulty running the new test while also running doctests, because choosing to run doctests imports One option is to just remove the new test. Perhaps we could instead test this deprecation warning with a bash command in .travis.yml, such as: python -c 'import toolz.compatibility' 2>&1 | grep "^<string>:1: DeprecationWarning: The toolz.compatibility module" |
We can also put that check in a subprocess call (we use that technique to test multiple GUI frameworks with Matplotlib). |
3740be1
to
8fd6530
Compare
@eriknw any idea why CI is not firing? |
Oh no! Probably because we haven't moved to Github Actions yet. I guess it's (past) time to do that. I can do it unless somebody else really, really wants to :) Thanks for the ping. |
Although, weird, did CI never fire for this PR? |
Regardless, I plan to give |
It fired on the pre-rebase PR (which is what told us doctest was unhappy). |
So it warns in the user's code not where it is defined.
toolz/tests/test_itertoolz.py::test_random_sample toolz/tests/test_itertoolz.py::test_random_sample toolz/tests/test_itertoolz.py::test_random_sample toolz/tests/test_itertoolz.py::test_random_sample ../lib/python3.9/random.py:100: DeprecationWarning: Seeding based on hashing is deprecated since Python 3.9 and will be removed in a subsequent version. The only supported seed types are: None, int, float, str, bytes, and bytearray. self.seed(x) explicitly hash the values before passing in
8fd6530
to
6bf5d19
Compare
6bf5d19
to
7dcce7a
Compare
@eriknw versioneer (?!?) needed some updating to install on py311 so I took the opportunity to rebase and fix this up again! I gave up on making pytest warn on error because I could not sort out how to get doctest to not import the module that warns. |
Thanks, you're the best @tacaswell! Yeah, I also had difficulty with it. Merging! |
Your welcome (and your too kind). |
Came across this warning while working on another library. This PR: