-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add py310 support #74
Conversation
Codecov Report
@@ Coverage Diff @@
## master #74 +/- ##
==========================================
- Coverage 92.32% 92.10% -0.22%
==========================================
Files 6 7 +1
Lines 456 456
==========================================
- Hits 421 420 -1
- Misses 35 36 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
45f0c5a
to
60fd24d
Compare
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
- name: Setup Micromamba | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about the caching options but I guess that wouldn't help since no conda env yml file. But maybe if use extra-specs as mentioned below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably. I only use cache for big envs, this one is not that heavy but we can try that in another PR I already added too much in this one.
@@ -36,7 +36,7 @@ | |||
from collections import defaultdict | |||
from typing import Union | |||
|
|||
from stdlib_list import stdlib_list | |||
from .stdliblist import builtin_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just be me but I find stdliblist
a bit ugly / hard to read, maybe the module could be stdlib_list_
instead or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super ugly! I'm terrible with names. I'm OK with stdlib_list_
. Let's see what @ericdill thinks and we'll rename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, let's hold this one for a bit. I forgot I'm also a maintainer of stdlib-list and these changes should be there instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see what @ericdill thinks and we'll rename.
FWIW you don't need my approval for anything in this project. do whatever you think is best. i trust you on this stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd prefix this to be _stdlib_list
but it's an internal detail so we can fix it in post
Also did you see the
in the test run? Not part of this PR though. |
builtin_modules = stdlib_list(pyver) | ||
del pyver | ||
except ImportError: | ||
# assuming py>=3.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the case now, but if stdlib-list was somehow missing in Python <3.10 situation, then the error message could be a bit confusing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is listed as a dependency for py<3.10, so the only way that scenario would happen is in a broken installation with "no-deps" and people doing that are usually experts. The error message would be:
AttributeError: module 'sys' has no attribute 'stdlib_module_names'
That is, IMO, the correct information an advanced users should know but I accept suggestions for a better one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I suppose you are right, that makes sense.
I guess I would lean towards switching the try
and except
parts or doing a sys.version_info
check.
And I know you're going another way here, but I also feel like it could be useful to have this in stdlib-list, e.g. to support listing the 3.10 stdlib from an older Python version, and to reduce the number of times this sort of code here would have to be written perhaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. It makes sense to put in stliblib-list. I completely forgot I am a maintainer there and I can port this over tomorrow.
Not sure where that is coming from but we should probably fix it in another PR. |
My approval never was or is needed here, but I am LGTMing this in an effort to get it merged ASAP. Thank you @ocefpaf! |
Co-authored-by: Zachary Moon <[email protected]>
i pushed a change to fix the tests but now we're failing because of the change introduced in #76. the reason for this is that python-stdlib-list has the builtin as "concurrent.futures". so when we're using python-stdlib-list, that's the thing that gets reported. The new way we're finding modules,
only has the top-level namespace (i.e., it only shows so now i think the solution probably has to be to have separate tests for py<=3.9 and py>=3.10. i'll give a think on how to implement that |
…tdlib-list and when not using it
🤞🏻 584c8a9 🤞🏻 should fix it |
@zmoon iirc this was from some weird windows encoding thing that CJ hit a while back. it's in one of the test files somewhere i think. could be a thing to look into later |
yolo |
@ocefpaf it's embarassing to admit but i have no idea how to release a new version of this |
oh actually looks like @beckermr did the last release. want to do another? |
I'm just tagging and using GitHub auto generated changelog. See https://github.com/ericdill/depfinder/releases/tag/V2.9.0 I'll add some extra stuff to automatically push to PyPI soon but I can push this one manually. |
@ericdill I do plan to move most of this stuff to |
thanks for releasing! conda-forge PR conda-forge/depfinder-feedstock#29 |
Something is failing for python 3.10 in the feedstock pr. Can you all look? |
Added a test matrix to be sure we find some corner cases.
Closes #69
stdlib-list
a py<310 dependency