Skip to content

Commit

Permalink
- Drop (unreleased) support for Python 3.3 and Python 3.4 (the ``pers…
Browse files Browse the repository at this point in the history
…istent``

  package no longer supports these versions).

- Drop (unreleased) support for Python 3.5 (too difficult to build correctly --
  even with pyenv -- to bother).

- Drop (released) support for Python 2.6 and 3.2.

- Add support for Python 3.6, 3.7, 3.8, 3.9, 3.10 (thanks to Thierry Florac).

- Use pytest instead of python setup.py test -q in tox.ini.

- Change how cross-version coverage is computed in tests.

- Remove unused hypatia/text/ricecode.py file.

- Change building of docs slightly to cope with modified github protocols.
  Some warnings are unearthed with newer Sphinx, which I've not
  caught by turning warnings into errors yet, because I don't understand them.
  • Loading branch information
mcdonc committed Apr 18, 2022
1 parent 21eb262 commit 20148b6
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 244 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
dist/
*~
.tox/
nosetests.xml
hypatia/coverage.xml
distribute-*.gz
coverage-py*.xml
coverage.xml
env*/
.build/
bin/
Expand Down
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
Expand Down
20 changes: 18 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
0.4 (unreleased)
----------------

- Add support for Python 3.5.
- Drop (unreleased) support for Python 3.3 and Python 3.4 (the ``persistent``
package no longer supports these versions).

- Drop support for Python 2.6 and 3.2.
- Drop (unreleased) support for Python 3.5 (too difficult to build correctly --
even with pyenv -- to bother).

- Drop (released) support for Python 2.6 and 3.2.

- Add support for Python 3.6, 3.7, 3.8, 3.9, 3.10 (thanks to Thierry Florac).

- Use pytest instead of python setup.py test -q in tox.ini.

- Change how cross-version coverage is computed in tests.

- Remove unused hypatia/text/ricecode.py file.

- Change building of docs slightly to cope with modified github protocols.
Some warnings are unearthed with newer Sphinx, which I've not
caught by turning warnings into errors yet, because I don't understand them.

- Don't modify queries attribute when optimizing And or Or, return a new
instance instead. This change is needed to open new optimization
Expand Down
2 changes: 1 addition & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:mod:`hypatia` Change History
=============================

.. literalinclude:: ../CHANGES.txt
.. include:: ../CHANGES.rst
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
_themes = os.path.join(cwd, '_themes')

if not os.path.isdir(_themes):
call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git',
call([git, 'clone', 'https://github.com/Pylons/pylons_sphinx_theme.git',
'_themes'])
else:
os.chdir(_themes)
Expand Down
214 changes: 0 additions & 214 deletions hypatia/text/ricecode.py

This file was deleted.

4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
python_files = test*.py
addopts = --deselect=hypatia/tests/test_functional.py::TestCatalogQueryBase

10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ def errprint(x):
'zope.interface',
]

testing_extras = ['nose', 'coverage', 'nosexcover']
docs_extras = ['Sphinx']
testing_extras = ['pytest', 'coverage']

docs_extras = [
'Sphinx >= 3.0.0', # Force RTD to use >= 3.0.0
]


setup(name='hypatia',
version='0.4.dev0',
Expand All @@ -83,8 +87,6 @@ def errprint(x):
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand Down
61 changes: 45 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,26 +1,55 @@
[tox]
envlist =
py27,py34,py35,py36,py37,py38,py39,py310,cover,docs
py27,py36,py37,py38,py39,py310,{py2,py3}-cover,coverage,docs

[testenv]
commands =
python setup.py -q test -q
pip install -e .[testing]
pytest
extras =
testing

[testenv:cover]
basepython =
python3.9
commands =
pip install hypatia[testing]
nosetests --with-xunit --with-xcoverage
[testenv:py2-cover]
basepython = python2.7
commands =
#coverage run setup.py -q test -q
pip install -e .[testing]
coverage run --source=hypatia {envbindir}/pytest
coverage xml -o coverage-py2.xml
setenv =
COVERAGE_FILE=.coverage.py2
extras =
testing

# we separate coverage into its own testenv because a) "last run wins" wrt
# cobertura jenkins reporting and b) pypy and jython can't handle any
# combination of versions of coverage and nosexcover that i can find.
[testenv:py3-cover]
basepython = python3.10
commands =
#coverage run setup.py -q test -q
pip install -e .[testing]
coverage run --source=hypatia {envbindir}/pytest
coverage xml -o coverage-py3.xml
setenv =
COVERAGE_FILE=.coverage.py3
extras =
testing

[testenv:docs]
[testenv:coverage]
basepython =
python3.9
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
python2.7
skip_install = true
commands =
coverage erase
coverage combine
coverage xml
coverage report -m --fail-under=100
deps =
Sphinx
coverage
setenv =
COVERAGE_FILE=.coverage

[testenv:docs]
whitelist_externals = make
commands =
make -C docs {posargs:html} BUILDDIR={envdir} "SPHINXOPTS=-E"
extras =
docs

0 comments on commit 20148b6

Please sign in to comment.