Skip to content

Conversation

@pangpang20
Copy link
Collaborator

Description

This pull request rebrands the psycopg project to gaussdb to align with the new project identity. It includes renaming directories, files, and content references, updating dependencies, configurations, and documentation, and ensuring compatibility with the new branding. The changes also involve updating the version from 3.3.0.dev1 to 1.0.0.dev1 and replacing references to PostgreSQL with GaussDB or openGauss where appropriate.

Changes Made

  • Cleanup of Compiled Files and Dependencies:

    • Removed __pycache__, *egg*, .pytest_cache, and *.back files.
    • Uninstalled psycopg, psycopg-pool, and isort-psycopg packages.
    • Removed psycopg_c and .mypy_cache directories.
  • Directory Renaming:

    • Renamed psycopg to gaussdb, psycopg_pool to gaussdb_pool, and related subdirectories.
    • Renamed tools/isort-psycopg to tools/isort-gaussdb.
  • File Renaming:

    • Used find and rename to replace psycopg with gaussdb in filenames.
  • Content Replacement:

    • Replaced psycopg and related terms (e.g., psycopg_c, psycopg_pool, Psycopg 3, psycopg.org) with gaussdb equivalents in .py, .rst, .toml, .txt, .yml, .pyi, .flake8, and .sh files.
    • Replaced PostgreSQL with GaussDB or _GaussDB in relevant files.
    • Removed references to gaussdb2.
    • Updated version from 3.3.0.dev1 to 1.0.0.dev1 in .toml files.
    • Updated PYTHONPATH environment variable to reference /opt/gaussdb_driver/gaussdb-python/gaussdb:/opt/gaussdb_driver/gaussdb-python/gaussdb_pool.
  • Configuration and Documentation Updates:

    • Updated pyproject.toml, requirements.txt, .github/workflows/ci.yml, .gitignore, .flake8, and .pre-commit-config.yaml to reflect gaussdb branding.
    • Updated README.rst and docs/ content to use gaussdb instead of psycopg.
    • Checked for residual psycopg references using grep.
  • Reinstallation and Testing:

    • Reinstalled gaussdb, gaussdb_pool, and isort-gaussdb packages.
    • Verified package versions and imports in Python environment.
    • Ran pre-commit checks and pytest with the test DSN.

Why

The rebranding from psycopg to gaussdb is necessary to align the project with its new identity, ensuring consistency across code, documentation, and configurations. This change also involves updating version numbers and references to PostgreSQL to reflect the adoption of GaussDB or openGauss. The cleanup and reinstallation steps ensure a clean slate for the rebranded project, removing outdated dependencies and compiled files.

Testing

  • Verification Steps:

    • Used find and grep to confirm all psycopg references were replaced with gaussdb.
    • Checked specific directories (psycopg/, docs/, tests/, tools/) for correct replacements.
    • Verified version update to 1.0.0.dev1 using grep -rn "1.0.0.dev1".
    • Confirmed PYTHONPATH update and package installations via pip list | grep gaussdb.
    • Validated imports and module paths in Python (e.g., import gaussdb; print(gaussdb.__file__)).
    • Ran pre-commit run --all-files to ensure code quality.
    • Executed pytest -s -v --durations=0 with the specified test DSN to validate functionality.
  • Environment:

    • Tests were conducted in a virtual environment (../myenv/bin/activate).
    • Used GAUSSDB_TEST_DSN for database connectivity during tests.

Additional Notes

  • Ensured no residual psycopg references remain by running grep -ir "psycopg" ..
  • Checked github.com URLs for updates, but specific changes depend on the repository context.
  • The rebranding maintains full compatibility with existing functionality, with no expected breaking changes.
  • Developers should verify the updated PYTHONPATH in their environments and ensure the test DSN is correctly configured for their setup.

… file names, and file contents across the gaussdb-python project. Update references from 'psycopg.org' to 'gaussdb.org' and 'PostgreSQL' to 'GaussDB'. Remove compiled files (pycache, egg, .pytest_cache, *.back) and delete 'gaussdb2' references. Update HTTP paths and verify changes with grep checks.
@liubao68 liubao68 merged commit 9d80490 into HuaweiCloudDeveloper:master Jun 16, 2025
2 of 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