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

3.17.0: ERROR collecting tests/test_path.py #112

Closed
mtelka opened this issue Sep 19, 2023 · 2 comments
Closed

3.17.0: ERROR collecting tests/test_path.py #112

mtelka opened this issue Sep 19, 2023 · 2 comments

Comments

@mtelka
Copy link

mtelka commented Sep 19, 2023

I'm trying to run tests for zipp==3.17.0 on OpenIndiana, but the test collection fails:

_____________________ ERROR collecting tests/test_path.py ______________________
/usr/lib/python3.9/vendor-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.9/vendor-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.9/vendor-packages/_pytest/doctest.py:567: in collect
    module = import_path(
/usr/lib/python3.9/vendor-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/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
    ???
/usr/lib/python3.9/vendor-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
tests/test_path.py:12: in <module>
    import jaraco.itertools
/usr/lib/python3.9/vendor-packages/jaraco/itertools.py:17: in <module>
    import inflect
/usr/lib/python3.9/vendor-packages/inflect/__init__.py:2027: in <module>
    class engine:
/usr/lib/python3.9/vendor-packages/inflect/__init__.py:2049: in engine
    def defnoun(self, singular: Optional[Word], plural: Optional[Word]) -> int:
pydantic/decorator.py:49: in pydantic.decorator.validate_arguments
    ???
pydantic/decorator.py:36: in pydantic.decorator.validate_arguments.validate
    ???
pydantic/decorator.py:126: in pydantic.decorator.ValidatedFunction.__init__
    ???
pydantic/decorator.py:264: in pydantic.decorator.ValidatedFunction.create_model
    ???
pydantic/main.py:1026: in pydantic.main.create_model
    ???
pydantic/main.py:186: in pydantic.main.ModelMetaclass.__new__
    ???
E   TypeError: Argument 'bases' has incorrect type (expected list, got tuple)

Please note pydantic is at version 1.10.12.

@jaraco
Copy link
Owner

jaraco commented Dec 16, 2023

That seems like a bug in inflect/pydantic.

I'm unable to replicate it, even with pydantic 1.10.12:

 ~ @ pip-run inflect "pydantic==1.10.12" -- -c 'import inflect'; echo done
done

I see you've already found the upstream issue: pydantic/pydantic#7689.

I don't think there's much this project can do about it (other than to push projects like jaraco.itertools to drop the inflect dependency, which I'm aware of), so closing.

@jaraco jaraco closed this as completed Dec 16, 2023
@mtelka
Copy link
Author

mtelka commented Jun 2, 2024

Just to close the loop: this issue is not reproducible with pydantic 2.7.2 and zipp 3.19.1.

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

No branches or pull requests

2 participants