0

我将 pyproject.toml 与诗歌一起使用(1.1.5,最新)。

我希望我的包支持 python>=3.4,如果它是 python>=3.6 httpx,那么也取决于 .

因此, pyproject.toml 是:

[tool.poetry.dependencies]
python = "^3.X"
httpx = {version = "^0.17.1", extras = ["http2"], python = "^3.6"}

当我将, ,分配3.X给任何一个时(venv 中的 python 为 3.8)。3.53.63.7poetry lock

但是,当它是时3.4poetry lock报告SolverProblemError

  The current project's Python requirement (>=3.4,<4.0) is not compatible with some of the required packages Python requirement:
    - httpcore requires Python >=3.6, so it will not be satisfied for Python >=3.4,<3.6
    - httpcore requires Python >=3.6, so it will not be satisfied for Python >=3.4,<3.6
    - sniffio requires Python >=3.5, so it will not be satisfied for Python >=3.4,<3.5
    - sniffio requires Python >=3.5, so it will not be satisfied for Python >=3.4,<3.5
    - sniffio requires Python >=3.5, so it will not be satisfied for Python >=3.4,<3.5
  
      Because no versions of httpcore match >0.12.1,<0.12.2 || >0.12.2,<0.12.3 || >0.12.3,<0.13
   and httpcore (0.12.1) requires Python >=3.6, httpcore is forbidden.
      And because httpcore (0.12.2) requires Python >=3.6, httpcore is forbidden.
      Because no versions of httpx match >0.17.1,<0.18.0
   and httpx (0.17.1) depends on httpcore (>=0.12.1,<0.13), httpx (>=0.17.1,<0.18.0) requires httpcore (>=0.12.1,<0.13).
      Thus, httpx (>=0.17.1,<0.18.0) requires httpcore (0.12.3).
  (1) So, because httpcore (0.12.3) depends on sniffio (>=1.0.0,<2.0.0), httpx (>=0.17.1,<0.18.0) requires sniffio (>=1.0.0,<2.0.0).
  
      Because no versions of sniffio match >1.0.0,<1.1.0 || >1.1.0,<1.2.0 || >1.2.0,<2.0.0
   and sniffio (1.0.0) requires Python >=3.5, sniffio is forbidden.
      And because sniffio (1.1.0) requires Python >=3.5
   and sniffio (1.2.0) requires Python >=3.5, sniffio is forbidden.
      And because httpx (>=0.17.1,<0.18.0) requires sniffio (>=1.0.0,<2.0.0) (1), httpx is forbidden
      So, because newp depends on httpx (^0.17.1), version solving failed.

 • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For httpcore, a possible solution would be to set the `python` property to ">=3.6,<4.0"
    For httpcore, a possible solution would be to set the `python` property to ">=3.6,<4.0"
    For sniffio, a possible solution would be to set the `python` property to ">=3.5,<4.0"
    For sniffio, a possible solution would be to set the `python` property to ">=3.5,<4.0"
    For sniffio, a possible solution would be to set the `python` property to ">=3.5,<4.0"

我怎样才能让它工作python="^3.4"

4

0 回答 0