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

Less restrictive python 3 dependency #71

Merged
merged 2 commits into from Oct 15, 2020

Conversation

yajo
Copy link
Contributor

@yajo yajo commented Oct 5, 2020

Using this new version specifier is equivalent to >=3.6,<4.0.0, which allows other projects using this same specifier work with yours.

I have this in my project, and when trying to add the master commit from questionary, poetry fails (correctly) with:

  SolverProblemError

  The current project's Python requirement (>=3.6.1,<4.0.0) is not compatible with some of the required packages Python requirement:
    - questionary requires Python >=3.6,<3.9, so it will not be satisfied for Python >=3.9,<4.0.0

  Because copier depends on questionary (1.6.0 git rev text-custom-lexer) which requires Python >=3.6,<3.9, version solving failed.

  at ~/.local/pipx/venvs/poetry/lib64/python3.8/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For questionary, a possible solution would be to set the `python` property to ">=3.6.1,<3.9"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

Unless there's a strong reason to block python 3.9, I would advise to use this easier version specifier.

It's a matter of opinion of course, you're not forced to accept this.

Using this new version specifier is equivalent to `>=3.6,<4.0.0`, which allows other projects using this same specifier work with yours.

I have this in my project, and when trying to add the master commit from questionary, poetry fails (correctly) with:

```
  SolverProblemError

  The current project's Python requirement (>=3.6.1,<4.0.0) is not compatible with some of the required packages Python requirement:
    - questionary requires Python >=3.6,<3.9, so it will not be satisfied for Python >=3.9,<4.0.0

  Because copier depends on questionary (1.6.0 git rev text-custom-lexer) which requires Python >=3.6,<3.9, version solving failed.

  at ~/.local/pipx/venvs/poetry/lib64/python3.8/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For questionary, a possible solution would be to set the `python` property to ">=3.6.1,<3.9"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers
```

Unless there's a strong reason to block python 3.9, I would advise to use this easier version specifier.

It's a matter of opinion of course, you're not forced to accept this.
@yajo yajo force-pushed the less-restrictive-python-version branch from b5072df to 341eb7e Compare October 5, 2020 16:23
@kiancross
Copy link
Collaborator

I think if we are supporting python 3.9 too we should add it to the CI matrix.

@yajo yajo mentioned this pull request Oct 6, 2020
6 tasks
@yajo
Copy link
Contributor Author

yajo commented Oct 6, 2020

Yes, done.

Please could you label this as hacktoberfest-accepted? All my other PRs would help too. Thanks!

@layday
Copy link
Contributor

layday commented Oct 6, 2020

The tests are failing because 3.9 is not available on GHA yet - you can track this issue. In meantime, you can test against 3.9.0rc1 or rc2 by doing something like this.

@kiancross kiancross added the Enhancement New feature or request label Oct 6, 2020
@yajo
Copy link
Contributor Author

yajo commented Oct 6, 2020

It seems they fixed it 10 minutes ago. Can you trigger a rebuild please?

@kiancross kiancross requested a review from tmbo October 6, 2020 16:14
@yajo
Copy link
Contributor Author

yajo commented Oct 15, 2020

@tmbo This is ✔️ and Python 3.9 was already released this month. Would you mind to merge please?

Also pretty please I need a new release with latest patches... Thanks!

@tmbo tmbo merged commit d8e4d88 into tmbo:master Oct 15, 2020
@tmbo
Copy link
Owner

tmbo commented Oct 15, 2020

will do 👍

@tmbo
Copy link
Owner

tmbo commented Oct 15, 2020

@yajo released 1.7.0 just for you 😉

@yajo yajo deleted the less-restrictive-python-version branch October 16, 2020 10:53
yajo pushed a commit to copier-org/copier that referenced this pull request Oct 16, 2020
github-actions bot pushed a commit to copier-org/copier that referenced this pull request Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants