diff --git a/.github/workflows/ci-integration-db-live.yaml b/.github/workflows/ci-integration-db-live.yaml deleted file mode 100644 index f40e64965..000000000 --- a/.github/workflows/ci-integration-db-live.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# CI - DB Integration - Cloud is designed to run integration testing against to cloud database -# Target database: Snowflake -# Sqlalchemy version: 1.4 (required by snowflake-sqlalchemy) -# Please aware that if you want to test locally, configure those environment variables: ['SF_USERNAME', 'SF_PASSWORD', 'SF_DATABASE'] - -name: CI - DB Integration - Cloud - -on: - workflow_call: - -jobs: - database-live-integration-test: - strategy: - matrix: - python-version: ['3.11'] - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - - env: - PLOOMBER_VERSION_CHECK_DISABLED: true - PYTHON_VERSION: ${{ matrix.python-version }} - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Environment Vars - id: secret-check - # perform secret check & put boolean result as an output - shell: bash - run: | - if [ "${{ secrets.SF_USERNAME }}" != '' ]; then - echo "available=true" >> $GITHUB_OUTPUT; - else - echo "available=false" >> $GITHUB_OUTPUT; - fi - - - name: Set up Python ${{ matrix.python-version }} - if : ${{ steps.secret-check.outputs.available == 'true' }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - - name: Install dependencies - if: ${{ steps.secret-check.outputs.available == 'true' }} - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade nox - nox --session test_integration_cloud --install-only - - - name: Integration Test - if: ${{ steps.secret-check.outputs.available == 'true'}} - env: - SF_USERNAME: ${{ secrets.SF_USERNAME }} - SF_PASSWORD: ${{ secrets.SF_PASSWORD }} - SF_DATABASE: ${{ secrets.SF_DATABASE }} - REDSHIFT_HOST: ${{ secrets.REDSHIFT_HOST }} - REDSHIFT_USERNAME: ${{ secrets.REDSHIFT_USERNAME }} - REDSHIFT_PASSWORD: ${{ secrets.REDSHIFT_PASSWORD }} - - run: | - - nox --session test_integration_cloud --no-install --reuse-existing-virtualenvs - - - name: Upload failed images artifacts - uses: actions/upload-artifact@v3 - if: failure() - with: - name: failed-image-artifacts-integration-live ${{ matrix.os }} ${{ matrix.python-version }} - path: result_images/ \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a79bb052f..42c02787a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -71,17 +71,12 @@ jobs: exit 0 fi - integration-test-non-live: - needs: [preliminary] - if: needs.preliminary.outputs.check_doc_modified == 'failure' - uses: ./.github/workflows/ci-integration-db.yaml - test: needs: [preliminary] if: needs.preliminary.outputs.check_doc_modified == 'failure' strategy: matrix: - python-version: [3.8, 3.9, '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11'] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} @@ -190,7 +185,7 @@ jobs: release: - needs: [test, test-sqlalchemy-v1, check, integration-test-non-live] + needs: [test, test-sqlalchemy-v1, check] if: startsWith(github.ref, 'refs/tags') && github.event_name != 'pull_request' runs-on: ubuntu-latest diff --git a/.readthedocs.yml b/.readthedocs.yml index 10a146011..a6e6ac719 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,16 +8,12 @@ build: jobs: # download latest version from S3 to leverage notebook cache pre_build: - - aws configure set aws_access_key_id ${aws_access_key_id} - - aws configure set aws_secret_access_key ${aws_secret_access_key} - - aws s3 cp s3://jupysql-build-docs/${READTHEDOCS_VERSION} _readthedocs/.jupyter_cache/ --recursive - 'mkdir -p $HOME/.ploomber/stats/' - 'echo "version_check_enabled: false" >> $HOME/.ploomber/stats/config.yaml' # upload to S3 post_build: - conda env export --no-build > environment.lock.yml - cat environment.lock.yml - - aws s3 cp _readthedocs/.jupyter_cache/ s3://jupysql-build-docs/${READTHEDOCS_VERSION} --recursive conda: environment: doc/environment.lock.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index e00b4ea13..a5776ecdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.10.15dev +*Drops compatibility with Python 3.8* + +* [Fix] Compatibility with `prettytable>=3.12.0` + ## 0.10.14 (2024-09-18) * [Feature] Removes telemetry diff --git a/doc/environment.lock.yml b/doc/environment.lock.yml index 1f7df788c..269730da3 100644 --- a/doc/environment.lock.yml +++ b/doc/environment.lock.yml @@ -146,7 +146,7 @@ dependencies: - pluggy==1.2.0 - polars==0.18.7 - posthog==3.0.1 - - prettytable==3.8.0 + - prettytable==3.12.0 - prompt-toolkit==3.0.39 - psutil==5.9.5 - ptyprocess==0.7.0 @@ -198,7 +198,7 @@ dependencies: - typing-extensions==4.7.1 - uc-micro-py==1.0.2 - urllib3==1.26.16 - - wcwidth==0.2.6 + - wcwidth==0.2.13 - widgetsnbextension==4.0.8 - zipp==3.16.2 prefix: /opt/conda/envs/jupysql-doc diff --git a/setup.py b/setup.py index 8f3b9aad2..456ed279e 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ ) install_requires = [ - "prettytable", + "prettytable>=3.12.0", # IPython dropped support for Python 3.8 "ipython<=8.12.0; python_version <= '3.8'", "sqlalchemy", diff --git a/src/sql/run/resultset.py b/src/sql/run/resultset.py index 50bb01c24..1ba76db81 100644 --- a/src/sql/run/resultset.py +++ b/src/sql/run/resultset.py @@ -463,7 +463,7 @@ def _init_table(self): pretty = CustomPrettyTable(self.field_names) if isinstance(self._config.style, str): - _style = prettytable.__dict__[self._config.style.upper()] + _style = prettytable.TableStyle.__members__[self._config.style.upper()] pretty.set_style(_style) return pretty