question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can`t install graphene-django due to bug in promise install_requires definition

See original GitHub issue

Hello!

Tried to compile my requirements file via pip-compile, that contains:

graphene-django==2.10.1
graphene==2.1.8

but get an error:

 error in promise setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in typing>=3.6.4; python_version < '3.5' at ; python_version < '3.5'

Error is here: https://github.com/syrusakbary/promise/blob/master/setup.py#L60

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
webknjazcommented, Feb 19, 2021

To be fair, this setup.py problem is also legitimate. Uploading a wheel will help but it is a band-aid.

Inline env markers aren’t well-supported by old setuptools so this will only work if the end-users know that they need to have a minimum setuptools version of 36.2 0 upfront. And when you migrate to using a declarative setup.cfg config, it will be 36.2.7.

A more portable solution would be to use markers in the nameless extras definitions (this seems to be supported since v0.7):

-    extras_require={"test": tests_require},
+    extras_require={
+        ":python_version < '3.5'": ["typing>=3.6.4"],
+        "test": tests_require,
+    },
     install_requires=[
-        "typing>=3.6.4; python_version < '3.5'",
         "six"
     ],

Although, my ultimate recommendation is to use PEP517. To activate it, simply add a pyproject.toml with the minimum or pinned version of setuptools and wheel. This way, pip will know to provision the right versions of build deps when building from sdist. Also, for building the dists for publishing, it is now recommended to use https://github.com/pypa/build.

0reactions
ValkoVolodyacommented, Feb 19, 2021

I asked about this problem in pip-tools repo - https://github.com/jazzband/pip-tools/issues/1327 and problem is that wheel file for version 2.3 is not downloaded - https://pypi.org/project/promise/#files for now I try to pin older version with wheel downloaded

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · syrusakbary/promise - GitHub
Can`t install graphene -django due to bug in promise install_requires definition. #90 opened on Jan 3, 2021 by ValkoVolodya.
Read more >
I can't install graphene-django in GitHub actions
The problem is that in the project, I am using the graphene-django package, which's available to install via pip install graphene-django .
Read more >
install - graphene - django
Add graphene_django to the INSTALLED_APPS in the settings.py file of your Django project: ; We need to add a graphql URL to the...
Read more >
Solving N+1 in GraphQL Python With Dataloader - Jerry Ng
Tips and guide to handle N+1 problem with Dataloader in Django Graphene while developing GraphQL API in Python.
Read more >
Django + GraphQL. Solving N+1 Problem using DataLoaders
If you have already played a little bit with Graphene Django, you can implement this API without breaking a sweat: # gql/schema.py.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found