Skip to content

Conversation

@pangpang20
Copy link
Collaborator

Description

This PR performs a comprehensive update to migrate the project from PostgreSQL to GaussDB, while also refining testing workflows, documentation, and code consistency. The goal is to ensure full compatibility with GaussDB, simplify CI pipelines, and improve developer experience through clearer documentation and improved test management.

Changes Made

GaussDB Migration

  • Renamed postgres.py to gaussdb_.py and updated all internal references accordingly.
  • Replaced PostgreSQL-specific logic with GaussDB-compatible code.
  • Updated OID definitions and type tooling to match GaussDB requirements.

Test Enhancements

  • Added GaussDB-specific skip markers and version checks to test suite.
  • Improved async_to_sync consistency check logic to loop until convergence.
  • Renamed CI workflow file from ci.yml to tests.yml for clarity.
  • Deleted obsolete asyncio_default_fixture_loop_scope configuration option.

Lint & Workflow Improvements

  • Refactored lint.yml to use editable installs (pip install -e) for improved developer workflow.
  • Updated type references and resolved issues with missing/incomplete stubs.

Documentation Updates

  • Restore copyright:
    • From: GaussDB Team
    • To: Psycopg Team
  • Improved formatting of reStructuredText tables in pipeline.rst.
  • Enhanced the GaussDB project description in documentation.
  • Refined documentation workflow triggers to reduce noise and improve efficiency.

Why

  • GaussDB Compatibility: The project is transitioning from PostgreSQL to GaussDB as the primary backend.
  • CI Consistency: Consolidating and simplifying the test workflow improves maintainability and clarity.
  • Documentation Accuracy: Reflect current project ownership and improve formatting and readability.

Testing

  • CI tests pass on GitHub Actions with the updated configuration.
  • Manual verification of renamed modules and updated references.
  • Verified formatting in built HTML/docs output for corrected tables and structure.

Additional Notes

  • Downstream projects or integrations relying on PostgreSQL-specific files or CI workflows may need to update references.
  • Follow-up PRs may focus on broader async/await audit and test coverage across newly adapted GaussDB interfaces.

Replace postgres-specific version checks with gaussdb equivalents
Add @pytest.mark.gaussdb_skip to tests incompatible with gaussdb
Update version check utilities to support gaussdb version rules
Fix cursor binary mode condition in copy tests
Remove obsolete build scripts for libpq and MacOS/Win32 wheels
…ged PostgreSQL to GaussDB, optimized README.rst, and removed unnecessary YAML files from CI.
…ences, fix outdated import in tests/test_typeinfo.py: replace gaussdb.postgres.types with gaussdb.gaussdb_.types
@liubao68 liubao68 merged commit fbd4c17 into HuaweiCloudDeveloper:master Jun 23, 2025
3 checks passed
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