It seems that poetry doesn't honor the following constraint:
if sys.version_info[0] >= 3:
install_requires = ['Flask>=0.10.1', 'python3-openid>=2.0']
extra['use_2to3'] = True
else:
install_requires = ['Flask>=0.3', 'python-openid>=2.0']
Link to source: https://github.com/mitsuhiko/flask-openid/blob/master/setup.py#L30
In the gist pyproject.toml, airflow is installing Flask which installs flask-openid. If I do not maually add python3-openid = "^3.1" in my pyproject.toml, poetry installs python-openid==2.2.5 which is only compatible with python 2.
Same issue for 锘匡豢锘匡豢https://github.com/python/typing/blob/master/typing_extensions/setup.py#L67
And as a result this broke package installation with AttributeError: type object 'Callable' has no attribute '_abc_registry' like here https://github.com/aws/chalice/issues/1050
This issue has been reported before and the gist of it is: this is not an issue with Poetry. Checking the Python version programmatically is not recommended and environment markers should be used. Poetry does not execute the setup.py file, for security reasons, and as such cannot see the dependencies.
You should report the issue upstream.
Fair enough but I thought poetry was using pip under the hood and pip install does honor the dependency?
@mbelang This is true for installing the packages but not for resolving the dependencies.
Most helpful comment
@mbelang This is true for installing the packages but not for resolving the dependencies.