Add support for Python 3.13 (#1190) · PyMySQL/PyMySQL@a1ac823 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit a1ac823

Browse files
authored
Add support for Python 3.13 (#1190)
- fixes #1188 - Add python 3.13 to test matrix and pyproject.toml
1 parent dabf098 commit a1ac823

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
- db: "mariadb:10.6"
3131
py: "3.12"
3232

33+
- db: "mariadb:10.6"
34+
py: "3.13"
35+
3336
- db: "mariadb:lts"
3437
py: "3.9"
3538

pymysql/connections.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@
4040

4141
DEFAULT_USER = getpass.getuser()
4242
del getpass
43-
except (ImportError, KeyError):
44-
# KeyError occurs when there's no entry in OS database for a current user.
43+
except (ImportError, KeyError, OSError):
44+
# When there's no entry in OS database for a current user:
45+
# KeyError is raised in Python 3.12 and below.
46+
# OSError is raised in Python 3.13+
4547
DEFAULT_USER = None
4648

4749
DEBUG = False

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers = [
2020
"Programming Language :: Python :: 3.10",
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2324
"Programming Language :: Python :: Implementation :: CPython",
2425
"Programming Language :: Python :: Implementation :: PyPy",
2526
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.