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

Python 3.12 compatibility #208

Closed
Gui-FernandesBR opened this issue Oct 29, 2023 · 5 comments · Fixed by #217
Closed

Python 3.12 compatibility #208

Gui-FernandesBR opened this issue Oct 29, 2023 · 5 comments · Fixed by #217
Labels
dependencies Pull requests that update a dependency file enhancement help wanted

Comments

@Gui-FernandesBR
Copy link

Python 3.12 was released a few weeks ago, but so far I could not install timezonefinder using pip, as commented here: #207 (comment)

I opened an issue on h3 since this was the error that I got, so I'm currently waiting for their updates: uber/h3-py#326

Any other problems when building on Python 3.12?

@ringsaturn
Copy link
Contributor

ringsaturn commented Nov 4, 2023

Numba: numba/numba#9197

citiespy==0.5.0
pytest
pytest-benchmark
pytest-pretty
timezonefinder[numba]==6.2.0
tzfpy==0.15.2

Build logs: https://github.com/ringsaturn/tz-benchmark/actions/runs/6755445795/job/18363879418?pr=129

Collecting citiespy==0.5.0 (from -r requirements.txt (line 1))
  Downloading citiespy-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (510 bytes)
Collecting pytest (from -r requirements.txt (line 2))
  Downloading pytest-7.4.3-py3-none-any.whl.metadata (7.9 kB)
Collecting pytest-benchmark (from -r requirements.txt (line 3))
  Downloading pytest_benchmark-4.0.0-py3-none-any.whl (43 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.0/44.0 kB 1.6 MB/s eta 0:00:00
Collecting pytest-pretty (from -r requirements.txt (line 4))
  Downloading pytest_pretty-1.2.0-py3-none-any.whl (6.2 kB)
Collecting timezonefinder==6.2.0 (from timezonefinder[numba]==6.2.0->-r requirements.txt (line 5))
  Downloading timezonefinder-6.2.0.tar.gz (46.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.9/46.9 MB 54.9 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting tzfpy==0.15.2 (from -r requirements.txt (line 6))
  Downloading tzfpy-0.15.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)
Collecting cffi<2,>=1.15.1 (from timezonefinder==6.2.0->timezonefinder[numba]==6.2.0->-r requirements.txt (line 5))
  Using cached cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting h3<4,>=3.7.6 (from timezonefinder==6.2.0->timezonefinder[numba]==6.2.0->-r requirements.txt (line 5))
  Downloading h3-3.7.6.tar.gz (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.6/178.6 kB 33.7 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting numpy<2,>=1.18 (from timezonefinder==6.2.0->timezonefinder[numba]==6.2.0->-r requirements.txt (line 5))
  Downloading numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 12.3 MB/s eta 0:00:00
Collecting setuptools>=65.5 (from timezonefinder==6.2.0->timezonefinder[numba]==6.2.0->-r requirements.txt (line 5))
  Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
Collecting numba<1,>=0.56 (from timezonefinder[numba]==6.2.0->-r requirements.txt (line 5))
  Downloading numba-0.58.1.tar.gz (2.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 85.8 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-4p_n_c_y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-4p_n_c_y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-4p_n_c_y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-4p_n_c_y/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 51, in <module>
        File "<string>", line 48, in _guard_py_ver
      RuntimeError: Cannot install on Python version 3.12.0; only versions >=3.8,<3.12 are supported.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Notice:  A new release of pip is available: 23.2.1 -> 23.3.1
Notice:  To update, run: pip install --upgrade pip
Error: Process completed with exit code 1.

@nhoover
Copy link

nhoover commented Dec 11, 2023

I'm also having this problem. Using python 3.12.1. Please fix - thanks!

@jannikmi jannikmi added enhancement help wanted dependencies Pull requests that update a dependency file labels Jan 11, 2024
jannikmi added a commit that referenced this issue Feb 2, 2024
jannikmi added a commit that referenced this issue Feb 2, 2024
* v6.4.0 python3.12 support

closes #208

* Update build.yml
@jannikmi
Copy link
Owner

jannikmi commented Feb 2, 2024

@nhoover @Gui-FernandesBR please check if you can install the new release 6.4.0 with python 3.12 and report back if not.

@nhoover
Copy link

nhoover commented Feb 2, 2024

Back in December to work around this I switched to tzfpy but I just tried installing timezonefinder 6.4.0 and got:

Successfully built timezonefinder Failed to build h3 error: subprocess-exited-with-error Building wheel for h3 (pyproject.toml) did not run successfully. exit code: 1 [356 lines of output]

@ringsaturn
Copy link
Contributor

ringsaturn commented Feb 2, 2024

Back in December to work around this I switched to tzfpy but I just tried installing timezonefinder 6.4.0 and got:

Successfully built timezonefinder Failed to build h3 error: subprocess-exited-with-error Building wheel for h3 (pyproject.toml) did not run successfully. exit code: 1 [356 lines of output]

I believe it's related to #207, as it came from here: uber/h3-py#326

However I can install timezonefinder 6.4.0 under 3.12, see ringsaturn/tz-benchmark#143

Collecting citiespy==0.5.4 (from -r requirements.txt (line 1))
  Downloading citiespy-0.5.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (763 bytes)
Collecting pytest (from -r requirements.txt (line 2))
  Downloading pytest-8.0.0-py3-none-any.whl.metadata (7.8 kB)
Collecting pytest-benchmark (from -r requirements.txt (line 3))
  Downloading pytest_benchmark-4.0.0-py3-none-any.whl (43 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.0/44.0 kB 3.7 MB/s eta 0:00:00
Collecting pytest-pretty (from -r requirements.txt (line 4))
  Downloading pytest_pretty-1.2.0-py3-none-any.whl (6.2 kB)
Collecting timezonefinder==6.4.0 (from timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Downloading timezonefinder-6.4.0.tar.gz (49.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.0/49.0 MB 58.8 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting tzfpy==0.15.3 (from -r requirements.txt (line 6))
  Downloading tzfpy-0.15.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.8 kB)
Collecting cffi<2,>=1.15.1 (from timezonefinder==6.4.0->timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Using cached cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting h3<4,>=3.7.6 (from timezonefinder==6.4.0->timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Downloading h3-3.7.6.tar.gz (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.6/178.6 kB 42.5 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting numpy<2,>=1.18 (from timezonefinder==6.4.0->timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Downloading numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 17.1 MB/s eta 0:00:00
Collecting setuptools>=65.5 (from timezonefinder==6.4.0->timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Using cached setuptools-69.0.3-py3-none-any.whl.metadata (6.3 kB)
Collecting numba<1,>=0.59 (from timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Downloading numba-0.59.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.7 kB)
Collecting iniconfig (from pytest->-r requirements.txt (line 2))
  Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting packaging (from pytest->-r requirements.txt (line 2))
  Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting pluggy<2.0,>=1.3.0 (from pytest->-r requirements.txt (line 2))
  Downloading pluggy-1.4.0-py3-none-any.whl.metadata (4.3 kB)
Collecting py-cpuinfo (from pytest-benchmark->-r requirements.txt (line 3))
  Downloading py_cpuinfo-9.0.0-py3-none-any.whl (22 kB)
Collecting rich>=12 (from pytest-pretty->-r requirements.txt (line 4))
  Downloading rich-13.7.0-py3-none-any.whl.metadata (18 kB)
Collecting pycparser (from cffi<2,>=1.15.1->timezonefinder==6.4.0->timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting llvmlite<0.43,>=0.42.0dev0 (from numba<1,>=0.59->timezonefinder[numba]==6.4.0->-r requirements.txt (line 5))
  Downloading llvmlite-0.42.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.8 kB)
Collecting markdown-it-py>=2.2.0 (from rich>=12->pytest-pretty->-r requirements.txt (line 4))
  Downloading markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)
Collecting pygments<3.0.0,>=2.13.0 (from rich>=12->pytest-pretty->-r requirements.txt (line 4))
  Downloading pygments-2.17.2-py3-none-any.whl.metadata (2.6 kB)
Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=12->pytest-pretty->-r requirements.txt (line 4))
  Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Downloading citiespy-0.5.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 12.1 MB/s eta 0:00:00
Downloading tzfpy-0.15.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 81.8 MB/s eta 0:00:00
Downloading pytest-8.0.0-py3-none-any.whl (334 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 334.0/334.0 kB 42.9 MB/s eta 0:00:00
Using cached cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (477 kB)
Downloading numba-0.59.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 91.9 MB/s eta 0:00:00
Downloading numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.0/18.0 MB 92.4 MB/s eta 0:00:00
Downloading pluggy-1.4.0-py3-none-any.whl (20 kB)
Downloading rich-13.7.0-py3-none-any.whl (240 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 240.6/240.6 kB 47.4 MB/s eta 0:00:00
Using cached setuptools-69.0.3-py3-none-any.whl (819 kB)
Using cached packaging-23.2-py3-none-any.whl (53 kB)
Downloading llvmlite-0.42.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (43.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.8/43.8 MB 59.2 MB/s eta 0:00:00
Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 24.7 MB/s eta 0:00:00
Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 91.2 MB/s eta 0:00:00
Building wheels for collected packages: timezonefinder, h3
  Building wheel for timezonefinder (pyproject.toml): started
  Building wheel for timezonefinder (pyproject.toml): finished with status 'done'
  Created wheel for timezonefinder: filename=timezonefinder-6.4.0-cp312-cp312-manylinux_2_35_x86_64.whl size=49041522 sha256=265f39bdfadab681d72c3b7cffd8c9fdf97b509327b82c868b42013c80f41ba7
  Stored in directory: /home/runner/.cache/pip/wheels/a0/bf/58/ff2db6e05bde277fb3e29e8d317fac5783f95dd05100eaa58d
  Building wheel for h3 (pyproject.toml): started
  Building wheel for h3 (pyproject.toml): finished with status 'done'
  Created wheel for h3: filename=h3-3.7.6-cp312-cp312-linux_x86_64.whl size=920425 sha256=df56baf07049f91dd34cf71baa976b172d6c8d04034b5647f55ab4070739727b
  Stored in directory: /home/runner/.cache/pip/wheels/90/3e/db/081a7cf237ab6fb7f6e785baed281f7eefa73082da94cf9665
Successfully built timezonefinder h3
Installing collected packages: py-cpuinfo, h3, tzfpy, setuptools, pygments, pycparser, pluggy, packaging, numpy, mdurl, llvmlite, iniconfig, citiespy, pytest, numba, markdown-it-py, cffi, timezonefinder, rich, pytest-benchmark, pytest-pretty
Successfully installed cffi-1.16.0 citiespy-0.5.4 h3-3.7.6 iniconfig-2.0.0 llvmlite-0.42.0 markdown-it-py-3.0.0 mdurl-0.1.2 numba-0.59.0 numpy-1.26.3 packaging-23.2 pluggy-1.4.0 py-cpuinfo-9.0.0 pycparser-2.21 pygments-2.17.2 pytest-8.0.0 pytest-benchmark-4.0.0 pytest-pretty-1.2.0 rich-13.7.0 setuptools-69.0.3 timezonefinder-6.4.0 tzfpy-0.15.3

Maybe you can provide more details info to h3-py repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants