Closed Bug 1499086 Opened 6 years ago Closed 3 years ago

|mach python-test| still generates an empty root Pipfile

Categories

(Testing :: Python Test, enhancement, P3)

Version 3
enhancement

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ahal, Unassigned, Mentored)

Details

(Keywords: good-first-bug)

Bug 1490253 switched us away from using Pipenv to vendor python packages and replaced it with pip-tools instead. As a consequence, the root Pipfile was removed.

However, it looks like running |mach python-test| causes a root Pipfile to get created again (albeit without any packages specified).

This doesn't seem to cause any harm so it's more of a minor annoyance than anything.
Looking into the source code for pipenv, it appears that this is a side-effect of using pipenv to create our virtual environment. I don't see an option to prevent the creation of the Pipfile, and as we're not using the tool in a typical way, I doubt there would be much traction in changing this behavior of pipenv. I would suggest deleting the file if it exists after the virtual environment has been created. Note that we should only delete the Pipfile when it's been created by pipenv, and not when a Pipfile exists for the purpose of populating the environment.
Mentor: dave.hunt
Keywords: good-first-bug
Priority: -- → P3

I am new to Mozilla and i have recently started contributing to it. I have the entire firefox environment set. I would like to work on this bug while using some mentoring. Please do let me know if i can start working on this..!

Hi Tejaswi, it looks like the mentor Dave is away until the 21st, but I can help out. First, just try and reproduce the problem so you can understand what needs to be fixed.

You'll need to modify this function here:
https://searchfox.org/mozilla-central/source/python/mozbuild/mozbuild/virtualenv.py#584

We need to somehow detect if the Pipfile was created our function call and remove it if so. Feel free to needinfo me if you need help / have questions!

Assignee: nobody → tejaswi55511

Thanks Andrew , for giving me chance .

This good-first-bug hasn't had any activity for 6 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: tejaswi55511 → nobody

I don't think this is still valid. I believe we moved away from pipenv, and when I ran the tests locally just now I didn't have a Pipfile.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.