Releases: crate/crate-python
2.0.0
What's Changed
-
Switched JSON encoder to use the orjson library, to improve JSON
marshalling performance. Thanks, @widmogrod.orjson is fast and in some spots even more correct when compared against
Python's stdlibjsonmodule. Contrary to the stdlib variant, orjson
will serialize tobytesinstead ofstr. When sending data to CrateDB,
crate-pythonuses a custom encoder to add support for additional data
types.- Python's
Decimaltype will be serialized tostr. - Python's
dt.datetimeanddt.datetypes will be serialized to
int(LONG) after converting to milliseconds since epoch, to
optimally accommodate CrateDB's TIMESTAMP representation. - NumPy's data types will be handled by
orjsonwithout any ado.
- Python's
Details
- Update poethepoet requirement from <0.31 to <0.32 by @dependabot in #679
- Bump codecov/codecov-action from 4 to 5 by @dependabot in #681
- Bump astral-sh/setup-uv from 3 to 4 by @dependabot in #682
- CI: Provide Python 3.7. EOL, it was removed from recent GHA runners by @amotl in #683
- Chore(deps-dev): Update mypy requirement from <1.14 to <1.15 by @dependabot in #684
- Chore(deps-dev): Update poethepoet requirement from <0.32 to <0.33 by @dependabot in #685
- Chore(deps): Bump astral-sh/setup-uv from 4 to 5 by @dependabot in #686
- Chore(deps): Bump advanced-security/dismiss-alerts from 1 to 2 by @dependabot in #687
- Chore: Fix test case because https://example.org/ responds differently by @amotl in #690
- Chore(deps-dev): Update ruff requirement from <0.8 to <0.10 by @dependabot in #688
- Remove tox, recommend uv by @amotl in #694
- Use
orjsonto improve JSON marshalling performance by @amotl in #691
Full Changelog: 1.0.1...2.0.0
1.0.1
What's Changed
- Python: Fixed "implicit namespace packages" migration by omitting
__init__.pyfromcratenamespace package, see PEP 420
and Package Discovery and Namespace Package » Finding namespace packages.
Details
- CI: Fix CodeQL and Release jobs by @amotl in #673
- Update poethepoet requirement from <0.30 to <0.31 by @dependabot in #674
- Python: Fix "implicit namespace packages" migration by @amotl in #675
- Chore: Suppress unqualified CodeQL admonitions by @amotl in #676
- CI: Migrate to
astral-sh/setup-uvby @amotl in #678
Full Changelog: 1.0.0...1.0.1
1.0.0
What's Changed
- BREAKING CHANGE: The SQLAlchemy dialect has been split off into
the sqlalchemy-cratedb package, see notice below. - Feature: Returned Python
datetimeobjects are now always timezone-aware,
using UTC by default.
It may be a breaking change for some users of the library that don't expect
to receive "aware" instead of "naive" Pythondatetimeobjects from now
on, i.e. instances with or without thetzinfoattribute set.
When notime_zoneinformation is specified when creating a database
connection or cursor,datetimeobjects will now use Coordinated
Universal Time (UTC), like CrateDB is storing timestamp values in this
format.
This update is coming from a deprecation of Python's
datetime.utcfromtimestamp(), which is effectively also phasing out
the use of "naive" timestamp objects in Python, in favor of using
timezone-aware objects, also to represent datetimes in UTC. - Feature: Configured DB API interface attribute
threadsafety = 1,
which signals "Threads may share the module, but not connections." - Feature: Added
error_traceto string representation of an Error,
to relay server stacktraces into exception messages. - Refactoring: The module namespace
crate.client.test_utilhas been
renamed tocrate.testing.util. - Error handling: At two spots in cursor / value converter handling, where
assertstatements have been used,ValueErrorexceptions are raised
now. - Python: Migrated to use "implicit namespace packages" instead of "declared
namespaces" for thecratenamespace package, seePEP 420_.
Note:
For learning about the transition to sqlalchemy-cratedb,
we recommend to read the enumeration of necessary migration steps
at Migrate from crate.client to sqlalchemy-cratedb.
Full Changelog: 0.35.2...1.0.0
0.35.2
What's Changed
- Test compatibility: Permit installation of pandas 2.1.
Full Changelog: 0.35.1...0.35.2
0.35.1
What's Changed
- Compatibility: Re-add
crate.client._pep440.Versionfromverlib2.
It is needed the prevent breakingcrash.
Full Changelog: 0.35.0...0.35.1
0.35.0
What's Changed
- Permit
urllib3.Timeoutinstances for defining timeout values.
This way, bothconnectandreadsocket timeout settings can be
configured. The unit is seconds. - Internal: Use
verlib2.Versionfor comparing versions. - CI: Add support for Python 3.12.
Full Changelog: 0.34.0...0.35.0
0.34.0
What's Changed
- Properly handle Python-native UUID types in SQL parameters. Thanks,
@SStorm. - SQLAlchemy: Fix handling URL parameters
timeoutandpool_size - Permit installation with urllib3 v2, see also urllib3 v2.0 roadmap
and urllib3 v2.0 migration guide. You can optionally retain support
for TLS 1.0 and TLS 1.1, but a few other outdated use-cases of X.509
certificate details are immanent, like no longer accepting the long
deprecatedcommonNameattribute. Instead, going forward, only the
subjectAltNameattribute will be used. - SQLAlchemy: Improve DDL compiler to ignore foreign key and uniqueness
constraints. - DBAPI: Properly raise
IntegrityErrorexceptions instead of
ProgrammingError, when CrateDB raises aDuplicateKeyException. - SQLAlchemy: Ignore SQL's
FOR UPDATEclause. Thanks, @surister.
New Contributors
Full Changelog: 0.33.0...0.34.0
0.33.0
What's Changed
- SQLAlchemy: Rename leftover occurrences of
ObjecttoObjectType - SQLAlchemy DQL: Use CrateDB's native
ILIKEoperator. Thanks, @hlcianfagna.
Full Changelog: 0.32.0...0.33.0
0.32.0
What's Changed
-
SQLAlchemy DDL: Allow turning off column store using
crate_columnstore=False.
Thanks, @fetzerms. -
SQLAlchemy DDL: Allow setting
server_defaulton columns to enable
server-generated defaults. Thanks, @JanLikar. -
Allow handling datetime values tagged with time zone info when inserting or updating.
-
SQLAlchemy: Fix SQL statement caching for CrateDB's
OBJECTtype. Thanks, @faymarie. -
SQLAlchemy: Refactor
OBJECTtype to use SQLAlchemy's JSON type infrastructure. -
SQLAlchemy: Added
insert_bulkfast-pathINSERTmethod for pandas, in
order to support efficient batch inserts using CrateDB's "bulk operations" endpoint. -
SQLAlchemy: Add documentation and software tests for usage with Dask
New Contributors
Full Changelog: 0.31.1...0.32.0