=== 5.20.0 (2019-05-01)
* Fix reversing of alter_table add_foreign_key when :type option is used (jeremyevans) (#1615)
* Switch from using instance_exec to define_method for model associations and in some plugins (jeremyevans)
* Fix Database#server_version when using mysql2 adapter with mysql driver on MariaDB 10+ database (v-kolesnikov) (#1614)
* Make one_to_one setter method handle models that use joined datasets (jeremyevans) (#1612)
* Make auto_validations plugin work with the class_table_inheritance plugin (jeremyevans) (#1611)
* Avoid use of instance_exec for PlaceholderLiteralString#with_dataset (jeremyevans)
* Recognize float unsigned database types as float (keeguon, jeremyevans) (#1609)
* Support :savepoint options to Database#{after_commit,after_rollback} for making the hooks handle savepoints (jeremyevans)
* Avoid use of instance_exec in association_dependencies plugin (jeremyevans)
* Add pg_auto_constraint_validation_override to the pg_auto_constraint_validations plugin, for customizing columns and error message per constraint (jeremyevans)
* Make Database#check_constraints on PostgreSQL also include constraints where the related columns are not known (jeremyevans)
pkgsrc change: add "USE_LANGUAGES= # none".
1.1.1
* Adapters::Sequel - use prepared statements
* Adapters::Sqlite - use upsert for increment where supported
1.1.0
* Adapters::ActiveRecord - rewrite to use Arel directly; support for Rails 5
* Moneta::Server - close all connections when stopping
* Moneta::Shared - recover from socket errors
* Transformer - add :urlsafe_base64; use this by default for keys with Couch
adapter
* Adapters::MongoMoped - recover from failed increment
* Moneta::Pool - fix race condition in #pop (#144)
* Moneta::Client - raise EOFError if a read fails
* Moneta::Expires - use Rational objects to get much more accurate time
resolution
* Moneta::Lock/Moneta::Pool - allow wrapped methods to call other wrapped
methods
* Adapters::Sequel - add optimisations for MySQL, PostgreSQL and SQLite
* Adapters::Sequel - add Postgres+HStore backend
* Add Adapters::ActiveSupportCache
* Adapters::Sqlite - add :journal_mode option
* Add table creation options to Sequel and ActiveRecord adapters
* Adapters::ActiveRecord - support for forking (#159)
* Adapters::Cassandra - rewrite to use cassandra-driver gem (#81)
* Adapters::Couch - add a LRUHash to cache document revs
* Adapters::KyotoCabinet - implement atomic increment
* Add :each_key feature and implemented on many adapters; add
Moneta::WeakEachKey (#143; see feature matrix)
* Add bulk read/write methods to the spec; added default implementation to
Defaults and fast versions in many adapters (#116; see feature matrix)
* First class support for latest JRuby (#160)
* Minimum required MRI version is now 2.2.2 (#135)
pkgsrc change: allow any Ruby on Rails in pkgsrc.
5.2.3: 2019-02-15
Improvements
* Changed to use add and delete for modify if it's needed.
[GitHub#156][Patch by David Klotz]
* Added support for timezone with munites offset such as @0530@.
[GitHub#160][GitHub#161][Patch by Neng Xu]
* Added support for Ruby 2.6.
Thanks
* David Klotz
* Neng Xu
1.0.10
bug
[bug] [commands]
Fixed bug introduced in release 0.9.0 where the helptext for commands inadvertently got expanded to include function docstrings from the command.py module. The logic has been adjusted to only refer to the first line(s) preceding the first line break within each docstring, as was the original intent.
[bug] [mysql] [operations]
Added an assertion in RevisionMap.get_revisions() and other methods which ensures revision numbers are passed as strings or collections of strings. Driver issues particularly on MySQL may inadvertently be passing bytes here which leads to failures later on.
[bug] [autogenerate] [mysql]
Fixed bug when using the EnvironmentContext.configure.compare_server_default flag set to True where a server default that is introduced in the table metadata on an Integer column, where there is no existing server default in the database, would raise a TypeError.
1.0.9
bug
[bug] [operations]
Simplified the internal scheme used to generate the alembic.op namespace to no longer attempt to generate full method signatures (e.g. rather than generic *args, **kw) as this was not working in most cases anyway, while in rare circumstances it would in fact sporadically have access to the real argument names and then fail when generating the function due to missing symbols in the argument signature.
1.3.3
orm
[orm] [bug]
Fixed 1.3 regression in new “ambiguous FROMs” query logic introduced in Query.join() handles ambiguity in deciding the “left” side more explicitly where a Query that explicitly places an entity in the FROM clause with Query.select_from() and also joins to it using Query.join() would later cause an “ambiguous FROM” error if that entity were used in additional joins, as the entity appears twice in the “from” list of the Query. The fix resolves this ambiguity by folding the standalone entity into the join that it’s already a part of in the same way that ultimately happens when the SELECT statement is rendered.
[orm] [bug]
Adjusted the Query.filter_by() method to not call and() internally against multiple criteria, instead passing it off to Query.filter() as a series of criteria, instead of a single criteria. This allows Query.filter_by() to defer to Query.filter()’s treatment of variable numbers of clauses, including the case where the list is empty. In this case, the Query object will not have a .whereclause, which allows subsequent “no whereclause” methods like Query.select_from() to behave consistently.
postgresql
[postgresql] [bug]
Fixed regression from release 1.3.2 caused by 4562 where a URL that contained only a query string and no hostname, such as for the purposes of specifying a service file with connection information, would no longer be propagated to psycopg2 properly. The change in 4562 has been adjusted to further suit psycopg2’s exact requirements, which is that if there are any connection parameters whatsoever, the “dsn” parameter is no longer required, so in this case the query string parameters are passed alone.
mssql
[mssql] [bug]
Fixed issue in SQL Server dialect where if a bound parameter were present in an ORDER BY expression that would ultimately not be rendered in the SQL Server version of the statement, the parameters would still be part of the execution parameters, leading to DBAPI-level errors. Pull request courtesy Matt Lewellyn.
misc
[bug] [pool]
Fixed behavioral regression as a result of deprecating the “use_threadlocal” flag for Pool, where the SingletonThreadPool no longer makes use of this option which causes the “rollback on return” logic to take place when the same Engine is used multiple times in the context of a transaction to connect or implicitly execute, thereby cancelling the transaction. While this is not the recommended way to work with engines and connections, it is nonetheless a confusing behavioral change as when using SingletonThreadPool, the transaction should stay open regardless of what else is done with the same engine in the same thread. The use_threadlocal flag remains deprecated however the SingletonThreadPool now implements its own version of the same logic.
[bug] [ext]
Fixed bug where using copy.copy() or copy.deepcopy() on MutableList would cause the items within the list to be duplicated, due to an inconsistency in how Python pickle and copy both make use of __getstate__() and __setstate__() regarding lists. In order to resolve, a __reduce_ex__ method had to be added to MutableList. In order to maintain backwards compatibility with existing pickles based on __getstate__(), the __setstate__() method remains as well; the test suite asserts that pickles made against the old version of the class can still be deserialized by the pickle module.
1.3.2
orm
[orm] [bug] [ext]
Restored instance-level support for plain Python descriptors, e.g. @property objects, in conjunction with association proxies, in that if the proxied object is not within ORM scope at all, it gets classified as “ambiguous” but is proxed directly. For class level access, a basic class level``__get__()`` now returns the AmbiguousAssociationProxyInstance directly, rather than raising its exception, which is the closest approximation to the previous behavior that returned the AssociationProxy itself that’s possible. Also improved the stringification of these objects to be more descriptive of current state.
[orm] [bug]
Fixed bug where use of with_polymorphic() or other aliased construct would not properly adapt when the aliased target were used as the Select.correlate_except() target of a subquery used inside of a column_property(). This required a fix to the clause adaption mechanics to properly handle a selectable that shows up in the “correlate except” list, in a similar manner as which occurs for selectables that show up in the “correlate” list. This is ultimately a fairly fundamental bug that has lasted for a long time but it is hard to come across it.
[orm] [bug]
Fixed regression where a new error message that was supposed to raise when attempting to link a relationship option to an AliasedClass without using PropComparator.of_type() would instead raise an AttributeError. Note that in 1.3, it is no longer valid to create an option path from a plain mapper relationship to an AliasedClass without using PropComparator.of_type().
sql
[sql] [bug] [documentation]
Thanks to TypeEngine methods bind_expression, column_expression work with Variant, type-specific types, we no longer need to rely on recipes that subclass dialect-specific types directly, TypeDecorator can now handle all cases. Additionally, the above change made it slightly less likely that a direct subclass of a base SQLAlchemy type would work as expected, which could be misleading. Documentation has been updated to use TypeDecorator for these examples including the PostgreSQL “ArrayOfEnum” example datatype and direct support for the “subclass a type directly” has been removed.
postgresql
[postgresql] [feature]
Added support for parameter-less connection URLs for the psycopg2 dialect, meaning, the URL can be passed to create_engine() as "postgresql+psycopg2://" with no additional arguments to indicate an empty DSN passed to libpq, which indicates to connect to “localhost” with no username, password, or database given. Pull request courtesy Julian Mehnle.
[postgresql] [bug]
Modified the Select.with_for_update.of parameter so that if a join or other composed selectable is passed, the individual Table objects will be filtered from it, allowing one to pass a join() object to the parameter, as occurs normally when using joined table inheritance with the ORM.
3.9.5
* Added small helper for setting timezone when using Postgres.
* Improved SQL generation for `VALUES` clause.
* Support passing resolution to `TimestampField` as a power-of-10.
* Small improvements to `INSERT` queries when the primary-key is not an
auto-incrementing integer, but is generated by the database server (eg uuid).
* Cleanups to virtual table implementation and python-to-sqlite value
conversions.
* Fixed bug related to binding previously-unbound models to a database using a
context manager.
SQLite Release 3.28.0:
Enhanced window functions:
Add support the EXCLUDE clause.
Add support for window chaining.
Add support for GROUPS frames.
Add support for "<expr> PRECEDING" and "<expr> FOLLOWING" boundaries in RANGE frames.
Added the new sqlite3_stmt_isexplain(S) interface for determining whether or not a prepared statement is an EXPLAIN.
Enhanced VACUUM INTO so that it works for read-only databases.
New query optimizations:
Enable the LIKE optimization for cases when the ESCAPE keyword is present and PRAGMA case_sensitive_like is on.
In queries that are driven by a partial index, avoid unnecessary tests of the constraint named in the WHERE clause of the partial index, since we know that constraint must always be true.
Enhancements to the TCL Interface:
Added the -returntype option to the function method.
Added the new bind_fallback method.
Enhancements to the CLI:
Added support for bound parameters and the .parameter command.
Fix the readfile() function so that it returns an empty BLOB rather than throwing an out-of-memory error when reading an empty file.
Fix the writefile() function so that when it creates new directories along the path of a new file, it gives them umask permissions rather than the same permissions as the file.
Change --update option in the .archive command so that it skips files that are already in the archive and are unchanged. Add the new --insert option that works like --update used to work.
Added the fossildelta.c extension that can create, apply, and deconstruct the Fossil DVCS file delta format that is used by the RBU extension.
Added the SQLITE_DBCONFIG_WRITABLE_SCHEMA verb for the sqlite3_db_config() interface, that does the same work as PRAGMA writable_schema without using the SQL parser.
Added the sqlite3_value_frombind() API for determining if the argument to an SQL function is from a bound parameter.
Security and compatibilities enhancements to fts3_tokenizer():
The fts3_tokenizer() function always returns NULL unless either the legacy application-defined FTS3 tokenizers interface are enabled using the sqlite3_db_config(SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER) setting, or unless the first argument to fts3_tokenizer() is a bound parameter.
The two-argument version of fts3_tokenizer() accepts a pointer to the tokenizer method object even without the sqlite3_db_config(SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER) setting if the second argument is a bound parameter
Improved robustness against corrupt database files.
Miscellaneous performance enhancements
3.9.4:
* Add Model.bulk_update() method for bulk-updating fields across multiple
model instances.
* Add lazy_load parameter to ForeignKeyField. When initialized with
lazy_load=False, the foreign-key will not use an additional query to
resolve the related model instance. Instead, if the related model instance is
not available, the underlying FK column value is returned (behaving like the
"_id" descriptor).
* Added Model.truncate_table() method.
* The reflection and pwiz extensions now attempt to be smarter about
converting database table and column names into snake-case. To disable this,
you can set snake_case=False when calling the Introspector.introspect()
method or use the -L (legacy naming) option with the pwiz script.
* Bulk insert via insert_many() no longer require specification of the
fields argument when the inserted rows are lists/tuples. In that case, the
fields will be inferred to be all model fields except any auto-increment id.
* Add DatabaseProxy, which implements several of the Database class context
managers. This allows you to reference some of the special features of the
database object without directly needing to initialize the proxy first.
* Add support for window function frame exclusion and added built-in support
for the GROUPS frame type.
* Add support for chaining window functions by extending a previously-declared
window function.
* Playhouse Postgresql extension TSVectorField.match() method supports an
additional argument plain, which can be used to control the parsing of the
TS query.
* Added very minimal JSONField to the playhouse MySQL extension.
2.8.2:
Fixed "there's no async cursor" error polling a connection with no cursor.
Fixed RealDictCursor when there are repeated columns.
Fixed RealDictRow modifiability.
Binary packages built with OpenSSL 1.1.1b. Should fix concurrency problems.
## Rails 5.2.3 (March 27, 2019) ##
* Fix different `count` calculation when using `size` with manual `select` with DISTINCT.
Fixes#35214.
*Juani Villarejo*
* Fix prepared statements caching to be enabled even when query caching is enabled.
*Ryuta Kamizono*
* Don't allow `where` with invalid value matches to nil values.
Fixes#33624.
*Ryuta Kamizono*
* Restore an ability that class level `update` without giving ids.
Fixes#34743.
*Ryuta Kamizono*
* Fix join table column quoting with SQLite.
*Gannon McGibbon*
* Ensure that `delete_all` on collection proxy returns affected count.
*Ryuta Kamizono*
* Reset scope after delete on collection association to clear stale offsets of removed records.
*Gannon McGibbon*
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
=== 5.19.0 (2019-04-02)
* Use more optimized approach to merging hashes in ruby 2.5+ (jeremyevans)
* Use SQLite extended result codes when using ruby-sqlite3 1.4.0+ (jeremyevans)
* Recognize additional SQLite extended result codes in the shared sqlite adapter (jeremyevans)
* Add Database#rename_enum_value to the pg_enum extension (AlexWayfer) (#1603)
* Make Database#drop_table delete constraint validations metadata for that table if using the constraint_validations extension (jeremyevans)
* Speed up row fetching in the sqlite adapter (jeremyevans)
* Speed up row fetching and type conversion in the sqlanywhere adapter (jeremyevans)
2.6:
- fixed empty digestMd5.py file in 2.5.2 package
- explicitly declare digest module md5 in util.ntlm
- change object passed to modify() was unexpectedly mutated
- added LDAPInfoError exception
- added Server.has_control(control) method to check if a server has a specific control
- added Server.has_extension(extension) method to check if a server has a specific extension
- added Server.has_feature(feature) method to check if a server has a specific feature
- fixed checking of \\ in safe_dn
- fixed uuid checking with 5c byte value
- added single=True parameter to the ServerPool object definition. Servers state is shared between connections using the same pool
- updated copyright notice
Release 3.2.0:
Lib/
* Add support for X-ORIGIN in ldap.schema's ObjectClass
* Make initialize() pass extra keyword arguments to LDAPObject
* ldap.controls.sss: use str instead of basestring on Python 3
* Provide ldap._trace_* atributes in non-debug mode
Doc/
* Fix ReST syntax for links to set_option and get_option
Tests/
* Use intersphinx to link to Python documentation
* Correct type of some attribute values to bytes
* Use system-specific ENOTCONN value
Infrastructure:
* Add testing and document support for Python 3.7
* Add Python 3.8-dev to Tox and CI configuration
* Add Doc/requirements.txt for building on Read the Docs
4.3:
repmgr: add "daemon (start|stop)" command
repmgr: add --version-number command line option
repmgr: add --compact option to "cluster show"
repmgr: cluster show - differentiate between unreachable nodes
and nodes which are running but rejecting connections
repmgr: add --dry-run option to "standby promote"
repmgr: add "node check --data-directory-config"
repmgr: prevent potential race condition in "standby switchover"
when checking received WAL location
repmgr: ensure "standby switchover" verifies repmgr can read the
data directory on the demotion candidate
repmgr: ensure "standby switchover" verifies replication connection
exists
repmgr: add sanity check for correct extension version
repmgr: ensure "witness register --dry-run" does not attempt to read node
tables if repmgr extension not installed
repmgr: ensure "standby register" fails when --upstream-node-id is the
same as the local node ID
repmgrd: check binary and extension major versions match
repmgrd: on a cascaded standby, don't fail over if "failover=manual";
repmgrd: don't consider nodes where repmgrd is not running as promotion
candidates
repmgrd: add option "connection_check_type"
repmgrd: improve witness monitoring when primary node not available
repmgrd: handle situation where a primary has unexpectedly appeared
during failover
Psycopg 2.8 released
After about two years from the previous major release, psycopg 2.8 is finally
here!
Among the highlights, PostgreSQL errors are now mapped to Python exceptions for
a more idiomatic way to handle them. Several additions allow a better insight
of the connection status and query results.
Behind the scene, asynchronous communication and concurrency received several
improvements, and dropping support for older versions of Python gave the chance
to refactor and modernise the codebase (with the especial help from Jon
Dufresne who ruthlessly butchered our code into a streamlined pulp).
1.0.8
bug
[bug] [operations] Removed use of deprecated force parameter for SQLAlchemy quoting functions as this parameter will be removed in a future release. Pull request courtesy Parth Shandilya(ParthS007).
[bug] [autogenerate] [postgresql] [py3k] Fixed issue where server default comparison on the PostgreSQL dialect would fail for a blank string on Python 3.7 only, due to a change in regular expression behavior in Python 3.7.
1.3.1
orm
[orm] [bug] [ext] Fixed regression where an association proxy linked to a synonym would no longer work, both at instance level and at class level.
mssql
[mssql] [bug] A commit() is emitted after an isolation level change to SNAPSHOT, as both pyodbc and pymssql open an implicit transaction which blocks subsequent SQL from being emitted in the current transaction.
This change is also backported to: 1.2.19
[mssql] [bug] Fixed regression in SQL Server reflection due to 4393 where the removal of open-ended **kw from the Float datatype caused reflection of this type to fail due to a “scale” argument being passed.
1.3.0
orm
[orm] [feature] The Query.get() method can now accept a dictionary of attribute keys and values as a means of indicating the primary key value to load; is particularly useful for composite primary keys. Pull request courtesy Sanjana S.
[orm] [feature] A SQL expression can now be assigned to a primary key attribute for an ORM flush in the same manner as ordinary attributes as described in Embedding SQL Insert/Update Expressions into a Flush where the expression will be evaulated and then returned to the ORM using RETURNING, or in the case of pysqlite, works using the cursor.lastrowid attribute.Requires either a database that supports RETURNING (e.g. Postgresql, Oracle, SQL Server) or pysqlite.
engine
[engine] [feature] Revised the formatting for StatementError when stringified. Each error detail is broken up over multiple newlines instead of spaced out on a single line. Additionally, the SQL representation now stringifies the SQL statement rather than using repr(), so that newlines are rendered as is. Pull request courtesy Nate Clark.
See also
Changed StatementError formatting (newlines and %s)
sql
[sql] [bug] The Alias class and related subclasses CTE, Lateral and TableSample have been reworked so that it is not possible for a user to construct the objects directly. These constructs require that the standalone construction function or selectable-bound method be used to instantiate new objects.
schema
[schema] [feature] Added new parameters Table.resolve_fks and MetaData.reflect.resolve_fks which when set to False will disable the automatic reflection of related tables encountered in ForeignKey objects, which can both reduce SQL overhead for omitted tables as well as avoid tables that can’t be reflected for database-specific reasons. Two Table objects present in the same MetaData collection can still refer to each other even if the reflection of the two tables occurred separately
Redis 5.0.4
Upgrade urgency HIGH: This release fixes several Redis stability issues.
Dear Redis users, this release includes a number of fixes for bugs that may
result in Redis crashing in special conditions (not normal usage, but specific
artificial conditions), fixes to certain Redis behaviors especially around
Redis streams, and finally a set of new APIs for Redis Modules.
Specifically:
* Hyperloglog different coding errors leading to potential crashes were fixed.
* A replication bug leading to a potential crash in case of plain misuse of handshake commands was fixed.
* XCLAIM command incrementing of number of deliveries was fixed.
* LFU field management in objects was improved.
* A potential overflow in the redis-check-aof was fixed.
* A memory leak in case of API misuse was fixed.
* ZPOP* behavior when count is 0 is fixed.
* A few redis-cli --cluster bugs were fixed, plus a few improvements.
* Many other smaller bugs.
3.9.3
* Added cross-database support for NULLS FIRST/LAST when specifying the
ordering for a query. Previously this was only supported for Postgres. Peewee
will now generate an equivalent CASE statement for Sqlite and MySQL.
* Added [EXCLUDED](http://docs.peewee-orm.com/en/latest/peewee/api.html#EXCLUDED)
helper for referring to the EXCLUDED namespace used with INSERT...ON CONFLICT
queries, when referencing values in the conflicting row data.
* Added helper method to the model Metadata class for setting the table name
at run-time. Setting the Model._meta.table_name directly may have appeared
to work in some situations, but could lead to subtle bugs. The new API is
Model._meta.set_table_name().
* Enhanced helpers for working with Peewee interactively, [see doc](http://docs.peewee-orm.com/en/latest/peewee/interactive.html).
* Fix cache invalidation bug in DataSet that was originally reported on the
sqlite-web project.
* New example script implementing a [hexastore]
3.27.2-r1
Added constants:
* SQLITE_CONFIG_MEMDB_MAXSIZE, SQLITE_FCNTL_SIZE_LIMIT
Added support for the geopoly extension
Removed hash optimisation that isn’t useful any more