]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Enable zzzeeksphinx module prefixes
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Apr 2020 19:18:02 +0000 (15:18 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 14 Apr 2020 17:01:03 +0000 (13:01 -0400)
commit6a26da0efb1d18936dd036986d8aa3e0ba99b56e
tree2cb1a17e590baf2e323b8dec07b545ea8ac92ab7
parent8aa9b706067c2537cec98c74e2afc42011330d8d
Enable zzzeeksphinx module prefixes

zzzeeksphinx 1.1.2 in git can now convert short
prefix names in a configured lookup to fully qualified module
names, so that
we can have succinct and portable pyrefs
that still resolve absolutely.
It also includes a formatter that will format all pyrefs
in a fully consistent way regardless of the package path,
by unconditionally removing all package tokens but always
leaving class names in place including for methods, which
means we no longer have to deal with tildes in pyrefs.

The most immediate goal of the absolute prefixes is
that we have lots of
"ambiguous" names that appear in muliple places, like select(),
ARRAY, ENUM etc.   With the incoming future packages there
is going to be lots of name overlap so it is necessary
that all names eventually use absolute package paths
when Sphinx receives them.

In multiple stages, pyrefs will be converted using the
zzzeeksphinx tools/fix_xrefs.py tool so that doclinks can
be made absolute using symbolic prefixes.

For this review, the actual search and replace of symbols
is not performed, instead some general cleanup to prepare
the docs as well as a lookup file used by the tool
to do the conversion.   this relatively small patch will
be backported
with appropriate changes to 1.3, 1.2, 1.1 and the tool
can then be run on each branch individually.  We are shooting
for almost no warnings at all for master (still a handful
I can't figure out which don't seem to have any impact)
, very few for 1.3,
and for 1.2 / 1.1 we hope for a significant reduction
in warnings.

Overall for all versions pyrefs should
always point to the correct target, if they are in fact
hyperlinked.  it's better for a ref to go nowhere and
be plain text than go to the wrong thing.  Right now,
hundreds of API links are pointing to the wrong thing
as they are ambiguous names such as refresh(), insert(),
update(), select(), join(), JSON etc. and Sphinx sends these all
to essesntially random destinations among as many as five
or six possible choices per symbol.  A shorthand system
that allows us to use absolute refs without having
to type out a full blown absoulte module is the only
way this is going to work, and we should ultimately
seek to abandon any use of prefix dot for lookups.  Everything
should be on an underscore token so at the very least the module
spaces can be reorganized without having to search and replace
the entire documentation every time.

Change-Id: I484a7329034af275fcdb322b62b6255dfeea9151
(cherry picked from commit d8d755ad619e2ee78f2c7cb60ae9a1feee4c6d76)
(cherry picked from commit 8f992000a4ed59d5f91796cef5cec7697ce464fc)
28 files changed:
doc/build/Makefile
doc/build/changelog/changelog_07.rst
doc/build/changelog/changelog_08.rst
doc/build/changelog/changelog_10.rst
doc/build/changelog/changelog_12.rst
doc/build/changelog/migration_08.rst
doc/build/changelog/migration_09.rst
doc/build/conf.py
doc/build/core/connections.rst
doc/build/core/dml.rst
doc/build/core/inspection.rst
doc/build/core/selectable.rst
doc/build/faq/metadata_schema.rst
doc/build/faq/performance.rst
doc/build/orm/extensions/declarative/inheritance.rst
doc/build/orm/join_conditions.rst
doc/build/orm/mapping_api.rst
doc/build/orm/session_state_management.rst
doc/build/replacments/fix_xref_state.txt [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/ext/declarative/api.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/util/deprecations.py
tox.ini