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

Remove 'futures' dependency #17

Closed
wants to merge 4 commits into from

Conversation

stephenfin
Copy link

The 'futures' dependency doesn't actually work with Python 3.6, or any Python 3.x release. We shouldn't be installing it in that environment and attempting to do so is an error with the most recent pip dependency resolver, which is in turn breaking unit tests for e.g. openstack nova. Remove the dependency. Testing this necessitates some surgery on the tox.ini file to ensure I can actually run tests with Python 3.6 on my host (Fedora 34 where 'python3' points to Python 3.9).

Note that I found references to a Gerrit instance, but I wasn't able to figure out which Gerrit instance I should use, and the '.gitreview' file is not configured with this information. If this is an internal instance, I'd respectfully ask that someone take these commits and apply them for me.

Configure 'ignore_basepython_conflict' so that e.g. the 'py36'
environment actually runs with Python 3.6.

While we're here, a number of other small nits are corrected.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Per the project README [1]:

  This is a backport of the concurrent.futures standard library module
  to Python 2.

  It does not work on Python 3 due to Python 2 syntax being used in the
  codebase. Python 3 users should not attempt to install it, since the
  package is already included in the standard library.

This dependency breaks testing with Python 3.6 when using the newest pip
dependency resolver. Remove it and fix things.

[1] https://github.com/agronholm/pythonfutures

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We don't have docs in-tree. No need for Sphinx. We also don't use
testscenarios anywhere in-tree.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
One less dependency to worry about.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
@stephenfin
Copy link
Author

Anything I need to do to move this along? It's a trivial thing but it's blocking Python 3.6 testing in nova for me. @pkenchap, perhaps?

@hrw
Copy link

hrw commented Nov 24, 2021

It also makes building OpenStack Kolla images painful and very time consuming as pip tries to go through long list of packages in an attempt to sort situation out.

@2uasimojo
Copy link

It pains me to watch this be ignored -- clearly nobody is actively maintaining this project on IBM's side.

Due to what can only possibly be an oversight, I still seem to have admin access to this repo, so I could merge this. However, I imagine that's not enough to unblock you, as you would presumably still need a pip package published.

@atthorst @edmondsw @dikonoor could you please (try to track down someone who can) move this forward?

@pshchelo
Copy link

I actually wondered how on Earth upstream CI in OpenStack Nova is passing at all - and you know what? Some PyPI mirrors (used by those upstream jobs) clearly contain futures-py3..whl that is obviously missing from main PyPI - a dirty hack indeed....

@hrw
Copy link

hrw commented Dec 22, 2021

In OpenStack Kolla we just drop that line from Nova's requirements.txt to be able to do CentOS builds (only distro with Python 3.6).

@JM1
Copy link

JM1 commented Jan 28, 2022

Due to this dependency on futures, DevStack fails to install on a clean CentOS 8 (Stream) system or any other distribution with Python 3.6. Further, futures is listed in OpenStack's upper-constraints.txt, as Nova depends on pypowervm. There have been several attempts to remove futures from upper-constraints.txt, but it is always pulled in again via pypowervm.

@stephenfin
Copy link
Author

Time to deprecate the driver and avoid installing these requirements by default. This project (and by extension, the nova driver) looks dead.

@stephenfin
Copy link
Author

The driver is now deprecated and the package is no longer installed by default, @JM1 @hrw

@hiwakaba
Copy link

hiwakaba commented Mar 8, 2022

Hello, I think pypowervm without futures should work on python3, but pypowervm with futures can't work on python3 because futures only works with python2.

Please see https://github.com/agronholm/pythonfutures#readme

futures does not work on Python 3 due to Python 2 syntax being used in the codebase. 
Python 3 users should not attempt to install it, since the package is already included in the standard library.

By the way... I need help because I got the following error when I was installing devstack(OpenStack devtool) on CentOS Stream-8.6. Do you think this issue has any relation with the following error message?

...
ERROR: Could not find a version that satisfies the requirement futures>=3.0; python_version == "3.6" (from pypowervm) (from versions: 0.2.python3, 0.1, 0.2, 1.0, 2.0, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1)
ERROR: No matching distribution found for futures>=3.0; python_version == "3.6"
...

Thanks in advance,
Hirotaka

@2uasimojo
Copy link

Hi @hiwakaba. I'm afraid pypowervm is no longer maintained. If you're trying to use it outside of OpenStack, I recommend forking it and just making whatever changes you need.

@hiwakaba
Copy link

hiwakaba commented Mar 9, 2022

Hello @2uasimojo. Thanks for your kind response! I am actually an OpenStack user. I will try some workaround for myself until this PR will be merged.

openstack-mirroring pushed a commit to openstack/requirements that referenced this pull request Mar 10, 2022
Starting from version 1.1.25, pypowervm is not instllable for py36
as it requires [1] `futures` which is only applicable for py2 [2].

PR [3] created by nova team was ignored and thus driver was deprecated.

[1] https://github.com/powervm/pypowervm/blob/1.1.25/requirements.txt#L15
[2] https://pypi.org/project/futures/
[3] powervm/pypowervm#17

Change-Id: If16038eaa5785026ae9c4dad30db64d4614e6eae
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Mar 10, 2022
* Update requirements from branch 'master'
  to c9752d8baee4873302e58cba441ca3212e477cf2
  - Merge "Switch pypowervm to Wallaby version"
  - Switch pypowervm to Wallaby version
    
    Starting from version 1.1.25, pypowervm is not instllable for py36
    as it requires [1] `futures` which is only applicable for py2 [2].
    
    PR [3] created by nova team was ignored and thus driver was deprecated.
    
    [1] https://github.com/powervm/pypowervm/blob/1.1.25/requirements.txt#L15
    [2] https://pypi.org/project/futures/
    [3] powervm/pypowervm#17
    
    Change-Id: If16038eaa5785026ae9c4dad30db64d4614e6eae
@2uasimojo
Copy link

Hello @2uasimojo. Thanks for your kind response! I am actually an OpenStack user. I will try some workaround for myself until this PR will be merged.

That's just it: This PR will never be merged :( (Even if it is, there's nobody to build the new pypi package.)

Are you trying to do something PowerVM-specific in OpenStack? If so, I'm afraid that support is being removed. If not, I think you'll be fine once that has been done, as this package will no longer be installed and won't get in your way anymore.

@stephenfin
Copy link
Author

I'm going to close this PR to signal that, as far as I'm concerned, my involvement here is done. We've deprecated support for PowerVM in OpenStack now and will look to remove it shortly. We've also made the dependency optional to avoid installation issues for certain users in Python 3.6 environments. Hopefully this resolves most issues for the people affected by this.

@stephenfin stephenfin closed this Mar 14, 2022
openstack-mirroring pushed a commit to openstack/requirements that referenced this pull request Mar 25, 2022
Starting from version 1.1.25, pypowervm is not instllable for py36
as it requires [1] `futures` which is only applicable for py2 [2].

PR [3] created by nova team was ignored and thus driver was deprecated.

[1] https://github.com/powervm/pypowervm/blob/1.1.25/requirements.txt#L15
[2] https://pypi.org/project/futures/
[3] powervm/pypowervm#17

Change-Id: If16038eaa5785026ae9c4dad30db64d4614e6eae
(cherry picked from commit d2f33eb)
@2uasimojo
Copy link

just checking something, will close again in a sec...

@2uasimojo 2uasimojo reopened this Mar 20, 2023
@2uasimojo 2uasimojo closed this Mar 20, 2023
tanaypf9 pushed a commit to tanaypf9/pf9-requirements that referenced this pull request May 20, 2024
Starting from version 1.1.25, pypowervm is not instllable for py36
as it requires [1] `futures` which is only applicable for py2 [2].

PR [3] created by nova team was ignored and thus driver was deprecated.

[1] https://github.com/powervm/pypowervm/blob/1.1.25/requirements.txt#L15
[2] https://pypi.org/project/futures/
[3] powervm/pypowervm#17

Change-Id: If16038eaa5785026ae9c4dad30db64d4614e6eae
(cherry picked from commit d2f33eb)
tanaypf9 pushed a commit to tanaypf9/pf9-requirements that referenced this pull request May 20, 2024
Per the README for this library [1]:

  [futures] is a backport of the concurrent.futures standard library
  module to Python 2.

  It does not work on Python 3 due to Python 2 syntax being used in the
  codebase. Python 3 users should not attempt to install it, since the
  package is already included in the standard library.

As this is a Python 2-only library, indicating that it should be
installed in Python 3.6 environments in clearly incorrect and in fact
breaks things on recent versions of pip/setuptools [2]. I suspect we're
simply including it to ensure we can install pypowervm, which specifies
this also and therefore also needs to be corrected [3].

Remove this dependency since we no longer have to care about Python 2.

[1] https://github.com/agronholm/pythonfutures/blob/3.3.0/README.rst
[2] pypa/pip#10650
[3] powervm/pypowervm#17

Change-Id: Ifaa77f0da33d86aa97e77c3f0ae24d2664cd3ce2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants