Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ repos:
- id: ruff-check
priority: 3
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
- repo: https://github.com/henryiii/flake8-lazy
rev: 7f268b3b3aaf7feca756ca610e37971382976365 # frozen: v0.11.0
hooks:
- id: flake8-lazy
priority: 2
files: ^src/
- repo: https://github.com/gaborbernat/simplint-pre-commit
rev: "d14a8917a5f578a176baf72ab9ee76314558769f" # frozen: v0.12.3
hooks:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/330.performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Defer server helper imports on Python 3.15 until a server needs them.
13 changes: 13 additions & 0 deletions src/devpi_process/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

from __future__ import annotations

__lazy_modules__ = [
"contextlib",
"logging",
"pathlib",
"secrets",
"socket",
"string",
"subprocess",
"sysconfig",
"threading",
f"{__spec__.parent}._version", # ty: ignore[missing-union-attribute] # imported modules have a spec
]

import secrets
import socket
import string
Expand Down