chore(python): Remove old dependencies on atomicwrites and colorama #20590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This deletes some old workarounds in our Python dependencies that I don't think we need anymore.
Background
Python packages can conditionally depend on each other. For example, package A might depend on package B when it's being installed on Windows, but not when it's being installed on macOS. Pipenv has, uh, fascinatingly, never accounted for this.
I guess at some point, that caused trouble for us with two of Pytest's conditional dependencies,
atomicwritesandcolorama; and we worked around it by naming them as dependencies, even though we don't depend on them directly.opentrons/api/Pipfile
Lines 26 to 30 in 59645ab
Since then, two things have changed that I think make the workaround unnecessary:
atomicwriteson any platform (though it does still usecoloramaon Windows).Changelog
Remove
atomicwritesandcoloramafrom our direct dependencies.Run
uv lock.In the lockfile, you can see that this deletes
atomicwrites(because nothing needs it anymore) but keepscolorama(because uv is smart enough to see that Pytest still needs it on Windows).Leave hardware-testing and abr-testing alone, since they're still using Pipenv. When we get around to migrating them to uv, we should do the same thing for them.
Test Plan and Hands on Testing
Just CI?
Review requests
None.
Risk assessment
🤷