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

poetry-plugin-export and urllib3 #167

Closed
cocochepeau opened this issue Oct 8, 2024 · 4 comments
Closed

poetry-plugin-export and urllib3 #167

cocochepeau opened this issue Oct 8, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@cocochepeau
Copy link

This currently occures on a fresh build:

 > [misp-modules python-build 10/23] RUN poetry export --with unstable --without-hashes -f requirements.txt -o requirements.txt:
0.747 Warning: poetry-plugin-export will not be installed by default in a future version of Poetry.
0.747 In order to avoid a breaking change and make your automation forward-compatible, please install poetry-plugin-export explicitly. See https://python-poetry.org/docs/plugins/#using-plugins for details on how to install a plugin.
0.747 To disable this warning run 'poetry config warnings.export false'.
1.167 
1.167 The `urllib3` package has the following compatible candidates `[Package('urllib3', '1.26.20')]`;  but, the exporter dependency walker previously elected `urllib3 (2.2.3)` which is not compatible with the dependency `urllib3 (<2)`. Please contribute to `poetry-plugin-export` to solve this problem.
@cocochepeau
Copy link
Author

Adding:

RUN poetry add "urllib3>=1.26,<2"

in modules Dockerfile:

    WORKDIR /srv/misp-modules
    RUN pip install poetry
    RUN sed -i "s/^python = .*/python = \"$(python -c 'import platform; print(platform.python_version())')\"/" pyprojec>    RUN poetry lock
    RUN poetry add "urllib3>=1.26,<2"
    RUN poetry self add poetry-plugin-export
    RUN poetry export --with unstable --without-hashes -f requirements.txt -o requirements.txt
    RUN pip wheel -r requirements.txt --no-cache-dir -w /wheels/
    RUN poetry build --output /wheels/

    WORKDIR /srv/
    RUN rm -rf /srv/misp-modules

"solves" the issue.

@ostefano
Copy link
Collaborator

ostefano commented Oct 8, 2024

Uff, this is ugly. Thanks for reporting.

@ostefano ostefano self-assigned this Oct 8, 2024
@ostefano ostefano added the bug Something isn't working label Oct 8, 2024
ostefano added a commit to MISP/misp-modules that referenced this issue Oct 8, 2024
@ostefano
Copy link
Collaborator

ostefano commented Oct 8, 2024

Tentatively fixing it here: MISP/misp-modules#696

ostefano added a commit to MISP/misp-modules that referenced this issue Oct 8, 2024
ostefano added a commit to MISP/misp-modules that referenced this issue Oct 8, 2024
@ostefano
Copy link
Collaborator

ostefano commented Oct 8, 2024

Released new misp-modules and building new images

@ostefano ostefano closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants