Skip to content

Commit 4e88e50

Browse files
committed
Remove SQLAlchemy dialect. It lives in sqlalchemy-cratedb now.
1 parent df133e2 commit 4e88e50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+37
-7545
lines changed

.github/workflows/codeql.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919
jobs:
2020

2121
analyze:
22-
name: "Analyze with SQLAlchemy ${{ matrix.sqla-version }}"
22+
name: "Analyze Python code"
2323
runs-on: ubuntu-latest
2424
permissions:
2525
actions: read
@@ -28,9 +28,7 @@ jobs:
2828

2929
strategy:
3030
fail-fast: false
31-
matrix:
32-
language: [ python ]
33-
sqla-version: ['<1.4', '<1.5', '<2.1']
31+
language: [ python ]
3432

3533
steps:
3634
- name: Checkout
@@ -57,10 +55,7 @@ jobs:
5755

5856
- name: Install project
5957
run: |
60-
pip install --editable=.[sqlalchemy,test]
61-
pip install "sqlalchemy${{ matrix.sqla-version }}" --upgrade --pre
58+
pip install --editable=.[test]
6259
6360
- name: Perform CodeQL Analysis
6461
uses: github/codeql-action/analyze@v3
65-
with:
66-
category: "/language:${{ matrix.language }}/sqla-version:${{ matrix.sqla-version }}"

.github/workflows/nightly.yml

+1-15
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
jobs:
1010
nightly:
1111
name: "Python: ${{ matrix.python-version }}
12-
SQLA: ${{ matrix.sqla-version }}
1312
CrateDB: ${{ matrix.cratedb-version }}
1413
on ${{ matrix.os }}"
1514
runs-on: ${{ matrix.os }}
@@ -18,23 +17,11 @@ jobs:
1817
os: ['ubuntu-latest']
1918
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
2019
cratedb-version: ['nightly']
21-
sqla-version: ['latest']
22-
pip-allow-prerelease: ['false']
23-
24-
# Another CI test matrix slot to test against prerelease versions of Python packages.
25-
include:
26-
- os: 'ubuntu-latest'
27-
python-version: '3.12'
28-
cratedb-version: 'nightly'
29-
sqla-version: 'latest'
30-
pip-allow-prerelease: 'true'
3120

3221
fail-fast: false
3322

3423
env:
3524
CRATEDB_VERSION: ${{ matrix.cratedb-version }}
36-
SQLALCHEMY_VERSION: ${{ matrix.sqla-version }}
37-
PIP_ALLOW_PRERELEASE: ${{ matrix.pip-allow-prerelease }}
3825

3926
steps:
4027
- uses: actions/checkout@v4
@@ -55,11 +42,10 @@ jobs:
5542
source bootstrap.sh
5643
5744
# Report about the test matrix slot.
58-
echo "Invoking tests with CrateDB ${CRATEDB_VERSION} and SQLAlchemy ${SQLALCHEMY_VERSION}"
45+
echo "Invoking tests with CrateDB ${CRATEDB_VERSION}"
5946
6047
# Run linter.
6148
flake8 src bin
6249
6350
# Run tests.
64-
export SQLALCHEMY_WARN_20=1
6551
bin/test -vvv

.github/workflows/tests.yml

+1-15
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ concurrency:
1313
jobs:
1414
test:
1515
name: "Python: ${{ matrix.python-version }}
16-
SQLA: ${{ matrix.sqla-version }}
1716
on ${{ matrix.os }}"
1817
runs-on: ${{ matrix.os }}
1918
strategy:
2019
matrix:
2120
os: ['ubuntu-latest', 'macos-latest']
2221
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
2322
cratedb-version: ['5.4.5']
24-
sqla-version: ['<1.4', '<1.5', '<2.1']
25-
pip-allow-prerelease: ['false']
2623

2724
# To save resources, only use the most recent Python versions on macOS.
2825
exclude:
@@ -35,20 +32,10 @@ jobs:
3532
- os: 'macos-latest'
3633
python-version: '3.10'
3734

38-
# Another CI test matrix slot to test against prerelease versions of Python packages.
39-
include:
40-
- os: 'ubuntu-latest'
41-
python-version: '3.12'
42-
cratedb-version: '5.4.5'
43-
sqla-version: 'latest'
44-
pip-allow-prerelease: 'true'
45-
4635
fail-fast: false
4736

4837
env:
4938
CRATEDB_VERSION: ${{ matrix.cratedb-version }}
50-
SQLALCHEMY_VERSION: ${{ matrix.sqla-version }}
51-
PIP_ALLOW_PRERELEASE: ${{ matrix.pip-allow-prerelease }}
5239
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5340

5441
steps:
@@ -70,13 +57,12 @@ jobs:
7057
source bootstrap.sh
7158
7259
# Report about the test matrix slot.
73-
echo "Invoking tests with CrateDB ${CRATEDB_VERSION} and SQLAlchemy ${SQLALCHEMY_VERSION}"
60+
echo "Invoking tests with CrateDB ${CRATEDB_VERSION}"
7461
7562
# Run linter.
7663
flake8 src bin
7764
7865
# Run tests.
79-
export SQLALCHEMY_WARN_20=1
8066
coverage run bin/test -vvv
8167
8268
# Set the stage for uploading the coverage report.

CHANGES.txt

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ Changes for crate
55
Unreleased
66
==========
77

8+
- The SQLAlchemy dialect has been split off into the `sqlalchemy-cratedb`_
9+
package. See `Migrate from crate.client to sqlalchemy-cratedb`_ to learn
10+
about necessary migration steps.
11+
12+
.. _Migrate from crate.client to sqlalchemy-cratedb: https://cratedb.com/docs/sqlalchemy-cratedb/migrate-from-crate-client.html
13+
.. _sqlalchemy-cratedb: https://pypi.org/project/sqlalchemy-cratedb/
14+
815

916
2024/01/18 0.35.2
1017
=================

DEVELOP.rst

-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ Run all tests::
3030

3131
Run specific tests::
3232

33-
./bin/test -vvvv -t SqlAlchemyCompilerTest
3433
./bin/test -vvvv -t test_score
35-
./bin/test -vvvv -t sqlalchemy
3634

3735
Ignore specific test directories::
3836

bootstrap.sh

+1-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
# Default variables.
2020
CRATEDB_VERSION=${CRATEDB_VERSION:-5.2.2}
21-
SQLALCHEMY_VERSION=${SQLALCHEMY_VERSION:-<2.1}
2221

2322

2423
function print_header() {
@@ -71,16 +70,7 @@ function setup_package() {
7170
fi
7271

7372
# Install package in editable mode.
74-
pip install ${PIP_OPTIONS} --editable='.[sqlalchemy,test]'
75-
76-
# Install designated SQLAlchemy version.
77-
if [ -n "${SQLALCHEMY_VERSION}" ]; then
78-
if [ "${SQLALCHEMY_VERSION}" = "latest" ]; then
79-
pip install ${PIP_OPTIONS} --upgrade "sqlalchemy"
80-
else
81-
pip install ${PIP_OPTIONS} --upgrade "sqlalchemy${SQLALCHEMY_VERSION}"
82-
fi
83-
fi
73+
pip install ${PIP_OPTIONS} --editable='.[test]'
8474

8575
}
8676

@@ -93,8 +83,6 @@ function finalize() {
9383
# Some steps before dropping into the activated virtualenv.
9484
echo
9585
echo "Sandbox environment ready"
96-
echo -n "Using SQLAlchemy version: "
97-
python -c 'import sqlalchemy; print(sqlalchemy.__version__)'
9886
echo
9987

10088
}

docs/by-example/index.rst

+2-25
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ By example
55
##########
66

77
This part of the documentation enumerates different kinds of examples how to
8-
use the CrateDB Python client.
9-
10-
11-
DB API, HTTP, and BLOB interfaces
12-
=================================
8+
use the CrateDB Python DBAPI HTTP client for standards-based database
9+
conversations, and the proprietary BLOB interfaces.
1310

1411
The examples in this section are all about CrateDB's `Python DB API`_ interface,
1512
the plain HTTP API interface, and a convenience interface for working with
@@ -27,24 +24,4 @@ methods, and behaviors of the ``Connection`` and ``Cursor`` objects.
2724
blob
2825

2926

30-
.. _sqlalchemy-by-example:
31-
32-
SQLAlchemy by example
33-
=====================
34-
35-
The examples in this section are all about CrateDB's `SQLAlchemy`_ dialect, and
36-
its corresponding API interfaces, see also :ref:`sqlalchemy-support`.
37-
38-
.. toctree::
39-
:maxdepth: 1
40-
41-
sqlalchemy/getting-started
42-
sqlalchemy/crud
43-
sqlalchemy/working-with-types
44-
sqlalchemy/advanced-querying
45-
sqlalchemy/inspection-reflection
46-
sqlalchemy/dataframe
47-
48-
4927
.. _Python DB API: https://peps.python.org/pep-0249/
50-
.. _SQLAlchemy: https://www.sqlalchemy.org/

0 commit comments

Comments
 (0)