André Casimiro created FLINK-29817:
--------------------------------------

             Summary: Published metadata for apache-flink in pypi are 
inconsistent and causes poetry to fail
                 Key: FLINK-29817
                 URL: https://issues.apache.org/jira/browse/FLINK-29817
             Project: Flink
          Issue Type: Bug
          Components: API / Python
    Affects Versions: 1.16.0
         Environment: macos 12.6 (M1)

Poetry Version: 1.2.2
Python Version:  3.9.12
            Reporter: André Casimiro


Hi, 

Following the debug steps described in [this github 
thread|https://github.com/python-poetry/poetry/issues/3011] I got to the 
conclusion that the metadata of the apache-flink 1.16.0 package is wrong. And 
because of that I cannot properly manage my dependencies using poetry.

I can successfully install it with pip (runs with no errors), as stated in the 
docs:
{code:java}
python -m pip install apache-flink {code}
But when I try to include the dependency in my poetry project I got the 
following error:

 
{code:java}
❯ poetry add apache-flink@1.16.0Updating dependencies
Resolving dependencies... (2.0s)Because pemja (0.2.6) depends on numpy (1.21.4)
 and apache-flink (1.16.0) depends on numpy (>=1.14.3,<1.20), pemja (0.2.6) is 
incompatible with apache-flink (1.16.0).
So, because cv-features depends on apache-flink (1.16.0) which depends on pemja 
(0.2.6), version solving failed. {code}
 

I've followed the same debug steps as in [this github 
thread|https://github.com/python-poetry/poetry/issues/3011] and can confirm 
that apache-flink has exactly the same problem as described in the thread: the 
wheel package in pypi has correct dependency metadata but the pypi published 
don't.

 
{code:java}
❯ pkginfo -f requires_dist 
/Users/andre/Downloads/apache_flink-1.16.0-cp39-cp39-macosx_11_0_arm64.whl
requires_dist: ['py4j (==0.10.9.3)', 'python-dateutil (==2.8.0)', 'apache-beam 
(==2.38.0)', 'cloudpickle (==2.1.0)', 'avro-python3 (!=1.9.2,<1.10.0,>=1.8.1)', 
'pytz (>=2018.3)', 'fastavro (<1.4.8,>=1.1.0)', 'requests (>=2.26.0)', 
'protobuf (<3.18)', 'httplib2 (<=0.20.4,>=0.19.0)', 'apache-flink-libraries 
(<1.16.1,>=1.16.0)', 'numpy (<1.22.0,>=1.21.4)', 'pandas (<1.4.0,>=1.3.0)', 
'pyarrow (<9.0.0,>=5.0.0)', 'pemja (==0.2.6) ; python_full_version >= "3.7" and 
platform_system != "Windows"'] {code}
but the pipy json metadata is wrong:

 

 
{code:java}
❯ curl -sL https://pypi.org/pypi/apache-flink/json | jq '.info.requires_dist'[
  "py4j (==0.10.9.3)",
  "python-dateutil (==2.8.0)",
  "apache-beam (==2.38.0)",
  "cloudpickle (==2.1.0)",
  "avro-python3 (!=1.9.2,<1.10.0,>=1.8.1)",
  "pytz (>=2018.3)",
  "fastavro (<1.4.8,>=1.1.0)",
  "requests (>=2.26.0)",
  "protobuf (<3.18)",
  "httplib2 (<=0.20.4,>=0.19.0)",
  "apache-flink-libraries (<1.16.1,>=1.16.0)",
  "numpy (<1.20,>=1.14.3)",
  "pandas (<1.2.0,>=1.0)",
  "pyarrow (<7.0.0,>=0.15.1)",
  "pemja (==0.2.6) ; python_full_version >= \"3.7\" and platform_system != 
\"Windows\""
]{code}
 

As per [this 
comment|https://github.com/python-poetry/poetry/issues/3011#issuecomment-702826616],
 could you please republish the package correcting this metadata information, 
please? This [other 
comment|https://github.com/apple/turicreate/issues/3342#issuecomment-702957550] 
can help gain more context.

 

Thanks

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to