psycache 26.4.0__tar.gz → 26.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- psycache-26.5.0/.github/workflows/actions.lock +131 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/workflows/ci.yml +25 -25
- {psycache-26.4.0 → psycache-26.5.0}/.github/workflows/codeql-analysis.yml +4 -4
- {psycache-26.4.0 → psycache-26.5.0}/.github/workflows/pypi-package.yml +6 -6
- psycache-26.5.0/.github/workflows/verify-lockfile.yml +29 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/workflows/zizmor.yml +2 -2
- {psycache-26.4.0 → psycache-26.5.0}/.pre-commit-config.yaml +3 -4
- {psycache-26.4.0 → psycache-26.5.0}/CHANGELOG.md +10 -1
- {psycache-26.4.0 → psycache-26.5.0}/PKG-INFO +5 -13
- {psycache-26.4.0 → psycache-26.5.0}/conftest.py +10 -5
- psycache-26.5.0/docs/assets/stylesheets/fonts.css +18 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/instrumentation/custom.md +6 -6
- {psycache-26.4.0 → psycache-26.5.0}/docs/instrumentation/sentry.md +2 -2
- {psycache-26.4.0 → psycache-26.5.0}/docs/pool-adapters.md +2 -2
- {psycache-26.4.0 → psycache-26.5.0}/pyproject.toml +2 -3
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/instrumentation/_spans.py +6 -6
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/instrumentation/prometheus.py +6 -6
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/instrumentation/sentry.py +27 -26
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/psycopg_pool.py +3 -3
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/sqlalchemy.py +3 -3
- psycache-26.5.0/tests/test_sentry.py +166 -0
- {psycache-26.4.0 → psycache-26.5.0}/typing_tests/core.py +2 -2
- {psycache-26.4.0 → psycache-26.5.0}/zensical.toml +4 -0
- {psycache-26.4.0 → psycache-26.5.0}/.git_archival.txt +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.gitattributes +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/AI_POLICY.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/CODE_OF_CONDUCT.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/CONTRIBUTING.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/FUNDING.yml +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/SECURITY.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.github/dependabot.yml +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.gitignore +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.python-version +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/.readthedocs.yaml +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/LICENSE +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/README.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/api-types.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/api.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/assets/javascript/readthedocs.js +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/async.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/cleanup.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/getting-started.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/index.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/instrumentation/index.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/instrumentation/prometheus.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/quality-of-life.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/docs/raw-queries.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/__init__.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/__main__.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/_async.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/_durations.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/_sql.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/_sync.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/_tables.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/instrumentation/__init__.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/py.typed +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/src/psycache/typing.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/__init__.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/test_cli.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/test_maintenance.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/test_psycopg_pool.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/test_raw.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/test_raw_async.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/test_sqlalchemy.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tests/test_sqlalchemy_async.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/tox.ini +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/typing_tests/README.md +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/typing_tests/__init__.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/typing_tests/psycopg_pool.py +0 -0
- {psycache-26.4.0 → psycache-26.5.0}/typing_tests/sqlalchemy.py +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# This file is machine-generated by `gh actions-lock`.
|
|
2
|
+
# Do not edit by hand; run `gh actions-lock` to update.
|
|
3
|
+
# Docs: https://gh.io/actions-lockfile
|
|
4
|
+
version: 'v0.0.3'
|
|
5
|
+
workflows:
|
|
6
|
+
'.github/workflows/ci.yml':
|
|
7
|
+
- 'actions/checkout@v7.0.1'
|
|
8
|
+
- 'actions/download-artifact@v8.0.2'
|
|
9
|
+
- 'actions/setup-python@v7.1.0'
|
|
10
|
+
- 'actions/upload-artifact@v7.0.2'
|
|
11
|
+
- 'hynek/build-and-inspect-python-package@v3.0.2'
|
|
12
|
+
- 'hynek/setup-cached-uv@v2.6.0'
|
|
13
|
+
- 're-actors/alls-green@v1.3.0'
|
|
14
|
+
'.github/workflows/codeql-analysis.yml':
|
|
15
|
+
- 'actions/checkout@v7.0.1'
|
|
16
|
+
- 'github/codeql-action@v4.39.4'
|
|
17
|
+
'.github/workflows/pypi-package.yml':
|
|
18
|
+
- 'actions/checkout@v7.0.1'
|
|
19
|
+
- 'actions/download-artifact@v8.0.2'
|
|
20
|
+
- 'hynek/build-and-inspect-python-package@v3.0.2'
|
|
21
|
+
- 'pypa/gh-action-pypi-publish@v1.14.3'
|
|
22
|
+
'.github/workflows/verify-lockfile.yml':
|
|
23
|
+
- 'actions/checkout@v7.0.1'
|
|
24
|
+
'.github/workflows/zizmor.yml':
|
|
25
|
+
- 'actions/checkout@v7.0.1'
|
|
26
|
+
- 'zizmorcore/zizmor-action@v0.9.0'
|
|
27
|
+
dependencies:
|
|
28
|
+
'actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8':
|
|
29
|
+
ref: 'v4.2.2'
|
|
30
|
+
commit: 'sha1-4d101475d8b20a2381f78447822ac1eab6504dd8'
|
|
31
|
+
owner_id: 44036562
|
|
32
|
+
repo_id: 760702757
|
|
33
|
+
uses:
|
|
34
|
+
- 'actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d'
|
|
35
|
+
'actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d':
|
|
36
|
+
ref: 'v4.2.1'
|
|
37
|
+
commit: 'sha1-508db95dd578ae2727ebd6217d5ba78e4fbda05d'
|
|
38
|
+
owner_id: 44036562
|
|
39
|
+
repo_id: 760701061
|
|
40
|
+
'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9':
|
|
41
|
+
ref: 'v6.1.0'
|
|
42
|
+
commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
|
|
43
|
+
owner_id: 44036562
|
|
44
|
+
repo_id: 215566462
|
|
45
|
+
'actions/checkout@v7.0.1':
|
|
46
|
+
ref: 'v7.0.1'
|
|
47
|
+
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
|
|
48
|
+
owner_id: 44036562
|
|
49
|
+
repo_id: 197814629
|
|
50
|
+
'actions/download-artifact@v8.0.2':
|
|
51
|
+
ref: 'v8.0.2'
|
|
52
|
+
commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
|
|
53
|
+
owner_id: 44036562
|
|
54
|
+
repo_id: 192626254
|
|
55
|
+
'actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97':
|
|
56
|
+
ref: 'v7.0.0'
|
|
57
|
+
commit: 'sha1-5fda3b95a4ea91299a34e894583c3862153e4b97'
|
|
58
|
+
owner_id: 44036562
|
|
59
|
+
repo_id: 192625525
|
|
60
|
+
'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405':
|
|
61
|
+
ref: 'v6.2.0'
|
|
62
|
+
commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405'
|
|
63
|
+
owner_id: 44036562
|
|
64
|
+
repo_id: 192625525
|
|
65
|
+
'actions/setup-python@v7.1.0':
|
|
66
|
+
ref: 'v7.1.0'
|
|
67
|
+
commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0'
|
|
68
|
+
owner_id: 44036562
|
|
69
|
+
repo_id: 192625525
|
|
70
|
+
'actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9':
|
|
71
|
+
ref: 'v7.0.2'
|
|
72
|
+
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
|
|
73
|
+
owner_id: 44036562
|
|
74
|
+
repo_id: 192625955
|
|
75
|
+
'actions/upload-artifact@v7.0.2':
|
|
76
|
+
ref: 'v7.0.2'
|
|
77
|
+
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
|
|
78
|
+
owner_id: 44036562
|
|
79
|
+
repo_id: 192625955
|
|
80
|
+
'gacts/run-and-post-run@598d7a875d5620e0457490555b5e18e46082aa47':
|
|
81
|
+
ref: 'v1.4.4'
|
|
82
|
+
commit: 'sha1-598d7a875d5620e0457490555b5e18e46082aa47'
|
|
83
|
+
owner_id: 56696274
|
|
84
|
+
repo_id: 617991574
|
|
85
|
+
'github/codeql-action@33d7b85da1a04171e211befe2c739303b9a4c066':
|
|
86
|
+
ref: 'v4.39.3'
|
|
87
|
+
commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066'
|
|
88
|
+
owner_id: 9919
|
|
89
|
+
repo_id: 259445878
|
|
90
|
+
'github/codeql-action@v4.39.4':
|
|
91
|
+
ref: 'v4.39.4'
|
|
92
|
+
commit: 'sha1-1bd86f2fdb4b86187fa4059f16f31a3202acc9ea'
|
|
93
|
+
owner_id: 9919
|
|
94
|
+
repo_id: 259445878
|
|
95
|
+
'hynek/build-and-inspect-python-package@v3.0.2':
|
|
96
|
+
ref: 'v3.0.2'
|
|
97
|
+
commit: 'sha1-67230f7b8410ae0052b39c1efc89d89fff43ff10'
|
|
98
|
+
owner_id: 41240
|
|
99
|
+
repo_id: 526525235
|
|
100
|
+
uses:
|
|
101
|
+
- 'actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8'
|
|
102
|
+
- 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
|
|
103
|
+
- 'actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97'
|
|
104
|
+
- 'actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9'
|
|
105
|
+
'hynek/setup-cached-uv@v2.6.0':
|
|
106
|
+
ref: 'v2.6.0'
|
|
107
|
+
commit: 'sha1-34e35d30f1ebc7421a5cc733bca38dcc62603960'
|
|
108
|
+
owner_id: 41240
|
|
109
|
+
repo_id: 779953216
|
|
110
|
+
uses:
|
|
111
|
+
- 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
|
|
112
|
+
- 'gacts/run-and-post-run@598d7a875d5620e0457490555b5e18e46082aa47'
|
|
113
|
+
'pypa/gh-action-pypi-publish@v1.14.3':
|
|
114
|
+
ref: 'v1.14.3'
|
|
115
|
+
commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086'
|
|
116
|
+
owner_id: 647025
|
|
117
|
+
repo_id: 178055147
|
|
118
|
+
uses:
|
|
119
|
+
- 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405'
|
|
120
|
+
're-actors/alls-green@v1.3.0':
|
|
121
|
+
ref: 'v1.3.0'
|
|
122
|
+
commit: 'sha1-b5b5b37504aa4183270bd3d855c52a67f212be35'
|
|
123
|
+
owner_id: 46427759
|
|
124
|
+
repo_id: 434447646
|
|
125
|
+
'zizmorcore/zizmor-action@v0.9.0':
|
|
126
|
+
ref: 'v0.9.0'
|
|
127
|
+
commit: 'sha1-bd12b495c90993a4301c73398142281a61499af3'
|
|
128
|
+
owner_id: 210636713
|
|
129
|
+
repo_id: 985558803
|
|
130
|
+
uses:
|
|
131
|
+
- 'github/codeql-action@33d7b85da1a04171e211befe2c739303b9a4c066'
|
|
@@ -22,12 +22,12 @@ jobs:
|
|
|
22
22
|
runs-on: ubuntu-latest
|
|
23
23
|
|
|
24
24
|
steps:
|
|
25
|
-
- uses: actions/checkout@
|
|
25
|
+
- uses: actions/checkout@v7.0.1
|
|
26
26
|
with:
|
|
27
27
|
fetch-depth: 0
|
|
28
28
|
persist-credentials: false
|
|
29
29
|
|
|
30
|
-
- uses: hynek/build-and-inspect-python-package@
|
|
30
|
+
- uses: hynek/build-and-inspect-python-package@v3.0.2
|
|
31
31
|
id: baipp
|
|
32
32
|
|
|
33
33
|
outputs:
|
|
@@ -51,18 +51,18 @@ jobs:
|
|
|
51
51
|
|
|
52
52
|
steps:
|
|
53
53
|
- name: Download pre-built packages
|
|
54
|
-
uses: actions/download-artifact@
|
|
54
|
+
uses: actions/download-artifact@v8.0.2
|
|
55
55
|
with:
|
|
56
56
|
name: Packages
|
|
57
57
|
path: dist
|
|
58
58
|
- run: |
|
|
59
59
|
tar xf dist/*.tar.gz --strip-components=1
|
|
60
60
|
rm -rf src
|
|
61
|
-
- uses: actions/setup-python@
|
|
61
|
+
- uses: actions/setup-python@v7.1.0
|
|
62
62
|
with:
|
|
63
63
|
python-version: ${{ matrix.python-version }}
|
|
64
64
|
allow-prereleases: true
|
|
65
|
-
- uses: hynek/setup-cached-uv@
|
|
65
|
+
- uses: hynek/setup-cached-uv@v2.6.0
|
|
66
66
|
|
|
67
67
|
- name: Start PostgreSQL
|
|
68
68
|
run: |
|
|
@@ -84,7 +84,7 @@ jobs:
|
|
|
84
84
|
-f ${PYTHON}-tests
|
|
85
85
|
|
|
86
86
|
- name: Upload coverage data
|
|
87
|
-
uses: actions/upload-artifact@
|
|
87
|
+
uses: actions/upload-artifact@v7.0.2
|
|
88
88
|
with:
|
|
89
89
|
name: coverage-data-${{ matrix.python-version }}
|
|
90
90
|
path: .coverage.*
|
|
@@ -98,16 +98,16 @@ jobs:
|
|
|
98
98
|
if: always()
|
|
99
99
|
|
|
100
100
|
steps:
|
|
101
|
-
- uses: actions/checkout@
|
|
101
|
+
- uses: actions/checkout@v7.0.1
|
|
102
102
|
with:
|
|
103
103
|
persist-credentials: false
|
|
104
|
-
- uses: actions/setup-python@
|
|
104
|
+
- uses: actions/setup-python@v7.1.0
|
|
105
105
|
with:
|
|
106
106
|
python-version-file: .python-version
|
|
107
|
-
- uses: hynek/setup-cached-uv@
|
|
107
|
+
- uses: hynek/setup-cached-uv@v2.6.0
|
|
108
108
|
|
|
109
109
|
- name: Download coverage data
|
|
110
|
-
uses: actions/download-artifact@
|
|
110
|
+
uses: actions/download-artifact@v8.0.2
|
|
111
111
|
with:
|
|
112
112
|
pattern: coverage-data-*
|
|
113
113
|
merge-multiple: true
|
|
@@ -126,7 +126,7 @@ jobs:
|
|
|
126
126
|
coverage report --fail-under=100
|
|
127
127
|
|
|
128
128
|
- name: Upload HTML report if check failed.
|
|
129
|
-
uses: actions/upload-artifact@
|
|
129
|
+
uses: actions/upload-artifact@v7.0.2
|
|
130
130
|
with:
|
|
131
131
|
name: html-report
|
|
132
132
|
path: htmlcov
|
|
@@ -139,15 +139,15 @@ jobs:
|
|
|
139
139
|
|
|
140
140
|
steps:
|
|
141
141
|
- name: Download pre-built packages
|
|
142
|
-
uses: actions/download-artifact@
|
|
142
|
+
uses: actions/download-artifact@v8.0.2
|
|
143
143
|
with:
|
|
144
144
|
name: Packages
|
|
145
145
|
path: dist
|
|
146
146
|
- run: tar xf dist/*.tar.gz --strip-components=1
|
|
147
|
-
- uses: actions/setup-python@
|
|
147
|
+
- uses: actions/setup-python@v7.1.0
|
|
148
148
|
with:
|
|
149
149
|
python-version-file: .python-version
|
|
150
|
-
- uses: hynek/setup-cached-uv@
|
|
150
|
+
- uses: hynek/setup-cached-uv@v2.6.0
|
|
151
151
|
|
|
152
152
|
- run: >
|
|
153
153
|
uvx --with tox-uv-bare
|
|
@@ -156,18 +156,18 @@ jobs:
|
|
|
156
156
|
docs:
|
|
157
157
|
name: Run doctests
|
|
158
158
|
needs: build-package
|
|
159
|
-
runs-on: ubuntu-
|
|
159
|
+
runs-on: ubuntu-24.04 # the version affects postgres paths!
|
|
160
160
|
steps:
|
|
161
161
|
- name: Download pre-built packages
|
|
162
|
-
uses: actions/download-artifact@
|
|
162
|
+
uses: actions/download-artifact@v8.0.2
|
|
163
163
|
with:
|
|
164
164
|
name: Packages
|
|
165
165
|
path: dist
|
|
166
166
|
- run: tar xf dist/*.tar.gz --strip-components=1
|
|
167
|
-
- uses: actions/setup-python@
|
|
167
|
+
- uses: actions/setup-python@v7.1.0
|
|
168
168
|
with:
|
|
169
169
|
python-version-file: .python-version
|
|
170
|
-
- uses: hynek/setup-cached-uv@
|
|
170
|
+
- uses: hynek/setup-cached-uv@v2.6.0
|
|
171
171
|
|
|
172
172
|
- name: Start PostgreSQL
|
|
173
173
|
# The README examples connect to a real database, so the doctests need
|
|
@@ -193,15 +193,15 @@ jobs:
|
|
|
193
193
|
runs-on: ubuntu-latest
|
|
194
194
|
steps:
|
|
195
195
|
- name: Download pre-built packages
|
|
196
|
-
uses: actions/download-artifact@
|
|
196
|
+
uses: actions/download-artifact@v8.0.2
|
|
197
197
|
with:
|
|
198
198
|
name: Packages
|
|
199
199
|
path: dist
|
|
200
200
|
- run: tar xf dist/*.tar.gz --strip-components=1
|
|
201
|
-
- uses: actions/setup-python@
|
|
201
|
+
- uses: actions/setup-python@v7.1.0
|
|
202
202
|
with:
|
|
203
203
|
python-version-file: .python-version
|
|
204
|
-
- uses: hynek/setup-cached-uv@
|
|
204
|
+
- uses: hynek/setup-cached-uv@v2.6.0
|
|
205
205
|
|
|
206
206
|
- run: >
|
|
207
207
|
uvx --with tox-uv-bare
|
|
@@ -212,13 +212,13 @@ jobs:
|
|
|
212
212
|
runs-on: ubuntu-latest
|
|
213
213
|
|
|
214
214
|
steps:
|
|
215
|
-
- uses: actions/checkout@
|
|
215
|
+
- uses: actions/checkout@v7.0.1
|
|
216
216
|
with:
|
|
217
217
|
persist-credentials: false
|
|
218
|
-
- uses: actions/setup-python@
|
|
218
|
+
- uses: actions/setup-python@v7.1.0
|
|
219
219
|
with:
|
|
220
220
|
python-version-file: .python-version
|
|
221
|
-
- uses: hynek/setup-cached-uv@
|
|
221
|
+
- uses: hynek/setup-cached-uv@v2.6.0
|
|
222
222
|
|
|
223
223
|
- run: uv venv
|
|
224
224
|
- run: uv pip install -e . --group dev
|
|
@@ -240,6 +240,6 @@ jobs:
|
|
|
240
240
|
|
|
241
241
|
steps:
|
|
242
242
|
- name: Decide whether the needed jobs succeeded or failed
|
|
243
|
-
uses: re-actors/alls-green@
|
|
243
|
+
uses: re-actors/alls-green@v1.3.0
|
|
244
244
|
with:
|
|
245
245
|
jobs: ${{ toJSON(needs) }}
|
|
@@ -26,17 +26,17 @@ jobs:
|
|
|
26
26
|
|
|
27
27
|
steps:
|
|
28
28
|
- name: Checkout repository
|
|
29
|
-
uses: actions/checkout@
|
|
29
|
+
uses: actions/checkout@v7.0.1
|
|
30
30
|
with:
|
|
31
31
|
persist-credentials: false
|
|
32
32
|
|
|
33
33
|
- name: Initialize CodeQL
|
|
34
|
-
uses: github/codeql-action/init@
|
|
34
|
+
uses: github/codeql-action/init@v4.39.4
|
|
35
35
|
with:
|
|
36
36
|
languages: ${{ matrix.language }}
|
|
37
37
|
|
|
38
38
|
- name: Autobuild
|
|
39
|
-
uses: github/codeql-action/autobuild@
|
|
39
|
+
uses: github/codeql-action/autobuild@v4.39.4
|
|
40
40
|
|
|
41
41
|
- name: Perform CodeQL Analysis
|
|
42
|
-
uses: github/codeql-action/analyze@
|
|
42
|
+
uses: github/codeql-action/analyze@v4.39.4
|
|
@@ -26,12 +26,12 @@ jobs:
|
|
|
26
26
|
id-token: write # necessary for GitHub attestations
|
|
27
27
|
|
|
28
28
|
steps:
|
|
29
|
-
- uses: actions/checkout@
|
|
29
|
+
- uses: actions/checkout@v7.0.1
|
|
30
30
|
with:
|
|
31
31
|
fetch-depth: 0
|
|
32
32
|
persist-credentials: false
|
|
33
33
|
|
|
34
|
-
- uses: hynek/build-and-inspect-python-package@
|
|
34
|
+
- uses: hynek/build-and-inspect-python-package@v3.0.2
|
|
35
35
|
with:
|
|
36
36
|
attest-build-provenance-github: 'true'
|
|
37
37
|
|
|
@@ -48,13 +48,13 @@ jobs:
|
|
|
48
48
|
|
|
49
49
|
steps:
|
|
50
50
|
- name: Download packages built by build-and-inspect-python-package
|
|
51
|
-
uses: actions/download-artifact@
|
|
51
|
+
uses: actions/download-artifact@v8.0.2
|
|
52
52
|
with:
|
|
53
53
|
name: Packages
|
|
54
54
|
path: dist
|
|
55
55
|
|
|
56
56
|
- name: Upload package to Test PyPI
|
|
57
|
-
uses: pypa/gh-action-pypi-publish@
|
|
57
|
+
uses: pypa/gh-action-pypi-publish@v1.14.3
|
|
58
58
|
with:
|
|
59
59
|
repository-url: https://test.pypi.org/legacy/
|
|
60
60
|
|
|
@@ -71,12 +71,12 @@ jobs:
|
|
|
71
71
|
|
|
72
72
|
steps:
|
|
73
73
|
- name: Download packages built by build-and-inspect-python-package
|
|
74
|
-
uses: actions/download-artifact@
|
|
74
|
+
uses: actions/download-artifact@v8.0.2
|
|
75
75
|
with:
|
|
76
76
|
name: Packages
|
|
77
77
|
path: dist
|
|
78
78
|
|
|
79
79
|
- name: Upload package to PyPI
|
|
80
|
-
uses: pypa/gh-action-pypi-publish@
|
|
80
|
+
uses: pypa/gh-action-pypi-publish@v1.14.3
|
|
81
81
|
with:
|
|
82
82
|
attestations: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Fails when .github/workflows/actions.lock is out of sync with the
|
|
2
|
+
# workflows or a locked pin no longer verifies upstream.
|
|
3
|
+
|
|
4
|
+
name: verify-lockfile
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
pull_request:
|
|
8
|
+
push:
|
|
9
|
+
branches: ["main"]
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
verify:
|
|
20
|
+
name: Verify actions lockfile
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
env:
|
|
23
|
+
GH_TOKEN: ${{ github.token }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- run: gh extension install github/gh-actions-lock
|
|
29
|
+
- run: gh actions-lock --verify
|
|
@@ -22,12 +22,12 @@ jobs:
|
|
|
22
22
|
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
|
|
23
23
|
steps:
|
|
24
24
|
- name: Checkout repository
|
|
25
|
-
uses: actions/checkout@
|
|
25
|
+
uses: actions/checkout@v7.0.1
|
|
26
26
|
with:
|
|
27
27
|
persist-credentials: false
|
|
28
28
|
|
|
29
29
|
- name: Run zizmor 🌈
|
|
30
|
-
uses: zizmorcore/zizmor-action@
|
|
30
|
+
uses: zizmorcore/zizmor-action@v0.9.0
|
|
31
31
|
with:
|
|
32
32
|
persona: pedantic
|
|
33
33
|
...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
repos:
|
|
3
3
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
4
|
-
rev: v0.
|
|
4
|
+
rev: v0.17.6
|
|
5
5
|
hooks:
|
|
6
6
|
- id: ruff-check
|
|
7
7
|
args: [--fix, --exit-non-zero-on-fix]
|
|
@@ -19,14 +19,13 @@ repos:
|
|
|
19
19
|
- id: codespell
|
|
20
20
|
|
|
21
21
|
- repo: https://github.com/abravalheri/validate-pyproject
|
|
22
|
-
rev: "
|
|
22
|
+
rev: "v0.27"
|
|
23
23
|
hooks:
|
|
24
24
|
- id: validate-pyproject
|
|
25
25
|
# Optional extra validations from SchemaStore:
|
|
26
26
|
additional_dependencies: ["validate-pyproject-schema-store[all]"]
|
|
27
27
|
|
|
28
|
-
- repo:
|
|
29
|
-
rev: v6.0.0
|
|
28
|
+
- repo: builtin
|
|
30
29
|
hooks:
|
|
31
30
|
- id: trailing-whitespace
|
|
32
31
|
- id: end-of-file-fixer
|
|
@@ -13,6 +13,15 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
|
|
|
13
13
|
<!-- changelog follows -->
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
## [26.5.0](https://github.com/hynek/psycache/compare/26.4.0...26.5.0) - 2026-11-23
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- `psycache.instrumentation.sentry.SentryInstrumentation` now requires *sentry-sdk* 3.0 or later.
|
|
21
|
+
The span data are now span attributes, and the operation is the `sentry.op` attribute.
|
|
22
|
+
[#12](https://github.com/hynek/psycache/pull/12)
|
|
23
|
+
|
|
24
|
+
|
|
16
25
|
## [26.4.0](https://github.com/hynek/psycache/compare/26.3.0...26.4.0) - 2026-09-29
|
|
17
26
|
|
|
18
27
|
### Changed
|
|
@@ -27,7 +36,7 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
|
|
|
27
36
|
|
|
28
37
|
- sqlalchemy: Imports from `sqlalchemy.ext.asyncio` are now protected using `if TYPE_CHECKING:`.
|
|
29
38
|
This fixes the runtime dependency on *greenlet* on SQLALchemy 2.1+, even if `psycache.sqlalchemy.AsyncSQLAlchemyCachePool` is not used.
|
|
30
|
-
[#11](https://github.com/hynek/psycache/pull/
|
|
39
|
+
[#11](https://github.com/hynek/psycache/pull/11)
|
|
31
40
|
|
|
32
41
|
|
|
33
42
|
## [26.3.0](https://github.com/hynek/psycache/compare/26.2.0...26.3.0) - 2026-06-26
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: psycache
|
|
3
|
-
Version: 26.
|
|
3
|
+
Version: 26.5.0
|
|
4
4
|
Summary: A Psycopg-backed PostgreSQL cache
|
|
5
5
|
Project-URL: Documentation, https://psycache.hynek.me/
|
|
6
6
|
Project-URL: Changelog, https://github.com/hynek/psycache/blob/main/CHANGELOG.md
|
|
@@ -28,7 +28,7 @@ Requires-Dist: psycopg-pool; extra == 'pool'
|
|
|
28
28
|
Provides-Extra: prometheus
|
|
29
29
|
Requires-Dist: prometheus-client; extra == 'prometheus'
|
|
30
30
|
Provides-Extra: sentry
|
|
31
|
-
Requires-Dist: sentry-sdk; extra == 'sentry'
|
|
31
|
+
Requires-Dist: sentry-sdk>=3; extra == 'sentry'
|
|
32
32
|
Provides-Extra: sqlalchemy
|
|
33
33
|
Requires-Dist: sqlalchemy; extra == 'sqlalchemy'
|
|
34
34
|
Provides-Extra: sqlalchemy-asyncio
|
|
@@ -107,17 +107,9 @@ Full documentation lives at **<https://psycache.hynek.me/>**.
|
|
|
107
107
|
|
|
108
108
|
### Changed
|
|
109
109
|
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
They take the name of the cache table, optionally schema-qualified with a dot (for example, `app_cache.psycache`).
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Fixed
|
|
117
|
-
|
|
118
|
-
- sqlalchemy: Imports from `sqlalchemy.ext.asyncio` are now protected using `if TYPE_CHECKING:`.
|
|
119
|
-
This fixes the runtime dependency on *greenlet* on SQLALchemy 2.1+, even if `psycache.sqlalchemy.AsyncSQLAlchemyCachePool` is not used.
|
|
120
|
-
[#11](https://github.com/hynek/psycache/pull/6)
|
|
110
|
+
- `psycache.instrumentation.sentry.SentryInstrumentation` now requires *sentry-sdk* 3.0 or later.
|
|
111
|
+
The span data are now span attributes, and the operation is the `sentry.op` attribute.
|
|
112
|
+
[#12](https://github.com/hynek/psycache/pull/12)
|
|
121
113
|
|
|
122
114
|
|
|
123
115
|
---
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import importlib.util
|
|
6
6
|
|
|
7
|
-
from collections.abc import
|
|
7
|
+
from collections.abc import AsyncGenerator, Generator
|
|
8
8
|
from contextlib import asynccontextmanager, contextmanager
|
|
9
9
|
from dataclasses import dataclass
|
|
10
10
|
from doctest import ELLIPSIS
|
|
@@ -104,7 +104,7 @@ class _RawCachePool:
|
|
|
104
104
|
dsn: str
|
|
105
105
|
|
|
106
106
|
@contextmanager
|
|
107
|
-
def connect(self) ->
|
|
107
|
+
def connect(self) -> Generator[psycopg.Connection]:
|
|
108
108
|
"""
|
|
109
109
|
Yield a fresh autocommit psycopg connection.
|
|
110
110
|
"""
|
|
@@ -112,13 +112,18 @@ class _RawCachePool:
|
|
|
112
112
|
yield conn
|
|
113
113
|
|
|
114
114
|
|
|
115
|
+
@pytest.fixture(name="raw_pool")
|
|
116
|
+
def _raw_pool(db_dsn: str) -> _RawCachePool:
|
|
117
|
+
return _RawCachePool(db_dsn)
|
|
118
|
+
|
|
119
|
+
|
|
115
120
|
@pytest.fixture(
|
|
116
121
|
name="cache",
|
|
117
122
|
params=_INSTRUMENTATIONS,
|
|
118
123
|
ids=["none", "both"],
|
|
119
124
|
)
|
|
120
|
-
def _cache(request: pytest.FixtureRequest,
|
|
121
|
-
return PostgresCache(
|
|
125
|
+
def _cache(request: pytest.FixtureRequest, raw_pool: _RawCachePool):
|
|
126
|
+
return PostgresCache(raw_pool, instrumentations=request.param)
|
|
122
127
|
|
|
123
128
|
|
|
124
129
|
@dataclass
|
|
@@ -130,7 +135,7 @@ class _RawAsyncCachePool:
|
|
|
130
135
|
dsn: str
|
|
131
136
|
|
|
132
137
|
@asynccontextmanager
|
|
133
|
-
async def connect(self) ->
|
|
138
|
+
async def connect(self) -> AsyncGenerator[psycopg.AsyncConnection]:
|
|
134
139
|
"""
|
|
135
140
|
Yield a fresh autocommit psycopg async connection.
|
|
136
141
|
"""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import url('https://rsms.me/inter/inter.css');
|
|
2
|
+
@import url('https://assets.hynek.me/css/bm.css');
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Adapted from https://rsms.me/inter/.
|
|
6
|
+
*/
|
|
7
|
+
:root {
|
|
8
|
+
--md-text-font: "Inter";
|
|
9
|
+
--md-code-font: "BerkeleyMono";
|
|
10
|
+
}
|
|
11
|
+
@supports (font-variation-settings: normal) {
|
|
12
|
+
:root { --md-text-font: "InterVariable"; }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
aside, body, input {
|
|
16
|
+
/* Keep Zensical's features and add the fix for Chrome. */
|
|
17
|
+
font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
|
|
18
|
+
}
|
|
@@ -11,7 +11,7 @@ A minimal, do-nothing provider looks like this:
|
|
|
11
11
|
|
|
12
12
|
<!-- skip: next -->
|
|
13
13
|
```python
|
|
14
|
-
from collections.abc import
|
|
14
|
+
from collections.abc import Generator
|
|
15
15
|
from contextlib import contextmanager
|
|
16
16
|
|
|
17
17
|
|
|
@@ -19,23 +19,23 @@ class MyInstrumentation:
|
|
|
19
19
|
@contextmanager
|
|
20
20
|
def start_cache_get_span(
|
|
21
21
|
self, key: str, name: str | None
|
|
22
|
-
) ->
|
|
22
|
+
) -> Generator[CacheGetSpan]: ...
|
|
23
23
|
|
|
24
24
|
@contextmanager
|
|
25
25
|
def start_cache_put_span(
|
|
26
26
|
self, key: str, name: str | None
|
|
27
|
-
) ->
|
|
27
|
+
) -> Generator[CachePutSpan]: ...
|
|
28
28
|
|
|
29
29
|
@contextmanager
|
|
30
30
|
def start_cache_remove_span(
|
|
31
31
|
self, key: str
|
|
32
|
-
) ->
|
|
32
|
+
) -> Generator[CacheRemoveSpan]: ...
|
|
33
33
|
|
|
34
34
|
@contextmanager
|
|
35
|
-
def start_cache_cleanup_span(self) ->
|
|
35
|
+
def start_cache_cleanup_span(self) -> Generator[CacheCleanupSpan]: ...
|
|
36
36
|
|
|
37
37
|
@contextmanager
|
|
38
|
-
def start_cache_flush_span(self) ->
|
|
38
|
+
def start_cache_flush_span(self) -> Generator[CacheFlushSpan]: ...
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
Because the protocol is [structural](https://typing.python.org/en/latest/spec/protocol.html), you don't need to inherit from anything.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Sentry
|
|
2
2
|
|
|
3
|
-
[`SentryInstrumentation`][psycache.instrumentation.sentry.SentryInstrumentation] creates [Sentry cache spans](https://docs.sentry.io/platforms/python/tracing/instrumentation/custom-instrumentation/caches-module/) for `get`, `put`, `remove`, and `flush` operations, recording `cache.hit`, `cache.item_size`, and `cache.key`
|
|
3
|
+
[`SentryInstrumentation`][psycache.instrumentation.sentry.SentryInstrumentation] creates [Sentry cache spans](https://docs.sentry.io/platforms/python/tracing/instrumentation/custom-instrumentation/caches-module/) for `get`, `put`, `remove`, and `flush` operations, recording `cache.hit`, `cache.item_size`, and `cache.key` attributes.
|
|
4
4
|
These show up in Sentry's [Cache Monitoring](https://docs.sentry.io/product/insights/caches/) views.
|
|
5
5
|
|
|
6
6
|
The *span_name* argument to [`get_raw()`][psycache.PostgresCache.get_raw] and [`put_raw()`][psycache.PostgresCache.put_raw] is used as the Sentry span name (it defaults to `"psycache get"` / `"psycache put"`).
|
|
7
7
|
|
|
8
|
-
It requires the `sentry` extra:
|
|
8
|
+
It requires *sentry-sdk* 3.0 or later, which the `sentry` extra installs:
|
|
9
9
|
|
|
10
10
|
```console
|
|
11
11
|
$ uv pip install "psycache[sentry]"
|
|
@@ -56,7 +56,7 @@ If neither adapter fits, implement the [`psycache.typing.CachePool`][] protocol
|
|
|
56
56
|
All it requires is a `connect()` context manager that yields a [`psycopg.Connection`][]:
|
|
57
57
|
|
|
58
58
|
```python
|
|
59
|
-
from collections.abc import
|
|
59
|
+
from collections.abc import Generator
|
|
60
60
|
from contextlib import contextmanager
|
|
61
61
|
|
|
62
62
|
import psycopg
|
|
@@ -64,5 +64,5 @@ import psycopg
|
|
|
64
64
|
|
|
65
65
|
class MyCachePool:
|
|
66
66
|
@contextmanager
|
|
67
|
-
def connect(self) ->
|
|
67
|
+
def connect(self) -> Generator[psycopg.Connection]: ...
|
|
68
68
|
```
|
|
@@ -30,7 +30,7 @@ dependencies = ["psycopg>3"]
|
|
|
30
30
|
|
|
31
31
|
[project.optional-dependencies]
|
|
32
32
|
prometheus = ["prometheus-client"]
|
|
33
|
-
sentry = ["sentry-sdk"]
|
|
33
|
+
sentry = ["sentry-sdk>=3"]
|
|
34
34
|
sqlalchemy = ["sqlalchemy"]
|
|
35
35
|
sqlalchemy-asyncio = ["sqlalchemy[asyncio]"]
|
|
36
36
|
pool = ["psycopg-pool"]
|
|
@@ -51,13 +51,12 @@ tests = ["coverage", "pytest", "pytest-asyncio", "sybil"]
|
|
|
51
51
|
docs = ["zensical", "mkdocstrings-python"]
|
|
52
52
|
dev = [
|
|
53
53
|
{ include-group = "tests" },
|
|
54
|
+
"psycache[pool,sqlalchemy-asyncio,sentry]",
|
|
54
55
|
"mypy",
|
|
55
56
|
"prometheus-client",
|
|
56
57
|
"pyrefly",
|
|
57
58
|
"ruff",
|
|
58
|
-
"sentry-sdk",
|
|
59
59
|
"ty",
|
|
60
|
-
"psycache[pool,sqlalchemy-asyncio]"
|
|
61
60
|
]
|
|
62
61
|
|
|
63
62
|
|