Skip to content

fix(deps): bump psycopg2-binary to 2.9.13 - #148

Merged
tkislan merged 1 commit into
tk/install-poetry-with-pipxfrom
tk/bump-psycopg2-binary-2026-11-10
Nov 10, 2026
Merged

tkislan merged 1 commit into
tk/install-poetry-with-pipxfrom
tk/bump-psycopg2-binary-2026-11-10

Conversation

@tkislan

@tkislan tkislan commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Bumps psycopg2-binary from 2.9.11 to 2.9.13. No advisory has been published for 2.9.11 yet. The bump follows the process this repository uses for audit findings, because 2.9.12 and 2.9.13 fix parsing of malformed server input.

Audit

  • Command: poetry export <matrix export-args> -f requirements.txt, then pypa/gh-action-pip-audit with require-hashes: true, disable-pip: true, ignoring PYSEC-2024-161 and PYSEC-2026-113, on Python 3.11 (.github/workflows/ci.yml:516, :518). It runs three times: Production (--without dev), Server (--extras server), Dev (--only dev).
  • Result on this branch:
    • Dev passes.
    • Production and Server report no psycopg2-binary findings.
    • Production and Server fail on oauthlib 4.0.0 (CVE-2026-49272, fix version now 4.0.1). main fails the same way. This is not caused by this PR; see "Not fixed".

Precedent

psycopg2-binary 2.9.11 → 2.9.13

  • Advisories: none published. Fixes from the changelog:
    • 2.9.12: infinite loop on a malformed interval.
    • 2.9.13: parsing of malformed bytea input, and of malformed int64 input in arrays.
    • 2.9.13 also adds Python 3.15 and drops 3.9.
  • Path: direct production dependency (main group). No other locked package depends on psycopg2.
  • Decision: raise the floor to 2.9.13 on every Python. The old split existed only because 2.9.10 was the first release with Python 3.13 wheels (929b7e4). 2.9.13 requires Python >= 3.10 and ships wheels for 3.10–3.14, so the two lines collapse into one, keeping the <3 ceiling as in fix(deps): resolve pip-audit failures #133/fix(deps): resolve pip-audit failures for pymongo, dnspython, oauthlib and pylint #145. On 3.10–3.12 the ceiling widens from <2.10 to <3. That changes nothing today: no 2.10 exists or is announced.
  • Effect on user environments: when DEEPNOTE_ENFORCE_PIP_CONSTRAINTS is on, the published constraints file now rejects user pins below 2.9.13 (deepnote_core/execution/registry.py:155). This is the same effect every earlier floor raise had.
  • Bundled libraries: libpq 17.6 → 17.11 and OpenSSL 3.5.4 → 3.5.8, both patch updates in the same series. aarch64 Linux wheels now need glibc 2.28 instead of 2.17.
-    "psycopg2-binary>=2.9.4,<2.10; python_version < '3.13'",
-    "psycopg2-binary>=2.9.10,<3; python_version>='3.13'",
+    "psycopg2-binary>=2.9.13,<3",  # 2.9.12 and 2.9.13 fix parsing of malformed interval, bytea and int8-array input

Verified

  • The spliced lock block is byte-identical to what Poetry 2.2.0 generates.
  • All 67 file hashes match PyPI.
  • Every export resolves psycopg2-binary==2.9.13.
  • Unit suite: 1462 passed, 4 skipped, 13 warnings, identical before and after the bump.
  • Round-trip against a Postgres 17 container with the toolkit's wait_select callback: interval, bytea and extreme int8 values in an array parse correctly, and statement_timeout cancellation raises QueryCanceled.

Decided with the user

  • Scope: bump only psycopg2, to 2.9.13, handled like a vulnerability fix although no advisory exists.
  • oauthlib: not fixed here, because it is outside that scope.

Checks

Command Result
poetry check --lock (Poetry 2.2.0) exit 0
Spliced lock compared block-by-block with base and with a fresh poetry lock only psycopg2-binary and content-hash differ from base
pip-audit==2.10.1 on Python 3.11, CI flags and ignores, three exports Dev clean; Production and Server: only oauthlib CVE-2026-49272 (same on main)
pytest tests/unit on Python 3.13, before / after 1462 passed, 4 skipped / 1462 passed, 4 skipped
Postgres 17 round-trip with set_wait_callback(wait_select) pass

Not fixed

Summary by CodeRabbit

  • Compatibility
    • Updated package compatibility across supported Python versions.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The psycopg2-binary requirement is now >=2.9.13,<3 for all supported Python versions. The previous Python-version-specific constraints were removed.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: m1so

Merge Risk: Minimal · up to 0bb86

The dependency floor is raised to 2.9.13. No concrete merge-blocking issue has been established.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the dependency update to psycopg2-binary 2.9.13.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Updates Docs Passed This PR updates a dependency and its lockfile; it does not implement a feature. The linked repositories are unavailable for inspection. Please check their documentation and roadmap if an update is nee…
Full details: Updates Docs

Explanation

This PR updates a dependency and its lockfile; it does not implement a feature. The linked repositories are unavailable for inspection. Please check their documentation and roadmap if an update is needed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 72117e1d-5fc3-486d-b368-317860fbef49
Commits

Reviewing files that changed from the base of the PR and between 3122452 and 0bb86ff.

Files ignored due to path filters: 1

  • poetry.lock is excluded by !**/*.lock
Files selected for processing: 1

  • pyproject.toml

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.43%. Comparing base (b6b7dbd) to head (ad79fde).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                     Coverage Diff                      @@
##           tk/install-poetry-with-pipx     #148   +/-   ##
============================================================
  Coverage                        78.43%   78.43%           
============================================================
  Files                              121      121           
  Lines                             6920     6920           
  Branches                          1005     1005           
============================================================
  Hits                              5428     5428           
  Misses                            1182     1182           
  Partials                           310      310           
Flag Coverage Δ
combined 78.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 10, 2026
@deepnote-bot

deepnote-bot commented Nov 10, 2026 •

Copy link
Copy Markdown

🚀 Review App Deployment Started

📝 Description 🌐 Link / Info
🌍 Review application ra-148
🔑 Sign-in URL Click to sign-in
📊 Application logs View logs
🔄 Actions Click to redeploy
🚀 ArgoCD deployment View deployment
⏰ Last deployed 2026-11-10 14:18:32 (UTC)
📜 Deployed commit e79b719bd6e7995c165ce430847eed8588bbbe63
🛠️ Toolkit version 2b5d364

psycopg2-binary 2.9.12 and 2.9.13 fix an infinite loop on a malformed
interval and the parsing of malformed bytea and int64-array input. No
advisory is published for them yet; the floor is raised the way past
audit fixes raise one.

2.9.13 requires Python 3.10 and ships wheels for 3.10 to 3.14, so the
per-Python split, which existed only because 2.9.10 was the first
release with 3.13 wheels, collapses into one constraint with the newer
line's <3 ceiling, as was done for pymongo and pylint.

Only the psycopg2-binary block and content-hash were spliced into the
lock.
@tkislan
tkislan force-pushed the tk/bump-psycopg2-binary-2026-11-10 branch from 0bb86ff to ad79fde Compare November 10, 2026 14:06
@tkislan
tkislan changed the base branch from main to tk/install-poetry-with-pipx November 10, 2026 14:06
@github-actions

Copy link
Copy Markdown

📦 Python package built successfully!

  • Version: 2.9.1.dev3+2b5d364
  • Wheel: deepnote_toolkit-2.9.1.dev3+2b5d364-py3-none-any.whl
  • Install:
    pip install "deepnote-toolkit @ https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/2.9.1.dev3%2B2b5d364/deepnote_toolkit-2.9.1.dev3%2B2b5d364-py3-none-any.whl"

@tkislan
tkislan marked this pull request as ready for review November 10, 2026 14:27
@tkislan
tkislan requested a review from a team as a code owner November 10, 2026 14:27
@tkislan
tkislan requested review from mfranczel and removed request for a team November 10, 2026 14:27
@tkislan
tkislan merged commit f573369 into tk/install-poetry-with-pipx Nov 10, 2026
42 of 81 checks passed
@tkislan
tkislan deleted the tk/bump-psycopg2-binary-2026-11-10 branch November 10, 2026 14:28
tkislan added a commit that referenced this pull request Nov 10, 2026
…149)

* fix(ci): install Poetry with pipx instead of snok/install-poetry

Every job that installs Poetry through snok/install-poetry fails with
HTTP 403. The action downloads https://install.python-poetry.org/ with
Python's urllib, and the Cloudflare front of that host now rejects the
Python-urllib User-Agent with error 1010. The action's latest release
makes the same request, so bumping it does not help.

Poetry is installed from PyPI with the runner's preinstalled pipx
instead, as dockerfiles/test.Dockerfile already does. The settings the
action applied are already set by the workflow-level POETRY_* env vars.

The runner image points pipx at /opt, so the two jobs that cache
~/.local for their Poetry install redirect pipx there; otherwise the
cache would save nothing and a later cache hit would leave poetry
missing.

* fix(deps): bump psycopg2-binary to 2.9.13 (#148)

psycopg2-binary 2.9.12 and 2.9.13 fix an infinite loop on a malformed
interval and the parsing of malformed bytea and int64-array input. No
advisory is published for them yet; the floor is raised the way past
audit fixes raise one.

2.9.13 requires Python 3.10 and ships wheels for 3.10 to 3.14, so the
per-Python split, which existed only because 2.9.10 was the first
release with 3.13 wheels, collapses into one constraint with the newer
line's <3 ceiling, as was done for pymongo and pylint.

Only the psycopg2-binary block and content-hash were spliced into the
lock.

* fix(deps): bump oauthlib to 4.0.1

CVE-2026-49272 (GHSA-3jp2-3mrg-2vxc) was revised on 2026-11-05 to name
4.0.1 as its fix, so pip-audit fails Production and Server on 4.0.0.
4.0.1 changes only the server-side device flow; databricks-sql-connector,
the only consumer, uses oauthlib as a client and allows <5. The floor in
the transitive security block is raised in place, as for pyasn1.

Only the oauthlib block and content-hash were spliced into the lock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants