From f6e440be4fe486dac6e60281a364e96a28e7d2f9 Mon Sep 17 00:00:00 2001 From: Peter Wilhelmsson Date: Fri, 13 Nov 2020 13:13:01 +0100 Subject: [PATCH 1/6] Proper initialization of system CAs on Windows Should use SSLContext.load_default_certs to load system CAs properly on all platforms including Windows. SSLContext.set_default_verify_paths worked fine on Linux based OSes. load_default_certs is new in Python 3.4. --- neo4j/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neo4j/conf.py b/neo4j/conf.py index f1772c719..f671e3e1d 100644 --- a/neo4j/conf.py +++ b/neo4j/conf.py @@ -261,7 +261,10 @@ def get_ssl_context(self): ssl_context.check_hostname = False ssl_context.verify_mode = ssl.CERT_NONE # https://docs.python.org/3.5/library/ssl.html#ssl.CERT_NONE - ssl_context.set_default_verify_paths() # https://docs.python.org/3.5/library/ssl.html#ssl.SSLContext.set_default_verify_paths + # Must be load_default_certs, not set_default_verify_paths to work + # on Windows with system CAs. + ssl_context.load_default_certs() + return ssl_context From bea0784f93c66d62bb3458982fd095991d1bdd6e Mon Sep 17 00:00:00 2001 From: Nigel Small Date: Wed, 21 Oct 2020 15:53:33 +0100 Subject: [PATCH 2/6] Shell setting depends on platform --- tests/stub/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/stub/conftest.py b/tests/stub/conftest.py index 6aab0d5b5..48b29b7de 100644 --- a/tests/stub/conftest.py +++ b/tests/stub/conftest.py @@ -23,6 +23,7 @@ import os import time +from platform import system from threading import Thread from time import sleep @@ -43,7 +44,8 @@ def __init__(self, port, script): self.script = os.path.join(os.path.dirname(__file__), "scripts", script) def run(self): - self._process = subprocess.Popen(["python", "-m", "boltkit", "stub", "-v", "-l", ":{}".format(str(self.port)), "-t", "10", self.script], stdout=subprocess.PIPE) + shell = system() == "Windows" # I hate myself for doing this + self._process = subprocess.Popen(["python", "-m", "boltkit", "stub", "-v", "-l", ":{}".format(str(self.port)), "-t", "10", self.script], stdout=subprocess.PIPE, shell=shell) # Need verbose for this to work line = self._process.stdout.readline().decode("utf-8") log.debug("started stub server {}".format(self.port)) From 19eb04275f900ae15f41fd691a7b0f357afdc0ae Mon Sep 17 00:00:00 2001 From: Peter Wilhelmsson Date: Thu, 17 Dec 2020 11:23:31 +0100 Subject: [PATCH 3/6] Fix problem with failed retriable transactions in cluster During rolling upgrades of clusters the handshake can be interrupted and a read during handshake can fail, this should be retried. Change the exception raised for this condition. --- neo4j/io/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo4j/io/__init__.py b/neo4j/io/__init__.py index 100614553..6fe980912 100644 --- a/neo4j/io/__init__.py +++ b/neo4j/io/__init__.py @@ -1006,7 +1006,7 @@ def _handshake(s, resolved_address): # response, the server has closed the connection log.debug("[#%04X] S: ", local_port) s.close() - raise BoltHandshakeError("Connection to {address} closed without handshake response".format(address=resolved_address), address=resolved_address, request_data=handshake, response_data=None) + raise ServiceUnavailable("Connection to {address} closed without handshake response".format(address=resolved_address)) if data_size != 4: # Some garbled data has been received log.debug("[#%04X] S: @*#!", local_port) From f8b6add7ab69333812047b69215440430591b65b Mon Sep 17 00:00:00 2001 From: Peter Wilhelmsson Date: Fri, 18 Dec 2020 09:41:35 +0100 Subject: [PATCH 4/6] Reclassify exceptions as retryable These errors from server should trigger a retry: Neo.ClientError.Cluster.NotALeader Neo.ClientError.General.ForbiddenOnReadOnlyDatabase --- neo4j/exceptions.py | 8 ++++---- tests/stub/test_routingdriver.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/neo4j/exceptions.py b/neo4j/exceptions.py index 91e7c72d3..26015e66f 100644 --- a/neo4j/exceptions.py +++ b/neo4j/exceptions.py @@ -31,11 +31,11 @@ + ConstraintError + AuthError + Forbidden - + ForbiddenOnReadOnlyDatabase - + NotALeader + DatabaseError + TransientError + DatabaseUnavailable + + NotALeader + + ForbiddenOnReadOnlyDatabase + DriverError + TransactionError @@ -174,7 +174,7 @@ class CypherTypeError(ClientError): """ -class NotALeader(ClientError): +class NotALeader(TransientError): """ """ @@ -184,7 +184,7 @@ class Forbidden(ClientError): """ -class ForbiddenOnReadOnlyDatabase(Forbidden): +class ForbiddenOnReadOnlyDatabase(TransientError): """ """ diff --git a/tests/stub/test_routingdriver.py b/tests/stub/test_routingdriver.py index c62d2decd..d9603ef5e 100644 --- a/tests/stub/test_routingdriver.py +++ b/tests/stub/test_routingdriver.py @@ -544,7 +544,7 @@ def test_forgets_address_on_not_a_leader_error(driver_info, test_scripts, test_r with StubCluster(*test_scripts): with GraphDatabase.driver(driver_info["uri_neo4j"], auth=driver_info["auth_token"]) as driver: with driver.session(default_access_mode=WRITE_ACCESS, fetch_size=-1) as session: - with pytest.raises(ClientError): + with pytest.raises(TransientError): _ = session.run(*test_run_args) pool = driver._pool @@ -570,7 +570,7 @@ def test_forgets_address_on_forbidden_on_read_only_database_error(driver_info, t with StubCluster(*test_scripts): with GraphDatabase.driver(driver_info["uri_neo4j"], auth=driver_info["auth_token"]) as driver: with driver.session(default_access_mode=WRITE_ACCESS, fetch_size=-1) as session: - with pytest.raises(ClientError): + with pytest.raises(TransientError): _ = session.run(*test_run_args) pool = driver._pool From d37a77c1e97abac91ada6daa48f69687f04e50a4 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Wed, 17 Feb 2021 09:25:21 +0100 Subject: [PATCH 5/6] Remove year from the license header (#502) --- NOTICE.txt | 2 +- docs/source/_static/nature_custom.css_t | 2 +- neo4j/__init__.py | 2 +- neo4j/_exceptions.py | 2 +- neo4j/addressing.py | 2 +- neo4j/api.py | 2 +- neo4j/conf.py | 2 +- neo4j/data.py | 2 +- neo4j/debug.py | 2 +- neo4j/exceptions.py | 2 +- neo4j/graph/__init__.py | 2 +- neo4j/io/__init__.py | 2 +- neo4j/io/_bolt3.py | 2 +- neo4j/io/_bolt4x0.py | 2 +- neo4j/io/_bolt4x1.py | 2 +- neo4j/io/_courier.py | 2 +- neo4j/meta.py | 2 +- neo4j/packstream.py | 2 +- neo4j/routing.py | 2 +- neo4j/spatial/__init__.py | 2 +- neo4j/time/__init__.py | 2 +- neo4j/time/__main__.py | 2 +- neo4j/time/arithmetic.py | 2 +- neo4j/time/clock_implementations.py | 2 +- neo4j/time/hydration.py | 2 +- neo4j/time/metaclasses.py | 2 +- neo4j/work/__init__.py | 2 +- neo4j/work/pipelining.py | 2 +- neo4j/work/result.py | 2 +- neo4j/work/simple.py | 2 +- neo4j/work/summary.py | 2 +- neo4j/work/transaction.py | 2 +- setup.py | 2 +- tests/integration/conftest.py | 2 +- tests/integration/examples/__init__.py | 2 +- .../integration/examples/test_autocommit_transaction_example.py | 2 +- tests/integration/examples/test_basic_auth_example.py | 2 +- .../integration/examples/test_config_connection_pool_example.py | 2 +- .../examples/test_config_connection_timeout_example.py | 2 +- .../integration/examples/test_config_max_retry_time_example.py | 2 +- tests/integration/examples/test_config_secure_example.py | 2 +- tests/integration/examples/test_config_trust_example.py | 2 +- tests/integration/examples/test_config_unencrypted_example.py | 2 +- tests/integration/examples/test_custom_auth_example.py | 2 +- tests/integration/examples/test_custom_resolver_example.py | 2 +- tests/integration/examples/test_cypher_error_example.py | 2 +- tests/integration/examples/test_database_selection_example.py | 2 +- tests/integration/examples/test_driver_introduction_example.py | 2 +- tests/integration/examples/test_driver_lifecycle_example.py | 2 +- tests/integration/examples/test_hello_world_example.py | 2 +- tests/integration/examples/test_kerberos_auth_example.py | 2 +- tests/integration/examples/test_pass_bookmarks_example.py | 2 +- .../integration/examples/test_read_write_transaction_example.py | 2 +- tests/integration/examples/test_result_consume_example.py | 2 +- tests/integration/examples/test_result_retain_example.py | 2 +- tests/integration/examples/test_service_unavailable_example.py | 2 +- tests/integration/examples/test_session_example.py | 2 +- tests/integration/examples/test_transaction_function_example.py | 2 +- tests/integration/test_autocommit.py | 2 +- tests/integration/test_bolt_driver.py | 2 +- tests/integration/test_bookmarking.py | 2 +- tests/integration/test_core_types.py | 2 +- tests/integration/test_explicit_tx.py | 2 +- tests/integration/test_graph_types.py | 2 +- tests/integration/test_neo4j_driver.py | 2 +- tests/integration/test_pipelines.py | 2 +- tests/integration/test_readme.py | 2 +- tests/integration/test_result.py | 2 +- tests/integration/test_result_data.py | 2 +- tests/integration/test_result_graph.py | 2 +- tests/integration/test_spatial_types.py | 2 +- tests/integration/test_summary.py | 2 +- tests/integration/test_temporal_types.py | 2 +- tests/integration/test_tx_functions.py | 2 +- tests/stub/conftest.py | 2 +- tests/stub/test_accesslevel.py | 2 +- tests/stub/test_bookmarking.py | 2 +- tests/stub/test_directdriver.py | 2 +- tests/stub/test_multi_database.py | 2 +- tests/stub/test_routingdriver.py | 2 +- tests/stub/test_transactions.py | 2 +- tests/unit/data/test_packing.py | 2 +- tests/unit/io/conftest.py | 2 +- tests/unit/io/test_class_bolt.py | 2 +- tests/unit/io/test_class_bolt3.py | 2 +- tests/unit/io/test_class_bolt4x0.py | 2 +- tests/unit/io/test_direct.py | 2 +- tests/unit/io/test_routing.py | 2 +- tests/unit/test_addressing.py | 2 +- tests/unit/test_api.py | 2 +- tests/unit/test_conf.py | 2 +- tests/unit/test_data.py | 2 +- tests/unit/test_exceptions.py | 2 +- tests/unit/test_import_neo4j.py | 2 +- tests/unit/test_record.py | 2 +- tests/unit/test_security.py | 2 +- tests/unit/test_types.py | 2 +- tests/unit/time/__init__.py | 2 +- tests/unit/time/test_clock.py | 2 +- tests/unit/time/test_clocktime.py | 2 +- tests/unit/time/test_date.py | 2 +- tests/unit/time/test_datetime.py | 2 +- tests/unit/time/test_duration.py | 2 +- tests/unit/time/test_hydration.py | 2 +- tests/unit/time/test_time.py | 2 +- 105 files changed, 105 insertions(+), 105 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 890aaae98..ace851fb9 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,4 +1,4 @@ Neo4j -Copyright (c) 2002-2020 Neo4j Sweden AB (referred to in this notice as "Neo4j") [http://neo4j.com] +Copyright (c) Neo4j Sweden AB (referred to in this notice as "Neo4j") [http://neo4j.com] This product includes software ("Software") developed by Neo4j diff --git a/docs/source/_static/nature_custom.css_t b/docs/source/_static/nature_custom.css_t index 5e0300f52..5f1490fee 100644 --- a/docs/source/_static/nature_custom.css_t +++ b/docs/source/_static/nature_custom.css_t @@ -6,7 +6,7 @@ * The original Sphinx stylesheet is -- nature theme. * * Copyright (c) 2007-2020 by the Sphinx team. - * Copyright (c) 2020-2020 Neo4j + * Copyright (c) Neo4j * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/neo4j/__init__.py b/neo4j/__init__.py index 2138a18a7..445da43a4 100644 --- a/neo4j/__init__.py +++ b/neo4j/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/_exceptions.py b/neo4j/_exceptions.py index 130469855..1bfbd420e 100644 --- a/neo4j/_exceptions.py +++ b/neo4j/_exceptions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/addressing.py b/neo4j/addressing.py index 5f4db511d..e294291b7 100644 --- a/neo4j/addressing.py +++ b/neo4j/addressing.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/api.py b/neo4j/api.py index 80ee0b6fa..0179b0e4a 100644 --- a/neo4j/api.py +++ b/neo4j/api.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/conf.py b/neo4j/conf.py index f671e3e1d..0dfa33ee9 100644 --- a/neo4j/conf.py +++ b/neo4j/conf.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/data.py b/neo4j/data.py index bc9f173c7..e1a3a959c 100644 --- a/neo4j/data.py +++ b/neo4j/data.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/debug.py b/neo4j/debug.py index b66e218e1..b8872a377 100644 --- a/neo4j/debug.py +++ b/neo4j/debug.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/exceptions.py b/neo4j/exceptions.py index 26015e66f..d73e67ed1 100644 --- a/neo4j/exceptions.py +++ b/neo4j/exceptions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/graph/__init__.py b/neo4j/graph/__init__.py index 95f316e86..66285af73 100644 --- a/neo4j/graph/__init__.py +++ b/neo4j/graph/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/io/__init__.py b/neo4j/io/__init__.py index 6fe980912..8e59a5de2 100644 --- a/neo4j/io/__init__.py +++ b/neo4j/io/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/io/_bolt3.py b/neo4j/io/_bolt3.py index d57b84263..31fb52b34 100644 --- a/neo4j/io/_bolt3.py +++ b/neo4j/io/_bolt3.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/io/_bolt4x0.py b/neo4j/io/_bolt4x0.py index 32c239242..a9b87f8dc 100644 --- a/neo4j/io/_bolt4x0.py +++ b/neo4j/io/_bolt4x0.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/io/_bolt4x1.py b/neo4j/io/_bolt4x1.py index cc7e01bbe..60cebb7b1 100644 --- a/neo4j/io/_bolt4x1.py +++ b/neo4j/io/_bolt4x1.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/io/_courier.py b/neo4j/io/_courier.py index d994c72d5..e4e49abf7 100644 --- a/neo4j/io/_courier.py +++ b/neo4j/io/_courier.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/meta.py b/neo4j/meta.py index 9616f1e59..48f0be600 100644 --- a/neo4j/meta.py +++ b/neo4j/meta.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/packstream.py b/neo4j/packstream.py index 7e25d7137..1b72451ba 100644 --- a/neo4j/packstream.py +++ b/neo4j/packstream.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/routing.py b/neo4j/routing.py index b79c2cb06..a0ef48c25 100644 --- a/neo4j/routing.py +++ b/neo4j/routing.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/spatial/__init__.py b/neo4j/spatial/__init__.py index 37d0eb847..f7085fd4c 100644 --- a/neo4j/spatial/__init__.py +++ b/neo4j/spatial/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/time/__init__.py b/neo4j/time/__init__.py index c878bad3e..71652efe7 100644 --- a/neo4j/time/__init__.py +++ b/neo4j/time/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/time/__main__.py b/neo4j/time/__main__.py index 2500bbb58..447b375c0 100644 --- a/neo4j/time/__main__.py +++ b/neo4j/time/__main__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/time/arithmetic.py b/neo4j/time/arithmetic.py index 67028e43e..d9b374199 100644 --- a/neo4j/time/arithmetic.py +++ b/neo4j/time/arithmetic.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/time/clock_implementations.py b/neo4j/time/clock_implementations.py index 1559e1722..cda32cd94 100644 --- a/neo4j/time/clock_implementations.py +++ b/neo4j/time/clock_implementations.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/time/hydration.py b/neo4j/time/hydration.py index 32a7bfd90..313ed1619 100644 --- a/neo4j/time/hydration.py +++ b/neo4j/time/hydration.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/time/metaclasses.py b/neo4j/time/metaclasses.py index 2be81abc9..278a0fb65 100644 --- a/neo4j/time/metaclasses.py +++ b/neo4j/time/metaclasses.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/work/__init__.py b/neo4j/work/__init__.py index c97cc7ca9..a516004cb 100644 --- a/neo4j/work/__init__.py +++ b/neo4j/work/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/work/pipelining.py b/neo4j/work/pipelining.py index ce5d0c9d4..ccca84202 100644 --- a/neo4j/work/pipelining.py +++ b/neo4j/work/pipelining.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2018 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/work/result.py b/neo4j/work/result.py index e31036105..cf68741e4 100644 --- a/neo4j/work/result.py +++ b/neo4j/work/result.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/work/simple.py b/neo4j/work/simple.py index 06e53c24b..ef1e6d8c4 100644 --- a/neo4j/work/simple.py +++ b/neo4j/work/simple.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/work/summary.py b/neo4j/work/summary.py index 37a2290ab..c1d7dcf87 100644 --- a/neo4j/work/summary.py +++ b/neo4j/work/summary.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/neo4j/work/transaction.py b/neo4j/work/transaction.py index 1f3bd1ffb..7cb7dc968 100644 --- a/neo4j/work/transaction.py +++ b/neo4j/work/transaction.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/setup.py b/setup.py index 601dca9cd..893b37431 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index e36cf9d90..54f1e759f 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/__init__.py b/tests/integration/examples/__init__.py index ef1cb5268..87bbaf268 100644 --- a/tests/integration/examples/__init__.py +++ b/tests/integration/examples/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_autocommit_transaction_example.py b/tests/integration/examples/test_autocommit_transaction_example.py index 026ec655e..0f5b16e19 100644 --- a/tests/integration/examples/test_autocommit_transaction_example.py +++ b/tests/integration/examples/test_autocommit_transaction_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_basic_auth_example.py b/tests/integration/examples/test_basic_auth_example.py index ad6707d2a..90e328082 100644 --- a/tests/integration/examples/test_basic_auth_example.py +++ b/tests/integration/examples/test_basic_auth_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_config_connection_pool_example.py b/tests/integration/examples/test_config_connection_pool_example.py index 4aa5213c3..7ddaacc72 100644 --- a/tests/integration/examples/test_config_connection_pool_example.py +++ b/tests/integration/examples/test_config_connection_pool_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_config_connection_timeout_example.py b/tests/integration/examples/test_config_connection_timeout_example.py index aeb7c61cb..00d6c97dc 100644 --- a/tests/integration/examples/test_config_connection_timeout_example.py +++ b/tests/integration/examples/test_config_connection_timeout_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_config_max_retry_time_example.py b/tests/integration/examples/test_config_max_retry_time_example.py index 9a7a43104..8cd25905c 100644 --- a/tests/integration/examples/test_config_max_retry_time_example.py +++ b/tests/integration/examples/test_config_max_retry_time_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_config_secure_example.py b/tests/integration/examples/test_config_secure_example.py index 4b0910ea1..ebd048dc1 100644 --- a/tests/integration/examples/test_config_secure_example.py +++ b/tests/integration/examples/test_config_secure_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_config_trust_example.py b/tests/integration/examples/test_config_trust_example.py index 9fef3ac20..1466c5369 100644 --- a/tests/integration/examples/test_config_trust_example.py +++ b/tests/integration/examples/test_config_trust_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_config_unencrypted_example.py b/tests/integration/examples/test_config_unencrypted_example.py index 4cb6a5ce9..6d70ad032 100644 --- a/tests/integration/examples/test_config_unencrypted_example.py +++ b/tests/integration/examples/test_config_unencrypted_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_custom_auth_example.py b/tests/integration/examples/test_custom_auth_example.py index 6431a7e72..1aaddd1ea 100644 --- a/tests/integration/examples/test_custom_auth_example.py +++ b/tests/integration/examples/test_custom_auth_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_custom_resolver_example.py b/tests/integration/examples/test_custom_resolver_example.py index 3e4eb0f6a..fe4e5e08b 100644 --- a/tests/integration/examples/test_custom_resolver_example.py +++ b/tests/integration/examples/test_custom_resolver_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_cypher_error_example.py b/tests/integration/examples/test_cypher_error_example.py index 946219d9e..c2108b9fd 100644 --- a/tests/integration/examples/test_cypher_error_example.py +++ b/tests/integration/examples/test_cypher_error_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_database_selection_example.py b/tests/integration/examples/test_database_selection_example.py index 1cecb9c6b..6d5752995 100644 --- a/tests/integration/examples/test_database_selection_example.py +++ b/tests/integration/examples/test_database_selection_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_driver_introduction_example.py b/tests/integration/examples/test_driver_introduction_example.py index 605fcb9e5..5d592680f 100644 --- a/tests/integration/examples/test_driver_introduction_example.py +++ b/tests/integration/examples/test_driver_introduction_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_driver_lifecycle_example.py b/tests/integration/examples/test_driver_lifecycle_example.py index e29eb00af..d416173fd 100644 --- a/tests/integration/examples/test_driver_lifecycle_example.py +++ b/tests/integration/examples/test_driver_lifecycle_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_hello_world_example.py b/tests/integration/examples/test_hello_world_example.py index 0d3428542..a27234533 100644 --- a/tests/integration/examples/test_hello_world_example.py +++ b/tests/integration/examples/test_hello_world_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_kerberos_auth_example.py b/tests/integration/examples/test_kerberos_auth_example.py index 10500d734..8587e35f8 100644 --- a/tests/integration/examples/test_kerberos_auth_example.py +++ b/tests/integration/examples/test_kerberos_auth_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_pass_bookmarks_example.py b/tests/integration/examples/test_pass_bookmarks_example.py index 605238f7a..6f51584ae 100644 --- a/tests/integration/examples/test_pass_bookmarks_example.py +++ b/tests/integration/examples/test_pass_bookmarks_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_read_write_transaction_example.py b/tests/integration/examples/test_read_write_transaction_example.py index cbfc8f6e9..04a1a4efa 100644 --- a/tests/integration/examples/test_read_write_transaction_example.py +++ b/tests/integration/examples/test_read_write_transaction_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_result_consume_example.py b/tests/integration/examples/test_result_consume_example.py index fda6511d3..53da413bc 100644 --- a/tests/integration/examples/test_result_consume_example.py +++ b/tests/integration/examples/test_result_consume_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_result_retain_example.py b/tests/integration/examples/test_result_retain_example.py index 89fe24c2e..a96bf02e8 100644 --- a/tests/integration/examples/test_result_retain_example.py +++ b/tests/integration/examples/test_result_retain_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_service_unavailable_example.py b/tests/integration/examples/test_service_unavailable_example.py index 5b401b002..7b2961db5 100644 --- a/tests/integration/examples/test_service_unavailable_example.py +++ b/tests/integration/examples/test_service_unavailable_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_session_example.py b/tests/integration/examples/test_session_example.py index 480591114..65cb3255d 100644 --- a/tests/integration/examples/test_session_example.py +++ b/tests/integration/examples/test_session_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/examples/test_transaction_function_example.py b/tests/integration/examples/test_transaction_function_example.py index f637c4796..5e525dfff 100644 --- a/tests/integration/examples/test_transaction_function_example.py +++ b/tests/integration/examples/test_transaction_function_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_autocommit.py b/tests/integration/test_autocommit.py index 316a9f838..a3c738a49 100644 --- a/tests/integration/test_autocommit.py +++ b/tests/integration/test_autocommit.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_bolt_driver.py b/tests/integration/test_bolt_driver.py index 49a7cf87d..408ce89a7 100644 --- a/tests/integration/test_bolt_driver.py +++ b/tests/integration/test_bolt_driver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_bookmarking.py b/tests/integration/test_bookmarking.py index 0679186a7..736e3cf67 100644 --- a/tests/integration/test_bookmarking.py +++ b/tests/integration/test_bookmarking.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_core_types.py b/tests/integration/test_core_types.py index 288f314e0..d44acdbd9 100644 --- a/tests/integration/test_core_types.py +++ b/tests/integration/test_core_types.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_explicit_tx.py b/tests/integration/test_explicit_tx.py index 885eba026..718de2ca6 100644 --- a/tests/integration/test_explicit_tx.py +++ b/tests/integration/test_explicit_tx.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_graph_types.py b/tests/integration/test_graph_types.py index 25c7eda44..33949ba33 100644 --- a/tests/integration/test_graph_types.py +++ b/tests/integration/test_graph_types.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_neo4j_driver.py b/tests/integration/test_neo4j_driver.py index 18208922c..97e07485b 100644 --- a/tests/integration/test_neo4j_driver.py +++ b/tests/integration/test_neo4j_driver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_pipelines.py b/tests/integration/test_pipelines.py index ed4b637fc..076fe0a31 100644 --- a/tests/integration/test_pipelines.py +++ b/tests/integration/test_pipelines.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2018 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_readme.py b/tests/integration/test_readme.py index 82e98adf6..4788411d6 100644 --- a/tests/integration/test_readme.py +++ b/tests/integration/test_readme.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_result.py b/tests/integration/test_result.py index 250ba8c89..a6ca598b5 100644 --- a/tests/integration/test_result.py +++ b/tests/integration/test_result.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_result_data.py b/tests/integration/test_result_data.py index c166c8627..ae545e6f8 100644 --- a/tests/integration/test_result_data.py +++ b/tests/integration/test_result_data.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_result_graph.py b/tests/integration/test_result_graph.py index 9d8b9034e..8c2cf81f4 100644 --- a/tests/integration/test_result_graph.py +++ b/tests/integration/test_result_graph.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_spatial_types.py b/tests/integration/test_spatial_types.py index 1e07ed374..2227715f8 100644 --- a/tests/integration/test_spatial_types.py +++ b/tests/integration/test_spatial_types.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_summary.py b/tests/integration/test_summary.py index 9a811425b..32b5b0b80 100644 --- a/tests/integration/test_summary.py +++ b/tests/integration/test_summary.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_temporal_types.py b/tests/integration/test_temporal_types.py index 2ae4c622e..0e996db23 100644 --- a/tests/integration/test_temporal_types.py +++ b/tests/integration/test_temporal_types.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/integration/test_tx_functions.py b/tests/integration/test_tx_functions.py index e28f87e8e..184efbcd0 100644 --- a/tests/integration/test_tx_functions.py +++ b/tests/integration/test_tx_functions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/stub/conftest.py b/tests/stub/conftest.py index 48b29b7de..f7db996b1 100644 --- a/tests/stub/conftest.py +++ b/tests/stub/conftest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/stub/test_accesslevel.py b/tests/stub/test_accesslevel.py index b10164ea7..12f465132 100644 --- a/tests/stub/test_accesslevel.py +++ b/tests/stub/test_accesslevel.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/stub/test_bookmarking.py b/tests/stub/test_bookmarking.py index 3e3262fde..0aee5757a 100644 --- a/tests/stub/test_bookmarking.py +++ b/tests/stub/test_bookmarking.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/stub/test_directdriver.py b/tests/stub/test_directdriver.py index 592b6de1e..dd595e0aa 100644 --- a/tests/stub/test_directdriver.py +++ b/tests/stub/test_directdriver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/stub/test_multi_database.py b/tests/stub/test_multi_database.py index efa4570d4..489291aa1 100644 --- a/tests/stub/test_multi_database.py +++ b/tests/stub/test_multi_database.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/stub/test_routingdriver.py b/tests/stub/test_routingdriver.py index d9603ef5e..8ab750f38 100644 --- a/tests/stub/test_routingdriver.py +++ b/tests/stub/test_routingdriver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/stub/test_transactions.py b/tests/stub/test_transactions.py index c1c17740a..b1e705d66 100644 --- a/tests/stub/test_transactions.py +++ b/tests/stub/test_transactions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/data/test_packing.py b/tests/unit/data/test_packing.py index d4dfa5588..6fc296af6 100644 --- a/tests/unit/data/test_packing.py +++ b/tests/unit/data/test_packing.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/io/conftest.py b/tests/unit/io/conftest.py index 8a4f23071..f5bb67cc4 100644 --- a/tests/unit/io/conftest.py +++ b/tests/unit/io/conftest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/io/test_class_bolt.py b/tests/unit/io/test_class_bolt.py index 082b07f21..b37dc7687 100644 --- a/tests/unit/io/test_class_bolt.py +++ b/tests/unit/io/test_class_bolt.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/io/test_class_bolt3.py b/tests/unit/io/test_class_bolt3.py index cd60d27bc..eba6957ac 100644 --- a/tests/unit/io/test_class_bolt3.py +++ b/tests/unit/io/test_class_bolt3.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/io/test_class_bolt4x0.py b/tests/unit/io/test_class_bolt4x0.py index 1886e5fcd..ee5f1b729 100644 --- a/tests/unit/io/test_class_bolt4x0.py +++ b/tests/unit/io/test_class_bolt4x0.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/io/test_direct.py b/tests/unit/io/test_direct.py index 479a4cc0e..1664bfa1c 100644 --- a/tests/unit/io/test_direct.py +++ b/tests/unit/io/test_direct.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/io/test_routing.py b/tests/unit/io/test_routing.py index 0380468b8..ff555bcb8 100644 --- a/tests/unit/io/test_routing.py +++ b/tests/unit/io/test_routing.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_addressing.py b/tests/unit/test_addressing.py index d10ac3870..86cb0c54a 100644 --- a/tests/unit/test_addressing.py +++ b/tests/unit/test_addressing.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_api.py b/tests/unit/test_api.py index d7a3d5c6a..30dc1bfb1 100644 --- a/tests/unit/test_api.py +++ b/tests/unit/test_api.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_conf.py b/tests/unit/test_conf.py index 7ecc6614e..ccd795011 100644 --- a/tests/unit/test_conf.py +++ b/tests/unit/test_conf.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_data.py b/tests/unit/test_data.py index 124404efd..7f48af9dc 100644 --- a/tests/unit/test_data.py +++ b/tests/unit/test_data.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_exceptions.py b/tests/unit/test_exceptions.py index 385d7486b..fda28b460 100644 --- a/tests/unit/test_exceptions.py +++ b/tests/unit/test_exceptions.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_import_neo4j.py b/tests/unit/test_import_neo4j.py index d1b04668a..a7ab16e13 100644 --- a/tests/unit/test_import_neo4j.py +++ b/tests/unit/test_import_neo4j.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_record.py b/tests/unit/test_record.py index 10fb5c3a6..1f13e6e6c 100644 --- a/tests/unit/test_record.py +++ b/tests/unit/test_record.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_security.py b/tests/unit/test_security.py index 8d9575661..ae009cf45 100644 --- a/tests/unit/test_security.py +++ b/tests/unit/test_security.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/test_types.py b/tests/unit/test_types.py index 221e90bf6..68c0473a1 100644 --- a/tests/unit/test_types.py +++ b/tests/unit/test_types.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/__init__.py b/tests/unit/time/__init__.py index 66ce46474..0665bdc90 100644 --- a/tests/unit/time/__init__.py +++ b/tests/unit/time/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/test_clock.py b/tests/unit/time/test_clock.py index cc803a48b..fd182bcd5 100644 --- a/tests/unit/time/test_clock.py +++ b/tests/unit/time/test_clock.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/test_clocktime.py b/tests/unit/time/test_clocktime.py index dea1b17ec..ceb2a13ad 100644 --- a/tests/unit/time/test_clocktime.py +++ b/tests/unit/time/test_clocktime.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/test_date.py b/tests/unit/time/test_date.py index ca27c04c7..2ab0f1200 100644 --- a/tests/unit/time/test_date.py +++ b/tests/unit/time/test_date.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/test_datetime.py b/tests/unit/time/test_datetime.py index 38eb50574..0f508bc3e 100644 --- a/tests/unit/time/test_datetime.py +++ b/tests/unit/time/test_datetime.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/test_duration.py b/tests/unit/time/test_duration.py index f548637d1..4195a9428 100644 --- a/tests/unit/time/test_duration.py +++ b/tests/unit/time/test_duration.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/test_hydration.py b/tests/unit/time/test_hydration.py index 58661c016..fbe86a296 100644 --- a/tests/unit/time/test_hydration.py +++ b/tests/unit/time/test_hydration.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. diff --git a/tests/unit/time/test_time.py b/tests/unit/time/test_time.py index 2aaced315..f6e8dce0a 100644 --- a/tests/unit/time/test_time.py +++ b/tests/unit/time/test_time.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) 2002-2020 "Neo4j," +# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. From afb721a6acfd8e33c7db67a0b12fc671d8cd50c2 Mon Sep 17 00:00:00 2001 From: stellasia Date: Mon, 5 Apr 2021 16:13:24 +0200 Subject: [PATCH 6/6] Fix #523 --- neo4j/time/__init__.py | 24 ++++++++++++++++++++++++ tests/unit/time/test_date.py | 13 +++++++++++++ tests/unit/time/test_datetime.py | 14 +++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/neo4j/time/__init__.py b/neo4j/time/__init__.py index 71652efe7..54460f312 100644 --- a/neo4j/time/__init__.py +++ b/neo4j/time/__init__.py @@ -389,6 +389,12 @@ def __repr__(self): def __str__(self): return self.iso_format() + def __copy__(self): + return self.__new(self.ticks, self.hour, self.minute, self.second, self.tzinfo) + + def __deepcopy__(self, memodict={}): + return self.__copy__() + @classmethod def from_iso_format(cls, s): m = DURATION_ISO_PATTERN.match(s) @@ -845,6 +851,12 @@ def __sub__(self, other): except TypeError: return NotImplemented + def __copy__(self): + return self.__new(self.__ordinal, self.__year, self.__month, self.__day) + + def __deepcopy__(self, *args, **kwargs): + return self.__copy__() + # INSTANCE METHODS # def replace(self, **kwargs): @@ -1133,6 +1145,12 @@ def __add__(self, other): def __sub__(self, other): return NotImplemented + def __copy__(self): + return self.__new(self.__ticks, self.__hour, self.__minute, self.__second, self.__tzinfo) + + def __deepcopy__(self, *args, **kwargs): + return self.__copy__() + # INSTANCE METHODS # def replace(self, **kwargs): @@ -1474,6 +1492,12 @@ def __sub__(self, other): return self.__add__(-other) return NotImplemented + def __copy__(self): + return self.combine(self.__date, self.__time) + + def __deepcopy__(self, *args, **kwargs): + return self.__copy__() + # INSTANCE METHODS # def date(self): diff --git a/tests/unit/time/test_date.py b/tests/unit/time/test_date.py index 2ab0f1200..6b76d1b5e 100644 --- a/tests/unit/time/test_date.py +++ b/tests/unit/time/test_date.py @@ -24,6 +24,7 @@ from unittest import TestCase import pytz +import copy from neo4j.time import Duration, Date, UnixEpoch, ZeroDate @@ -532,3 +533,15 @@ def test_from_iso_format(self): expected = Date(2018, 10, 1) actual = Date.from_iso_format("2018-10-01") self.assertEqual(expected, actual) + + def test_date_copy(self): + d = Date(2010, 10, 1) + d2 = copy.copy(d) + self.assertIsNot(d, d2) + self.assertEqual(d, d2) + + def test_date_deep_copy(self): + d = Date(2010, 10, 1) + d2 = copy.deepcopy(d) + self.assertIsNot(d, d2) + self.assertEqual(d, d2) diff --git a/tests/unit/time/test_datetime.py b/tests/unit/time/test_datetime.py index 0f508bc3e..42c9d676e 100644 --- a/tests/unit/time/test_datetime.py +++ b/tests/unit/time/test_datetime.py @@ -18,7 +18,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - +import copy from unittest import TestCase from datetime import ( datetime, @@ -337,6 +337,18 @@ def test_from_iso_format_with_negative_long_tz(self): actual = DateTime.from_iso_format("2018-10-01T12:34:56.123456789-12:34:56.123456") self.assertEqual(expected, actual) + def test_datetime_copy(self): + d = DateTime(2010, 10, 1, 10, 0, 10) + d2 = copy.copy(d) + self.assertIsNot(d, d2) + self.assertEqual(d, d2) + + def test_datetime_deep_copy(self): + d = DateTime(2010, 10, 1, 10, 0, 12) + d2 = copy.deepcopy(d) + self.assertIsNot(d, d2) + self.assertEqual(d, d2) + def test_iso_format_with_time_zone_case_1(): # python -m pytest tests/unit/time/test_datetime.py -s -v -k test_iso_format_with_time_zone_case_1