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

Failing in project without dependencies #20

Open
DBS-ST-VIT opened this issue May 28, 2024 · 4 comments
Open

Failing in project without dependencies #20

DBS-ST-VIT opened this issue May 28, 2024 · 4 comments

Comments

@DBS-ST-VIT
Copy link

DBS-ST-VIT commented May 28, 2024

The command poetry freeze-wheel is failing in projects without dependencies. Example:

[tool.poetry.dependencies]
python = "^3.9"

This happens, if you are using this in a generic pipeline template for much projects. Stdout/Stderr example:

freezing wheels
'NoneType' object is not iterable

Imho, this shouldnt be an (unhandled) error. A warning log message is okay, but the exit code should be 0 anyway.

@DBS-ST-VIT
Copy link
Author

I contributed a fix in #21 - in my environment, this is working flawless.

@ajkerrigan @kapilt May you can have a look on this? This is production relevant for us. Thanks - and also thanks for this great project! :)

@WhoAmI0501
Copy link

I am also facing this problem in a similar use case. As a workaround, i added some unused dummy dependencies to the projects, that are affected by this bug - but i think, that this workaround is very very hacky.

@DBS-ST-VIT
Copy link
Author

I contributed a fix in #21 - in my environment, this is working flawless.

I also added some tests for my code, since i had some time left for that. The pytest output can be seen below:

========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.10.12, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/xxx/Desktop/poetry-plugin-freeze
plugins: cov-4.0.0, xdist-3.2.1
collected 6 items                                                                                                                                                                                        

tests/test_freeze.py ......                                                                                                                                                                        [100%]

---------- coverage: platform linux, python 3.10.12-final-0 ----------
Name                                   Stmts   Miss  Cover
----------------------------------------------------------
src/poetry_plugin_freeze/__init__.py       0      0   100%
src/poetry_plugin_freeze/app.py          208      6    97%
----------------------------------------------------------
TOTAL                                    208      6    97%


=========================================================================================== 6 passed in 2.29s ============================================================================================

@enidisepic
Copy link

+1 same issue here

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

3 participants