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

query_utm_crs_info is missing from type stub for pyproj.database #1044

Closed
orontee opened this issue Mar 30, 2022 · 1 comment · Fixed by #1047
Closed

query_utm_crs_info is missing from type stub for pyproj.database #1044

orontee opened this issue Mar 30, 2022 · 1 comment · Fixed by #1047
Labels

Comments

@orontee
Copy link
Contributor

orontee commented Mar 30, 2022

Code Sample

matthias@carbon:~$ mkdir pyproj_issue
matthias@carbon:~$ cd pyproj_issue/
matthias@carbon:~/pyproj_issue$ echo "from pyproj.database import query_utm_crs_info" > test.py
matthias@carbon:~/pyproj_issue$ python3 --version
Python 3.9.2
matthias@carbon:~/pyproj_issue$ python3 -m venv env
matthias@carbon:~/pyproj_issue$ . env/bin/activate
(env) matthias@carbon:~/pyproj_issue$ python3 -m pip install pyproj==3.3.0 mypy
Collecting pyproj==3.3.0
  Using cached pyproj-3.3.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (5.8 MB)
Collecting mypy
  Downloading mypy-0.942-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (17.1 MB)
     |████████████████████████████████| 17.1 MB 145 kB/s 
Collecting certifi
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting typing-extensions>=3.10
  Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting tomli>=1.1.0
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Installing collected packages: typing-extensions, tomli, mypy-extensions, certifi, pyproj, mypy
Successfully installed certifi-2021.10.8 mypy-0.942 mypy-extensions-0.4.3 pyproj-3.3.0 tomli-2.0.1 typing-extensions-4.1.1
(env) matthias@carbon:~/pyproj_issue$ mypy test.py 
test.py:1: error: Module "pyproj.database" has no attribute "query_utm_crs_info"; maybe "query_crs_info"?
Found 1 error in 1 file (checked 1 source file)
(env) matthias@carbon:~/pyproj_issue$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyproj.database import query_utm_crs_info
>>> 

Problem description

I am able to import query_utm_crs_info from pyproj.database but mypy can't found its signature from type stubs.

Environment Information

  • Output from: pyproj -v
pyproj info:
    pyproj: 3.3.0
      PROJ: 8.2.0
  data dir: /home/matthias/pyproj_issue/env/lib/python3.9/site-packages/pyproj/proj_dir/share/proj
user_data_dir: /home/matthias/.local/share/proj
PROJ DATA (recommended version): 1.8
PROJ Database: 1.2
EPSG Database: v10.038 [2021-10-21]
ESRI Database: ArcMap 12.8 [2021-05-06]
IGNF Database: 3.1.0 [2019-05-24]

System:
    python: 3.9.2 (default, Feb 28 2021, 17:03:44)  [GCC 10.2.1 20210110]
executable: /home/matthias/pyproj_issue/env/bin/python3
   machine: Linux-5.10.0-13-amd64-x86_64-with-glibc2.31

Python deps:
   certifi: 2021.10.08
       pip: 20.3.4
setuptools: 44.1.1
    Cython: None
  • Python version (python -c "import sys; print(sys.version.replace('\n', ' '))")
3.9.2 (default, Feb 28 2021, 17:03:44)  [GCC 10.2.1 20210110]
  • Operation System Information (python -c "import platform; print(platform.platform())")
Linux-5.10.0-13-amd64-x86_64-with-glibc2.31

Installation method

  • pip
@orontee orontee added the bug label Mar 30, 2022
@snowman2 snowman2 added installation-issues Issue related to installation problems. bug and removed bug installation-issues Issue related to installation problems. labels Mar 31, 2022
@snowman2
Copy link
Member

It is missing from here: https://github.com/pyproj4/pyproj/blob/main/pyproj/database.pyi

A PR with the fix is welcome.

@snowman2 snowman2 added this to To do in 3.3.1 Release via automation Mar 31, 2022
@snowman2 snowman2 moved this from To do to In progress in 3.3.1 Release Mar 31, 2022
3.3.1 Release automation moved this from In progress to Done Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants