Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
6abde06a
Commit
6abde06a
authored
Aug 22, 2018
by
Jason Madden
Committed by
GitHub
Aug 22, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #220 from zopefoundation/issue214
Add Python 3.7 support.
parents
1c9a55d4
196295a6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
25 deletions
+38
-25
.travis.yml
.travis.yml
+3
-0
CHANGES.rst
CHANGES.rst
+2
-0
appveyor.yml
appveyor.yml
+2
-0
setup.py
setup.py
+1
-0
src/ZODB/Connection.py
src/ZODB/Connection.py
+1
-1
src/ZODB/scripts/tests/test_doc.py
src/ZODB/scripts/tests/test_doc.py
+7
-7
src/ZODB/tests/testConnection.py
src/ZODB/tests/testConnection.py
+2
-2
src/ZODB/tests/test_TransactionMetaData.py
src/ZODB/tests/test_TransactionMetaData.py
+18
-13
tox.ini
tox.ini
+2
-2
No files found.
.travis.yml
View file @
6abde06a
...
...
@@ -15,6 +15,9 @@ matrix:
python
:
3.5
-
os
:
linux
python
:
3.6
-
python
:
3.7
dist
:
xenial
sudo
:
true
install
:
-
pip install -U pip
-
pip install -U setuptools zc.buildout
...
...
CHANGES.rst
View file @
6abde06a
...
...
@@ -15,6 +15,8 @@
- Bump the dependency on persistent to at least 4.4.0.
- Add support for Python 3.7.
5.4.0 (2018-03-26)
==================
...
...
appveyor.yml
View file @
6abde06a
...
...
@@ -8,6 +8,8 @@ environment:
-
python
:
35-x64
-
python
:
36
-
python
:
36-x64
-
python
:
37
-
python
:
37-x64
install
:
-
"
SET
PATH=C:
\\
Python%PYTHON%;c:
\\
Python%PYTHON%
\\
scripts;%PATH%"
...
...
setup.py
View file @
6abde06a
...
...
@@ -25,6 +25,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 :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Database
...
...
src/ZODB/Connection.py
View file @
6abde06a
...
...
@@ -1328,7 +1328,7 @@ class TransactionMetaData(object):
@
property
def
_extension
(
self
):
warnings
.
warn
(
"_extension is deprecated, use extension"
,
DeprecationWarning
)
DeprecationWarning
,
stacklevel
=
2
)
return
self
.
extension
@
_extension
.
setter
...
...
src/ZODB/scripts/tests/test_doc.py
View file @
6abde06a
...
...
@@ -19,7 +19,7 @@ import zope.testing.renormalizing
checker
=
zope
.
testing
.
renormalizing
.
RENormalizing
([
(
re
.
compile
(
'[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
\
.[
0
-9]+'
),
r
'[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\
.[
0-9]+'
),
'2007-11-10 15:18:48.543001'
),
(
re
.
compile
(
'hash=[0-9a-f]{40}'
),
'hash=b16422d09fabdb45d4e4325e4b42d7d6f021d3c3'
),
...
...
@@ -29,13 +29,13 @@ checker = zope.testing.renormalizing.RENormalizing([
# Python 3 produces larger pickles, even when we use zodbpickle :(
# this changes all the offsets and sizes in fstail.txt
(
re
.
compile
(
"user='' description='' "
"length=[0-9]+ offset=[0-9]+
\
(
\
+23
\
)
"
),
"
user
=
''
description
=
''
"
"
length
=<
LENGTH
>
offset
=<
OFFSET
>
(
+
23
)
"),
r
"length=[0-9]+ offset=[0-9]+ \
(
\+23\
)
"),
"
user
=
''
description
=
''
"
"
length
=<
LENGTH
>
offset
=<
OFFSET
>
(
+
23
)
"),
(re.compile("
user
=
''
description
=
'initial database creation'
"
"
length
=
[
0
-
9
]
+
offset
=
4
\
(
\
+
48
\
)
"),
"
user
=
''
description
=
'initial database creation'
"
"
length
=<
LENGTH
>
offset
=
4
(
+
48
)
"),
r
"
length
=
[
0
-
9
]
+
offset
=
4
\
(
\
+
48
\
)
"),
"
user
=
''
description
=
'initial database creation'
"
"
length
=<
LENGTH
>
offset
=
4
(
+
48
)
"),
])
def test_suite():
...
...
src/ZODB/tests/testConnection.py
View file @
6abde06a
...
...
@@ -36,7 +36,7 @@ checker = renormalizing.RENormalizing([
# Python 3 bytes add a "b".
(
re
.
compile
(
"b('.*?')"
),
r"\1"
),
# Python 3 removes empty list representation.
(
re
.
compile
(
"set
\
(
\
[
\
]
\
)"
),
r"set()"
),
(
re
.
compile
(
r
"set\
(
\[\
]
\)"
),
r"set()"
),
# Python 3 adds module name to exceptions.
(
re
.
compile
(
"ZODB.POSException.POSKeyError"
),
r"POSKeyError"
),
(
re
.
compile
(
"ZODB.POSException.ReadConflictError"
),
r"ReadConflictError"
),
...
...
@@ -198,7 +198,7 @@ class SetstateErrorLoggingTests(ZODB.tests.util.TestCase):
record
.
msg
,
"Shouldn't load state for ZODB.tests.testConnection.StubObject"
" 0x01 when the connection is closed"
)
self
.
assert
_
(
record
.
exc_info
)
self
.
assert
True
(
record
.
exc_info
)
class
UserMethodTests
(
unittest
.
TestCase
):
...
...
src/ZODB/tests/test_TransactionMetaData.py
View file @
6abde06a
...
...
@@ -38,32 +38,38 @@ class TransactionMetaDataTests(unittest.TestCase):
self
.
assertEqual
(
t
.
user
,
b'user'
)
self
.
assertEqual
(
t
.
description
,
b'description'
)
self
.
assertEqual
(
t
.
extension
,
dict
(
foo
=
'FOO'
))
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"ignore"
)
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
def
test_constructor_default_args
(
self
):
t
=
TransactionMetaData
()
self
.
assertEqual
(
t
.
user
,
b''
)
self
.
assertEqual
(
t
.
description
,
b''
)
self
.
assertEqual
(
t
.
extension
,
{})
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"ignore"
)
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
def
test_set_extension
(
self
):
t
=
TransactionMetaData
(
u''
,
u''
,
b''
)
self
.
assertEqual
(
t
.
user
,
b''
)
self
.
assertEqual
(
t
.
description
,
b''
)
self
.
assertEqual
(
t
.
extension
,
{})
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
for
name
in
'extension'
,
'_extension'
:
data
=
{
name
:
name
+
'foo'
}
setattr
(
t
,
name
,
data
)
self
.
assertEqual
(
t
.
extension
,
data
)
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
data
=
{}
setattr
(
t
,
name
,
data
)
self
.
assertEqual
(
t
.
extension
,
data
)
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
"ignore"
)
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
for
name
in
'extension'
,
'_extension'
:
data
=
{
name
:
name
+
'foo'
}
setattr
(
t
,
name
,
data
)
self
.
assertEqual
(
t
.
extension
,
data
)
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
data
=
{}
setattr
(
t
,
name
,
data
)
self
.
assertEqual
(
t
.
extension
,
data
)
self
.
assertEqual
(
t
.
_extension
,
t
.
extension
)
def
test_used_by_connection
(
self
):
import
ZODB
from
ZODB.MappingStorage
import
MappingStorage
...
...
@@ -109,4 +115,3 @@ def test_suite():
if
__name__
==
'__main__'
:
unittest
.
main
(
defaultTest
=
'test_suite'
)
tox.ini
View file @
6abde06a
...
...
@@ -2,7 +2,7 @@
# Jython 2.7rc2 does work, but unfortunately has an issue running
# with Tox 1.9.2 (http://bugs.jython.org/issue2325)
#envlist = py26,py27,py33,py34,pypy,simple,jython,pypy3
envlist
=
py27,py34,py35,py36,pypy,pypy3
envlist
=
py27,py34,py35,py36,py
37,py
py,pypy3
[testenv]
# ZODB.tests.testdocumentation needs to find
...
...
@@ -16,7 +16,7 @@ commands =
# Run unit tests first.
zope-testrunner
-u
--test-path
=
src []
# Only run functional tests if unit tests pass.
zope-testrunner
-f
--test-path
=
src []
zope-testrunner
-f
-
j5
-
-test-path
=
src []
deps
=
.
[test]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment