]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/log
thirdparty/sqlalchemy/alembic.git
3 years agoDocument config for migration files timestamp prefixed
Elias Dorneles [Wed, 6 Apr 2022 14:42:36 +0000 (10:42 -0400)] 
Document config for migration files timestamp prefixed

See discussion in issue: https://github.com/sqlalchemy/alembic/issues/1011

### Description

Summary of changes:

* updated `alembic.ini` templates
* updated tutorial accordingly

### Checklist

This pull request is:

- [x] A documentation / typographical error fix
- [ ] A short code fix
- [ ] A new feature implementation

Closes: #1013
Pull-request: https://github.com/sqlalchemy/alembic/pull/1013
Pull-request-sha: 34f06ac0a59a6207cf132f9ae5fdc9bc4780f404

Change-Id: Ia51441c9ec39a43a0ecc1270a40859af014b326c

3 years agobump black to 22.3.0
Mike Bayer [Mon, 28 Mar 2022 19:50:29 +0000 (15:50 -0400)] 
bump black to 22.3.0

both black and click were released in the past
few hours, and black 21.5b1 seems to suddenly
be failing on a missing symbol from click.  just
update to the latest

Change-Id: Icb9d98d6473aa603aa29ad1c2d1e43ff3b371db5

3 years agoadapt for column collection being "immutable" or "readonly"
Mike Bayer [Sat, 26 Mar 2022 15:47:29 +0000 (11:47 -0400)] 
adapt for column collection being "immutable" or "readonly"

in 2.0 the ColumnCollectionConstraint will use a
"read only" column collection, renamed from "immutable".
Add logic to detect both of these kinds of collections

Change-Id: I4049c3081a2b3801ea7bfa31bb62bafb3eae4a9d

3 years agoadd covering index tests; generalize autogen index tests
Mike Bayer [Wed, 16 Mar 2022 14:55:46 +0000 (10:55 -0400)] 
add covering index tests; generalize autogen index tests

In response to #1006, add tests for covering indexes
for PostgreSQL and MSSQL.

Refactor test_autogen_indexes to be generalized for all
backends.  Parts of this test module should eventually move
to the suite tests.

Fixes: #1006
Change-Id: I126b0bcbf4f065e5b148567929fece898e66821e

3 years agoVersion 1.7.8 placeholder
Mike Bayer [Mon, 14 Mar 2022 19:41:19 +0000 (15:41 -0400)] 
Version 1.7.8 placeholder

3 years ago- 1.7.7 rel_1_7_7
Mike Bayer [Mon, 14 Mar 2022 19:39:01 +0000 (15:39 -0400)] 
- 1.7.7

3 years agochangelog updates
Mike Bayer [Mon, 14 Mar 2022 19:38:01 +0000 (15:38 -0400)] 
changelog updates

Change-Id: I6e1bcdab140eb91926520984e6fc2c288f1dade1

3 years agoadd sphinx_copybutton
Mike Bayer [Mon, 14 Mar 2022 19:33:15 +0000 (15:33 -0400)] 
add sphinx_copybutton

Change-Id: I14471e98a876982b4fcfdfab35c3150ab0b18bde

3 years agoFix duplicated constraints when using expressions
Nicolas CANIART [Sun, 13 Mar 2022 16:39:40 +0000 (12:39 -0400)] 
Fix duplicated constraints when using expressions

Fixed issue where using :meth:`.Operations.create_table` in conjunction
with a :class:`.CheckConstraint` that referred to table-bound
:class:`.Column` objects rather than string expressions would be added to
the parent table twice, resulting in an incorrect DDL sequence. Pull
request courtesy Nicolas CANIART.

Fixes: #1004
Closes: #1005
Pull-request: https://github.com/sqlalchemy/alembic/pull/1005
Pull-request-sha: 2fe5c5297bcde990096571a047039c451aa876f6

Change-Id: I2bf48701968fe59a6766f8f8879320b1bfd75774

3 years agofix failing test on windows after sqlite switched to queuepool by default
CaselIT [Mon, 28 Feb 2022 23:21:17 +0000 (00:21 +0100)] 
fix failing test on windows after sqlite switched to queuepool by default

Change-Id: Iec2b2ae9c2df9592988fa2239b768d1919eec297

3 years agodesensitize Oracle to FLOAT/DOUBLE/DOUBLE_PRECISION differences
Mike Bayer [Wed, 2 Mar 2022 01:56:46 +0000 (20:56 -0500)] 
desensitize Oracle to FLOAT/DOUBLE/DOUBLE_PRECISION differences

Oracle Float will come back as DOUBLE_PRECISION
as a result of https://github.com/sqlalchemy/sqlalchemy/issues/5465.
Add some synonyms to prevent changes between these names from resulting
in autogenerate positives.

Change-Id: I6cdda7ff660ecf92884c18c663aef1c143a58da7

3 years agomore links to pypi, add 3.10 to classifiers
CaselIT [Mon, 28 Feb 2022 20:12:58 +0000 (21:12 +0100)] 
more links to pypi, add 3.10 to classifiers

Change-Id: I9af924f6d28ebbfc1186b5369655bed7d3348766

3 years agoadd GitHub URL for PyPi (#994)
Andrii Oriekhov [Mon, 28 Feb 2022 20:08:56 +0000 (22:08 +0200)] 
add GitHub URL for PyPi (#994)

3 years agoillustrate connection sharing + asyncio
Mike Bayer [Tue, 15 Feb 2022 18:06:57 +0000 (13:06 -0500)] 
illustrate connection sharing + asyncio

References: #991
:

Change-Id: I4d1d738ab27a541618762240888dd45284867720

3 years agorepair sharing example
Mike Bayer [Tue, 15 Feb 2022 14:18:50 +0000 (09:18 -0500)] 
repair sharing example

the note re: "we dont have to guess" is wrong.
engine_from_config() returns an engine.   It seems
like this example was edited a few times and
was not completely checked (it was me, for sure).

for now just use two separate blocks to eliminate
any problems

Change-Id: Ib44671526d0f570ed88dd3b1c77d078c1afbf3eb

3 years agofix connection handling in consumption test
Mike Bayer [Fri, 11 Feb 2022 15:33:09 +0000 (10:33 -0500)] 
fix connection handling in consumption test

these tests were leaving connections opened.

This rev is necessary for tests to pass assuming
QueuePool for SQLite file connections, in
I5f6c259def0ef43d401c6163dc99f651e519148d

Change-Id: I5f6c259def0ef43d401c6163dc99f651e519148d

3 years agoadd conditional for fileConfig()
Mike Bayer [Mon, 7 Feb 2022 19:52:03 +0000 (14:52 -0500)] 
add conditional for fileConfig()

The ``fileConfig()`` line in the ``env.py`` templates is now conditional on
``Config.config_file_name`` not being None.

Change-Id: Ibe943d093fd872c4d0a836f58e0608a4e078ce1f
Fixes: #986
3 years agoPrevent alter_column() from changing nullability
Gord Thompson [Thu, 13 Jan 2022 18:46:46 +0000 (11:46 -0700)] 
Prevent alter_column() from changing nullability

Fixed bug where an alter_column() operation would change a "NOT NULL"
column to "NULL" by emitting an ALTER COLUMN statement that did not specify
"NOT NULL". (In the absence of "NOT NULL" T-SQL was implicitly assuming
"NULL"). An alter_column() operation that specifies `type_=` should also
specify either `nullable=` or `existing_nullable=` to inform Alembic as to
whether the emitted DDL should include "NULL" or "NOT NULL"; a warning is
now emitted if this is missing under this scenario.

Fixes: #977
Change-Id: Ifbaa06bf149ba39d1a5deb43a6fd42c9ca118894

3 years agoclarify default configuration behavior
Mike Bayer [Fri, 4 Feb 2022 16:51:30 +0000 (11:51 -0500)] 
clarify default configuration behavior

alembic does not by default read other sections
besides ``[alembic]``, however the generated ``env.py``
file by default contains instructions to also read logging
directives.  clarify that if the configuration file is
customized to not have logging directives, env.py also
needs to be customized.

Change-Id: I4804ce54b78b68c2d72ba4bcc7c1ecaf93a09103
Fixes: #985
3 years agofix pep484 issue
Mike Bayer [Tue, 1 Feb 2022 15:35:23 +0000 (10:35 -0500)] 
fix pep484 issue

the jenkins pep484 job wasn't catching the tox target
so we missed a mypy failure that got released :/

Change-Id: Ibaee3158971985fb08e43a53f99244bcc4fa0f81

3 years agoVersion 1.7.7 placeholder
Mike Bayer [Tue, 1 Feb 2022 15:02:28 +0000 (10:02 -0500)] 
Version 1.7.7 placeholder

3 years ago- 1.7.6 rel_1_7_6
Mike Bayer [Tue, 1 Feb 2022 15:00:09 +0000 (10:00 -0500)] 
- 1.7.6

3 years agohappy new year
Mike Bayer [Tue, 1 Feb 2022 14:59:05 +0000 (09:59 -0500)] 
happy new year

Change-Id: Ieaacc9d126d88f54d585e6380dd6bd56aa5919c2

3 years agoresolve for variant before testing for schema type
Mike Bayer [Tue, 1 Feb 2022 14:12:17 +0000 (09:12 -0500)] 
resolve for variant before testing for schema type

Fixed regression where usage of a ``with_variant()`` datatype in
conjunction with the ``existing_type`` option of ``op.alter_column()``
under batch mode would lead to an internal exception.

note this exception would only occur under 1.x, under 2.0
the new variant architecture would have prevented this problem,
however it is best here that the ultimate variant type is
unwrapped in the case that we have a plain type with a
schema type as a variant.

also sqla 1.3 needs pytest < 7 to run correctly

Change-Id: I0f5480f97f014e707b8bd4e70f8495d3bd27fd21
Fixes: #982
3 years agoadd pep484 target
Mike Bayer [Thu, 20 Jan 2022 18:31:29 +0000 (13:31 -0500)] 
add pep484 target

this is now the mypy target that the jenkins gerrit
job will access.

Change-Id: Iaa2bdbe8c4da683d7704a50be8ff3d9e7f887e09

3 years agoInsert spaces in warning and error messages 976/head
Harutaka Kawamura [Tue, 11 Jan 2022 07:08:43 +0000 (16:08 +0900)] 
Insert spaces in warning and error messages

3 years agoProvide useful error message in stub tests
CaselIT [Wed, 1 Dec 2021 21:11:36 +0000 (22:11 +0100)] 
Provide useful error message in stub tests

Change-Id: I6d2662cb5c13d5438210aa001cbdb8c7eb876bb7

3 years agoRemove warning regarding cache key when using MSSQL.
CaselIT [Tue, 28 Dec 2021 21:15:32 +0000 (22:15 +0100)] 
Remove warning regarding cache key when using MSSQL.

Change-Id: I5eacf7c2030d8dbdaf1e5d2eba836a7596365ae3

3 years agoadd missing import in asyncion cookbook example
CaselIT [Tue, 21 Dec 2021 19:27:01 +0000 (20:27 +0100)] 
add missing import in asyncion cookbook example

Change-Id: Idda470d2aa7df298e5553359be1ced07e2c112d0

3 years agofix type errors raised by mypy .920
CaselIT [Tue, 21 Dec 2021 19:17:39 +0000 (20:17 +0100)] 
fix type errors raised by mypy .920

Change-Id: Ifca989610193074757dec6602af268ea5139c4bc

3 years agodocs: Add missing engine.dispose() call to the asyncio cookbook example. (#973)
DanCardin [Tue, 21 Dec 2021 19:07:23 +0000 (14:07 -0500)] 
docs: Add missing engine.dispose() call to the asyncio cookbook example. (#973)

3 years agoRemove usage of no longer needed compat code
CaselIT [Tue, 23 Nov 2021 20:51:23 +0000 (21:51 +0100)] 
Remove usage of no longer needed compat code

Change-Id: I3180931673496260614e69e95f7da09d68b51714

3 years agoMerge remote-tracking branch 'github/pr/969'
Mike Bayer [Tue, 23 Nov 2021 16:22:43 +0000 (11:22 -0500)] 
Merge remote-tracking branch 'github/pr/969'

Change-Id: Ic6c07a214e372464c1d6303317caf98cfc3b0edf

3 years agoTweak docs about version_path_separator 969/head
Vlastimil Zíma [Thu, 18 Nov 2021 09:27:15 +0000 (10:27 +0100)] 
Tweak docs about version_path_separator

3 years agoMerge "Add new ensure_version command" into main
mike bayer [Thu, 18 Nov 2021 21:10:09 +0000 (21:10 +0000)] 
Merge "Add new ensure_version command" into main

3 years agoAdd new ensure_version command
Kai Mueller [Wed, 10 Nov 2021 16:38:11 +0000 (11:38 -0500)] 
Add new ensure_version command

Add a new command ``alembic ensure_version``, which will ensure that the
Alembic version table is present in the target database, but does not
alter its contents.  Pull request courtesy Kai Mueller.

Fixes: #964
Closes: #965
Pull-request: https://github.com/sqlalchemy/alembic/pull/965
Pull-request-sha: a85d2ac048c666126e583fbda482eeabd9c58c53

Change-Id: Ia39d43287634915537725e779dba7ac34f2946e4

3 years agoMerge "add type synonym for mysql.LONGTEXT / JSON" into main
mike bayer [Thu, 18 Nov 2021 15:54:27 +0000 (15:54 +0000)] 
Merge "add type synonym for mysql.LONGTEXT / JSON" into main

3 years agosupport 2.0 style variants
Mike Bayer [Tue, 16 Nov 2021 19:10:58 +0000 (14:10 -0500)] 
support 2.0 style variants

Implemented support for recognizing and rendering SQLAlchemy "variant"
types going forward into SQLAlchemy 2.0, where the architecture of
"variant" datatypes will be changing.

Specifically any TypeEngine can now have "variants" by looking
in the _variant_mapping dictionary collection associated with the
type directly.

Change-Id: I0b5ca887dce1dd77af3504dbe318701b31c7d574

3 years agoadd type synonym for mysql.LONGTEXT / JSON
Mike Bayer [Sat, 13 Nov 2021 15:27:30 +0000 (10:27 -0500)] 
add type synonym for mysql.LONGTEXT / JSON

Added a rule to the MySQL impl so that the translation between JSON /
LONGTEXT is accommodated by autogenerate, treating LONGTEXT from the server
as equivalent to an existing JSON in the model.

Change-Id: Ia8370d2269c4decea00aa94beafd3d9d861a1269
Fixes: #968
3 years agoVersion 1.7.6 placeholder
Mike Bayer [Thu, 11 Nov 2021 15:56:19 +0000 (10:56 -0500)] 
Version 1.7.6 placeholder

3 years ago- 1.7.5 rel_1_7_5
Mike Bayer [Thu, 11 Nov 2021 15:55:00 +0000 (10:55 -0500)] 
- 1.7.5

3 years agoUpdate documentation about alembic configuration path 966/head
Madison Swain-Bowden [Thu, 11 Nov 2021 00:14:43 +0000 (16:14 -0800)] 
Update documentation about alembic configuration path

3 years agoadjust autocommit tests to accommodate for execution_options change
Mike Bayer [Fri, 5 Nov 2021 20:58:27 +0000 (16:58 -0400)] 
adjust autocommit tests to accommodate for execution_options change

the tests here were relying on the fact that execution_options
returns a new connection which is not the case for future mode.

Change-Id: Ib6c2c69243a615fa2097c68fc5c35c14507bea61

3 years agouse a heuristic for pure "future engine" until future engine merges
Mike Bayer [Fri, 5 Nov 2021 16:19:12 +0000 (12:19 -0400)] 
use a heuristic for pure "future engine" until future engine merges

Change-Id: I0d5605091c3010ce50bcd0083dfb3c9615212d22

3 years agosqlalchemy 2.0 test updates
Mike Bayer [Fri, 5 Nov 2021 15:24:23 +0000 (11:24 -0400)] 
sqlalchemy 2.0 test updates

- disable branched connection tests for 2.x
- dont use future flag for 2.x
- adjust batch tests for autobegin, inconsistent
  SQLite transactional DDL behaviors

Change-Id: I70caf6afecc83f880dc92fa6cbc29e2043c43bb9

3 years agofix annotation
Mike Bayer [Fri, 5 Nov 2021 04:05:07 +0000 (00:05 -0400)] 
fix annotation

Change-Id: Iae921dd45d78e9c657304a2977adb18b0191a20d

3 years agorollback connection before teardown
Mike Bayer [Fri, 5 Nov 2021 03:49:15 +0000 (23:49 -0400)] 
rollback connection before teardown

this test needs to clear out the transaction
if running on SQLAlchemy 2.0.

Change-Id: Ic3f76433ba9b9ea5485a81caae745d3c7f2a4ee8

3 years agoworkflow: also test against rel_1_4
CaselIT [Thu, 4 Nov 2021 20:50:07 +0000 (21:50 +0100)] 
workflow: also test against rel_1_4

Change-Id: I68c8a06c9d8baefdb6736e701be33b730eff7442

3 years agoworkflows; skip py3.6 when testing against main, add py3.10
CaselIT [Thu, 4 Nov 2021 20:37:47 +0000 (21:37 +0100)] 
workflows; skip py3.6 when testing against main, add py3.10

Change-Id: Ia847a906ed64a3a9bef4c8a72b732e1c156e9a85

3 years agodont hardcode transaction opened messaging
Mike Bayer [Thu, 4 Nov 2021 18:34:07 +0000 (14:34 -0400)] 
dont hardcode transaction opened messaging

Adjustments to the test suite to accommodate for error message changes
occurring as of SQLAlchemy 1.4.27.

Change-Id: I5092c8d3ba3d16819b200f1dfc3c30b8d24abe30

3 years agoRemove code to force ENABLE_ASYNCIO to False
Gord Thompson [Sat, 23 Oct 2021 17:24:40 +0000 (11:24 -0600)] 
Remove code to force ENABLE_ASYNCIO to False

Forcing ENABLE_ASYNCIO to False was interfering
with testing under async drivers when the
(third-party dialect) test suite included both
SQLAlchemy and Alembic tests.

Change-Id: I2fe40049c24ba8eba0a10011849a912c03aa381e

3 years agoAdjust test requirements for mssql
Gord Thompson [Sat, 23 Oct 2021 22:41:19 +0000 (16:41 -0600)] 
Adjust test requirements for mssql

SQLAlchemy added FK onupdate/ondelete reflection
in 1.4.26

Change-Id: Ie4e95294fe3857ea1f28a67a7a78ca9213e8e8f8

3 years agoensure connection is not None
Mike Bayer [Sat, 23 Oct 2021 19:58:37 +0000 (15:58 -0400)] 
ensure connection is not None

the inspect() API changed in
https://github.com/sqlalchemy/sqlalchemy2-stubs/commit/68f8417888456588714fcced1c6799f3eb00ff2d
to be more accurate which correctly appears to necessitate a
type check in Alembic AutogenContext.inspector() to ensure
"self.connection" isn't None

Change-Id: Icb3c73be62dc14d9a8f88e0723c3651b6628739a

3 years agomain name for github workflows
Mike Bayer [Mon, 11 Oct 2021 16:18:20 +0000 (12:18 -0400)] 
main name for github workflows

Change-Id: I0c32212f1b96acb691c29f013cfa78e1ae228cfc

3 years agorename to main
Mike Bayer [Mon, 11 Oct 2021 15:28:04 +0000 (11:28 -0400)] 
rename to main

Change-Id: I6cff33e68cbb2735f3fda22433c36e565a3d5e7a

3 years agoFix issue 928 create_check_constraint condition argument typing fix (#929)
liverpool1026 [Thu, 7 Oct 2021 19:46:58 +0000 (05:46 +1000)] 
Fix issue 928 create_check_constraint condition argument typing fix (#929)

* Update create_check_constraint method typing

* Pass str type down

Fixes: #928
Co-authored-by: Kevin Hwa <liverpoo1026.bne@gmail.com>
Co-authored-by: Kevin Hwa <kevin.hwa@polymathian.com>
3 years agoAdd `[post_write_hooks]` to example `alembic.ini` 946/head
Anatoli Babenia [Thu, 7 Oct 2021 06:47:32 +0000 (09:47 +0300)] 
Add `[post_write_hooks]` to example `alembic.ini`

3 years agoVersion 1.7.5 placeholder
Mike Bayer [Wed, 6 Oct 2021 14:31:50 +0000 (10:31 -0400)] 
Version 1.7.5 placeholder

3 years ago- 1.7.4 rel_1_7_4
Mike Bayer [Wed, 6 Oct 2021 14:13:39 +0000 (10:13 -0400)] 
- 1.7.4

3 years agoMerge "frame a transaction around autocommit"
mike bayer [Tue, 5 Oct 2021 13:25:23 +0000 (13:25 +0000)] 
Merge "frame a transaction around autocommit"

3 years agoframe a transaction around autocommit
Mike Bayer [Mon, 4 Oct 2021 19:15:16 +0000 (15:15 -0400)] 
frame a transaction around autocommit

Fixed issue where the :meth:`.MigrationContext.autocommit_block` feature
would fail to function when using a SQLAlchemy engine using 2.0 future
mode.

Change-Id: I851573424c7cde2595ae22c816ec6580d7cab248
Fixes: #944
3 years agoFix write hook issue in python < 3.9.
Federico Caselli [Thu, 30 Sep 2021 13:06:13 +0000 (15:06 +0200)] 
Fix write hook issue in python < 3.9.

Adjust require of importlib_metadata also include py3.8.

Fixes: #934
Change-Id: Id64163a0dc53226d62795d40190b6cec0aee522b

3 years agoMultiDB README: Add a bit more detail 932/head
Chris Dary [Fri, 24 Sep 2021 19:47:08 +0000 (15:47 -0400)] 
MultiDB README: Add a bit more detail

3 years agoVersion 1.7.4 placeholder
Mike Bayer [Fri, 17 Sep 2021 15:29:34 +0000 (11:29 -0400)] 
Version 1.7.4 placeholder

3 years ago- 1.7.3 rel_1_7_3
Mike Bayer [Fri, 17 Sep 2021 15:28:22 +0000 (11:28 -0400)] 
- 1.7.3

3 years agoMerge "Fix constraint_name type of create_foreign_key"
mike bayer [Fri, 17 Sep 2021 15:27:41 +0000 (15:27 +0000)] 
Merge "Fix constraint_name type of create_foreign_key"

3 years agoVersion 1.7.3 placeholder
Mike Bayer [Fri, 17 Sep 2021 14:06:36 +0000 (10:06 -0400)] 
Version 1.7.3 placeholder

3 years ago- 1.7.2 rel_1_7_2
Mike Bayer [Fri, 17 Sep 2021 13:59:36 +0000 (09:59 -0400)] 
- 1.7.2

3 years agoFix constraint_name type of create_foreign_key
TilmanK [Tue, 14 Sep 2021 19:39:59 +0000 (15:39 -0400)] 
Fix constraint_name type of create_foreign_key

Fixed type annotations for the "constraint_name" argument of operations
``create_primary_key()``, ``create_foreign_key()``.  Pull request courtesy
TilmanK.

Closes: #914
Pull-request: https://github.com/sqlalchemy/alembic/pull/914
Pull-request-sha: 39d44af226b2103da3964daf3229880a0958b97c

Change-Id: Iec4b392c70ae0eeda06dcbfda95a2f044e976686

3 years agoMerge "render 3rd party module annotations as forward references"
mike bayer [Fri, 17 Sep 2021 13:23:00 +0000 (13:23 +0000)] 
Merge "render 3rd party module annotations as forward references"

3 years agorender 3rd party module annotations as forward references
Mike Bayer [Wed, 15 Sep 2021 20:43:45 +0000 (16:43 -0400)] 
render 3rd party module annotations as forward references

Fixed issue where registration of custom ops was prone to failure due to
the registration process running ``exec()`` on generated code that as of
the 1.7 series includes pep-484 annotations, which in the case of end user
code would result in name resolution errors when the exec occurs. The logic
in question has been altered so that the annotations are rendered as
forward references so that the ``exec()`` can proceed.

Change-Id: I142b89e2f6354b2ce253f3b8109f59fa3aae68ef
Fixes: #920
3 years agoAdded missing attributes from context stubs.
CaselIT [Mon, 6 Sep 2021 21:22:30 +0000 (23:22 +0200)] 
Added missing attributes from context stubs.

Fixes: #900
Change-Id: I2e21b6f363bf6405bd472c9aca04fbbc3c9cc384

3 years agoAdds exception when trying to run write_pyi.py with Python < 3.9
TilmanK [Tue, 14 Sep 2021 19:43:30 +0000 (15:43 -0400)] 
Adds exception when trying to run write_pyi.py with Python < 3.9

### Description
write_pyi.py now raises an exception when someone tries to run the script with Python version 3.8 or smaller.

This also fixes:
- When using absolute Paths, i.e. on Windows, they are now converted to relative paths to avoid useless changes in the doc strings of the pyi files
- Corrected destination_path argument type when calling `generate_pyi_for_proxy` in `run_file`
- A comment typo

Fixes: #915
Closes: #919
Pull-request: https://github.com/sqlalchemy/alembic/pull/919
Pull-request-sha: e885d27ac5509858c8cb2927310f6195fc1d6004

Change-Id: Ia33d32b2828e71185186afc49848ce89d48a8323

3 years agoMerge "use in-package imports"
mike bayer [Tue, 14 Sep 2021 17:00:08 +0000 (17:00 +0000)] 
Merge "use in-package imports"

3 years agouse in-package imports
Mike Bayer [Mon, 13 Sep 2021 18:58:06 +0000 (14:58 -0400)] 
use in-package imports

Fixed an import in one of the .pyi files that was triggering an
assertion error in some versions of mypy.

Change-Id: Ifc663a876ebe5bebf8411c1eb451f2a25fe4dec0
Fixes: #897
3 years agoMerge branch 'workflow_test_mypy' into master-gerrit
CaselIT [Mon, 13 Sep 2021 19:19:07 +0000 (21:19 +0200)] 
Merge branch 'workflow_test_mypy' into master-gerrit
Change-Id: Ifb5f035a83341b4ccf0d615ab4d6ba23ca7f1573

3 years agoAdd mypy to the github workflow 918/head
CaselIT [Mon, 13 Sep 2021 19:11:22 +0000 (21:11 +0200)] 
Add mypy to the github workflow

Fixes: #917
Change-Id: I77d8a3673eb6d990ca947c59f6960925561d122a

3 years agoMerge remote-tracking branch 'github/pr/911'
Mike Bayer [Mon, 13 Sep 2021 18:48:50 +0000 (14:48 -0400)] 
Merge remote-tracking branch 'github/pr/911'

Change-Id: Id661e1e1f81e0ab8e17dab2479d9223e425f471b

3 years agoFix/typos doc build (#910)
Kevin Kirsche [Sat, 11 Sep 2021 20:39:08 +0000 (16:39 -0400)] 
Fix/typos doc build (#910)

* fix: typos in docs/build/batch.rst

* fix: typos in docs/build/autogenerate.rst

* fix: typos in docs/build/changelog.rst

3 years agofix: typos in doc/build/api (#909)
Kevin Kirsche [Sat, 11 Sep 2021 20:37:23 +0000 (16:37 -0400)] 
fix: typos in doc/build/api (#909)

3 years ago[DOCS]: Remove suggestion to use branched connections 911/head
Chris Sewell [Sat, 11 Sep 2021 06:12:10 +0000 (08:12 +0200)] 
[DOCS]: Remove suggestion to use branched connections

Fixes #908

3 years agoadd missing resources from alembic doc build
Mike Bayer [Thu, 9 Sep 2021 12:27:21 +0000 (08:27 -0400)] 
add missing resources from alembic doc build

Change-Id: I0f1c3a67edf35ab9ea2b0ac0689f68e8b4dee99d
Fixes: #907
3 years agoclarify that only named check constraints are regenerated
Mike Bayer [Wed, 1 Sep 2021 14:57:00 +0000 (10:57 -0400)] 
clarify that only named check constraints are regenerated

Change-Id: Ie0489137122d6ccedfa7c1af44dc8420a0842ee8
References: #400

3 years agoVersion 1.7.2 placeholder
Mike Bayer [Mon, 30 Aug 2021 21:51:30 +0000 (17:51 -0400)] 
Version 1.7.2 placeholder

3 years ago- 1.7.1 rel_1_7_1
Mike Bayer [Mon, 30 Aug 2021 21:49:50 +0000 (17:49 -0400)] 
- 1.7.1

3 years agocheck all directives in batch block until recreate selected
Mike Bayer [Mon, 30 Aug 2021 20:02:02 +0000 (16:02 -0400)] 
check all directives in batch block until recreate selected

Fixed regression in batch mode due to :ticket:`883` where the "auto" mode
of batch would fail to accommodate any additional migration directives
beyond encountering an ``add_column()`` directive, due to a mis-application
of the conditional logic that was added as part of this change, leading to
"recreate" mode not being used in cases where it is required for SQLite
such as for unique constraints.

Change-Id: I6315569caff5f3b33d152974ebecc8b18d9cc523
Fixes: #896
3 years agorestore default values for keyword arguments in stubs
Mike Bayer [Mon, 30 Aug 2021 18:30:37 +0000 (14:30 -0400)] 
restore default values for keyword arguments in stubs

Fixed issue in generated .pyi files where default values for ``Optional``
arguments were missing, thereby causing mypy to consider them as required.

Change-Id: I08c4cd7bd04c6763fdc9c5b42abbdcca8fd90e0e
Fixes: #895
3 years agofix mypy errors
CaselIT [Mon, 30 Aug 2021 19:39:40 +0000 (21:39 +0200)] 
fix mypy errors

Change-Id: If49e0ff00f0b00ed914ddb8979ae49c3a8a10a0e

3 years agoDo not tag wheel as being compatible with Python 2
layday [Mon, 30 Aug 2021 17:30:05 +0000 (13:30 -0400)] 
Do not tag wheel as being compatible with Python 2

Corrected "universal wheel" directive in setup.cfg so that building a wheel
does not target Python 2. The PyPi files index for 1.7.0 was corrected
manually. Pull request courtesy layday.

Fixes: #893
Closes: #894
Pull-request: https://github.com/sqlalchemy/alembic/pull/894
Pull-request-sha: 577afdbe5906247493182df95fe5e5338ac23080

Change-Id: I26ca6d9e3e8064d22713926707a53cb57a69d8e7

3 years agoVersion 1.7.1 placeholder
Mike Bayer [Mon, 30 Aug 2021 15:12:17 +0000 (11:12 -0400)] 
Version 1.7.1 placeholder

3 years ago- 1.7.0 rel_1_7_0
Mike Bayer [Mon, 30 Aug 2021 15:02:39 +0000 (11:02 -0400)] 
- 1.7.0

3 years agobump importlib.resources req to 3.9
Mike Bayer [Fri, 27 Aug 2021 16:38:16 +0000 (12:38 -0400)] 
bump importlib.resources req to 3.9

The importlib.resources.files() API was not added until 3.9.

Change-Id: I62ef8974d6637394448346d7e0f86c6dd93f81a7

3 years agochangelog updates
Mike Bayer [Thu, 26 Aug 2021 22:37:35 +0000 (18:37 -0400)] 
changelog updates

Change-Id: I84519c685e2f0a7ac84fe866f33a8451cfc495e2

3 years agodecouple pyproject.toml from the test suite
Mike Bayer [Thu, 26 Aug 2021 22:25:29 +0000 (18:25 -0400)] 
decouple pyproject.toml from the test suite

tools/write_pyi.py is run as part of the test suite,
which has to run from a source distribution, which
does not have pyproject.toml right now due to
issues reported w/ pip.  these pip issues are probably
resolved now however we have not gone back to including
pyproject.toml at the moment.   so we therefore have to
hardcode the single "-l79" black config option in
write_pyi.py.

Change-Id: I877f69eb2322f6cbb39ed4c6d4a9adf598703223

3 years agoalso include py.typed
Mike Bayer [Thu, 26 Aug 2021 22:16:09 +0000 (18:16 -0400)] 
also include py.typed

Change-Id: I8f41eeaf517dfb52f1ddad0a3735f61545bea205

3 years agoadjust manifest to accommodate .pyi files
Mike Bayer [Thu, 26 Aug 2021 21:55:15 +0000 (17:55 -0400)] 
adjust manifest to accommodate .pyi files

Change-Id: I51c7c04c609dd008921e803596c53a48c8b247c0

3 years agoMerge "Add test to ensure method given in #880 works"
mike bayer [Wed, 25 Aug 2021 18:22:21 +0000 (18:22 +0000)] 
Merge "Add test to ensure method given in #880 works"

3 years agoAdd test to ensure method given in #880 works
Mike Bayer [Tue, 24 Aug 2021 15:02:52 +0000 (11:02 -0400)] 
Add test to ensure method given in #880 works

Change-Id: I05dae157320be49eb598084388196e72896bc89d
Fixes: #880
3 years agoMerge "remove dependency on pkg_resources"
mike bayer [Wed, 25 Aug 2021 17:26:49 +0000 (17:26 +0000)] 
Merge "remove dependency on pkg_resources"

3 years agoMerge "support named CHECK constraints in batch"
mike bayer [Tue, 24 Aug 2021 14:45:37 +0000 (14:45 +0000)] 
Merge "support named CHECK constraints in batch"