Closed Bug 1601445 Opened 6 years ago Closed 5 years ago

Stop using pipenv to manage virtualenvs

Categories

(Testing :: Python Test, task, P3)

Version 3
task

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ahal, Unassigned)

References

Details

Attachments

(1 obsolete file)

We'd like to deprecate the use of Pipenv in mozilla-central. It ended up not being a great fit, is much larger than we need and is causing issues when trying to upgrade our vendored copy of virtualenv.

The main reason we use pipenv in mach python-test is to:

  1. Find a Python binary given a version (e.g, "2.7", "3", "3.6", etc).
  2. Create the virtualenv for us.

The former can be handled by this library, which is much lighterweight and is what Pipenv itself uses. The latter can be handled by VirtualenvManager.

Assignee: nobody → ahal

I'm +1 on using a light-weight focused library that tries to do one thing really well. pythonfinder appears to cover the functionality of mozbuild.pythonutil.find_python3_executable(), mozfile.which(), shutil.which(), pipenv's python finder feature, and a dozen other which() functions scattered through the codebase. It would be nice if the Python build infrastructure had a single go-to library to handle this functionality.

I assume the intention is to use this just for the python-test command first?

It's debatable if we even need pythonfinder for this case (instead of which python3). I'd tend to stick with which for now and if we find there's a need to use pythonfinder in the future, we can make that switch in a follow-up.

Just to update status.. the attached patch causes a failure in the configure tests. I'm not actively working on fixing it.

Assignee: ahal → nobody
Priority: -- → P3

At this point it's better to spend effort wrapping up the Python 3 migration and removing all Python 2 tests from the tree. At which point we won't need this Pipenv hack to jump between the two. We'll just go back to using the default version that mach runs with.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Attachment #9113613 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: