dropbox / sqlalchemy-stubs

Mypy plugin and stubs for SQLAlchemy
Apache License 2.0
570 stars 101 forks source link

Data type for Float column should be float, not Decimal #180

Open KKawamura1 opened 3 years ago

KKawamura1 commented 3 years ago

Fixes #178 ~(CI failure will be fixed by #179 )~

shawnwall commented 3 years ago

@KKawamura1 can we bump this to get the checks to run again given https://github.com/dropbox/sqlalchemy-stubs/pull/179 got merged? I'm also experiencing the float issue.

KKawamura1 commented 3 years ago

Sad thing is that I've already merged #179 in https://github.com/dropbox/sqlalchemy-stubs/pull/180/commits/b02017937250c42cabbddb941225d0f2772cc309 ... so the cause lies in other place.

The error says

...
$ set -e
pytest
usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: -nauto
  inifile: /home/travis/build/dropbox/sqlalchemy-stubs/pytest.ini
  rootdir: /home/travis/build/dropbox/sqlalchemy-stubs

so addopts = -nauto in pytest.ini may cause the CI failure. ...why?

KKawamura1 commented 3 years ago

pip install seems fail in the test:

$ pip install -Ur external/mypy/test-requirements.txt
  pip install -U .
  python2 -m pip install --user -U .
  export PYTHONPATH=`pwd`/external/mypy
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.5.1/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/home/travis/virtualenv/python3.5.1/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.5.1/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/home/travis/virtualenv/python3.5.1/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
Processing /home/travis/build/dropbox/sqlalchemy-stubs
Collecting mypy>=0.790 (from sqlalchemy-stubs==0.4)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement mypy>=0.790 (from sqlalchemy-stubs==0.4) (from versions: 0.1, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.221, 0.222, 0.223, 0.224, 0.225, 0.226, 0.227, 0.228, 0.229, 0.230, 0.231, 0.232, 0.233, 0.234, 0.235, 0.236, 0.237, 0.238, 0.239, 0.240, 0.241, 0.250, 0.251, 0.252, 0.253, 0.254, 0.255, 0.256, 0.470, 0.471, 0.501, 0.510, 0.511, 0.520, 0.521, 0.530, 0.540, 0.550, 0.560, 0.570, 0.580, 0.590, 0.600, 0.610, 0.620, 0.630, 0.641, 0.650, 0.660, 0.670, 0.700, 0.701, 0.710, 0.711, 0.720)
No matching distribution found for mypy>=0.790 (from sqlalchemy-stubs==0.4)

and thus pytest-xdist was not installed, which caused error: unrecognized arguments: -nauto.

I haven't reproduced this yet in my local machine. Any ideas?

shawnwall commented 3 years ago

It appears as though when its going and updating pip itself in the context of python 3.5, its getting a newer pip that utilizes f-strings that python3.5 itself doesn't support. After digging around...yep, pip 21 dropped support for python 3.5:

https://pip.pypa.io/en/stable/news/#id4

Let me try to pin a specific version for pip in the travis config and make a PR.

shawnwall commented 3 years ago

Added issue #208 along with a PR. I'm currently waiting on the travis build to run to see if it fixes the prob :)

shawnwall commented 3 years ago

@KKawamura1 my fix for the tests in #208 was merged to master. Can you plz merge in master to re-run CI here?

KKawamura1 commented 3 years ago

Fixed, thanks @shawnwall !

cooldudemcgeexl commented 2 years ago

Any chance we can get this merged? I'm running into this float issue.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

KKawamura1 commented 7 months ago

I've updated this branch to make sure it follows the latest. Who should I mention for this PR to be merged?