Skip to content

license: remove LGPL psycopg2 dependency path #910

Description

@seonghobae

Problem

LineageWeave's own source is MIT, but the current dependency/test toolchain includes psycopg2-binary>=2.9.12 in the dev extra and locks psycopg2-binary==2.9.12. That package is LGPL-family (GNU Library or Lesser General Public License (LGPL) (LGPL with exceptions) in the upstream 2.9.12 package metadata), which is outside the ContextualWisdomLab commercial-license intake policy.

This is not a README attribution problem and must not be hidden by changing the repository's MIT grant. The inbound dependency path itself needs removal or replacement.

Upstream license evidence: https://pypi.org/project/psycopg2/2.9.12/

Current repository reachability

Fresh default-branch search shows direct psycopg2 use in multiple executable/test paths, including:

  • scripts/seed_demo_data.py;
  • tests/test_prov_o_schema.py (psycopg2.sql.Identifier for generated database identities);
  • tests/test_synthetic_seed_cleanup.py;
  • tests/test_analysis_run_authorization.py;
  • tests/test_schema.py and related schema/registry tests;
  • tests/test_source_post_voice_history_live.py;
  • tests/test_person_mention_projection.py;
  • backend API test helpers;
  • lineageweave/optional_extra_collection.py and historical changelog references.

asyncpg is already used by the backend/runtime, but the synchronous admin/schema fixture path still depends on psycopg2. Therefore deleting one dependency declaration without migrating those callers would break hosted tests and seed tooling.

Required repair

Replace the LGPL-family synchronous PostgreSQL dependency with a commercially compatible driver or eliminate the duplicate synchronous driver boundary entirely. A candidate worth evaluating is pg8000 (BSD 3-Clause, pure Python DB-API 2.0), but selection must be based on actual compatibility with the repository's DSN handling, identifier quoting, transaction/error semantics and PostgreSQL-version tests—not on license alone.

The repair must:

  1. remove psycopg2-binary from pyproject.toml and uv.lock;
  2. migrate every direct psycopg2 / psycopg2.sql / psycopg2.errors caller;
  3. preserve safe generated-identifier quoting and DSN query options;
  4. preserve exact exception/rollback/cleanup behavior in database tests and seed tooling;
  5. keep PROV-O and schema tests fail-closed when PostgreSQL is unreachable;
  6. update optional-extra collection and license inventory/documentation;
  7. run the full exact-head Tests/PROV-O/Security/SAST gates before integration.

README integration consequence

README/public-surface PR #908 is not license-clean for integration under the current organization policy while this reachable LGPL dependency remains. Do not solve this by adding an exception, suppressing license inventory, or presenting the MIT repository license as covering the third-party dependency.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions