Skip to content

Commit e93a5e8

Browse files
committed
2.1 setup / initial dependency/min version change
this includes setup.cfg changes for asyncio and 3.8 min support. it doesnt have any code changes in support of these adjusments. Fixes: #10197 Fixes: #10357 Change-Id: Ic4569c770d1b893a067a9a5dfe13a6e28aaf47fa
1 parent dd79f8a commit e93a5e8

File tree

14 files changed

+157
-51
lines changed

14 files changed

+157
-51
lines changed

doc/build/changelog/changelog_21.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=============
2+
2.1 Changelog
3+
=============
4+
5+
.. changelog_imports::
6+
7+
.. include:: changelog_20.rst
8+
:start-line: 5
9+
10+
11+
.. changelog::
12+
:version: 2.1.0b1
13+
:include_notes_from: unreleased_21

doc/build/changelog/index.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ capabilities and behaviors in SQLAlchemy 2.0.
1717
.. toctree::
1818
:titlesonly:
1919

20-
migration_20
21-
whatsnew_20
20+
migration_21
2221

2322
Change logs
2423
-----------
2524

2625
.. toctree::
2726
:titlesonly:
2827

28+
changelog_21
2929
changelog_20
3030
changelog_14
3131
changelog_13
@@ -49,6 +49,8 @@ Older Migration Guides
4949
.. toctree::
5050
:titlesonly:
5151

52+
migration_20
53+
whatsnew_20
5254
migration_14
5355
migration_13
5456
migration_12

doc/build/changelog/migration_21.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _whatsnew_21_toplevel:
2+
3+
=============================
4+
What's New in SQLAlchemy 2.1?
5+
=============================
6+
7+
.. admonition:: About this Document
8+
9+
This document describes changes between SQLAlchemy version 2.0 and
10+
version 2.1.
11+
12+
13+
.. _change_10197:
14+
15+
Asyncio "greenlet" dependency no longer installs by default
16+
------------------------------------------------------------
17+
18+
SQLAlchemy 1.4 and 2.0 used a complex expression to determine if the
19+
``greenlet`` dependency, needed by the :ref:`asyncio <asyncio_toplevel>`
20+
extension, could be installed from pypi using a pre-built wheel instead
21+
of having to build from source. This because the source build of ``greenlet``
22+
is not always trivial on some platforms.
23+
24+
Disadantages to this approach included that SQLAlchemy needed to track
25+
exactly which versions of ``greenlet`` were published as wheels on pypi;
26+
the setup expression led to problems with some package management tools
27+
such as ``poetry``; it was not possible to install SQLAlchemy **without**
28+
``greenlet`` being installed, even though this is completely feasible
29+
if the asyncio extension is not used.
30+
31+
These problems are all solved by keeping ``greenlet`` entirely within the
32+
``[asyncio]`` target. The only downside is that users of the asyncio extension
33+
need to be aware of this extra installation dependency.
34+
35+
:ticket:`10197`
36+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. change::
2+
:tags: change, installation
3+
:tickets: 10197
4+
5+
The ``greenlet`` dependency used for asyncio support no longer installs
6+
by default. This dependency does not publish wheel files for every architecture
7+
and is not needed for applications that aren't using asyncio features.
8+
Use the ``sqlalchemy[asyncio]`` install target to include this dependency.
9+
10+
.. seealso::
11+
12+
:ref:`change_10197`
13+
14+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. change::
2+
:tags: change, installation
3+
:tickets: 10357
4+
5+
Python 3.8 or above is now required; support for Python 3.7 is dropped as
6+
this version is EOL.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Individual per-changelog files go here
2+
in .rst format, which are pulled in by
3+
changelog (version 0.4.0 or higher) to
4+
be rendered into the changelog_xx.rst file.
5+
At release time, the files here are removed and written
6+
directly into the changelog.
7+
8+
Rationale is so that multiple changes being merged
9+
into gerrit don't produce conflicts. Note that
10+
gerrit does not support custom merge handlers unlike
11+
git itself.
12+

doc/build/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,11 @@
240240
# built documents.
241241
#
242242
# The short X.Y version.
243-
version = "2.0"
243+
version = "2.1"
244244
# The full version, including alpha/beta/rc tags.
245-
release = "2.0.23"
245+
release = "2.1.0b1"
246246

247-
release_date = "November 2, 2023"
247+
release_date = None
248248

249249
site_base = os.environ.get("RTD_SITE_BASE", "https://www.sqlalchemy.org")
250250
site_adapter_template = "docs_adapter.mako"

doc/build/index.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,20 @@ SQLAlchemy Documentation
5252

5353
.. container::
5454

55-
Users coming from older versions of SQLAlchemy, especially those transitioning
56-
from the 1.x style of working, will want to review this documentation.
55+
Users coming SQLAlchemy version 2.0 will want to read:
56+
57+
* :doc:`What's New in SQLAlchemy 2.1? <changelog/migration_21>` - New features and behaviors in version 2.1
58+
59+
Users transitioning from 1.x versions of SQLAlchemy, such as version 1.4, will want to
60+
transition to version 2.0 overall before making any additional changes needed for
61+
the much smaller transition from 2.0 to 2.1. Key documentation for the 1.x to 2.x
62+
transition:
5763

5864
* :doc:`Migrating to SQLAlchemy 2.0 <changelog/migration_20>` - Complete background on migrating from 1.3 or 1.4 to 2.0
5965
* :doc:`What's New in SQLAlchemy 2.0? <changelog/whatsnew_20>` - New 2.0 features and behaviors beyond the 1.x migration
66+
67+
An index of all changelogs and migration documentation is at:
68+
6069
* :doc:`Changelog catalog <changelog/index>` - Detailed changelogs for all SQLAlchemy Versions
6170

6271

doc/build/intro.rst

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Documentation Overview
5555

5656
The documentation is separated into four sections:
5757

58-
* :ref:`unified_tutorial` - this all-new tutorial for the 1.4/2.0 series of
58+
* :ref:`unified_tutorial` - this all-new tutorial for the 1.4/2.0/2.1 series of
5959
SQLAlchemy introduces the entire library holistically, starting from a
6060
description of Core and working more and more towards ORM-specific concepts.
6161
New users, as well as users coming from the 1.x series of
@@ -94,23 +94,14 @@ Installation Guide
9494
Supported Platforms
9595
-------------------
9696

97-
SQLAlchemy supports the following platforms:
97+
SQLAlchemy 2.1 supports the following platforms:
9898

99-
* cPython 3.7 and higher
99+
* cPython 3.8 and higher
100100
* Python-3 compatible versions of `PyPy <http://pypy.org/>`_
101101

102-
.. versionchanged:: 2.0
103-
SQLAlchemy now targets Python 3.7 and above.
102+
.. versionchanged:: 2.1
103+
SQLAlchemy now targets Python 3.8 and above.
104104

105-
AsyncIO Support
106-
----------------
107-
108-
SQLAlchemy's ``asyncio`` support depends upon the
109-
`greenlet <https://pypi.org/project/greenlet/>`_ project. This dependency
110-
will be installed by default on common machine platforms, however is not
111-
supported on every architecture and also may not install by default on
112-
less common architectures. See the section :ref:`asyncio_install` for
113-
additional details on ensuring asyncio support is present.
114105

115106
Supported Installation Methods
116107
-------------------------------
@@ -129,7 +120,7 @@ downloaded from PyPI and installed in one step:
129120

130121
.. sourcecode:: text
131122

132-
pip install SQLAlchemy
123+
pip install sqlalchemy
133124

134125
This command will download the latest **released** version of SQLAlchemy from
135126
the `Python Cheese Shop <https://pypi.org/project/SQLAlchemy>`_ and install it
@@ -141,11 +132,30 @@ pip requires that the ``--pre`` flag be used:
141132

142133
.. sourcecode:: text
143134

144-
pip install --pre SQLAlchemy
135+
pip install --pre sqlalchemy
145136

146137
Where above, if the most recent version is a prerelease, it will be installed
147138
instead of the latest released version.
148139

140+
Installing with AsyncIO Support
141+
-------------------------------
142+
143+
SQLAlchemy's ``asyncio`` support depends upon the
144+
`greenlet <https://pypi.org/project/greenlet/>`_ project. This dependency
145+
is not inclued by default. To install with asyncio support, run this command:
146+
147+
.. sourcecode:: text
148+
149+
pip install sqlalchemy[asyncio]
150+
151+
This installation will include the greenlet dependency in the installation.
152+
See the section :ref:`asyncio_install` for
153+
additional details on ensuring asyncio support is present.
154+
155+
.. versionchanged:: 2.1 SQLAlchemy no longer installs the "greenlet"
156+
dependency by default; use the ``sqlalchemy[asyncio]`` pip target to
157+
install.
158+
149159

150160
Installing manually from the source distribution
151161
-------------------------------------------------
@@ -238,13 +248,13 @@ the available DBAPIs for each database, including external links.
238248
Checking the Installed SQLAlchemy Version
239249
------------------------------------------
240250

241-
This documentation covers SQLAlchemy version 2.0. If you're working on a
251+
This documentation covers SQLAlchemy version 2.1. If you're working on a
242252
system that already has SQLAlchemy installed, check the version from your
243253
Python prompt like this::
244254

245255
>>> import sqlalchemy
246256
>>> sqlalchemy.__version__ # doctest: +SKIP
247-
2.0.0
257+
2.1.0
248258

249259
Next Steps
250260
----------
@@ -254,7 +264,21 @@ With SQLAlchemy installed, new and old users alike can
254264

255265
.. _migration:
256266

257-
1.x to 2.0 Migration
267+
2.0 to 2.1 Migration
258268
=====================
259269

260-
Notes on the new API released in SQLAlchemy 2.0 is available here at :doc:`changelog/migration_20`.
270+
Users coming SQLAlchemy version 2.0 will want to read:
271+
272+
* :doc:`What's New in SQLAlchemy 2.1? <changelog/migration_21>` - New features and behaviors in version 2.1
273+
274+
Users transitioning from 1.x versions of SQLAlchemy, such as version 1.4, will want to
275+
transition to version 2.0 overall before making any additional changes needed for
276+
the much smaller transition from 2.0 to 2.1. Key documentation for the 1.x to 2.x
277+
transition:
278+
279+
* :doc:`Migrating to SQLAlchemy 2.0 <changelog/migration_20>` - Complete background on migrating from 1.3 or 1.4 to 2.0
280+
* :doc:`What's New in SQLAlchemy 2.0? <changelog/whatsnew_20>` - New 2.0 features and behaviors beyond the 1.x migration
281+
282+
An index of all changelogs and migration documentation is at:
283+
284+
* :doc:`Changelog catalog <changelog/index>` - Detailed changelogs for all SQLAlchemy Versions

doc/build/orm/extensions/asyncio.rst

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ included, using asyncio-compatible dialects.
99
.. versionadded:: 1.4
1010

1111
.. warning:: Please read :ref:`asyncio_install` for important platform
12-
installation notes for many platforms, including **Apple M1 Architecture**.
12+
installation notes on **all** platforms.
1313

1414
.. seealso::
1515

@@ -20,25 +20,14 @@ included, using asyncio-compatible dialects.
2020

2121
.. _asyncio_install:
2222

23-
Asyncio Platform Installation Notes (Including Apple M1)
24-
---------------------------------------------------------
23+
Asyncio Platform Installation Notes
24+
-----------------------------------
2525

26-
The asyncio extension requires Python 3 only. It also depends
26+
The asyncio extension depends
2727
upon the `greenlet <https://pypi.org/project/greenlet/>`_ library. This
28-
dependency is installed by default on common machine platforms including:
28+
dependency is **not installed by default**.
2929

30-
.. sourcecode:: text
31-
32-
x86_64 aarch64 ppc64le amd64 win32
33-
34-
For the above platforms, ``greenlet`` is known to supply pre-built wheel files.
35-
For other platforms, **greenlet does not install by default**;
36-
the current file listing for greenlet can be seen at
37-
`Greenlet - Download Files <https://pypi.org/project/greenlet/#files>`_.
38-
Note that **there are many architectures omitted, including Apple M1**.
39-
40-
To install SQLAlchemy while ensuring the ``greenlet`` dependency is present
41-
regardless of what platform is in use, the
30+
To install SQLAlchemy while ensuring the ``greenlet`` dependency is present, the
4231
``[asyncio]`` `setuptools extra <https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-setuptools-extras>`_
4332
may be installed
4433
as follows, which will include also instruct ``pip`` to install ``greenlet``:
@@ -51,6 +40,9 @@ Note that installation of ``greenlet`` on platforms that do not have a pre-built
5140
wheel file means that ``greenlet`` will be built from source, which requires
5241
that Python's development libraries also be present.
5342

43+
.. versionchanged:: 2.1 ``greenlet`` is no longer installed by default; to
44+
use the asyncio extension, the ``sqlalchemy[asyncio]`` target must be used.
45+
5446

5547
Synopsis - Core
5648
---------------

0 commit comments

Comments
 (0)