@cryptotaxi247 / CoPilot / commits / 6f983a60

chore: tier 2 python dep upgrades — medium-risk majors (#848)

Drops the protective upper-bound pins added in #844 for the medium-risk major bumps. All 6 majors verified to work with the existing code via a fresh container boot + smoke tests against the specific code paths each library is used in. Bumped (top-level + selected transitives): aiofiles 23.2.1 → 25.1.0 bcrypt 4.3.0 → 5.0.0 cryptography 41.0.7 → 46.0.7 environs 9.5.0 → 15.0.1 grafana-client 3.11.2 → 5.1.0 xmltodict 0.15.1 → 1.0.4 Compat pin lifted (was required for environs 9 + marshmallow 4 incompatibility): marshmallow 3.26.2 → 4.3.0 (no longer pinned <4) Smoke tests (run inside the rebuilt backend container) confirm: - bcrypt 5.0.0: hashpw + checkpw round-trip OK (used by app/auth/models/users.py:Password.generate()) - cryptography 46.0.7: Fernet encrypt/decrypt round-trip OK (used by app/auth/services/totp.py for encrypted TOTP secrets) - environs 15.0.1: Env().bool() / Env().str() / Env().read_env() OK (used by app/db/db_session.py + app/data_store/data_store_session.py) - grafana-client 5.1.0: all 5 API paths the code uses still exist: admin.create_user, admin.delete_user, organizations.organization_user_add, user.switch_actual_user_organisation, dashboard.update_dashboard - aiofiles 25.1.0: async open() / read() OK - xmltodict 1.0.4: parse/unparse round-trip OK (used by app/connectors/wazuh_manager/services/rules.py) Verified at boot: - docker build of backend/Dockerfile succeeds - all ~50 routers import without ModuleNotFoundError - alembic upgrade head runs, all seed funcs complete, "Application startup complete" + "Scheduler started" in logs - existing MySQL test data unchanged across the rebuild - GET / returns HTTP 200 Note on grafana-client 5.1.0: import emits a SyntaxWarning from elements/datasource.py:414 and elements/_async/datasource.py:420 (`timestamp=["data"]["to"]` is a typo — should be `timestamp=request["data"]["to"]`). The bug is upstream, only fires on the Prometheus instant-query proxy path, and CoPilot does not use that path. Worth filing upstream but doesn't block this PR. Roadmap state after this PR: - Tier 1, Tier 2 done - Remaining majors: pydantic 1→2 (29 @validator + 44 class Config sites), SQLAlchemy 1.4→2.0 (142 AsyncSession sites). Each a dedicated migration PR. Co-authored-by: taylor_socfortress <taylor.walton@socfortress.co> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

taylorcopilot committed May 7, 2026 at 18:49 UTC 6f983a60e14d2fb7b20986190af842db927ebddf
2 files changed +21 -17
backend/requirements.in
+6 -7
@@ -1,25 +1,24 @@
1 -aiofiles<24
1 +aiofiles
2 aiohttp
3 aiomysql
4 aiosqlite
5 alembic
6 apscheduler
7 asyncgelf
8 -bcrypt<5
8 +bcrypt
9 cortex4py
10 -cryptography<42
10 +cryptography
11 docxtpl
12 elasticsearch7==7.10.1
13 -environs<10
13 +environs
14 fastapi<0.116
15 -grafana-client<4
15 +grafana-client
16 grpcio
17 grpcio-tools
18 httpx[http2]<0.29
19 influxdb-client[async]
20 Jinja2
21 loguru
22 -marshmallow<4
22 miniopy-async
23 packaging
24 passlib
@@ -44,4 +43,4 @@ sqlmodel<0.0.10
43 starlette
44 uvicorn[standard]
45 werkzeug
47 -xmltodict<1
46 +xmltodict
backend/requirements.txt
+15 -10
@@ -1,5 +1,5 @@
1 aiocsv==1.4.0
2 -aiofiles==23.2.1
2 +aiofiles==25.1.0
3 aiohappyeyeballs==2.6.1
4 aiohttp==3.13.5
5 aiohttp-retry==2.9.1
@@ -42,7 +42,7 @@ azure-mgmt-sql==1.0.0
42 azure-mgmt-storage==17.0.0
43 azure-mgmt-web==1.0.0
44 backports-tarfile==1.2.0
45 -bcrypt==4.3.0
45 +bcrypt==5.0.0
46 boto3==1.43.6
47 botocore==1.43.6
48 cachetools==4.2.4
@@ -57,13 +57,13 @@ click==8.3.3
57 coloredlogs==10.0
58 cortex4py==2.1.0
59 crcmod==1.7
60 -cryptography==41.0.7
60 +cryptography==46.0.7
61 dnspython==2.8.0
62 docxtpl==0.20.2
63 durationpy==0.10
64 elasticsearch7==7.10.1
65 email-validator==2.3.0
66 -environs==9.5.0
66 +environs==15.0.1
67 fastapi==0.115.14
68 frozenlist==1.8.0
69 google-api-core[grpc]==1.31.5
@@ -83,7 +83,7 @@ google-cloud-storage==2.11.0
83 google-crc32c==1.8.0
84 google-resumable-media==2.9.0
85 googleapis-common-protos[grpc]==1.75.0
86 -grafana-client==3.11.2
86 +grafana-client==5.1.0
87 greenlet==3.5.0
88 grpc-google-iam-v1==0.12.4
89 grpcio==1.80.0
@@ -106,6 +106,7 @@ jaraco-collections==5.2.1
106 jaraco-context==6.1.2
107 jaraco-functools==4.4.0
108 jaraco-text==4.2.0
109 +jh2==5.0.11
110 jinja2==3.1.6
111 jmespath==0.10.0
112 kubernetes==35.0.0
@@ -114,7 +115,7 @@ lxml==6.1.0
115 mako==1.3.12
116 markdown-it-py==4.2.0
117 markupsafe==3.0.3
117 -marshmallow==3.26.2
118 +marshmallow==4.3.0
119 mdurl==0.1.2
120 miniopy-async==1.23.5
121 more-itertools==11.0.2
@@ -124,6 +125,7 @@ msgraph-core==0.2.2
125 msrest==0.7.1
126 multidict==6.7.1
127 netaddr==1.3.0
128 +niquests==3.18.7
129 oauth2client==4.1.3
130 oauthlib==3.3.1
131 oci==2.168.1
@@ -148,7 +150,7 @@ pyee==13.0.1
150 pygments==2.20.0
151 pyjwt[crypto]==2.12.1
152 pymysql==1.1.3
151 -pyopenssl==25.1.0
153 +pyopenssl==25.3.0
154 pyotp==2.9.0
155 pyparsing==3.3.2
156 python-dateutil==2.8.0
@@ -157,8 +159,9 @@ python-dotenv==1.2.2
159 python-magic==0.4.27
160 python-multipart==0.0.27
161 pytz==2026.2
160 -pyvelociraptor==0.1.9
162 +pyvelociraptor==0.1.14
163 pyyaml==6.0.3
164 +qh3==1.8.1
165 qrcode==8.2
166 reactivex==4.1.0
167 regex==2026.4.4
@@ -183,14 +186,16 @@ typing-extensions==4.15.0
186 tzlocal==5.3.1
187 uritemplate==4.2.0
188 urllib3==1.26.20
189 +urllib3-future==2.19.913
190 uvicorn[standard]==0.46.0
191 uvloop==0.22.1
188 -verlib2==0.2.0
192 +verlib2==0.3.2
193 +wassima==2.0.6
194 watchfiles==1.1.1
195 websocket-client==1.9.0
196 websockets==16.0
197 werkzeug==3.1.8
193 -xmltodict==0.15.1
198 +xmltodict==1.0.4
199 yarl==1.23.0
200 zc-lockfile==4.0
201