Skip to content

Conversation

@SyntaxColoring
Copy link
Contributor

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, atomicwrites and colorama; 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

# atomicwrites and colorama are pytest dependencies on windows,
# spec'd here to force lockfile inclusion
# https://github.com/pypa/pipenv/issues/4408#issuecomment-668324177
atomicwrites = { version = "==1.4.0", markers="sys_platform=='win32'" }
colorama = { version = "==0.4.4", markers="sys_platform=='win32'" }

Since then, two things have changed that I think make the workaround unnecessary:

  1. Pytest no longer uses atomicwrites on any platform (though it does still use colorama on Windows).
  2. We've switched from Pytest to uv, which has a universal, i.e. cross-platform, lockfile.

Changelog

  • Remove atomicwrites and colorama from our direct dependencies.

  • Run uv lock.

    In the lockfile, you can see that this deletes atomicwrites (because nothing needs it anymore) but keeps colorama (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

🤷

@SyntaxColoring SyntaxColoring requested review from a team and sfoster1 January 14, 2026 22:20
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner January 14, 2026 22:20
@SyntaxColoring SyntaxColoring requested review from mjhuff and removed request for a team January 14, 2026 22:20
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.91%. Comparing base (efa17ee) to head (39ad05b).
⚠️ Report is 12 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #20590      +/-   ##
==========================================
- Coverage   55.95%   55.91%   -0.05%     
==========================================
  Files        3680     3682       +2     
  Lines      311563   311791     +228     
  Branches    45805    45935     +130     
==========================================
- Hits       174342   174328      -14     
- Misses     137003   137245     +242     
  Partials      218      218              
Flag Coverage Δ
app 45.97% <ø> (+<0.01%) ⬆️
protocol-designer 19.58% <ø> (+<0.01%) ⬆️
step-generation 5.70% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay, thank you

@SyntaxColoring
Copy link
Contributor Author

Looking into tests that are mysteriously hanging only for system-server and only in CI.

@SyntaxColoring SyntaxColoring marked this pull request as draft January 15, 2026 15:53
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.

3 participants