Commit Graph

69 Commits

Author SHA1 Message Date
Federico Caselli 9e7c068d66 try fixing github actions again
Change-Id: Iaf801a028510f276cf94b4999f129de8f4eb590c
2022-02-25 22:08:09 +01:00
Mike Bayer 96e197f3d0 repair GH actions syntax
the commit in 51e6a62ab3
included a comment that appears to not be accepted

Change-Id: I1e56293e0e75c0440073bff7190b4961cfebc353
2022-02-25 13:26:02 -05:00
Mike Bayer 51e6a62ab3 block pypy for now
the most recent pypy 7.3.8 series (3.7 and 3.9 included, likely
3.8 as well) have installed a 9 year old version of SQLite,
and additionally seem to have some other behavioral changes
like formatting of exception messages that is breaking
some tests.  as we are waiting on a response at [1]
remove pypy testing for now.

[1] https://foss.heptapod.net/pypy/pypy/-/issues/3690

Change-Id: I66650635111e71241b5c45a778954544c8d2490e
2022-02-25 12:40:21 -05:00
Mike Bayer 8370ac2bff fix memusage test for 2.0
also drop 3.7, 3.8 from mypy GH action

Change-Id: Ib273219edf88ad66f591e044f0984bd364b395f5
2022-02-14 15:51:45 -05:00
Arie Bovenberg 38cdd3946c add slotscheck to CI
As discussed in #7589, `slotscheck` can prevent slots-related mistakes from creeping back in.

Plan for now is to have slotscheck part of the "lint" tests
(renamed from pep8) that will run for CI and github actions.

To support slotscheck's runtime nature, slotscheck is
run twice, first with cython exts enabled and then
with them disabled via new environment variable.
Also added sqlalchemy[mypy] dependency to support slots
checking the mypy plugin.

Found and fixed one more `__slots__` issue by disabling C
exts.

Closes: #7670
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7670
Pull-request-sha: 3e77fe5449

Change-Id: I90cdd284cdcee316a38856ba94d72ffc98947c5a
2022-02-07 13:51:11 -05:00
Mike Bayer ff1ab665cb mypy: sqlalchemy.util
Starting to set up practices and conventions to
get the library typed.

Key goals for typing are:

1. whole library can pass mypy without any strict
   turned on.
2. we can incrementally turn on some strict flags on a per-package/
   module basis, as here we turn on more strictness for sqlalchemy.util, exc,
   and log
3. mypy ORM plugin tests work fully without sqlalchemy2-stubs
   installed
4. public facing methods all have return types, major parameter
   signatures filled in also
5. Foundational elements like util etc. are typed enough so that
   we can use them in fully typed internals higher up the stack.

Conventions set up here:

1. we can use lots of config in setup.cfg to limit where mypy
   is throwing errors and how detailed it should be in different
   packages / modules.  We can use this to push up gerrits
   that will pass tests fully without everything being typed.
2. a new tox target pep484 is added.  this links to a new jenkins
   pep484 job that works across all projects (alembic, dogpile, etc.)

We've worked around some mypy bugs that will likely
be around for awhile, and also set up some core practices
for how to deal with certain things such as public_factory
modules (mypy won't accept a module from a callable at all,
so need to use simple type checking conditionals).

References: #6810
Change-Id: I80be58029896a29fd9f491aa3215422a8b705e12
2022-01-24 15:14:01 -05:00
Hugo van Kemenade 0980de38a8 Remove redundant code for EOL Python <= 3.6
<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
<!-- Describe your changes in detail -->

There's a few bits and pieces of code to support Python <= 3.6 which are no longer needed and can be removed, to slightly simplify the codebase.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
	- Good to go, no issue or tests are needed
- [x] A short code fix
	- please include the issue number, and create an issue if none exists, which
	  must include a complete example of the issue.  one line code fixes without an
	  issue and demonstration will not be accepted.
	- Please include: `Fixes: #<issue number>` in the commit message
	- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
	- please include the issue number, and create an issue if none exists, which must
	  include a complete example of how the feature would look.
	- Please include: `Fixes: #<issue number>` in the commit message
	- please include tests.

**Have a nice day!**

Closes: #7544
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7544
Pull-request-sha: 282b4a9128

Change-Id: I9ddf15fcf72551d52e3f027f337c7fee4aa9083b
2022-01-06 12:14:33 -05:00
Federico Caselli 76fa211620 Replace c extension with cython versions.
Re-implement c version immutabledict / processors / resultproxy / utils with cython.
Performance is in general in par or better than the c version
Added a collection module that has cython version of OrderedSet and IdentitySet

Added a new test/perf file to compare the implementations.
Run ``python test/perf/compiled_extensions.py all`` to execute the comparison test.

See results here: https://docs.google.com/document/d/1nOcDGojHRtXEkuy4vNXcW_XOJd9gqKhSeALGG3kYr6A/edit?usp=sharing

Fixes: #7256
Change-Id: I2930ef1894b5048210384728118e586e813f6a76
Signed-off-by: Federico Caselli <cfederico87@gmail.com>
2021-12-17 21:29:05 +01:00
Federico Caselli 4427ec6821 remove python2 from workflows
Change-Id: Ib2da811acbad291dc9bbe798c84f2309f5d0f21e
2021-10-30 21:19:52 +02:00
Federico Caselli 822cf98ecc Fix wheels generation for python 3.10+
Change-Id: I0124bb1bb164fbf2eadf41be066773a2e316b3fe
2021-10-20 22:28:55 +02:00
Federico Caselli de9db9940f Add support for Python 3.10
<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
<!-- Describe your changes in detail -->

Python 3.10 was released last week.

Test on Python 3.10 and add the Trove classifier.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical error fix
	- Good to go, no issue or tests are needed
- [x] A short code fix
	- please include the issue number, and create an issue if none exists, which
	  must include a complete example of the issue.  one line code fixes without an
	  issue and demonstration will not be accepted.
	- Please include: `Fixes: #<issue number>` in the commit message
	- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
	- please include the issue number, and create an issue if none exists, which must
	  include a complete example of how the feature would look.
	- Please include: `Fixes: #<issue number>` in the commit message
	- please include tests.

**Have a nice day!**

^ Which checklist option should I use?

Should I do something to trigger/test all the workflows?

Closes: #7179
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7179
Pull-request-sha: 5df7ff0e0d

Change-Id: Ib7ecc0de75f7dffdf05db13563f7be10898e67ba
2021-10-11 15:47:18 -04:00
Mike Bayer b91e76a4f7 rename elements to main
There are still some SQLite / MySQL specific occurrences
of "master" but this is most of it.

Change-Id: I0144c992e2f0207777e20e058b63a11c031986b9
2021-10-11 12:32:45 -04:00
Federico Caselli ab6605aee2 add pep8 to github workflow
Change-Id: I579e914e7bea38f73304f4d624649f09554ab21c
2021-09-30 21:04:22 +02:00
Federico Caselli 77071310f4 improve bug report template. Many people don't know what dbapi is
Change-Id: Ibbe47a159292d333ae58fe046e5c32e949856d6d
2021-09-28 20:15:15 +02:00
Federico Caselli b1c50ad223 Add async tests to the github workflow
Fixes: #6967
Change-Id: I222cb5bdedf572e734c827d72bcbced202cdd62f
2021-09-06 22:27:07 +02:00
Federico Caselli 6bc755d2ab New issue templates forms
Noting fancy. we could add checkbox and/or dropdowns if needed

**To test**: to go my fork. Link https://github.com/CaselIT/sqlalchemy/issues/new/choose

See docs at
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema

Closes: #6809
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6809
Pull-request-sha: 21beb5a441

Change-Id: I74c671aa2790b9f08c20b0659625c8a91b5b9c72
2021-07-26 10:00:23 -04:00
Federico Caselli 7e7d097a63 Add mypy tests on github.
Support skipping mypy tests based on interpreter version

Change-Id: I98963318dbb2e7e097ad5518e0e4022349ca9779
2021-07-22 23:09:18 +02:00
Federico Caselli a457e555e0 add python 2.7 to pr workflow to help catch py3 only issues
Change-Id: If26b3c2ca84636859adc7623ec912f9e44cbbc3c
2021-07-08 23:28:49 +02:00
Federico Caselli fb81f9c8d9 Replace all http:// links to https://
Also replace http://pypi.python.org/pypi with https://pypi.org/project

Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
2021-07-04 20:54:33 +02:00
Federico Caselli 4c6f10d7a3 Add python 3.10 to github pipeline
Change-Id: Iaa5c3ec2ad2bf70da412cc79871d22b7ea3bf9a6
2021-05-27 21:36:15 +02:00
Mike Bayer 0816144afc Add a template for use case
These are distinct from features.

Change-Id: I97caa25c94bdd71a3dd227614d03c3891cea5e87
2021-05-25 14:37:12 -04:00
Mike Bayer e5619d38b7 put bug guidelines in html comment
Change-Id: I3659b20f93a5059029176cc16c2ae4a3fde7c72e
2021-05-25 14:32:45 -04:00
Mike Bayer c379f80b4e add missing config.yml from previous commit
Change-Id: Ia23ca00c548bde416ee8282d470dd835f6d07f45
2021-05-16 12:47:40 -04:00
Mike Bayer 709c0d3e8b rework issue template
only bug reports are encouraged through "issues"

all other questions / features go through discussions

links to external help resources

Change-Id: I6ac2dc460a3bf9fbdaf63c1269e9ba7a5501f181
2021-05-16 12:45:59 -04:00
Mike Bayer f8bb1c1022 formatting
Change-Id: I69092dc6c2121bb780aed1b145ccd3eaabb0ff5d
2021-05-09 12:14:42 -04:00
Mike Bayer 334b83643e remove extra verbiage
having all this verbiage in the template itself means
all the issues will have all this verbiage in them, so
pull it back again.  there is unfortunately no way to
cleanly direct reporters through the guidelines with github.

Change-Id: I9835e412fac244b639d1fe6970e4dab43ab95117
2021-05-09 11:54:15 -04:00
Mike Bayer 17e85e3e8f fix quote.
I really wish there were a way to get the guidelines to be
HTML formatted.

Change-Id: I22de6d40be9940e152c829a7c9a1cfc0eaf2211c
2021-05-09 11:52:04 -04:00
Mike Bayer 6e4952f8d1 trying a different issue template
Change-Id: Ibb4fda98f4fdef569ce0bb9435849f0009ff1a82
2021-05-09 11:19:38 -04:00
Federico Caselli 88c0ff61fa Use sqlalchemyorg action forks for the releases.
Change-Id: Ib7ccde2fbcaefe80859941e5e46bebf4fe4ea689
2021-05-04 22:14:35 +02:00
mike bayer 80281c8907 Merge "Minor optimization to the code" 2021-02-24 16:33:52 +00:00
Federico Caselli 6d67c00b13 Update the create wheel action:
- use manylinux1 for python 2 since manylinux2010 has dropped
  support for it
- use a different action to upload the artifacts to the release so
  that a single step can be used
- also generate manylinux2014 wheels for python3

Change-Id: Ibc1cc31737a90c40afc7988308c58b471d2fec2f
2021-02-18 21:05:05 +01:00
Federico Caselli 629273a31b Minor optimization to the code
* remove the c version of distill params since it's actually slower than
the python one
* add a function to langhelpers to check if the cextensions are active
* minor cleanup to the OrderedSet implementation

Change-Id: Iec3d0c3f0f42cdf51f802aaca342ba37b8783b85
2021-02-18 20:37:22 +01:00
Mike Bayer ce03f72b74 add sqlalchemy to FUNDING
Change-Id: I764189f0360b97948c6222a3ff422d7259a55ef2
2021-01-26 16:53:34 -05:00
Mike Bayer 5b05041a80 Disallow bug reports based on flask and others
I don't have time to rewrite test cases to not use
these systems.

Change-Id: I76aeec67f97749da1caf2ccfa7d21c27bff51ab0
2020-11-30 11:45:58 -05:00
Federico Caselli b0e6dccfb6 Fix wheel generation
Avoid passing LD_LIBRARY_PATH variable to the docker image used
to generate the wheels

Change-Id: I418a9574a7f49695984b1c68c997fc02f0450c12
2020-11-02 23:08:52 +01:00
mike bayer d0b5ce2ad4 Merge "Drop python 3.5 support" 2020-10-10 16:02:26 +00:00
Federico Caselli 9b3812a0c6 Drop python 3.5 support
Fixes: #5634
Change-Id: Ie8d4076ee35234b535a04e6fb9321096df3f648b
2020-10-08 21:32:09 +02:00
Federico Caselli 21e3276905 Add python 3.9 to ci test and wheel workflow
Change-Id: I3b80b836ca547fa92f324acb265180cdeea17611
2020-10-08 20:44:55 +02:00
Mike Bayer 42b761aefb add --notimingintensive; block from github jobs
this provides a front-end option to disable tests marked
as timing_intensive, all of which are in test_pool, which are more
fragile and aren't consistent on the
github runners.   also remove /reduce unnecessary time.sleep()
from two other pool tests that are not timing intensive.

note that this removes test_hanging_connect_within_overflow
from the github runs via the timing_intensive requirement.

I've also removed MockReconnectTest from exclusions as those are
really important tests and they use mocks so should not have
platform dependent issues.   Need to see what the
windows failures are.

Closes: #5633
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5633
Pull-request-sha: 166833e16e

Change-Id: Icb3d284a2a952e2495d80fa91e22e0b32a54340f
2020-10-07 00:16:53 -04:00
Federico Caselli c68f9fb878 Enable pypy tests on github workflow
Fixes: #5223
Change-Id: I0952e54ed9af2952ea340be1945311376ffc1ad2
2020-10-02 21:21:11 +02:00
Mike Bayer 4a9a991601 try out the github stale hook.
This will mark an issue with the "stale" label after
5 days and close after 7.

The goal is that it will mark "question" issues as stale
automatically.

it doesn't give us a way to link it to that label however,
and we have to define it in terms of labels to exclude.

Change-Id: I7c34f4e8fdf4ee0a15baa93b5831e5cdcf72dcc8
2020-09-23 12:04:18 -04:00
Federico Caselli e860060866 Update select usage to use the new 1.4 format
This change includes mainly that the bracketed use within
select() is moved to positional, and keyword arguments are
removed from calls to the select() function.  it does not
yet fully address other issues such as keyword arguments passed
to the table.select().

Additionally, allows False / None to both be considered
as "disable" for all of select.correlate(), select.correlate_except(),
query.correlate(), which establishes consistency with
passing of ``False`` for the legact select(correlate=False)
argument.

Change-Id: Ie6c6e6abfbd3d75d4c8de504c0cf0159e6999108
2020-09-08 17:13:48 -04:00
odidev f359908b56 ARM64 Support to Github Actions For Testing And Development Of Wheels
**Added**:
1. ARM64 jobs in Github Workflows For Testing And Development Of Wheels
2. Two script files for creating wheels and testing.

Resolves #5436

Signed-off-by: odidev <odidev@puresoftware.com>
Co-authored-by: Federico Caselli <cfederico87@gmail.com>
Closes: #5480
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5480
Pull-request-sha: 131ef520bb

Change-Id: Ia10dadd93365ba4beeefbd27c060bc077c2d7aeb
2020-08-25 00:06:17 +02:00
Federico Caselli e7875b39f8 Fix wheel check in linux workflow and improve it
Change-Id: I3b208674649e41bca0285d00aa11cc5975eb971a
2020-08-17 23:48:21 +02:00
Federico Caselli 8e89f04039 Improve github action workflows
- in create wheel set minimum versions of setuptools and wheel to avoid
  failure in python 3.5 with metadata configured in setup.cfg
- update action versions
- test also cext in the pull requests

Change-Id: Iaa5e4e4000c7faa688b51f2f41428c7dd7cae9c3
2020-07-27 22:44:36 +02:00
Mike Bayer 5060043e8e typo
Change-Id: I8b10309e47b07065893f6f41dfdbd67ad3e96bad
2020-07-01 20:10:38 -04:00
Mike Bayer 7a99eb4d0a enhance question template
we need to know all version / database information for questions
as well and users should be encouraged to follow MCVE form
if possible.

Change-Id: Ic3a4c4dbb021069b7765aa351a4d4d18a821160d
2020-07-01 20:08:42 -04:00
Federico Caselli fbb455e2e5 Add pip list to workflow, update setuptools
Change-Id: I2e32ba315a79dcfc7c5f79ed6517ac0cee4f55e3
2020-06-22 21:57:01 +02:00
Federico Caselli b67548ad78 Target real pypi in the create wheel workflow
Change-Id: Ic764aae08b9d45011048f21c8ee992222c078bd2
2020-05-20 21:31:16 +02:00
Federico Caselli d43192cf98 other minor cleanups
Change-Id: Ie7b8cec01ce36f2619b3e3bcb3152747be673ca3
2020-04-28 19:11:30 +02:00