Skip to content

[PyMySQL] Fix issue with import constants attributes #14393

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

Merged
merged 2 commits into from
Jul 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions stubs/PyMySQL/pymysql/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ from _typeshed import ReadableBuffer
from collections.abc import Iterable
from typing import Final, SupportsBytes, SupportsIndex

from . import connections, constants, converters, cursors
from .connections import Connection as Connection
from . import connections as connections, constants as constants, converters as converters, cursors as cursors
from .constants import FIELD_TYPE as FIELD_TYPE
from .err import (
DatabaseError as DatabaseError,
Expand Down Expand Up @@ -58,9 +57,9 @@ def thread_safe() -> bool: ...

NULL: str

# pymysql/__init__.py says "Connect = connect = Connection = connections.Connection"
Connect = Connection
connect = Connection
Connect = connections.Connection
connect = connections.Connection
Connection = connections.Connection

__all__ = [
"BINARY",
Expand Down