googleapis / googleapis/python-pubsublite

Dependency on `overrides` causes crash for Python 3.14

Đang mở
#560 0 bình luận 0 reaction 1 người được giao Được @johnjcasey nhận Xem trên GitHub
api: pubsublite
Ngôn ngữ chính
Python
Star
19
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

#### Description

Python 3.14 is scheduled to be released on Tuesday. (https://peps.python.org/pep-0745/) The dependency on `overrides` is a problem, as it raises an `AttributeError` when it is imported under Python 3.14. An [issue](https://github.com/mkorpela/overrides/issues/127) has been raised and a [pull request](https://github.com/mkorpela/overrides/pull/133) has been submitted to the GitHub repo for the `overrides` project. But the maintainer has been unresponsive.

---

#### Environment details

- OS type and version: `Any. Verified on Linux with x86_64 architecture`
- Python version: `Python 3.14.0rc2`
- pip version: `pip 24.3.1`
- `google-cloud-pubsublite` version: `Version: 1.12.0`

#### Steps to reproduce

```sh
git clone git@github.com:googleapis/python-pubsublite.git

cd python-pubsublite

uv venv --clear --python 3.14 && \
uv pip install -e . && \
uv run samples/snippets/list_lite_topics_example.py 1122334455 "us-central1" "a" True
```
```text
AttributeError: module 'typing' has no attribute 'ByteString'
```

#### Code example

Above, I'm just using the `list_lite_topics_example.py` in this repo's `samples/snippets/` directory

#### Stack trace
```
Traceback (most recent call last):
File "/mnt/md0/home/ed/Documents/python-pubsublite/samples/snippets/list_lite_topics_example.py", line 68, in
list_lite_topics(
~~~~~~~~~~~~~~~~^
args.project_number,
^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
args.regional,
^^^^^^^^^^^^^^
)
^
File "/mnt/md0/home/ed/Documents/python-pubsublite/samples/snippets/list_lite_topics_example.py", line 27, in list_lite_topics
from google.cloud.pubsublite import AdminClient
File "/mnt/md0/home/ed/Documents/python-pubsublite/google/cloud/pubsublite/__init__.py", line 119, in
from google.cloud.pubsublite.admin_client import AdminClient
File "/mnt/md0/home/ed/Documents/python-pubsublite/google/cloud/pubsublite/admin_client.py", line 17, in
from overrides import overrides
File "/mnt/md0/home/ed/Documents/python-pubsublite/.venv/lib/python3.14/site-packages/overrides/__init__.py", line 8, in
from overrides.overrides import __VERSION__, overrides, override
File "/mnt/md0/home/ed/Documents/python-pubsublite/.venv/lib/python3.14/site-packages/overrides/overrides.py", line 26, in
from overrides.signature import ensure_signature_is_compatible
File "/mnt/md0/home/ed/Documents/python-pubsublite/.venv/lib/python3.14/site-packages/overrides/signature.py", line 6, in
from .typing_utils import get_args, issubtype
File "/mnt/md0/home/ed/Documents/python-pubsublite/.venv/lib/python3.14/site-packages/overrides/typing_utils.py", line 50, in
typing.ByteString: bytes, # https://docs.python.org/3/library/typing.html#typing.ByteString
^^^^^^^^^^^^^^^^^
File "/home/ed/.local/share/uv/python/cpython-3.14.0rc2-linux-x86_64-gnu/lib/python3.14/typing.py", line 3807, in __getattr__
raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
AttributeError: module 'typing' has no attribute 'ByteString'
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.