Thanks to visit codestin.com
Credit goes to github.com

Skip to content

functions-framework-python does not work with python 3.13+ #350

Closed
@mrbuk

Description

@mrbuk

Running functions-framework-python with Python 3.13 leads to the following error:

% functions-framework-python --target check_http
Traceback (most recent call last):
  File "/Users/mbukowski/workspace/chronicle-export-data/.venv/bin/functions-framework-python", line 5, in <module>
    from functions_framework._cli import _cli
  File "/Users/mbukowski/workspace/chronicle-export-data/.venv/lib/python3.13/site-packages/functions_framework/__init__.py", line 37, in <module>
    from functions_framework import (
    ...<4 lines>...
    )
  File "/Users/mbukowski/workspace/chronicle-export-data/.venv/lib/python3.13/site-packages/functions_framework/_function_registry.py", line 19, in <module>
    from re import T
ImportError: cannot import name 'T' from 're' (/opt/homebrew/Cellar/[email protected]/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/re/__init__.py)

Trying to run from re import T directly in Python 3.13 leads to the same error

Python 3.13.0 (main, Oct 19 2024, 02:19:02) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from re import T
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    from re import T
ImportError: cannot import name 'T' from 're' (/usr/local/lib/python3.13/re/__init__.py)

in comparison for 3.12 it works

Python 3.12.7 (main, Oct 19 2024, 03:00:35) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from re import T
>>>

Assumption is that this is due to the deprecation of typing.re in Python 3.13 as described in the GH Issue Deprecate the typing.io and typing.re pseudo-modules #82472

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions