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

Update pyln-testing cheroot dependency #6845

Merged

Conversation

ErikDeSmedt
Copy link
Contributor

pyln-testing depends on cheroot~=8 which depends on pkg_resources.

In python3.11 this has been deprecated which results in the following warning

.../venv/lib/python3.11/site-packages/cheroot/__init__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

@ErikDeSmedt ErikDeSmedt requested a review from cdecker as a code owner November 6, 2023 16:53
@ErikDeSmedt ErikDeSmedt marked this pull request as draft November 6, 2023 16:56
@rustyrussell
Copy link
Contributor

Might need poetry update or something? But a good idea!

Using `pyln-testing` with `python3.11` results in the following warning.

```
.../venv/lib/python3.11/site-packages/cheroot/__init__.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources
```

I've updated the `cheroot`-dependency.

However, the changes will not take effect immediately because we are
facing an internal conflict.

This conflict comes from the following requirements
- `//contrib/pyln-testing/pyproject.toml` requires `cheroot`. We can pick
  the requried version
- `./external/lnprototest/pyproject.toml` requires `pyln="^0.12"` requires
  `cheroot="^8"

It appears we have to do a multi-stage upgrade here.

**Step 1**
This commit configures `./contrib/pyln-testing/pyproject.toml`
to require `cheroot=">=8 <=10`. This allows users of `pyln-testing`
to start using a new release of `cheroot` immediately.

However, we still require `cheroot="^8"` because of `lnprototests`.
Even after running `poetry install` in the project root the warning
will remain.

**Step 2**
Not a part of this commit.

Publish a new release of `pyln-testing` on PyPI.

Once this release is finished we can update
`./external/lnprototests/pyproject.toml` to use the new
version of `pyln-testing` and the warning will disappear.
@ErikDeSmedt ErikDeSmedt force-pushed the pyln-testing-update-deps branch from b1472c9 to 179dfa1 Compare December 15, 2023 13:26
@ErikDeSmedt
Copy link
Contributor Author

Had to go down a little rabbit-hole. There is a conflict from the following requirements

  • //contrib/pyln-testing/pyproject.toml requires cheroot. We can pick
    the required version
  • ./external/lnprototest/pyproject.toml requires pyln="^0.12" requires
    cheroot="^8"

It appears we have to do a multi-stage upgrade here.

Step 1
This commit configures ./contrib/pyln-testing/pyproject.toml
to require cheroot=">=8 <=10. This allows users of pyln-testing
to start using a new release of cheroot immediately.

However, we still require cheroot="^8" because of lnprototests.
Even after running poetry install in the project root the warning
will remain.

Step 2
Not a part of this commit.

Publish a new release of pyln-testing on PyPI.

Once this release is finished we can update
./external/lnprototests/pyproject.toml to use the new
version of pyln-testing and the warning will disappear.

@ErikDeSmedt ErikDeSmedt marked this pull request as ready for review December 15, 2023 13:35
@rustyrussell rustyrussell merged commit 4f089ac into ElementsProject:master Dec 16, 2023
38 checks passed
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

Successfully merging this pull request may close these issues.

2 participants