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 f1772c71..f671e3e1 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 6aab0d5b..48b29b7d 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 10061455..6fe98091 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 91e7c72d..26015e66 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 c62d2dec..d9603ef5 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 890aaae9..ace851fb 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 5e0300f5..5f1490fe 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 2138a18a..445da43a 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 13046985..1bfbd420 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 5f4db511..e294291b 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 80ee0b6f..0179b0e4 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 f671e3e1..0dfa33ee 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 bc9f173c..e1a3a959 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 b66e218e..b8872a37 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 26015e66..d73e67ed 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 95f316e8..66285af7 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 6fe98091..8e59a5de 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 d57b8426..31fb52b3 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 32c23924..a9b87f8d 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 cc7e01bb..60cebb7b 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 d994c72d..e4e49abf 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 9616f1e5..48f0be60 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 7e25d713..1b72451b 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 b79c2cb0..a0ef48c2 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 37d0eb84..f7085fd4 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 c878bad3..71652efe 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 2500bbb5..447b375c 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 67028e43..d9b37419 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 1559e172..cda32cd9 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 32a7bfd9..313ed161 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 2be81abc..278a0fb6 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 c97cc7ca..a516004c 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 ce5d0c9d..ccca8420 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 e3103610..cf68741e 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 06e53c24..ef1e6d8c 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 37a2290a..c1d7dcf8 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 1f3bd1ff..7cb7dc96 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 601dca9c..893b3743 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 e36cf9d9..54f1e759 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 ef1cb526..87bbaf26 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 026ec655..0f5b16e1 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 ad6707d2..90e32808 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 4aa5213c..7ddaacc7 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 aeb7c61c..00d6c97d 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 9a7a4310..8cd25905 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 4b0910ea..ebd048dc 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 9fef3ac2..1466c536 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 4cb6a5ce..6d70ad03 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 6431a7e7..1aaddd1e 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 3e4eb0f6..fe4e5e08 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 946219d9..c2108b9f 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 1cecb9c6..6d575299 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 605fcb9e..5d592680 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 e29eb00a..d416173f 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 0d342854..a2723453 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 10500d73..8587e35f 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 605238f7..6f51584a 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 cbfc8f6e..04a1a4ef 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 fda6511d..53da413b 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 89fe24c2..a96bf02e 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 5b401b00..7b2961db 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 48059111..65cb3255 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 f637c479..5e525dff 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 316a9f83..a3c738a4 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 49a7cf87..408ce89a 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 0679186a..736e3cf6 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 288f314e..d44acdbd 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 885eba02..718de2ca 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 25c7eda4..33949ba3 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 18208922..97e07485 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 ed4b637f..076fe0a3 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 82e98adf..4788411d 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 250ba8c8..a6ca598b 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 c166c862..ae545e6f 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 9d8b9034..8c2cf81f 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 1e07ed37..2227715f 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 9a811425..32b5b0b8 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 2ae4c622..0e996db2 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 e28f87e8..184efbcd 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 48b29b7d..f7db996b 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 b10164ea..12f46513 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 3e3262fd..0aee5757 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 592b6de1..dd595e0a 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 efa4570d..489291aa 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 d9603ef5..8ab750f3 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 c1c17740..b1e705d6 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 d4dfa558..6fc296af 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 8a4f2307..f5bb67cc 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 082b07f2..b37dc768 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 cd60d27b..eba6957a 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 1886e5fc..ee5f1b72 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 479a4cc0..1664bfa1 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 0380468b..ff555bcb 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 d10ac387..86cb0c54 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 d7a3d5c6..30dc1bfb 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 7ecc6614..ccd79501 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 124404ef..7f48af9d 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 385d7486..fda28b46 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 d1b04668..a7ab16e1 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 10fb5c3a..1f13e6e6 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 8d957566..ae009cf4 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 221e90bf..68c0473a 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 66ce4647..0665bdc9 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 cc803a48..fd182bcd 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 dea1b17e..ceb2a13a 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 ca27c04c..2ab0f120 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 38eb5057..0f508bc3 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 f548637d..4195a942 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 58661c01..fbe86a29 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 2aaced31..f6e8dce0 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 71652efe..54460f31 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 2ab0f120..6b76d1b5 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 0f508bc3..42c9d676 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