Skip to content

Commit 2a410c8

Browse files
committed
use python3.12, fix requirements and gitlab deprecation for member list
1 parent 244cce9 commit 2a410c8

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11-slim
1+
FROM python:3.12-slim
22

33
WORKDIR /usr/src/app
44

@@ -10,6 +10,7 @@ RUN groupadd --gid 1000 appuser \
1010

1111
USER appuser
1212
COPY gitlab2sentry/ gitlab2sentry/
13+
COPY tests/ tests/
1314
COPY run.py run.py
1415

1516
CMD ["python3", "run.py"]

gitlab2sentry/utils/gitlab_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def _get_default_mentions(self, project: Project) -> str:
216216
return ", ".join(
217217
[
218218
f"@{member.username}"
219-
for member in project.members.all()
219+
for member in project.members.list(all=True)
220220
if (
221221
member.access_level >= GITLAB_MENTIONS_ACCESS_LEVEL
222222
and member.state != "blocked"

requirements.txt

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
aiohttp==3.9.0b0
1+
aiohappyeyeballs==2.4.0
2+
aiohttp==3.10.5
23
aiosignal==1.3.1
4+
anyio==4.4.0
35
attrs==24.2.0
46
awesome-slugify==1.6.5
5-
certifi==2020.6.20
6-
chardet==3.0.4
7+
backoff==2.2.1
8+
certifi==2024.8.30
79
charset-normalizer==3.3.2
8-
Cython==0.29.37
910
frozenlist==1.4.1
10-
gql==3.2.0
11+
gql==3.5.0
1112
graphql-core==3.2.4
12-
idna==2.10
13+
idna==3.8
1314
multidict==6.1.0
1415
python-gitlab==4.10.0
15-
pytz==2022.1
16-
PyYAML==6.0
17-
regex==2020.10.28
16+
regex==2024.9.11
1817
requests==2.32.3
1918
requests-toolbelt==1.0.0
20-
sentry-sdk==0.19.5
21-
setuptools==74.1.2
19+
sentry-sdk==2.14.0
20+
sniffio==1.3.1
2221
Unidecode==0.4.21
23-
urllib3==1.25.11
24-
wheel==0.44.0
22+
urllib3==2.2.2
2523
yarl==1.11.1

tests/test_gitlab_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_get_default_mentions(gitlab_provider_fixture, gitlab_project_fixture):
9292
)
9393
_project_non_blocked_members = [
9494
member
95-
for member in gitlab_project_fixture.members.all()
95+
for member in gitlab_project_fixture.members.list(all=True)
9696
if member.state != "blocked"
9797
]
9898
assert len(_mentioned_members) == len(_project_non_blocked_members)
@@ -168,4 +168,4 @@ def test_get_all_projects(
168168
]
169169
)
170170
== 1
171-
)
171+
)

0 commit comments

Comments
 (0)