Releases: crate/crate-python
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
datetime
objects 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" Pythondatetime
objects from now
on, i.e. instances with or without thetzinfo
attribute set.
When notime_zone
information is specified when creating a database
connection or cursor,datetime
objects 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_trace
to string representation of an Error,
to relay server stacktraces into exception messages. - Refactoring: The module namespace
crate.client.test_util
has been
renamed tocrate.testing.util
. - Error handling: At two spots in cursor / value converter handling, where
assert
statements have been used,ValueError
exceptions are raised
now. - Python: Migrated to use "implicit namespace packages" instead of "declared
namespaces" for thecrate
namespace 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.Version
fromverlib2
.
It is needed the prevent breakingcrash
.
Full Changelog: 0.35.0...0.35.1
0.35.0
What's Changed
- Permit
urllib3.Timeout
instances for defining timeout values.
This way, bothconnect
andread
socket timeout settings can be
configured. The unit is seconds. - Internal: Use
verlib2.Version
for 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
timeout
andpool_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
deprecatedcommonName
attribute. Instead, going forward, only the
subjectAltName
attribute will be used. - SQLAlchemy: Improve DDL compiler to ignore foreign key and uniqueness
constraints. - DBAPI: Properly raise
IntegrityError
exceptions instead of
ProgrammingError
, when CrateDB raises aDuplicateKeyException
. - SQLAlchemy: Ignore SQL's
FOR UPDATE
clause. Thanks, @surister.
New Contributors
Full Changelog: 0.33.0...0.34.0
0.33.0
What's Changed
- SQLAlchemy: Rename leftover occurrences of
Object
toObjectType
- SQLAlchemy DQL: Use CrateDB's native
ILIKE
operator. 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_default
on 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
OBJECT
type. Thanks, @faymarie. -
SQLAlchemy: Refactor
OBJECT
type to use SQLAlchemy's JSON type infrastructure. -
SQLAlchemy: Added
insert_bulk
fast-pathINSERT
method 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
0.31.1
0.31.0
What's Changed
-
SQLAlchemy Core: Support
INSERT...VALUES
with multiple value sets by enabling
supports_multivalues_insert
on the CrateDB dialect, it is used by pandas'
method="multi"
option -
SQLAlchemy Core: Enable the
insertmanyvalues
feature, which lets you control
the batch size ofINSERT
operations using theinsertmanyvalues_page_size
engine-, connection-, and statement-options. -
SQLAlchemy ORM: Remove support for the legacy
session.bulk_save_objects
API
on SQLAlchemy 2.0, in favor of the newinsertmanyvalues
feature. Performance
optimizations frombulk_save()
have been made inherently part ofadd_all()
.
Note: The legacy mode will still work on SQLAlchemy 1.x, while SQLAlchemy 2.x users
MUST switch to the new method now.
Full Changelog: 0.30.1...0.31.0
0.30.1
What's Changed
- Fixed SQLAlchemy 2.0 incompatibility with
CrateDialect.{has_schema,has_table}
Full Changelog: 0.30.0...0.30.1