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

pyinfra3 inventory.py is neither a valid Python import or hostname - warning #1069

Closed
cernoel opened this issue Feb 23, 2024 · 0 comments · Fixed by #1111
Closed

pyinfra3 inventory.py is neither a valid Python import or hostname - warning #1069

cernoel opened this issue Feb 23, 2024 · 0 comments · Fixed by #1111
Labels
Bug Label for all kind of bugs.
Milestone

Comments

@cernoel
Copy link

cernoel commented Feb 23, 2024

Describe the bug

pyinfra3 throws a warning on "Loading inventory" when using "inventory.py":

"inventory.py is neither a valid Python import or hostname."

... but it gets loaded anyway.

using ./inventory.py instead of inventory.py removes the error

To Reproduce

try with pyinfra v2.9 vs 3.0.b0

pyinfra ./inventory.py exec -- echo hello
pyinfra inventory.py exec -- echo hello

Expected behavior

A consistent behaviour, (so one option) or both examples possible.

Meta

  • How was pyinfra installed: pip
@cernoel cernoel added the Bug Label for all kind of bugs. label Feb 23, 2024
@Fizzadar Fizzadar added this to the v3 milestone Mar 13, 2024
martenlienen added a commit to martenlienen/pyinfra that referenced this issue May 24, 2024
Check for inventory files first, so that they are never mistaken for python modules or
hostnames and avoid unnecessary warnings. Also, support IPv6-only hosts.

Fixes pyinfra-dev#1069.
martenlienen added a commit to martenlienen/pyinfra that referenced this issue May 24, 2024
Check for inventory files first, so that they are never mistaken for python modules or
hostnames and avoid unnecessary warnings. Also, support IPv6-only hosts.

Fixes pyinfra-dev#1069.
Fizzadar pushed a commit that referenced this issue May 25, 2024
Check for inventory files first, so that they are never mistaken for python modules or
hostnames and avoid unnecessary warnings. Also, support IPv6-only hosts.

Fixes #1069.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Label for all kind of bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants