Skip to content

Commit c8e2409

Browse files
committed
Bump driver version to 4.4, drop Python 3.5 support
1 parent 76b399d commit c8e2409

File tree

13 files changed

+52
-53
lines changed

13 files changed

+52
-53
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Neo4j Driver Change Log
22

3+
## Version 4.4
4+
5+
- Python 3.5 support has been dropped.
6+
37

48
## Version 4.3
59

@@ -35,4 +39,4 @@
3539
+ Python 3.2 support has been dropped.
3640
+ Python 3.1 support has been dropped.
3741
+ Python 3.0 support has been dropped.
38-
+ Python 2.7 support has been dropped.
42+
+ Python 2.7 support has been dropped.

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ These drivers will also be compatible with the previous Neo4j release, although
1010
+ Python 3.8 supported.
1111
+ Python 3.7 supported.
1212
+ Python 3.6 supported.
13-
+ Python 3.5 supported.
1413

1514
Python 2.7 support has been dropped as of the Neo4j 4.0 release.
1615

@@ -120,4 +119,4 @@ Other Information
120119
.. _`Neo4j Cypher Refcard`: https://neo4j.com/docs/cypher-refcard/current/
121120
.. _`Example Project`: https://github.com/neo4j-examples/movies-python-bolt
122121
.. _`Driver Wiki`: https://github.com/neo4j/neo4j-python-driver/wiki
123-
.. _`Neo4j 4.0 Migration Guide`: https://neo4j.com/docs/migration-guide/4.0/
122+
.. _`Neo4j 4.0 Migration Guide`: https://neo4j.com/docs/migration-guide/4.0/

TESTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Neo4j Driver Testing
22

33
To run driver tests, [Tox](https://tox.readthedocs.io) is required as well as at least one version of Python.
4-
The versions of Python supported by this driver are CPython 2.7, 3.4, 3.5 and 3.6.
4+
The versions of Python supported by this driver are CPython 3.6, 3.7, 3.8, and 3.9.
55

66

77
## Unit Tests & Stub Tests
@@ -40,7 +40,7 @@ a report can be viewed after the run with `coverage report --show-missing`.
4040

4141
## Testing with Testkit
4242

43-
Tests **require** the latest [Testkit 4.3](https://github.com/neo4j-drivers/testkit/tree/4.3), Python3 and Docker.
43+
Tests **require** the latest [Testkit 4.4](https://github.com/neo4j-drivers/testkit/tree/4.4), Python3 and Docker.
4444

4545
Testkit is needed to be cloned and configured to run against the Python Driver. Use the following steps to configure Testkit.
4646

@@ -69,4 +69,4 @@ To run test against against some Neo4j version:
6969
python3 main.py
7070
```
7171

72-
More details about how to use Teskit could be found on [its repository](https://github.com/neo4j-drivers/testkit/tree/4.3)
72+
More details about how to use Teskit could be found on [its repository](https://github.com/neo4j-drivers/testkit/tree/4.4)

docs/source/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ The Official Neo4j Driver for Python.
66

77
Neo4j versions supported:
88

9+
* Neo4j 4.4
910
* Neo4j 4.3
10-
* Neo4j 4.2
1111
* Neo4j 3.5
1212

1313
Python versions supported:
@@ -16,7 +16,6 @@ Python versions supported:
1616
* Python 3.8
1717
* Python 3.7
1818
* Python 3.6
19-
* Python 3.5
2019

2120
.. note::
2221

neo4j/conf.py

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -232,30 +232,14 @@ def get_ssl_context(self):
232232
# TLS 1.1 - Released in 2006, published as RFC 4346. (Disabled)
233233
# TLS 1.2 - Released in 2008, published as RFC 5246.
234234

235-
try:
236-
# python 3.6+
237-
# https://docs.python.org/3.6/library/ssl.html#ssl.PROTOCOL_TLS_CLIENT
238-
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
239-
240-
# For recommended security options see
241-
# https://docs.python.org/3.6/library/ssl.html#protocol-versions
242-
ssl_context.options |= ssl.OP_NO_TLSv1 # Python 3.2
243-
ssl_context.options |= ssl.OP_NO_TLSv1_1 # Python 3.4
244-
245-
except AttributeError:
246-
# python 3.5
247-
# https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLS
248-
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
249-
250-
# For recommended security options see
251-
# https://docs.python.org/3.5/library/ssl.html#protocol-versions
252-
ssl_context.options |= ssl.OP_NO_SSLv2 # Python 3.2
253-
ssl_context.options |= ssl.OP_NO_SSLv3 # Python 3.2
254-
ssl_context.options |= ssl.OP_NO_TLSv1 # Python 3.2
255-
ssl_context.options |= ssl.OP_NO_TLSv1_1 # Python 3.4
256-
257-
ssl_context.verify_mode = ssl.CERT_REQUIRED # https://docs.python.org/3.5/library/ssl.html#ssl.SSLContext.verify_mode
258-
ssl_context.check_hostname = True # https://docs.python.org/3.5/library/ssl.html#ssl.SSLContext.check_hostname
235+
# https://docs.python.org/3.6/library/ssl.html#ssl.PROTOCOL_TLS_CLIENT
236+
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
237+
238+
# For recommended security options see
239+
# https://docs.python.org/3.6/library/ssl.html#protocol-versions
240+
ssl_context.options |= ssl.OP_NO_TLSv1 # Python 3.2
241+
ssl_context.options |= ssl.OP_NO_TLSv1_1 # Python 3.4
242+
259243

260244
if self.trust == TRUST_ALL_CERTIFICATES:
261245
ssl_context.check_hostname = False

neo4j/io/__init__.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,15 @@ def protocol_handlers(cls, protocol_version=None):
211211

212212
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
213213
from neo4j.io._bolt3 import Bolt3
214-
from neo4j.io._bolt4 import Bolt4x0, Bolt4x1, Bolt4x2, Bolt4x3
214+
from neo4j.io._bolt4 import Bolt4x0, Bolt4x1, Bolt4x2, Bolt4x3, Bolt4x4
215215

216216
handlers = {
217217
Bolt3.PROTOCOL_VERSION: Bolt3,
218218
Bolt4x0.PROTOCOL_VERSION: Bolt4x0,
219219
Bolt4x1.PROTOCOL_VERSION: Bolt4x1,
220220
Bolt4x2.PROTOCOL_VERSION: Bolt4x2,
221221
Bolt4x3.PROTOCOL_VERSION: Bolt4x3,
222+
Bolt4x4.PROTOCOL_VERSION: Bolt4x4,
222223
}
223224

224225
if protocol_version is None:
@@ -310,33 +311,38 @@ def open(cls, address, *, auth=None, timeout=None, routing_context=None, **pool_
310311
keep_alive=pool_config.keep_alive,
311312
)
312313

314+
# Carry out Bolt subclass imports locally to avoid circular dependency
315+
# issues.
313316
if pool_config.protocol_version == (3, 0):
314-
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
315317
from neo4j.io._bolt3 import Bolt3
316-
connection = Bolt3(address, s, pool_config.max_connection_lifetime, auth=auth, user_agent=pool_config.user_agent, routing_context=routing_context)
318+
bolt_cls = Bolt3
317319
elif pool_config.protocol_version == (4, 0):
318-
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
319320
from neo4j.io._bolt4 import Bolt4x0
320-
connection = Bolt4x0(address, s, pool_config.max_connection_lifetime, auth=auth, user_agent=pool_config.user_agent, routing_context=routing_context)
321+
bolt_cls = Bolt4x0
321322
elif pool_config.protocol_version == (4, 1):
322-
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
323323
from neo4j.io._bolt4 import Bolt4x1
324-
connection = Bolt4x1(address, s, pool_config.max_connection_lifetime, auth=auth, user_agent=pool_config.user_agent, routing_context=routing_context)
324+
bolt_cls = Bolt4x1
325325
elif pool_config.protocol_version == (4, 2):
326-
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
327326
from neo4j.io._bolt4 import Bolt4x2
328-
connection = Bolt4x2(address, s, pool_config.max_connection_lifetime, auth=auth, user_agent=pool_config.user_agent, routing_context=routing_context)
327+
bolt_cls = Bolt4x2
329328
elif pool_config.protocol_version == (4, 3):
330-
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
331329
from neo4j.io._bolt4 import Bolt4x3
332-
connection = Bolt4x3(address, s, pool_config.max_connection_lifetime, auth=auth, user_agent=pool_config.user_agent, routing_context=routing_context)
330+
bolt_cls = Bolt4x3
331+
elif pool_config.protocol_version == (4, 4):
332+
from neo4j.io._bolt4 import Bolt4x4
333+
bolt_cls = Bolt4x4
333334
else:
334335
log.debug("[#%04X] S: <CLOSE>", s.getpeername()[1])
335336
_close_socket(s)
336337

337338
supported_versions = Bolt.protocol_handlers().keys()
338339
raise BoltHandshakeError("The Neo4J server does not support communication with this driver. This driver have support for Bolt Protocols {}".format(supported_versions), address=address, request_data=handshake, response_data=data)
339340

341+
connection = bolt_cls(
342+
address, s, pool_config.max_connection_lifetime, auth=auth,
343+
user_agent=pool_config.user_agent, routing_context=routing_context
344+
)
345+
340346
try:
341347
connection.hello()
342348
except Exception:

neo4j/io/_bolt3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
class Bolt3(Bolt):
5656
""" Protocol handler for Bolt 3.
5757
58-
This is supported by Neo4j versions 3.5, 4.0, 4.1 and 4.2.
58+
This is supported by Neo4j versions 3.5, 4.0, 4.1, 4.2, 4.3, and 4.4.
5959
"""
6060

6161
PROTOCOL_VERSION = Version(3, 0)

neo4j/io/_bolt4.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def defunct(self):
316316
class Bolt4x1(Bolt4x0):
317317
""" Protocol handler for Bolt 4.1.
318318
319-
This is supported by Neo4j versions 4.1 and 4.2.
319+
This is supported by Neo4j versions 4.1 - 4.4.
320320
"""
321321

322322
PROTOCOL_VERSION = Version(4, 1)
@@ -338,7 +338,7 @@ def get_base_headers(self):
338338
class Bolt4x2(Bolt4x1):
339339
""" Protocol handler for Bolt 4.2.
340340
341-
This is supported by Neo4j version 4.2.
341+
This is supported by Neo4j version 4.2 - 4.4.
342342
"""
343343

344344
PROTOCOL_VERSION = Version(4, 2)
@@ -347,7 +347,7 @@ class Bolt4x2(Bolt4x1):
347347
class Bolt4x3(Bolt4x2):
348348
""" Protocol handler for Bolt 4.3.
349349
350-
This is supported by Neo4j version 4.3.
350+
This is supported by Neo4j version 4.3 - 4.4.
351351
"""
352352

353353
PROTOCOL_VERSION = Version(4, 3)
@@ -376,3 +376,12 @@ def fail(md):
376376
self.send_all()
377377
self.fetch_all()
378378
return [metadata.get("rt")]
379+
380+
381+
class Bolt4x4(Bolt4x3):
382+
""" Protocol handler for Bolt 4.4.
383+
384+
This is supported by Neo4j version 4.4.
385+
"""
386+
387+
PROTOCOL_VERSION = Version(4, 4)

neo4j/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
# Can be automatically overridden in builds
2323
package = "neo4j"
24-
version = "4.3.dev0"
24+
version = "4.4.dev0"
2525

2626

2727
def get_user_agent():

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"Operating System :: OS Independent",
3434
"Topic :: Database",
3535
"Topic :: Software Development",
36-
"Programming Language :: Python :: 3.5",
3736
"Programming Language :: Python :: 3.6",
3837
"Programming Language :: Python :: 3.7",
3938
"Programming Language :: Python :: 3.8",

testkit/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ ENV PYENV_ROOT /.pyenv
4040
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
4141

4242
# Set minimum supported Python version
43-
RUN pyenv install 3.5.9
43+
RUN pyenv install 3.6.13
4444
RUN pyenv rehash
45-
RUN pyenv global 3.5.9
45+
RUN pyenv global 3.6.13
4646

4747
# Install Latest pip for each environment
4848
# https://pip.pypa.io/en/stable/news/

tox-unit.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py35
3+
py36
44

55
[testenv]
66
deps =

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[tox]
22
envlist =
3-
py35
43
py36
54
py37
65
py38

0 commit comments

Comments
 (0)