Skip to content

Commit 0be89aa

Browse files
committed
Switch to cython pure python mode
Replaces the pyx files with py files that can be both compiled by cython or imported as is by python. This avoids the need of duplicating the code to have a python only fallback. The cython files are also reorganized to be in the module they use instead of all being in the cyextension package, that has been removed. The performance is pretty much equal between main and this change. A detailed comparison is at this link https://docs.google.com/spreadsheets/d/1jkmGpnCyEcPyy6aRK9alElGjxlNHu44Wxjr4VrD99so/edit?usp=sharing Change-Id: Iaed232ea5dfb41534cc9f58f6ea2f912a93263af
1 parent e6ad64b commit 0be89aa

45 files changed

Lines changed: 1932 additions & 2226 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ test/test_schema.db
4040
/db_idents.txt
4141
.DS_Store
4242
.vs
43+
44+
# cython complied files
45+
/lib/**/*.c
46+
/lib/**/*.cpp
47+
# cython annotated output
48+
/lib/**/*.html

MANIFEST.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ recursive-include tools *.py
88

99
# for some reason in some environments stale Cython .c files
1010
# are being pulled in, these should never be in a dist
11-
exclude lib/sqlalchemy/cyextension/*.c
12-
exclude lib/sqlalchemy/cyextension/*.so
11+
exclude lib/sqlalchemy/**/*.c
12+
exclude lib/sqlalchemy/**/*.so
1313

14-
# include the pyx and pxd extensions, which otherwise
14+
# include the pxd extensions, which otherwise
1515
# don't come in if --with-cextensions isn't specified.
16-
recursive-include lib *.pyx *.pxd *.txt *.typed
16+
recursive-include lib *.pxd *.txt *.typed
1717

1818
include README* AUTHORS LICENSE CHANGES* tox.ini
1919
prune doc/build/output

doc/build/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
# sys.path.insert(0, os.path.abspath("."))
2626

2727

28-
os.environ["DISABLE_SQLALCHEMY_CEXT_RUNTIME"] = "true"
29-
3028
# -- General configuration --------------------------------------------------
3129

3230
# If your documentation needs a minimal Sphinx version, state it here.

lib/sqlalchemy/cyextension/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/sqlalchemy/cyextension/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)