Skip to content

Commit

Permalink
Add support for Python 3.6, drop support for Python 3.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Apr 26, 2017
1 parent 2c99011 commit facef1d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ language: python
sudo: false
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- pypy
- pypy3.3-5.2-alpha1
install:
- python bootstrap.py
- bin/buildout
- pip install -U setuptools
- pip install zc.buildout
- buildout bootstrap
- buildout
script:
- bin/test -v1
notifications:
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
4.2 (unreleased)
----------------

- Add support for Python 3.6, drop support for Python 3.3.

4.1.1 (2016-04-30)
------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down
11 changes: 9 additions & 2 deletions src/DateTime/tests/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from datetime import date, datetime, tzinfo, timedelta
import math
import platform
import os
import sys
import time
Expand All @@ -39,6 +40,8 @@
else:
f = __file__

IS_PYPY = getattr(platform, 'python_implementation', lambda: None)() == 'PyPy'

DATADIR = os.path.dirname(os.path.abspath(f))
del f

Expand Down Expand Up @@ -576,10 +579,14 @@ def testZoneInFarDates(self):
dt2.strftime('%d/%m/%Y %H:%M'))

def testStrftimeUnicode(self):
if IS_PYPY:
# Using Non-Ascii characters for strftime doesn't work in PyPy
# https://bitbucket.org/pypy/pypy/issues/2161/pypy3-strftime-does-not-accept-unicode
return
dt = DateTime('2002-05-02T08:00:00+00:00')
uchar = b'\xe0'.decode('latin1')
uchar = b'\xc3\xa0'.decode('utf-8')
ok = dt.strftime('Le %d/%m/%Y a %Hh%M').replace('a', uchar)
ustr = b'Le %d/%m/%Y \xe0 %Hh%M'.decode('latin-1')
ustr = b'Le %d/%m/%Y \xc3\xa0 %Hh%M'.decode('utf-8')
self.assertEqual(dt.strftime(ustr), ok)

def testTimezoneNaiveHandling(self):
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tox]
envlist =
py27,py33,py34,py35,pypy,coverage
py27,py34,py35,py36,pypy,pypy3,coverage

[testenv]
commands =
nosetests
zope-testrunner --test-path={envsitepackagesdir} -s DateTime
deps =
nose
zope.testrunner

[testenv:coverage]
basepython =
Expand Down

0 comments on commit facef1d

Please sign in to comment.