Commit Graph

113 Commits

Author SHA1 Message Date
Gord Thompson ae33920f81 Add py3.8, py3.9 token to setup.py
Fixes: #5113

<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
Add py3.8 and py3.9 tokens to setup.py

### 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: #5115
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5115
Pull-request-sha: 5ae662f1ec

Change-Id: I1313df9bd117b1356c1d06d588e8e04a07ba4e39
(cherry picked from commit 9a7c65c908)
2020-01-27 16:49:47 -05:00
Mike Bayer 3cd1b5f762 Work around setuptools issue #1902
Added a workaround for a setuptools-related failure that has been observed
as occurring on Windows installations, where setuptools is not correctly
reporting a build error when the MSVC build dependencies are not installed
and therefore not allowing graceful degradation into non C extensions
builds.

Setuptools issue https://github.com/pypa/setuptools/issues/1902

Fixes: #4967
Change-Id: I5e21e7e78cb6d927b18afce64cacf8643b98354e
(cherry picked from commit 4a2dd4902a)
2019-11-08 11:25:05 -05:00
Mike Bayer 9a7b95093b Reformat license name
While we have the OSI classifier for "MIT License", it looks
like for the "license" field, this is normally just the word
"MIT" and not "MIT License".   While the pypa docs suggest we
only need it as the OSI classifier, keep it also in "license"
in order to appease common tooling.

Change-Id: Ife51bbc74d6c1b8ab9a736024818fbba35316e17
(cherry picked from commit fff65b814a)
2019-05-28 09:48:00 -04:00
Mike Bayer 4dfc4a170a Add documentation / tracker URLs for pypi
Change-Id: I379b3d9e59ff8cda17c2d738fde794249f105510
(cherry picked from commit 9feec16b14)
2019-05-27 17:26:55 -04:00
Mike Bayer 1e278de4cc Post black reformatting
Applied on top of a pure run of black -l 79 in
I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9,  this set of changes
resolves all remaining flake8 conditions for those codes
we have enabled in setup.cfg.

Included are resolutions for all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.

Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
2019-01-06 18:23:11 -05:00
Mike Bayer 1e1a38e780 Run black -l 79 against all source files
This is a straight reformat run using black as is, with no edits
applied at all.

The black run will format code consistently, however in
some cases that are prevalent in SQLAlchemy code it produces
too-long lines.   The too-long lines will be resolved in the
following commit that will resolve all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.

Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
2019-01-06 17:34:50 +00:00
Mike Bayer 404e69426b Assorted pre-Black fixes
Fixes to the test suite, a few errant imports, and setup.py:

- mysql and postgresql have unused 'json' imports; remove
- postgresql is exporting the 'json' symbol, remove
- make sure setup.py can find __version__ using " or '
- retry logic in provision create database for postgresql fixed
- refactor test_magazine to use cls.tables rather than globals
- remove unused class in test_scoping
- add a comment to test_deprecations that this test suite itself
  is deprecated
- don't use mapper() and orm_mapper() in test_unitofwork, just
  use mapper()
- remove dupe test_scalar_set_None test in test_attributes
- Python 2.7 and above includes unittest.SkipTest, remove pre-2.7
  fallback
- use imported SkipTest in profiling
- declarative test_reflection tests with "reflectable_autoincrement"
  already don't run on oracle or firebird; remove conditional logic
  for these, which also removes an "id" symbol
- clean up test in test_functions, remove print statement
- remove dupe test_literal_processor_coercion_native_int_out_of_range
  in test/sql/test_types.py
- fix psycopg2_hstore ref

Change-Id: I7b3444f8546aac82be81cd1e7b6d8b2ad6834fe6
2019-01-05 23:51:34 -05:00
Mike Bayer 664290ab54 - block py.test 3.9.1 and 3.9.2, 3.9.3 is OK
Change-Id: I35ecd78b92ea420ef7909de65f82e005b92bf986
2018-11-02 16:54:21 -04:00
Mike Bayer 580d114405 Pin pytest *before* 3.9.1 totally
Unfortunately they have released
3.9.2 before fixing issue 4181, which means we will have to
re-pin a third time after they eventually release with
a fix

Change-Id: I9b6fab1b535f883a035f002264c41ad0166790ab
Reference: https://github.com/pytest-dev/pytest/issues/4181
2018-10-24 09:09:32 -04:00
Mike Bayer b4d42a84e2 block py.test 3.9.1
references:

https://github.com/pytest-dev/pytest/issues/4181

Change-Id: I216fde19dd0f5c4910d76c08400f2329b09ad584
2018-10-17 11:49:47 -04:00
Hugo fb9f4c4d44 Add python_requires and update classifiers
- bump minimum Python 3 version to 3.4 in docs
- set up setup.py classifiers to cover 2.7, 3.4, 3.5, 3.6, 3.7 explicitly
- add python_requires

These are also the ones supported by the core Python team.
https://en.wikipedia.org/wiki/CPython#Version_history

Change-Id: I2ffa632c73c39bf38ba9d8b5dcc86d552b61aa68
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/468
2018-08-26 13:53:37 -04:00
Alex Rothberg 5469dd1b8f Add postgresql_psycopg2binary install extra that installs psycopg2-binary
Fixes: #4306
Change-Id: I26edc1a4ac8a7f9f3f258bb03009ebfa4cc00e1a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/465
2018-07-18 10:41:26 -04:00
Mike Bayer ef78334c0f Add oracle, mssql to profiling
As we are changing Oracle typing *again*, we should start tracking
if we trip over a big performance hit on the unicode stuff.

Change-Id: I72719cca4b9424171b32e1f2e58d655426e3bbba
2018-06-18 17:42:29 -04:00
Mike Bayer 2c594da214 Isolate memory tests in forks
Swing the biggest hammer, run multiprocessing.Process() for
each memusage test individually so that they are fully isolated
from the parent process and any side effects of pytest-xdist

Also add --nomemory as a shortcut to exclude_tags=memory-intensive
and add this to the setup.py test runner as the memory tests
should not be running for quick runs

Change-Id: I3c16c781e21b33deb939a64e77a6e0e41fb86922
2017-08-14 12:41:58 -04:00
Mike Bayer 1da9d37521 - bump minimum python version to 2.7
- add placeholder 1.2 release documentation, update intro numbers

Change-Id: I9f9969cbb9e95c2f750a5c16798e92c35a5ef6cf
2017-03-10 14:28:49 -05:00
Mike Bayer f2028dc5af - further changes to avoid pytest warnings
Change-Id: Ia83a996ff97a6ba54a0666a32241e570f3852ab4
2017-01-17 15:51:02 -05:00
Mark Sandan 42078107f1 update pytest good practices link in PyTest class
Change-Id: Ie96edd05e962663e9ddeeda85b24858caabd3bfd
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/262
2016-06-16 11:51:53 -04:00
Mike Bayer 6b05150392 - add a new qualifier "native" vs. "dbapi" unicode to avoid
profiling problems here
- add extras_require to setup.py for the most common DBAPIs
- rework tox.ini to use extras, specify a test matrix built in
2016-01-24 18:28:09 -05:00
Donald Stufft 39517d1046 Tell Wheel to generate platform and interpreter specific wheels
By telling wheel that we have extension modules, even though we
have none, wheel will create a Wheel which is platform and
interpreter specific. This will ensure that the pure Python wheels
on PyPy do not trigger installs on CPython without the C speedups.
2015-08-13 14:57:53 -04:00
Mike Bayer 44420423de - we can again use setuptools.find_packages since we require setuptools
- clean up other things we aren't using anymore
2015-08-13 14:48:18 -04:00
Mike Bayer 5ab9ab7940 - remove "distutils-only" mode, use setuptools only
- add first-class "pytest" runner to setup.py, fixes #3489
- remove references to setuptools Feature and mark that "--without-cextensions"
 is removed, fixes #3500
2015-07-24 18:52:25 -04:00
Mike Bayer 9554759642 - have python setup.py test use xdist with -q 2014-08-08 13:51:58 -04:00
Brian Jarrett 304e5b2a11 fixed style to conform to PEP8 2014-07-10 16:28:49 -06:00
Mike Bayer 99350b159f - Fixed bug where "python setup.py test" wasn't calling into
distutils appropriately, and errors would be emitted at the end
of the test suite.
2014-07-09 15:50:17 -04:00
Mike Bayer 56ef17e0f7 - we aren't supporting py2.5 so just simplify this import for platform, re: #2986 2014-03-22 17:49:35 -04:00
Mike Bayer ec97911ed9 - Adjusted `setup.py` file to support the possible future
removal of the ``setuptools.Feature`` extension from setuptools.
If this keyword isn't present, the setup will still succeed
with setuptools rather than falling back to distutils.  C extension
building can be disabled now also by setting the
DISABLE_SQLALCHEMY_CEXT environment variable.  This variable works
whether or not setuptools is even available. fixes #2986
- using platform.python_implementation() in setup.py to detect CPython.
I've tested this function on OSX and linux on Python 2.6 through 3.4,
including 3.1, 3.2, 3.3.
Unfortunately, on OSX + 3.2 only, it seems to segfault.  I've tried
installing 3.2.5 from the python.org .dmg, building it from source,
and also blew away the whole 3.2 directory, something seems to be wrong
with the "platform" module on that platform only, and there's also no
issue on bugs.python.org; however, I'm going with
it anyway. If someone is using 3.2 on OSX they really should be upgrading.
2014-03-22 17:31:50 -04:00
Mike Bayer ea05a23218 - Support has been added for pytest to run tests. This runner
is currently being supported in addition to nose, and will likely
be preferred to nose going forward.   The nose plugin system used
by SQLAlchemy has been split out so that it works under pytest as
well.  There are no plans to drop support for nose at the moment
and we hope that the test suite itself can continue to remain as
agnostic of testing platform as possible.  See the file
README.unittests.rst for updated information on running tests
with pytest.

The test plugin system has also been enhanced to support running
tests against mutiple database URLs at once, by specifying the ``--db``
and/or ``--dburi`` flags multiple times.  This does not run the entire test
suite for each database, but instead allows test cases that are specific
to certain backends make use of that backend as the test is run.
When using pytest as the test runner, the system will also run
specific test suites multiple times, once for each database, particularly
those tests within the "dialect suite".   The plan is that the enhanced
system will also be used by Alembic, and allow Alembic to run
migration operation tests against multiple backends in one run, including
third-party backends not included within Alembic itself.
Third party dialects and extensions are also encouraged to standardize
on SQLAlchemy's test suite as a basis; see the file README.dialects.rst
for background on building out from SQLAlchemy's test platform.
2014-03-03 15:55:17 -05:00
Mike Bayer a6adc0a53e - The C extensions are ported to Python 3 and will build under
any supported CPython 2 or 3 environment. [ticket:2161]
2013-07-26 20:50:18 -04:00
Mike Bayer b38a76cd1d - replace most explicitly-named test objects called "Mock..." with
actual mock objects from the mock library.  I'd like to use mock
for new tests so we might as well use it in obvious places.
- use unittest.mock in py3.3
- changelog
- add a note to README.unittests
- add tests_require in setup.py
- have tests import from sqlalchemy.testing.mock
- apply usage of mock to one of the event tests.  we can be using
this approach all over the place.
2013-06-30 18:35:12 -04:00
Mike Bayer a5c9907d40 don't need 2to3 2013-04-28 15:01:26 -04:00
Mike Bayer 17790c9896 - revert mistaken checkin 2013-02-06 15:00:44 -05:00
Mike Bayer d21f4d8925 - need autoincrement here 2013-02-06 12:52:37 -05:00
Mike Bayer 04e126dd49 - revert the "basedir" thing - running setup.py from the currdir is unfortunately part of the
distutils docs (http://docs.python.org/install/index.html#platform-variations)
2012-09-29 13:21:15 -04:00
Mike Bayer 00e29c4cc6 - enhance setup.py to support being run from outside the current directory. hopefully there's no
gotchas with this on other platforms.
2012-09-29 13:08:07 -04:00
Mike Bayer 819ec8e13f - add new C extension "utils", so far includes distill_params
- repair test_processors which wasn't hitting the python functions
- add another suite to test_processors that does distill_params
2012-08-07 15:23:11 -04:00
Mike Bayer 27913554a8 trailing whitespace bonanza 2012-07-28 15:50:05 -04:00
Philip Jenvey 4d43079e34 unmonkeypatch the 2to3 preprocessor so we don't disturb subsequent runs
patch from mcdonc
fixes #2421
2012-03-02 00:21:18 -08:00
Mike Bayer 6d333bc5a8 modernize the README 2012-01-26 11:44:34 -05:00
Mike Bayer d628967ad2 add supported implementations 2011-12-03 12:39:41 -05:00
Mike Bayer dc75e0c683 - Added a workaround for Python bug 7511 where
failure of C extension build does not
raise an appropriate exception on Windows 64
bit + VC express [ticket:2184]
2011-06-05 11:58:26 -04:00
Mike Bayer 6d14c69edc this will also move back to prod/stable 2011-05-20 15:15:03 -04:00
Philip Jenvey 8b8fb2902b might as well explicitly disable the cext on Jython too 2011-04-22 19:38:39 -07:00
Mike Bayer fcded554df - rework setup.py script to work with:
- Python 3
   - Python 3 builds if Distribute isn't installed
- rework install documentation again
- raise if doc build with mako < 0.4.1
- Python 3.1 builds force doctest parse but then fails due to distribute bug,
  so remove usage of backslash \\ in hybrid.py docstring
- put in the latest ez_setup.py
2011-04-17 13:22:33 -04:00
Philip Jenvey e6fd32e173 explicitly disable the cextension on Python 3 until it's updated for it 2011-04-13 18:45:58 -07:00
Philip Jenvey a2094b1b6f enable the cextension by default, falling back to pure python when the
extension fails to compile
fixes #2129
2011-04-13 18:32:15 -07:00
Philip Jenvey 74f2e214c4 minor cleanup 2011-04-13 16:33:25 -07:00
Mike Bayer 6cd59ee663 0.7 will be beta classifier to start 2011-02-12 17:14:34 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 39fddb8bda - set sqla_nose as the setup.py test runner - works ! 2010-11-16 13:33:48 -05:00
Mike Bayer 756aa2724e first step of [ticket:1949], remove the setuptools aspect
of the plugin, move it to test/bootstrap
2010-11-15 19:25:34 -05:00