Skip to content

Commit

Permalink
Merge pull request #204 from Djailla/version
Browse files Browse the repository at this point in the history
Prepare version  0.17.0
  • Loading branch information
tobgu authored Sep 7, 2020
2 parents bc975c9 + c5bd6b1 commit b05a77a
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 51 deletions.
85 changes: 60 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ matrix:
- name: linux-py35
language: python
python: 3.5
dist: xenial
sudo: required
services:
- docker
Expand All @@ -15,18 +14,17 @@ matrix:
name: linux-py35
language: python
python: 3.5
dist: xenial
sudo: required
services:
- docker
env:
- TOXENV=py35
- PIP=pip3
- CIBW_BUILD=cp35-*

- name: linux-py36
language: python
python: 3.6
dist: xenial
sudo: required
services:
- docker
Expand All @@ -38,18 +36,17 @@ matrix:
name: linux-py36
language: python
python: 3.6
dist: xenial
sudo: required
services:
- docker
env:
- TOXENV=py36
- PIP=pip3
- CIBW_BUILD=cp36-*

- name: linux-py37
language: python
python: 3.7
dist: xenial
sudo: required
services:
- docker
Expand All @@ -61,53 +58,92 @@ matrix:
name: linux-py37
language: python
python: 3.7
dist: xenial
sudo: required
services:
- docker
env:
- TOXENV=py37
- PIP=pip3
- CIBW_BUILD=cp37-*

- name: linux-py38
language: python
python: 3.8
sudo: required
services:
- docker
env:
- TOXENV=py38
- PIP=pip3
- CIBW_BUILD=cp3!-*
- arch: arm64
name: linux-py38
language: python
python: 3.8
sudo: required
services:
- docker
env:
- TOXENV=py38
- PIP=pip3
- CIBW_BUILD=cp38-*

- name: osx-py35
os: osx
language: generic
env:
- TOXENV=py35
- PIP=pip2
- PIP=pip3
- CIBW_BUILD=cp35-*
- CIBW_TEST_COMMAND="pushd {project}; tox ; popd"
- CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install -r requirements.txt"
install:
- ${PIP} install cibuildwheel==0.10.2
script:
- cibuildwheel --output-dir dist

- name: osx-py36
os: osx
language: generic
env:
- TOXENV=py36
- PIP=pip2
- PIP=pip3
- CIBW_BUILD=cp36-*
- CIBW_TEST_COMMAND="pushd {project}; tox ; popd"
- CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install -r requirements.txt"
install:
- ${PIP} install cibuildwheel==0.10.2
script:
- cibuildwheel --output-dir dist

- name: osx-py37
os: osx
language: generic
env:
- TOXENV=py37
- PIP=pip2
- PIP=pip3
- CIBW_BUILD=cp37-*
- CIBW_TEST_COMMAND="pushd {project}; tox ; popd"
- CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install -r requirements.txt"
install:
- ${PIP} install cibuildwheel==0.10.2
script:
- cibuildwheel --output-dir dist

- name: osx-py38
os: osx
language: generic
env:
- TOXENV=py38
- PIP=pip3
- CIBW_BUILD=cp38-*
- CIBW_TEST_COMMAND="pushd {project}; tox ; popd"
- CIBW_BEFORE_BUILD="${PIP} install -U pip; ${PIP} install -r requirements.txt"
install:
- ${PIP} install cibuildwheel==0.10.2
script:
- cibuildwheel --output-dir dist

- name: pypy3.5
language: python
python: pypy3.5
Expand All @@ -121,60 +157,59 @@ matrix:
- ${PIP} install -r requirements.txt
script:
- tox
- name: doctest36

- name: doctest38
language: python
python: 3.6
dist: trusty
python: 3.8
sudo: false
env:
- TOXENV=doctest36
- TOXENV=doctest38
- PIP=pip
install:
- ${PIP} install -U pip
- ${PIP} install -r requirements.txt
script:
- tox
- arch: arm64
name: doctest36
name: doctest38
language: python
python: 3.6
dist: xenial
python: 3.8
sudo: false
env:
- TOXENV=doctest36
- TOXENV=doctest38
- PIP=pip
install:
- ${PIP} install -U pip
- ${PIP} install -r requirements.txt
script:
- tox
- name: memorytest36

- name: memorytest38
language: python
python: 3.6
dist: trusty
python: 3.8
sudo: false
env:
- TOXENV=memorytest36
- TOXENV=memorytest38
- PIP=pip
install:
- ${PIP} install -U pip
- ${PIP} install -r requirements.txt
script:
- tox
- arch: arm64
name: memorytest36
name: memorytest38
language: python
python: 3.6
dist: xenial
python: 3.8
sudo: false
env:
- TOXENV=memorytest36
- TOXENV=memorytest38
- PIP=pip
install:
- ${PIP} install -U pip
- ${PIP} install -r requirements.txt
script:
- tox

install:
- ${PIP} install -U pip
- ${PIP} install cibuildwheel==0.10.2
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history
----------------
0.17.0, 2020-09-08
* Remove Python 2 support.

0.16.0, 2020-03-24
* No major updates but Python 2 support no longer guaranteed.
* Fix #192, 'ignore_extra' for 'pvector_field'. Thanks @ss18 for this!
Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pyrsistent

.. _Pyrthon: https://www.github.com/tobgu/pyrthon/

Pyrsistent is a number of persistent collections (by some referred to as functional data structures). Persistent in
Pyrsistent is a number of persistent collections (by some referred to as functional data structures). Persistent in
the sense that they are immutable.

All methods on a data structure that would normally mutate it instead return a new copy of the structure containing the
Expand Down Expand Up @@ -222,7 +222,7 @@ by providing an iterable of types.
Custom types (classes) that are iterable should be wrapped in a tuple to prevent their
members being added to the set of valid types. Although Enums in particular are now
members being added to the set of valid types. Although Enums in particular are now
supported without wrapping, see #83 for more information.

Mandatory fields
Expand Down Expand Up @@ -329,7 +329,7 @@ It is also possible to have fields with ``pyrsistent`` collections.
... map_int_to_str = pmap_field(int, str)
... vector_of_strs = pvector_field(str)
...
Serialization
*************
PRecords support serialization back to dicts. Default serialization will take keys and values
Expand Down Expand Up @@ -567,15 +567,15 @@ Pyrsistent is developed and tested on Python 3.5, 3.6, 3.7, 3.8 and PyPy3.
Performance
-----------
Pyrsistent is developed with performance in mind. Still, while some operations are nearly on par with their built in,
Pyrsistent is developed with performance in mind. Still, while some operations are nearly on par with their built in,
mutable, counterparts in terms of speed, other operations are slower. In the cases where attempts at
optimizations have been done, speed has generally been valued over space.
Pyrsistent comes with two API compatible flavors of PVector (on which PMap and PSet are based), one pure Python
Pyrsistent comes with two API compatible flavors of PVector (on which PMap and PSet are based), one pure Python
implementation and one implemented as a C extension. The latter generally being 2 - 20 times faster than the former.
The C extension will be used automatically when possible.
The pure python implementation is fully PyPy compatible. Running it under PyPy speeds operations up considerably if
The pure python implementation is fully PyPy compatible. Running it under PyPy speeds operations up considerably if
the structures are used heavily (if JITed), for some cases the performance is almost on par with the built in counterparts.
Type hints
Expand Down Expand Up @@ -686,7 +686,7 @@ Tests can be executed using tox_.
Install tox: ``pip install tox``
Run test for Python 3.7: ``tox -epy37``
Run test for Python 3.8: ``tox -e py38``
Release
~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion _pyrsistent_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.16.0'
__version__ = '0.17.0'
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
hypothesis<5
hypothesis
memory-profiler==0.57.0
psutil==5.7.0
pyperform
pytest<5
pytest
setuptools
Sphinx
sphinx-rtd-theme==0.1.5
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def build_extension(self, ext):
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: PyPy',
],
test_suite='tests',
Expand Down
33 changes: 17 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,43 @@
# and then run "tox" from this directory.

[tox]
envlist = py35,py36,py37,memorytest36,doctest36,pypy3,coverage-py36
envlist = py35,py36,py37,py38,memorytest38,doctest38,pypy3,coverage-py38

[testenv]
commands = python {toxinidir}/setup.py test

# Specifying the following tests like this is very non-DRY but I have no better solution right now.
[testenv:coverage-py36]
[testenv:coverage-py38]
# Skip using C-extension to get coverage metrics on Python code.
basepython = python3.6
basepython = python3.8
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
setenv =
PYRSISTENT_NO_C_EXTENSION = 1
# Pin pytest version until https://github.com/pytest-dev/pytest-cov/pull/253 has been released
deps = pytest==4.0.2
hypothesis<5
pytest-cov
coveralls
deps =
pytest
hypothesis
pytest-cov
coveralls
changedir = tests
commands =
py.test --cov=pyrsistent
coveralls

[testenv:memorytest36]
basepython = python3.6
deps = pytest
memory_profiler
psutil
[testenv:memorytest38]
basepython = python3.8
deps =
pytest
memory_profiler
psutil
changedir = .
commands = python tests/memory_profiling.py

[testenv:doctest36]
[testenv:doctest38]
# Need to disable the random hashing or all docs printing a map with more than
# one item in it will be flaky.
setenv = PYTHONHASHSEED=0
basepython = python3.6
deps = pytest < 5
basepython = python3.8
deps = pytest
changedir = .
commands = py.test --doctest-modules pyrsistent

Expand Down

0 comments on commit b05a77a

Please sign in to comment.