pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/py-alembic py-alembic: updated to 1.0.11



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0082a3bd4988
branches:  trunk
changeset: 335973:0082a3bd4988
user:      adam <adam%pkgsrc.org@localhost>
date:      Wed Jul 03 20:24:24 2019 +0000

description:
py-alembic: updated to 1.0.11

version: 1.0.11

SQLite server default reflection will ensure parenthesis are surrounding a
column default expression that is detected as being a non-constant
expression, such as a datetime() default, to accommodate for the
requirement that SQL expressions have to be parenthesized when being sent
as DDL.  Parenthesis are not added to constant expressions to allow for
maximum cross-compatibility with other dialects and existing test suites
(such as Alembic's), which necessarily entails scanning the expression to
eliminate for constant numeric and string values. The logic is added to the
two "reflection->DDL round trip" paths which are currently autogenerate and
batch migration.  Within autogenerate, the logic is on the rendering side,
whereas in batch the logic is installed as a column reflection hook.

Improved SQLite server default comparison to accommodate for a text()
construct that added parenthesis directly vs. a construct that relied
upon the SQLAlchemy SQLite dialect to render the parenthesis, as well
as improved support for various forms of constant expressions such as
values that are quoted vs. non-quoted.

Fixed bug where the "literal_binds" flag was not being set when
autogenerate would create a server default value, meaning server default
comparisons would fail for functions that contained literal values.

Added support for MySQL "DROP CHECK", which is added as of MySQL 8.0.16,
separate from MariaDB's "DROP CONSTRAINT" for CHECK constraints.  The MySQL
Alembic implementation now checks for "MariaDB" in server_version_info to
decide which one to use.

Fixed issue where MySQL databases need to use CHANGE COLUMN when altering a
server default of CURRENT_TIMESTAMP, NOW() and probably other functions
that are only usable with DATETIME/TIMESTAMP columns.  While MariaDB
supports both CHANGE and ALTER COLUMN in this case, MySQL databases only
support CHANGE.  So the new logic is that if the server default change is
against a DateTime-oriented column, the CHANGE format is used
unconditionally, as in the vast majority of cases the server default is to
be CURRENT_TIMESTAMP which may also be potentially bundled with an "ON
UPDATE CURRENT_TIMESTAMP" directive, which SQLAlchemy does not currently
support as a distinct field.  The fix addiionally improves the server
default comparison logic when the "ON UPDATE" clause is present and
there are parenthesis to be adjusted for as is the case on some MariaDB
versions.

Warnings emitted by Alembic now include a default stack level of 2, and in
some cases it's set to 3, in order to help warnings indicate more closely
where they are originating from.  Pull request courtesy Ash Berlin-Taylor.

Replaced the Python compatbility routines for getargspec() with a fully
vendored version based on getfullargspec() from Python 3.3.
Originally, Python was emitting deprecation warnings for this function in
Python 3.8 alphas.  While this change was reverted, it was observed that
Python 3 implementations for getfullargspec() are an order of magnitude
slower as of the 3.4 series where it was rewritten against Signature.
While Python plans to improve upon this situation, SQLAlchemy projects for
now are using a simple replacement to avoid any future issues.

diffstat:

 databases/py-alembic/Makefile |   8 ++++----
 databases/py-alembic/distinfo |  10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (40 lines):

diff -r 15e53e28abd3 -r 0082a3bd4988 databases/py-alembic/Makefile
--- a/databases/py-alembic/Makefile     Wed Jul 03 20:22:00 2019 +0000
+++ b/databases/py-alembic/Makefile     Wed Jul 03 20:24:24 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.16 2019/04/29 10:27:33 adam Exp $
+# $NetBSD: Makefile,v 1.17 2019/07/03 20:24:24 adam Exp $
 
-DISTNAME=      alembic-1.0.10
+DISTNAME=      alembic-1.0.11
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    databases python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=a/alembic/}
@@ -21,10 +21,10 @@
 
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && \
-               ${MV} alembic alembic-${PYVERSSUFFIX} || ${TRUE}
+       ${MV} alembic alembic-${PYVERSSUFFIX} || ${TRUE}
 
 do-test:
-       cd ${WRKSRC} && py.test-${PYVERSSUFFIX}
+       cd ${WRKSRC} && pytest-${PYVERSSUFFIX}
 
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 15e53e28abd3 -r 0082a3bd4988 databases/py-alembic/distinfo
--- a/databases/py-alembic/distinfo     Wed Jul 03 20:22:00 2019 +0000
+++ b/databases/py-alembic/distinfo     Wed Jul 03 20:24:24 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.15 2019/04/29 10:27:33 adam Exp $
+$NetBSD: distinfo,v 1.16 2019/07/03 20:24:24 adam Exp $
 
-SHA1 (alembic-1.0.10.tar.gz) = 8e0488914021dc2b5e4805f762b6fb9fe75a4849
-RMD160 (alembic-1.0.10.tar.gz) = 2a7a611cc26f5daa27c716e78808ce66ca983199
-SHA512 (alembic-1.0.10.tar.gz) = 78cec44ae1b5e6958f629488cf615ada5853db420aee8b3febcffb9f89a0f79137aca7bbcc2eefd4ce6a29f96e989158994d6aa5772582f9d02e91dd7c46d67d
-Size (alembic-1.0.10.tar.gz) = 1019446 bytes
+SHA1 (alembic-1.0.11.tar.gz) = 7e22f168f674d54be4b0ef69c12f872fec0a2394
+RMD160 (alembic-1.0.11.tar.gz) = 58501afb51bdedc155189161f0fd4ee7a8c331c8
+SHA512 (alembic-1.0.11.tar.gz) = 5e59c90a0f0b0ca1fab356accc7f28cd4e2a76625fc7a268e6b3f925b3dd905aa3fda3d0044474b79fc969610fb9f0e795de5c4bdf42f047a194d178ca3d016c
+Size (alembic-1.0.11.tar.gz) = 1032693 bytes



Home | Main Index | Thread Index | Old Index