diff --git a/CHANGELOG.md b/CHANGELOG.md index e15d2d1a..fb4cd329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,19 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki for a full changelog. ## NEXT RELEASE -- No breaking or major changes. +- Remove deprecated modules: + - `neo4j.conf` + - `neo4j.data` + - `neo4j.meta` + - `neo4j.packstream` + - `neo4j.routing` + - `neo4j.time.arithmetic` + - `neo4j.time.clock_implementation` + - `neo4j.time.hydration` + - `neo4j.time.metaclasses` + - `neo4j.work` + - `neo4j.work.query` + - `neo4j.work.summary` ## Version 5.28 diff --git a/src/neo4j/conf.py b/src/neo4j/conf.py deleted file mode 100644 index d0a42f91..00000000 --- a/src/neo4j/conf.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from ._conf import ( - Config, - ConfigType, - DeprecatedAlias, - DeprecatedAlternative, - iter_items, - RoutingConfig, - SessionConfig, - TransactionConfig, - WorkspaceConfig, -) -from ._meta import deprecation_warn as _deprecation_warn -from ._sync.config import PoolConfig - - -__all__ = [ - "Config", - "ConfigType", - "DeprecatedAlias", - "DeprecatedAlternative", - "PoolConfig", - "RoutingConfig", - "SessionConfig", - "TransactionConfig", - "WorkspaceConfig", - "iter_items", -] - -_deprecation_warn( - "The module `neo4j.conf` was made internal and will " - "no longer be available for import in future versions.", - stack_level=2, -) diff --git a/src/neo4j/data.py b/src/neo4j/data.py deleted file mode 100644 index a7c75ba0..00000000 --- a/src/neo4j/data.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from ._data import ( - DataTransformer, - Record, - RecordExporter, - RecordTableRowExporter, -) -from ._meta import deprecation_warn - - -__all__ = [ - "DataTransformer", - "Record", - "RecordExporter", - "RecordTableRowExporter", -] - -deprecation_warn( - "The module `neo4j.data` was made internal and will " - "no longer be available for import in future versions. " - "`neo4j.data.Record` should be imported directly from `neo4j`.", - stack_level=2, -) diff --git a/src/neo4j/meta.py b/src/neo4j/meta.py deleted file mode 100644 index 9458dfcf..00000000 --- a/src/neo4j/meta.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from ._meta import ( - deprecated, - deprecation_warn, - experimental, - ExperimentalWarning, - get_user_agent, - package, - version, -) - - -__all__ = [ - "ExperimentalWarning", - "deprecated", - "deprecation_warn", - "experimental", - "get_user_agent", - "package", - "version", -] - -deprecation_warn( - "The module `neo4j.meta` was made internal and will " - "no longer be available for import in future versions." - "`ExperimentalWarning` can be imported from `neo4j.warnings` and " - "`neo4j.meta.version` is exposed through `neo4j.__version__`.", - stack_level=2, -) diff --git a/src/neo4j/packstream.py b/src/neo4j/packstream.py deleted file mode 100644 index cb65a267..00000000 --- a/src/neo4j/packstream.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# TODO: 6.0 - remove this file - - -from ._codec.packstream.v1 import ( - INT64_MAX, - INT64_MIN, - PACKED_UINT_8, - PACKED_UINT_16, - Packer, - Structure, - UnpackableBuffer, - UNPACKED_UINT_8, - UNPACKED_UINT_16, - Unpacker, -) -from ._meta import deprecation_warn - - -__all__ = [ - "INT64_MAX", - "INT64_MIN", - "PACKED_UINT_8", - "PACKED_UINT_16", - "UNPACKED_UINT_8", - "UNPACKED_UINT_16", - "Packer", - "Structure", - "UnpackableBuffer", - "Unpacker", -] - -deprecation_warn( - "The module `neo4j.packstream` was made internal and will " - "no longer be available for import in future versions.", - stack_level=2, -) diff --git a/src/neo4j/routing.py b/src/neo4j/routing.py deleted file mode 100644 index 31afd333..00000000 --- a/src/neo4j/routing.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from ._meta import deprecation_warn as _deprecation_warn -from ._routing import ( - OrderedSet, - RoutingTable, -) - - -__all__ = [ - "OrderedSet", - "RoutingTable", -] - -_deprecation_warn( - "The module `neo4j.routing` was made internal and will " - "no longer be available for import in future versions.", - stack_level=2, -) diff --git a/src/neo4j/time/__main__.py b/src/neo4j/time/__main__.py deleted file mode 100644 index 3f968099..00000000 --- a/src/neo4j/time/__main__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/src/neo4j/time/arithmetic.py b/src/neo4j/time/arithmetic.py deleted file mode 100644 index a8589cae..00000000 --- a/src/neo4j/time/arithmetic.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from .._meta import deprecation_warn -from ._arithmetic import ( - nano_add, - nano_div, - nano_divmod, - round_half_to_even, - symmetric_divmod, -) - - -__all__ = [ - "nano_add", - "nano_div", - "nano_divmod", - "round_half_to_even", - "symmetric_divmod", -] - -deprecation_warn( - "The module `neo4j.time.arithmetic` was made internal and will " - "no longer be available for import in future versions.", - stack_level=2, -) diff --git a/src/neo4j/time/clock_implementations.py b/src/neo4j/time/clock_implementations.py deleted file mode 100644 index 3d9835ff..00000000 --- a/src/neo4j/time/clock_implementations.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from .._meta import deprecation_warn -from ._clock_implementations import ( - LibCClock, - PEP564Clock, - SafeClock, -) - - -__all__ = [ - "LibCClock", - "PEP564Clock", - "SafeClock", -] - -deprecation_warn( - "The module `neo4j.time.clock_implementations` was made internal and will " - "no longer be available for import in future versions.", - stack_level=2, -) diff --git a/src/neo4j/time/hydration.py b/src/neo4j/time/hydration.py deleted file mode 100644 index bd4bb948..00000000 --- a/src/neo4j/time/hydration.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from .._codec.hydration.v1.temporal import ( - dehydrate_date, - dehydrate_datetime, - dehydrate_duration, - dehydrate_time, - dehydrate_timedelta, - get_date_unix_epoch, - get_date_unix_epoch_ordinal, - get_datetime_unix_epoch_utc, - hydrate_date, - hydrate_datetime, - hydrate_duration, - hydrate_time, -) -from .._meta import deprecation_warn - - -__all__ = [ - "dehydrate_date", - "dehydrate_datetime", - "dehydrate_duration", - "dehydrate_time", - "dehydrate_timedelta", - "get_date_unix_epoch", - "get_date_unix_epoch_ordinal", - "get_datetime_unix_epoch_utc", - "hydrate_date", - "hydrate_datetime", - "hydrate_duration", - "hydrate_time", -] - -deprecation_warn( - "The module `neo4j.time.hydration` was made internal and will " - "no longer be available for import in future versions.", - stack_level=2, -) diff --git a/src/neo4j/time/metaclasses.py b/src/neo4j/time/metaclasses.py deleted file mode 100644 index 932b0361..00000000 --- a/src/neo4j/time/metaclasses.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from .._meta import deprecation_warn -from ._metaclasses import ( - DateTimeType, - DateType, - TimeType, -) - - -__all__ = [ - "DateTimeType", - "DateType", - "TimeType", -] - -deprecation_warn( - "The module `neo4j.time.metaclasses` was made internal and will " - "no longer be available for import in future versions.", - stack_level=2, -) diff --git a/src/neo4j/work/__init__.py b/src/neo4j/work/__init__.py deleted file mode 100644 index 04c9ecb8..00000000 --- a/src/neo4j/work/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from .._meta import deprecation_warn -from .._work import ( - Query, - ResultSummary, - SummaryCounters, - unit_of_work, -) - - -__all__ = [ - "Query", - "ResultSummary", - "SummaryCounters", - "unit_of_work", -] - - -deprecation_warn( - "The module `neo4j.work` was made internal and will " - "no longer be available for import in future versions. " - "Everything from there should be imported directly from `neo4j`.", - stack_level=2, -) diff --git a/src/neo4j/work/query.py b/src/neo4j/work/query.py deleted file mode 100644 index 15c5e5ca..00000000 --- a/src/neo4j/work/query.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from .._meta import deprecation_warn -from .._work import ( - Query, - unit_of_work, -) - - -__all__ = [ - "Query", - "unit_of_work", -] - -deprecation_warn( - "The module `neo4j.work.summary` was made internal and will " - "no longer be available for import in future versions. " - "Everything from there should be imported directly from `neo4j`.", - stack_level=2, -) diff --git a/src/neo4j/work/summary.py b/src/neo4j/work/summary.py deleted file mode 100644 index e168e581..00000000 --- a/src/neo4j/work/summary.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) "Neo4j" -# Neo4j Sweden AB [https://neo4j.com] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: 6.0 - remove this file - - -from .._meta import deprecation_warn -from .._work import ( - ResultSummary, - SummaryCounters, -) - - -__all__ = [ - "ResultSummary", - "SummaryCounters", -] - -deprecation_warn( - "The module `neo4j.work.summary` was made internal and will " - "no longer be available for import in future versions. " - "Everything from there should be imported directly from `neo4j`.", - stack_level=2, -) diff --git a/tests/unit/common/test_import_neo4j.py b/tests/unit/common/test_import_neo4j.py index 7f7033c9..92f4688e 100644 --- a/tests/unit/common/test_import_neo4j.py +++ b/tests/unit/common/test_import_neo4j.py @@ -171,13 +171,8 @@ def test_import_star(): ("addressing", None), ("api", None), ("auth_management", None), - ("conf", DeprecationWarning), - ("data", DeprecationWarning), ("debug", None), ("exceptions", None), - ("meta", DeprecationWarning), - ("packstream", DeprecationWarning), - ("routing", DeprecationWarning), ("warnings", None), )