Skip to content

Commit

Permalink
compatibility with prettytable 3.12.0 (#1039)
Browse files Browse the repository at this point in the history
* fix

* drops python 3.8

* update

* skip test

* updates lock file

* fix

* config update

* removes problematic test

* fix

* disables integration tests

* ci

* typo
  • Loading branch information
edublancas authored Nov 5, 2024
1 parent 1274d09 commit 3c32cd3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 86 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/ci-integration-db-live.yaml

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions doc/environment.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/sql/run/resultset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c32cd3

Please sign in to comment.