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

chore(robot-server): Add sqlalchemy2-stubs #9773

Merged
merged 2 commits into from
Mar 24, 2022
Merged

Conversation

SyntaxColoring
Copy link
Contributor

Overview

This PR adds the sqlalchemy2-stubs package as a robot-server dev dependency.

Background

The SQLAlchemy type-checking situation seems pretty bad:

  • SQLAlchemy 2 promises to do it right, but there's no scheduled release date for it.

  • SQLAlchemy 1.4 appears to require at least standalone stubs, plus maybe also a mypy plugin.

    sqlalchemy2-stubs is the official solution, despite being proclaimed in various places to be unstable. (It "should now be considered as legacy, even though it is still necessary for full Mypy support when using SQLAlchemy 1.4." 🙃)

  • There's also sqlalchemy-stubs (without the 2), a more mature set of stubs published by DropBox. However, its support for SQLAlchemy 1.4 seems spotty.

Review requests

  • Do we agree that sqlalchemy2-stubs is the least bad option, for now?

Risk assessment

No risk to production code. This just adds a dev dependency.

@SyntaxColoring SyntaxColoring added chore robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). robot server Affects the `robot-server` project labels Mar 24, 2022
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner March 24, 2022 15:19
Comment on lines +17 to +20
# 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", sys_platform="== 'win32'"}
colorama = {version="==0.4.4", sys_platform="== 'win32'"}
Copy link
Contributor Author

@SyntaxColoring SyntaxColoring Mar 24, 2022

Choose a reason for hiding this comment

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

Moving this section up high because pipenv install --dev foo appends foo to the bottom of the list, which would make it look like foo is part of this Pytest workaround thing.

@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #9773 (d826b30) into edge (440a6ec) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             edge    #9773   +/-   ##
=======================================
  Coverage   75.24%   75.24%           
=======================================
  Files        1979     1979           
  Lines       52173    52173           
  Branches     5044     5044           
=======================================
  Hits        39258    39258           
  Misses      11949    11949           
  Partials      966      966           
Flag Coverage Δ
robot-server 93.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@SyntaxColoring SyntaxColoring merged commit 882cfc0 into edge Mar 24, 2022
@SyntaxColoring SyntaxColoring deleted the max/sqlalchemy2_stubs branch March 24, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore robot server Affects the `robot-server` project robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants