From 3c9abeb40ab3ed950a1d52e41891d1a0d2528f4e Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 12 Oct 2017 08:26:30 +0300 Subject: [PATCH 1/6] Ignore .cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 70f5746e..800f1c22 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ msgpack/*.cpp /venv /tags /docs/_build +.cache From 67187b53dfdafdcf4854bf51c41a671248dc183e Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 12 Oct 2017 08:27:18 +0300 Subject: [PATCH 2/6] Remove Python 2.6 test code --- test/test_pack.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/test/test_pack.py b/test/test_pack.py index a704fdbc..ac931038 100644 --- a/test/test_pack.py +++ b/test/test_pack.py @@ -7,6 +7,7 @@ from msgpack import packb, unpackb, Unpacker, Packer +from collections import OrderedDict from io import BytesIO def check(data, use_list=False): @@ -136,24 +137,9 @@ def testMapSize(sizes=[0, 5, 50, 1000]): assert unpacker.unpack() == dict((i, i * 2) for i in range(size)) -class odict(dict): - """Reimplement OrderedDict to run test on Python 2.6""" - def __init__(self, seq): - self._seq = seq - dict.__init__(self, seq) - - def items(self): - return self._seq[:] - - def iteritems(self): - return iter(self._seq) - - def keys(self): - return [x[0] for x in self._seq] - def test_odict(): seq = [(b'one', 1), (b'two', 2), (b'three', 3), (b'four', 4)] - od = odict(seq) + od = OrderedDict(seq) assert unpackb(packb(od), use_list=1) == dict(seq) def pair_hook(seq): return list(seq) From 4b81f612785a39599103cd663221e89b3e1f061b Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 12 Oct 2017 08:30:14 +0300 Subject: [PATCH 3/6] Remove restriction to allow test of feature branches --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0170360e..f5141d60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,6 @@ python: - "3.6" - "3.7-dev" -branches: - only: - - master - matrix: include: - sudo: required From 8b9b4a21c9fa02a0175dc7f8e02dadd33d18b9ba Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 12 Oct 2017 08:40:44 +0300 Subject: [PATCH 4/6] Remove build.cmd, only needed to build C extensions on 64-bit Python 3.3 or 3.4 (3.3/3.4 now unsupported) --- appveyor.yml | 13 ++++--------- build.cmd | 21 --------------------- 2 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 build.cmd diff --git a/appveyor.yml b/appveyor.yml index e63423da..d581839b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,24 +23,19 @@ build: off test_script: # Put your test command here. - # If you don't need to build C extensions on 64-bit Python 3.3 or 3.4, - # you can remove "build.cmd" from the front of the command, as it's - # only needed to support those cases. # Note that you must use the environment variable %PYTHON% to refer to # the interpreter you're using - Appveyor does not do anything special # to put the Python version you want to use on PATH. - - "build.cmd %PYTHON%\\python.exe setup.py build_ext -i" - - "build.cmd %PYTHON%\\python.exe setup.py install" + - "%PYTHON%\\python.exe setup.py build_ext -i" + - "%PYTHON%\\python.exe setup.py install" - "%PYTHON%\\python.exe -c \"import sys; print(hex(sys.maxsize))\"" - "%PYTHON%\\python.exe -c \"from msgpack import _packer, _unpacker\"" - "%PYTHON%\\Scripts\\py.test test" - - "build.cmd %PYTHON%\\python.exe setup.py bdist_wheel" + - "%PYTHON%\\python.exe setup.py bdist_wheel" after_test: # This step builds your wheels. - # Again, you only need build.cmd if you're building C extensions for - # 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct - # interpreter + # Again, you need to use %PYTHON% to get the correct interpreter artifacts: # bdist_wheel puts your built wheel in the dist directory diff --git a/build.cmd b/build.cmd deleted file mode 100644 index 243dc9a1..00000000 --- a/build.cmd +++ /dev/null @@ -1,21 +0,0 @@ -@echo off -:: To build extensions for 64 bit Python 3, we need to configure environment -:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 4 -:: -:: More details at: -:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows - -IF "%DISTUTILS_USE_SDK%"=="1" ( - ECHO Configuring environment to build with MSVC on a 64bit architecture - ECHO Using Windows SDK 7.1 - "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1 - CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release - SET MSSdk=1 - REM Need the following to allow tox to see the SDK compiler - SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB -) ELSE ( - ECHO Using default MSVC build environment -) - -CALL %* From 801d518ed2e3c27b8ea98ffb02c5b1f25b07ba58 Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 12 Oct 2017 08:43:12 +0300 Subject: [PATCH 5/6] Don't test on unsupported 3.3 and 3.4 --- .travis.yml | 2 -- tox.ini | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5141d60..98358784 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,6 @@ cache: pip python: - "2.7" - - "3.3" - - "3.4" - "3.5" - "3.6" - "3.7-dev" diff --git a/tox.ini b/tox.ini index b6e7a7f8..9e997c58 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py27,py33,py34,py35}-{c,pure},{pypy,pypy3}-pure,py27-x86,py34-x86 +envlist = {py27,py35}-{c,pure},{pypy,pypy3}-pure,py27-x86 [variants:pure] setenv= From 726ca02a1bb3e1321e0f1e1ee802d15e3554232e Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 12 Oct 2017 08:48:51 +0300 Subject: [PATCH 6/6] Remove Python 3.4 test code --- docker/runtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/runtests.sh b/docker/runtests.sh index 0eea715a..11ef9f46 100755 --- a/docker/runtests.sh +++ b/docker/runtests.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -x -for V in cp36-cp36m cp35-cp35m cp34-cp34m cp27-cp27m cp27-cp27mu; do +for V in cp36-cp36m cp35-cp35m cp27-cp27m cp27-cp27mu; do PYBIN=/opt/python/$V/bin $PYBIN/python setup.py install rm -rf build/ # Avoid lib build by narrow Python is used by wide python