Crate

Latest version: v1.0.0

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 20

1.0.0

================

- 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" Python ``datetime`` objects from now
on, i.e. instances with or without the ``tzinfo`` attribute set.
When no ``time_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 to ``crate.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 the ``crate`` namespace package, see `PEP 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`_.


.. _Migrate from crate.client to sqlalchemy-cratedb: https://cratedb.com/docs/sqlalchemy-cratedb/migrate-from-crate-client.html
.. _PEP 420: https://peps.python.org/pep-0420/
.. _sqlalchemy-cratedb: https://pypi.org/project/sqlalchemy-cratedb/

0.40.1

- CI: Verified support on Python 3.13
- Dependencies: Updated to `crate-1.0.0.dev2`

0.40.0

- Propagate error traces properly, using the `error_trace` `connect_args` option,
by using `crate-1.0.0.dev1`
- Use slightly amended `do_execute`, `do_execute_no_params`, `do_executemany`
to store their responses into the request context instance

0.39.0

- Added `quote_relation_name` support utility function

0.38.0

- Added/reactivated documentation as `sqlalchemy-cratedb`
- Added `CrateIdentifierPreparer`, in order to quote reserved words
like `object` properly, for example when used as column names.
- Fixed `CrateDialect.get_pk_constraint` to return `list` instead of `set` type
- Added re-usable patches and polyfills from application adapters.
New utilities: `patch_autoincrement_timestamp`, `refresh_after_dml`,
`check_uniqueness_factory`
- Added `table_kwargs` context manager to enable pandas/Dask to support
CrateDB dialect table options.
- Fixed SQL rendering of special DDL table options in `CrateDDLCompiler`.
Before, configuring `crate_"translog.durability"` was not possible.
- Unlocked supporting timezone-aware `DateTime` fields
- Added support for marshalling Python `datetime.date` values on `sa.DateTime` fields

0.37.0

- Added support for CrateDB's [FLOAT_VECTOR] data type and its accompanying
[KNN_MATCH] function, for HNSW matches. For SQLAlchemy column definitions,
you can use it like `FloatVector(dimensions=1536)`.
- Fixed `get_table_names()` reflection method to respect the
`schema` query argument in SQLAlchemy connection URLs.

[FLOAT_VECTOR]: https://cratedb.com/docs/crate/reference/en/latest/general/ddl/data-types.html#float-vector
[KNN_MATCH]: https://cratedb.com/docs/crate/reference/en/latest/general/builtins/scalar-functions.html#scalar-knn-match

Page 1 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.