-
Notifications
You must be signed in to change notification settings - Fork 63
WIP: Eliminate from ... import *
#304
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
Draft
moreati
wants to merge
6
commits into
bytecodealliance:main
Choose a base branch
from
moreati:eliminate-star-imports
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was interfering with running tests locally, pytest - scanned .git/ & tried to parse content as Python source - scanned build/ and found duplicates of e.g. wasmtime/_config.py This restores the relavant default globs for norecursedirs, that were previously overridden. https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-norecursedirs E.g. ``` __________ ERROR collecting .git/logs/refs/remotes/origin/issue231-src-dist-version_suffix_in_setup.py __________ .venv/lib/python3.9/site-packages/_pytest/python.py:498: in importtestmodule mod = import_path( .venv/lib/python3.9/site-packages/_pytest/pathlib.py:587: in import_path importlib.import_module(module_name) ../../.local/share/uv/python/cpython-3.9.23-macos-aarch64-none/lib/python3.9/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1030: in _gcd_import ??? <frozen importlib._bootstrap>:1007: in _find_and_load ??? <frozen importlib._bootstrap>:986: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:680: in _load_unlocked ??? <frozen importlib._bootstrap_external>:846: in exec_module ??? <frozen importlib._bootstrap_external>:983: in get_code ??? <frozen importlib._bootstrap_external>:913: in source_to_code ??? <frozen importlib._bootstrap>:228: in _call_with_frames_removed ??? E File "/Users/alex/src/wasmtime-py/.git/logs/refs/remotes/origin/issue231-src-dist-version_suffix_in_setup.py", line 1 E 0000000000000000000000000000000000000000 61c83b6 Alex Willmer <alex@moreati.org.uk> 1749727258 +0100 update by push E ^ E SyntaxError: invalid syntax ``` ``` __________ ERROR collecting src/wasmtime/bindgen/generated/imports/stderr.py __________ import file mismatch: imported module 'wasmtime.bindgen.generated.imports.stderr' has this __file__ attribute: /Users/alex/src/wasmtime-py/build/lib/wasmtime/bindgen/generated/imports/stderr.py which is not the same as the test file we want to collect: /Users/alex/src/wasmtime-py/src/wasmtime/bindgen/generated/imports/stderr.py HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules ```
Nox is a Python CLI tool for running tests or other build/project management tasks. It's invoked as - `nox` or `python3 -m nox` - run every session defined in noxfile.py - `nox --list` - list sessions defined - `nox -s <session>` - Run a particular session - `nox -p <python,...> - Run sessions the use the given python version(s) If desired checks such as MyPy or style can also be included. See https://nox.thea.codes/en/stable/index.html
Preparation before removing "from ctypes import *"
There are still instances of "from wasmtime import *" in the test suite
My preference would be a, but I'm fine with b or c. |
|
I think it's reasonable yeah! I'm happy to defer to whichever style you feel is best, I don't have a strong preference myself |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On a hunch I thought one or more of the
from ... import *might be triggering or influencing #302, so I tried removing them. This is result, it did not fix #302, I'm creating this PR mainly on the off chance there is any interest.Otherwise please feel free to ignore/close it. The number of changed lines is quite a high, for a low to middling benefit.