From db4bdf79fafaa9b4b72b75c6ccaa99180d1d28bb Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Thu, 24 Nov 2022 12:01:26 +0100 Subject: [PATCH 1/3] Modernize packaging * Introducing `pyproject.toml` https://peps.python.org/pep-0621/ * Migrate from flat-layout to src-layout * Deprecate legacy package name `neo4j-driver` in favor of `neo4j` + warn about it --- .coveragerc | 19 --- .pre-commit-config.yaml | 4 +- CONTRIBUTING.md | 2 +- MANIFEST.in | 5 +- README.rst | 9 ++ bin/dist-functions | 56 ++++++--- bin/make-unasync | 4 +- pyproject.toml | 111 ++++++++++++++++++ requirements-dev.txt | 24 +++- setup.cfg | 26 ---- setup.py | 107 +++++++++-------- {neo4j => src/neo4j}/__init__.py | 11 ++ {neo4j => src/neo4j}/_async/__init__.py | 0 .../neo4j}/_async/bookmark_manager.py | 0 {neo4j => src/neo4j}/_async/driver.py | 0 {neo4j => src/neo4j}/_async/io/__init__.py | 0 {neo4j => src/neo4j}/_async/io/_bolt.py | 0 {neo4j => src/neo4j}/_async/io/_bolt3.py | 0 {neo4j => src/neo4j}/_async/io/_bolt4.py | 0 {neo4j => src/neo4j}/_async/io/_bolt5.py | 0 {neo4j => src/neo4j}/_async/io/_common.py | 0 {neo4j => src/neo4j}/_async/io/_pool.py | 0 {neo4j => src/neo4j}/_async/work/__init__.py | 0 {neo4j => src/neo4j}/_async/work/result.py | 0 {neo4j => src/neo4j}/_async/work/session.py | 0 .../neo4j}/_async/work/transaction.py | 0 {neo4j => src/neo4j}/_async/work/workspace.py | 0 .../neo4j}/_async_compat/__init__.py | 0 .../neo4j}/_async_compat/concurrency.py | 0 .../neo4j}/_async_compat/network/__init__.py | 0 .../_async_compat/network/_bolt_socket.py | 0 .../neo4j}/_async_compat/network/_util.py | 0 .../neo4j}/_async_compat/shims/__init__.py | 0 {neo4j => src/neo4j}/_async_compat/util.py | 0 {neo4j => src/neo4j}/_codec/__init__.py | 0 .../neo4j}/_codec/hydration/__init__.py | 0 .../neo4j}/_codec/hydration/_common.py | 0 .../_codec/hydration/_interface/__init__.py | 0 .../neo4j}/_codec/hydration/v1/__init__.py | 0 .../_codec/hydration/v1/hydration_handler.py | 0 .../neo4j}/_codec/hydration/v1/spatial.py | 0 .../neo4j}/_codec/hydration/v1/temporal.py | 0 .../neo4j}/_codec/hydration/v2/__init__.py | 0 .../_codec/hydration/v2/hydration_handler.py | 0 .../neo4j}/_codec/hydration/v2/temporal.py | 0 .../neo4j}/_codec/packstream/__init__.py | 0 .../neo4j}/_codec/packstream/_common.py | 0 .../neo4j}/_codec/packstream/v1/__init__.py | 0 {neo4j => src/neo4j}/_conf.py | 0 {neo4j => src/neo4j}/_data.py | 0 {neo4j => src/neo4j}/_deadline.py | 0 {neo4j => src/neo4j}/_exceptions.py | 0 {neo4j => src/neo4j}/_meta.py | 1 + {neo4j => src/neo4j}/_routing.py | 0 {neo4j => src/neo4j}/_spatial/__init__.py | 0 {neo4j => src/neo4j}/_sync/__init__.py | 0 .../neo4j}/_sync/bookmark_manager.py | 0 {neo4j => src/neo4j}/_sync/driver.py | 0 {neo4j => src/neo4j}/_sync/io/__init__.py | 0 {neo4j => src/neo4j}/_sync/io/_bolt.py | 0 {neo4j => src/neo4j}/_sync/io/_bolt3.py | 0 {neo4j => src/neo4j}/_sync/io/_bolt4.py | 0 {neo4j => src/neo4j}/_sync/io/_bolt5.py | 0 {neo4j => src/neo4j}/_sync/io/_common.py | 0 {neo4j => src/neo4j}/_sync/io/_pool.py | 0 {neo4j => src/neo4j}/_sync/work/__init__.py | 0 {neo4j => src/neo4j}/_sync/work/result.py | 0 {neo4j => src/neo4j}/_sync/work/session.py | 0 .../neo4j}/_sync/work/transaction.py | 0 {neo4j => src/neo4j}/_sync/work/workspace.py | 0 {neo4j => src/neo4j}/addressing.py | 0 {neo4j => src/neo4j}/api.py | 0 {neo4j => src/neo4j}/conf.py | 0 {neo4j => src/neo4j}/data.py | 0 {neo4j => src/neo4j}/debug.py | 0 {neo4j => src/neo4j}/exceptions.py | 0 {neo4j => src/neo4j}/graph/__init__.py | 0 {neo4j => src/neo4j}/meta.py | 0 {neo4j => src/neo4j}/packstream.py | 0 {neo4j => src/neo4j}/py.typed | 0 {neo4j => src/neo4j}/routing.py | 0 {neo4j => src/neo4j}/spatial/__init__.py | 0 {neo4j => src/neo4j}/time/__init__.py | 0 {neo4j => src/neo4j}/time/__main__.py | 0 {neo4j => src/neo4j}/time/_arithmetic.py | 0 .../neo4j}/time/_clock_implementations.py | 0 {neo4j => src/neo4j}/time/_metaclasses.py | 0 {neo4j => src/neo4j}/time/arithmetic.py | 0 .../neo4j}/time/clock_implementations.py | 0 {neo4j => src/neo4j}/time/hydration.py | 0 {neo4j => src/neo4j}/time/metaclasses.py | 0 {neo4j => src/neo4j}/work/__init__.py | 0 {neo4j => src/neo4j}/work/query.py | 0 {neo4j => src/neo4j}/work/summary.py | 0 testkit/build.py | 3 +- testkitbackend/requirements.txt | 1 - tests/requirements.txt | 9 -- tox.ini | 12 +- 98 files changed, 262 insertions(+), 142 deletions(-) delete mode 100644 .coveragerc create mode 100644 pyproject.toml delete mode 100644 setup.cfg rename {neo4j => src/neo4j}/__init__.py (88%) rename {neo4j => src/neo4j}/_async/__init__.py (100%) rename {neo4j => src/neo4j}/_async/bookmark_manager.py (100%) rename {neo4j => src/neo4j}/_async/driver.py (100%) rename {neo4j => src/neo4j}/_async/io/__init__.py (100%) rename {neo4j => src/neo4j}/_async/io/_bolt.py (100%) rename {neo4j => src/neo4j}/_async/io/_bolt3.py (100%) rename {neo4j => src/neo4j}/_async/io/_bolt4.py (100%) rename {neo4j => src/neo4j}/_async/io/_bolt5.py (100%) rename {neo4j => src/neo4j}/_async/io/_common.py (100%) rename {neo4j => src/neo4j}/_async/io/_pool.py (100%) rename {neo4j => src/neo4j}/_async/work/__init__.py (100%) rename {neo4j => src/neo4j}/_async/work/result.py (100%) rename {neo4j => src/neo4j}/_async/work/session.py (100%) rename {neo4j => src/neo4j}/_async/work/transaction.py (100%) rename {neo4j => src/neo4j}/_async/work/workspace.py (100%) rename {neo4j => src/neo4j}/_async_compat/__init__.py (100%) rename {neo4j => src/neo4j}/_async_compat/concurrency.py (100%) rename {neo4j => src/neo4j}/_async_compat/network/__init__.py (100%) rename {neo4j => src/neo4j}/_async_compat/network/_bolt_socket.py (100%) rename {neo4j => src/neo4j}/_async_compat/network/_util.py (100%) rename {neo4j => src/neo4j}/_async_compat/shims/__init__.py (100%) rename {neo4j => src/neo4j}/_async_compat/util.py (100%) rename {neo4j => src/neo4j}/_codec/__init__.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/__init__.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/_common.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/_interface/__init__.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/v1/__init__.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/v1/hydration_handler.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/v1/spatial.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/v1/temporal.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/v2/__init__.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/v2/hydration_handler.py (100%) rename {neo4j => src/neo4j}/_codec/hydration/v2/temporal.py (100%) rename {neo4j => src/neo4j}/_codec/packstream/__init__.py (100%) rename {neo4j => src/neo4j}/_codec/packstream/_common.py (100%) rename {neo4j => src/neo4j}/_codec/packstream/v1/__init__.py (100%) rename {neo4j => src/neo4j}/_conf.py (100%) rename {neo4j => src/neo4j}/_data.py (100%) rename {neo4j => src/neo4j}/_deadline.py (100%) rename {neo4j => src/neo4j}/_exceptions.py (100%) rename {neo4j => src/neo4j}/_meta.py (99%) rename {neo4j => src/neo4j}/_routing.py (100%) rename {neo4j => src/neo4j}/_spatial/__init__.py (100%) rename {neo4j => src/neo4j}/_sync/__init__.py (100%) rename {neo4j => src/neo4j}/_sync/bookmark_manager.py (100%) rename {neo4j => src/neo4j}/_sync/driver.py (100%) rename {neo4j => src/neo4j}/_sync/io/__init__.py (100%) rename {neo4j => src/neo4j}/_sync/io/_bolt.py (100%) rename {neo4j => src/neo4j}/_sync/io/_bolt3.py (100%) rename {neo4j => src/neo4j}/_sync/io/_bolt4.py (100%) rename {neo4j => src/neo4j}/_sync/io/_bolt5.py (100%) rename {neo4j => src/neo4j}/_sync/io/_common.py (100%) rename {neo4j => src/neo4j}/_sync/io/_pool.py (100%) rename {neo4j => src/neo4j}/_sync/work/__init__.py (100%) rename {neo4j => src/neo4j}/_sync/work/result.py (100%) rename {neo4j => src/neo4j}/_sync/work/session.py (100%) rename {neo4j => src/neo4j}/_sync/work/transaction.py (100%) rename {neo4j => src/neo4j}/_sync/work/workspace.py (100%) rename {neo4j => src/neo4j}/addressing.py (100%) rename {neo4j => src/neo4j}/api.py (100%) rename {neo4j => src/neo4j}/conf.py (100%) rename {neo4j => src/neo4j}/data.py (100%) rename {neo4j => src/neo4j}/debug.py (100%) rename {neo4j => src/neo4j}/exceptions.py (100%) rename {neo4j => src/neo4j}/graph/__init__.py (100%) rename {neo4j => src/neo4j}/meta.py (100%) rename {neo4j => src/neo4j}/packstream.py (100%) rename {neo4j => src/neo4j}/py.typed (100%) rename {neo4j => src/neo4j}/routing.py (100%) rename {neo4j => src/neo4j}/spatial/__init__.py (100%) rename {neo4j => src/neo4j}/time/__init__.py (100%) rename {neo4j => src/neo4j}/time/__main__.py (100%) rename {neo4j => src/neo4j}/time/_arithmetic.py (100%) rename {neo4j => src/neo4j}/time/_clock_implementations.py (100%) rename {neo4j => src/neo4j}/time/_metaclasses.py (100%) rename {neo4j => src/neo4j}/time/arithmetic.py (100%) rename {neo4j => src/neo4j}/time/clock_implementations.py (100%) rename {neo4j => src/neo4j}/time/hydration.py (100%) rename {neo4j => src/neo4j}/time/metaclasses.py (100%) rename {neo4j => src/neo4j}/work/__init__.py (100%) rename {neo4j => src/neo4j}/work/query.py (100%) rename {neo4j => src/neo4j}/work/summary.py (100%) delete mode 100644 testkitbackend/requirements.txt delete mode 100644 tests/requirements.txt diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index d41b0a7d2..000000000 --- a/.coveragerc +++ /dev/null @@ -1,19 +0,0 @@ -[run] -branch = True -omit = - .*/* - tests/* - neo4j/meta.py - *neobolt* - *virtualenv* - -[report] -exclude_lines = - pragma: no cover - def __repr__ - if self.debug: - raise NotImplementedError - if __name__ == .__main__.: - except ImportError - -show_missing = True diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 009fe61df..236ca6cff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,11 +33,11 @@ repos: name: unasync entry: bin/make-unasync language: system - files: "^(neo4j/_async|tests/(unit|integration)/async_|testkitbackend/_async)/.*" + files: "^(src/neo4j/_async|tests/(unit|integration)/async_|testkitbackend/_async)/.*" - id: mypy name: mypy static type check entry: mypy - args: [ --show-error-codes, neo4j, tests, testkitbackend ] + args: [ --show-error-codes, src, tests, testkitbackend ] 'types_or': [ python, pyi ] language: system pass_filenames: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6fdb540e3..c27e236bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,7 +54,7 @@ Remember that many community members have become regular contributors and some a ## Specifically for this project: All code in `_sync` or `sync` folders is auto-generated. Don't change it, but -install the pre-commit hooks as described below insted. They will take care of +install the pre-commit hooks as described below instead. They will take care of updating the code if necessary. Setting up the development environment: diff --git a/MANIFEST.in b/MANIFEST.in index a3f2fb3dc..16e4e11b0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ -global-exclude *.class *.pyc *.pyo *.so *.dll __pycache__ -prune tests +include NOTICE* src/**/py.typed +global-exclude *.class *.py[cod] *.so *.dll __pycache__ +prune test* diff --git a/README.rst b/README.rst index a42794116..9481af26e 100644 --- a/README.rst +++ b/README.rst @@ -32,6 +32,15 @@ To install the latest stable version, use: pip install neo4j +.. TODO: 7.0 - remove this note + +.. note:: + + ``neo4j-driver`` is the old name for this package. It is now deprecated and + and will receive no further updates starting with 6.0.0. Make sure to + install ``neo4j`` as shown above. + + Quick Example ============= diff --git a/bin/dist-functions b/bin/dist-functions index 04688be10..aae74e595 100644 --- a/bin/dist-functions +++ b/bin/dist-functions @@ -2,26 +2,41 @@ set -e ROOT=$(dirname "$0")/.. +SRC="${ROOT}/src" DIST="${ROOT}/dist" function get_package { + cd "${SRC}" python -c "from neo4j._meta import package; print(package)" + cd - > /dev/null } function set_package { - sed -i 's/^package = .*/package = "'$1'"/g' neo4j/_meta.py + sed -i 's/^package = .*/package = "'$1'"/g' "${SRC}/neo4j/_meta.py" } function get_version { + cd "${SRC}" python -c "from neo4j._meta import version; print(version)" + cd - > /dev/null } function set_version { - sed -i 's/^version = .*/version = "'$1'"/g' neo4j/_meta.py + sed -i 's/^version = .*/version = "'$1'"/g' "${SRC}/neo4j/_meta.py" +} + +function get_deprecated { + cd "${SRC}" + python -c "from neo4j._meta import deprecated_package; print(deprecated_package)" + cd - > /dev/null +} + +function set_deprecated { + sed -i 's/^deprecated_package = .*/deprecated_package = '$1'/g' "${SRC}/neo4j/_meta.py" } function check_file @@ -40,27 +55,32 @@ function check_file function set_metadata_and_setup { PACKAGE="$1"; shift + DEPRECATED="$1"; shift VERSION="$1"; shift - cd ${ROOT} + cd "${ROOT}" # Capture original package metadata ORIGINAL_PACKAGE=$(get_package) ORIGINAL_VERSION=$(get_version) - echo "Source code originally configured for package ${ORIGINAL_PACKAGE}/${ORIGINAL_VERSION}" + ORIGINAL_DEPRECATED=$(get_deprecated) + echo "Source code originally configured for package ${ORIGINAL_PACKAGE}/${ORIGINAL_VERSION}/deprecated=${ORIGINAL_DEPRECATED}" echo "----------------------------------------" - grep "package\s\+=" neo4j/_meta.py - grep "version\s\+=" neo4j/_meta.py + grep "package\s\+=" "${SRC}/neo4j/_meta.py" + grep "version\s\+=" "${SRC}/neo4j/_meta.py" + grep "deprecated_package\s\+=" "${SRC}/neo4j/_meta.py" echo "----------------------------------------" function cleanup() { # Reset to original package metadata set_package "${ORIGINAL_PACKAGE}" set_version "${ORIGINAL_VERSION}" - echo "Source code reconfigured back to original package ${ORIGINAL_PACKAGE}/${ORIGINAL_VERSION}" + set_deprecated "${ORIGINAL_DEPRECATED}" + echo "Source code reconfigured back to original package ${ORIGINAL_PACKAGE}/${ORIGINAL_VERSION}/deprecated=${ORIGINAL_DEPRECATED}" echo "----------------------------------------" - grep "package\s\+=" neo4j/_meta.py - grep "version\s\+=" neo4j/_meta.py + grep "package\s\+=" "${SRC}/neo4j/_meta.py" + grep "version\s\+=" "${SRC}/neo4j/_meta.py" + grep "deprecated_package\s\+=" "${SRC}/neo4j/_meta.py" echo "----------------------------------------" } trap cleanup EXIT @@ -68,26 +88,28 @@ function set_metadata_and_setup # Temporarily override package metadata set_package "${PACKAGE}" set_version "${VERSION}" - echo "Source code reconfigured for package ${PACKAGE}/${VERSION}" + set_deprecated "${DEPRECATED}" + echo "Source code reconfigured for package ${PACKAGE}/${VERSION}/deprecated=${DEPRECATED}" echo "----------------------------------------" - grep "package\s\+=" neo4j/_meta.py - grep "version\s\+=" neo4j/_meta.py + grep "package\s\+=" "${SRC}/neo4j/_meta.py" + grep "version\s\+=" "${SRC}/neo4j/_meta.py" + grep "deprecated_package\s\+=" "${SRC}/neo4j/_meta.py" echo "----------------------------------------" # Create source distribution find . -name *.pyc -delete - rm -rf ${ROOT}/*.egg-info 2> /dev/null + rm -rf "${SRC}/*.egg-info" 2> /dev/null python setup.py $* check_file "${DIST}/${PACKAGE}-${VERSION}.tar.gz" - trap - EXIT - cleanup + trap - EXIT + cleanup } function setup { ARGS="$*" rm -rf ${DIST} 2> /dev/null - set_metadata_and_setup "neo4j-driver" ${ARGS} # Legacy package; can be removed in 2.0 - set_metadata_and_setup "neo4j" ${ARGS} + set_metadata_and_setup "neo4j-driver" "True" ${ARGS} # Legacy package; can be removed in 2.0 + set_metadata_and_setup "neo4j" "False" ${ARGS} } diff --git a/bin/make-unasync b/bin/make-unasync index 675a6bc4c..deba4b247 100755 --- a/bin/make-unasync +++ b/bin/make-unasync @@ -32,8 +32,8 @@ import unasync ROOT_DIR = Path(__file__).parents[1].absolute() -ASYNC_DIR = ROOT_DIR / "neo4j" / "_async" -SYNC_DIR = ROOT_DIR / "neo4j" / "_sync" +ASYNC_DIR = ROOT_DIR / "src" / "neo4j" / "_async" +SYNC_DIR = ROOT_DIR / "src" / "neo4j" / "_sync" ASYNC_UNIT_TEST_DIR = ROOT_DIR / "tests" / "unit" / "async_" SYNC_UNIT_TEST_DIR = ROOT_DIR / "tests" / "unit" / "sync" ASYNC_INTEGRATION_TEST_DIR = ROOT_DIR / "tests" / "integration" / "async_" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..f16454683 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,111 @@ +# Copyright (c) "Neo4j" +# Neo4j Sweden AB [https://neo4j.com] +# +# This file is part of Neo4j. +# +# 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. + +[project] +name = "neo4j" +description = "Neo4j Bolt driver for Python" +license = {text = "Apache License, Version 2.0"} +#TODO: 6.0 - static readme +#readme = "README.rst" +authors = [ + {name = "Neo4j, Inc.", email = "drivers@neo4j.com"}, +] +dependencies = ["pytz"] +requires-python = ">=3.7" +keywords = ["neo4j", "graph", "database"] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Topic :: Database", + "Topic :: Software Development", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +dynamic = ["version", "readme"] + +[project.urls] +Homepage = "https://github.com/neo4j/neo4j-python-driver" + +[project.optional-dependencies] +pandas = ["pandas>=1.0.0"] + +[build-system] +requires = ["setuptools~=65.6", "tomlkit~=0.11.6"] +build-backend = "setuptools.build_meta" + +# still in beta +#[tool.setuptools.dynamic] +#version = {attr = "neo4j._meta.version"} + + +[tool.coverage] +show_missing = true + +[tool.coverage.run] +branch = true +omit = [ + ".*/*", + "tests/*", + "src/neo4j/meta.py", + "*virtualenv*", + "*venv*", +] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "if self.debug:", + "raise NotImplementedError", + "if __name__ == .__main__.:", + "except ImportError", +] + + +[tool.isort] +combine_as_imports = true +ensure_newline_before_comments = true +force_grid_wrap = 2 +# breaks order of relative imports +# https://github.com/PyCQA/isort/issues/1944 +#force_sort_within_sections = true +include_trailing_comma = true +# currently broken +# https://github.com/PyCQA/isort/issues/1855 +#lines_before_imports = 2 +lines_after_imports = 2 +lines_between_sections = 1 +multi_line_output = 3 +order_by_type = false +remove_redundant_aliases = true +use_parentheses = true + + +[tool.pytest.ini_options] +mock_use_standalone_module = true +asyncio_mode = "auto" + + +[tool.mypy] + +[[tool.mypy.overrides]] +module = "pandas.*" +ignore_missing_imports = true diff --git a/requirements-dev.txt b/requirements-dev.txt index b9845fe54..f6a723200 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,13 +1,29 @@ +# the driver itself +-e . + # auto-generate sync driver from async code unasync>=0.5.0 +# pre-commit hooks and tools pre-commit>=2.15.0 isort>=5.10.0 mypy>=0.971 typing-extensions>=4.3.0 types-pytz>=2022.1.2 -# needed for running tests --r tests/requirements.txt +# for packaging +setuptools~=65.6 +# TODO: 6.0 - can be removed once `setup.py` is simplified +tomlkit~=0.11.6 -# production dependencies --r requirements.txt +# needed for running tests +coverage[toml]>=5.5 +mock>=4.0.3 +pandas>=1.0.0 +pytest>=6.2.5 +pytest-asyncio>=0.16.0 +pytest-benchmark>=3.4.1 +pytest-cov>=3.0.0 +pytest-mock>=3.6.1 +teamcity-messages>=1.29 +tox>=3.27.1 +tox-factor>=0.1.2 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a40b05ed7..000000000 --- a/setup.cfg +++ /dev/null @@ -1,26 +0,0 @@ -[isort] -combine_as_imports=true -ensure_newline_before_comments=true -force_grid_wrap=2 -# breaks order of relative imports -# https://github.com/PyCQA/isort/issues/1944 -#force_sort_within_sections=true -include_trailing_comma=true -# currently broken -# https://github.com/PyCQA/isort/issues/1855 -#lines_before_imports=2 -lines_after_imports=2 -lines_between_sections=1 -multi_line_output=3 -order_by_type=false -remove_redundant_aliases=true -use_parentheses=true - -[tool:pytest] -mock_use_standalone_module = true -asyncio_mode = auto - -[mypy] - -[mypy-pandas.*] -ignore_missing_imports = True diff --git a/setup.py b/setup.py index 34730a56d..2dcf14864 100644 --- a/setup.py +++ b/setup.py @@ -17,70 +17,75 @@ # See the License for the specific language governing permissions and # limitations under the License. +# TODO: 6.0 - the whole deprecation and double naming shebang can be removed + import os +import pathlib +import sys +import warnings +from contextlib import contextmanager + +import tomlkit +from setuptools import setup -from setuptools import ( - find_packages, - setup, -) + +sys.path.insert(0, str(pathlib.Path(__file__).parent / "src")) from neo4j._meta import ( + deprecated_package as deprecated, package, version, ) -install_requires = [ - "pytz", -] -extras_require = { - "pandas": ["pandas>=1.0.0"], -} -classifiers = [ - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Topic :: Database", - "Topic :: Software Development", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", -] -entry_points = { - "console_scripts": [ - ], -} - -packages = find_packages(exclude=["test*"]) -package_data = { - package: ["py.typed"] for package in packages -} +if deprecated: + warnings.warn( + f"`{package}` is deprecated, please install `neo4j` instead.", + DeprecationWarning + ) readme_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "README.rst")) with open(readme_path, mode="r", encoding="utf-8") as fr: readme = fr.read() -setup_args = { - "name": package, - "version": version, - "description": "Neo4j Bolt driver for Python", - "license": "Apache License, Version 2.0", - "long_description": readme, - "author": "Neo4j, Inc.", - "author_email": "drivers@neo4j.com", - "keywords": "neo4j graph database", - "url": "https://github.com/neo4j/neo4j-python-driver", - "install_requires": install_requires, - "extras_require": extras_require, - "classifiers": classifiers, - "packages": packages, - "package_data": package_data, - "entry_points": entry_points, - "python_requires": ">=3.7", -} - -setup(**setup_args) +if deprecated: + readme = """\ +.. warning:: + + This package is deprecated and will stop receiving updates starting with + version 6.0.0. Please install ``neo4j`` instead (which is an alias, i.e., + a drop-in replacement). See https://pypi.org/project/neo4j/ . + +""" + readme + + +@contextmanager +def changed_package_name(new_name): + with open("pyproject.toml", "a+") as fd: + fd.seek(0) + pyproject = tomlkit.parse(fd.read()) + old_name = pyproject["project"]["name"] + pyproject["project"]["name"] = new_name + fd.seek(0) + fd.truncate() + tomlkit.dump(pyproject, fd) + + yield + + with open("pyproject.toml", "a+") as fd: + fd.seek(0) + pyproject = tomlkit.parse(fd.read()) + pyproject["project"]["name"] = old_name + fd.seek(0) + fd.truncate() + tomlkit.dump(pyproject, fd) + + +with changed_package_name(package): + setup( + # until `[tool.setuptools.dynamic]` in pyproject.toml is out of beta + version=version, + long_description=readme, + ) diff --git a/neo4j/__init__.py b/src/neo4j/__init__.py similarity index 88% rename from neo4j/__init__.py rename to src/neo4j/__init__.py index df8590bee..f6a1a7ad9 100644 --- a/neo4j/__init__.py +++ b/src/neo4j/__init__.py @@ -41,6 +41,8 @@ ) from ._data import Record from ._meta import ( + deprecated_package as _deprecated_package, + deprecation_warn as _deprecation_warn, ExperimentalWarning, get_user_agent, version as __version__, @@ -165,3 +167,12 @@ def __getattr__(name): def __dir__(): return __all__ + + +if _deprecated_package: + _deprecation_warn( + "The neo4j driver was installed under the package name `noe4j-driver` " + "which is deprecated and will stop receiving updates starting with " + "version 6.0.0. Please install `neo4j` instead (which is an alias, " + "i.e., a drop-in replacement). See https://pypi.org/project/neo4j/ ." + ) diff --git a/neo4j/_async/__init__.py b/src/neo4j/_async/__init__.py similarity index 100% rename from neo4j/_async/__init__.py rename to src/neo4j/_async/__init__.py diff --git a/neo4j/_async/bookmark_manager.py b/src/neo4j/_async/bookmark_manager.py similarity index 100% rename from neo4j/_async/bookmark_manager.py rename to src/neo4j/_async/bookmark_manager.py diff --git a/neo4j/_async/driver.py b/src/neo4j/_async/driver.py similarity index 100% rename from neo4j/_async/driver.py rename to src/neo4j/_async/driver.py diff --git a/neo4j/_async/io/__init__.py b/src/neo4j/_async/io/__init__.py similarity index 100% rename from neo4j/_async/io/__init__.py rename to src/neo4j/_async/io/__init__.py diff --git a/neo4j/_async/io/_bolt.py b/src/neo4j/_async/io/_bolt.py similarity index 100% rename from neo4j/_async/io/_bolt.py rename to src/neo4j/_async/io/_bolt.py diff --git a/neo4j/_async/io/_bolt3.py b/src/neo4j/_async/io/_bolt3.py similarity index 100% rename from neo4j/_async/io/_bolt3.py rename to src/neo4j/_async/io/_bolt3.py diff --git a/neo4j/_async/io/_bolt4.py b/src/neo4j/_async/io/_bolt4.py similarity index 100% rename from neo4j/_async/io/_bolt4.py rename to src/neo4j/_async/io/_bolt4.py diff --git a/neo4j/_async/io/_bolt5.py b/src/neo4j/_async/io/_bolt5.py similarity index 100% rename from neo4j/_async/io/_bolt5.py rename to src/neo4j/_async/io/_bolt5.py diff --git a/neo4j/_async/io/_common.py b/src/neo4j/_async/io/_common.py similarity index 100% rename from neo4j/_async/io/_common.py rename to src/neo4j/_async/io/_common.py diff --git a/neo4j/_async/io/_pool.py b/src/neo4j/_async/io/_pool.py similarity index 100% rename from neo4j/_async/io/_pool.py rename to src/neo4j/_async/io/_pool.py diff --git a/neo4j/_async/work/__init__.py b/src/neo4j/_async/work/__init__.py similarity index 100% rename from neo4j/_async/work/__init__.py rename to src/neo4j/_async/work/__init__.py diff --git a/neo4j/_async/work/result.py b/src/neo4j/_async/work/result.py similarity index 100% rename from neo4j/_async/work/result.py rename to src/neo4j/_async/work/result.py diff --git a/neo4j/_async/work/session.py b/src/neo4j/_async/work/session.py similarity index 100% rename from neo4j/_async/work/session.py rename to src/neo4j/_async/work/session.py diff --git a/neo4j/_async/work/transaction.py b/src/neo4j/_async/work/transaction.py similarity index 100% rename from neo4j/_async/work/transaction.py rename to src/neo4j/_async/work/transaction.py diff --git a/neo4j/_async/work/workspace.py b/src/neo4j/_async/work/workspace.py similarity index 100% rename from neo4j/_async/work/workspace.py rename to src/neo4j/_async/work/workspace.py diff --git a/neo4j/_async_compat/__init__.py b/src/neo4j/_async_compat/__init__.py similarity index 100% rename from neo4j/_async_compat/__init__.py rename to src/neo4j/_async_compat/__init__.py diff --git a/neo4j/_async_compat/concurrency.py b/src/neo4j/_async_compat/concurrency.py similarity index 100% rename from neo4j/_async_compat/concurrency.py rename to src/neo4j/_async_compat/concurrency.py diff --git a/neo4j/_async_compat/network/__init__.py b/src/neo4j/_async_compat/network/__init__.py similarity index 100% rename from neo4j/_async_compat/network/__init__.py rename to src/neo4j/_async_compat/network/__init__.py diff --git a/neo4j/_async_compat/network/_bolt_socket.py b/src/neo4j/_async_compat/network/_bolt_socket.py similarity index 100% rename from neo4j/_async_compat/network/_bolt_socket.py rename to src/neo4j/_async_compat/network/_bolt_socket.py diff --git a/neo4j/_async_compat/network/_util.py b/src/neo4j/_async_compat/network/_util.py similarity index 100% rename from neo4j/_async_compat/network/_util.py rename to src/neo4j/_async_compat/network/_util.py diff --git a/neo4j/_async_compat/shims/__init__.py b/src/neo4j/_async_compat/shims/__init__.py similarity index 100% rename from neo4j/_async_compat/shims/__init__.py rename to src/neo4j/_async_compat/shims/__init__.py diff --git a/neo4j/_async_compat/util.py b/src/neo4j/_async_compat/util.py similarity index 100% rename from neo4j/_async_compat/util.py rename to src/neo4j/_async_compat/util.py diff --git a/neo4j/_codec/__init__.py b/src/neo4j/_codec/__init__.py similarity index 100% rename from neo4j/_codec/__init__.py rename to src/neo4j/_codec/__init__.py diff --git a/neo4j/_codec/hydration/__init__.py b/src/neo4j/_codec/hydration/__init__.py similarity index 100% rename from neo4j/_codec/hydration/__init__.py rename to src/neo4j/_codec/hydration/__init__.py diff --git a/neo4j/_codec/hydration/_common.py b/src/neo4j/_codec/hydration/_common.py similarity index 100% rename from neo4j/_codec/hydration/_common.py rename to src/neo4j/_codec/hydration/_common.py diff --git a/neo4j/_codec/hydration/_interface/__init__.py b/src/neo4j/_codec/hydration/_interface/__init__.py similarity index 100% rename from neo4j/_codec/hydration/_interface/__init__.py rename to src/neo4j/_codec/hydration/_interface/__init__.py diff --git a/neo4j/_codec/hydration/v1/__init__.py b/src/neo4j/_codec/hydration/v1/__init__.py similarity index 100% rename from neo4j/_codec/hydration/v1/__init__.py rename to src/neo4j/_codec/hydration/v1/__init__.py diff --git a/neo4j/_codec/hydration/v1/hydration_handler.py b/src/neo4j/_codec/hydration/v1/hydration_handler.py similarity index 100% rename from neo4j/_codec/hydration/v1/hydration_handler.py rename to src/neo4j/_codec/hydration/v1/hydration_handler.py diff --git a/neo4j/_codec/hydration/v1/spatial.py b/src/neo4j/_codec/hydration/v1/spatial.py similarity index 100% rename from neo4j/_codec/hydration/v1/spatial.py rename to src/neo4j/_codec/hydration/v1/spatial.py diff --git a/neo4j/_codec/hydration/v1/temporal.py b/src/neo4j/_codec/hydration/v1/temporal.py similarity index 100% rename from neo4j/_codec/hydration/v1/temporal.py rename to src/neo4j/_codec/hydration/v1/temporal.py diff --git a/neo4j/_codec/hydration/v2/__init__.py b/src/neo4j/_codec/hydration/v2/__init__.py similarity index 100% rename from neo4j/_codec/hydration/v2/__init__.py rename to src/neo4j/_codec/hydration/v2/__init__.py diff --git a/neo4j/_codec/hydration/v2/hydration_handler.py b/src/neo4j/_codec/hydration/v2/hydration_handler.py similarity index 100% rename from neo4j/_codec/hydration/v2/hydration_handler.py rename to src/neo4j/_codec/hydration/v2/hydration_handler.py diff --git a/neo4j/_codec/hydration/v2/temporal.py b/src/neo4j/_codec/hydration/v2/temporal.py similarity index 100% rename from neo4j/_codec/hydration/v2/temporal.py rename to src/neo4j/_codec/hydration/v2/temporal.py diff --git a/neo4j/_codec/packstream/__init__.py b/src/neo4j/_codec/packstream/__init__.py similarity index 100% rename from neo4j/_codec/packstream/__init__.py rename to src/neo4j/_codec/packstream/__init__.py diff --git a/neo4j/_codec/packstream/_common.py b/src/neo4j/_codec/packstream/_common.py similarity index 100% rename from neo4j/_codec/packstream/_common.py rename to src/neo4j/_codec/packstream/_common.py diff --git a/neo4j/_codec/packstream/v1/__init__.py b/src/neo4j/_codec/packstream/v1/__init__.py similarity index 100% rename from neo4j/_codec/packstream/v1/__init__.py rename to src/neo4j/_codec/packstream/v1/__init__.py diff --git a/neo4j/_conf.py b/src/neo4j/_conf.py similarity index 100% rename from neo4j/_conf.py rename to src/neo4j/_conf.py diff --git a/neo4j/_data.py b/src/neo4j/_data.py similarity index 100% rename from neo4j/_data.py rename to src/neo4j/_data.py diff --git a/neo4j/_deadline.py b/src/neo4j/_deadline.py similarity index 100% rename from neo4j/_deadline.py rename to src/neo4j/_deadline.py diff --git a/neo4j/_exceptions.py b/src/neo4j/_exceptions.py similarity index 100% rename from neo4j/_exceptions.py rename to src/neo4j/_exceptions.py diff --git a/neo4j/_meta.py b/src/neo4j/_meta.py similarity index 99% rename from neo4j/_meta.py rename to src/neo4j/_meta.py index 75d84bf9c..f9ef0fc6d 100644 --- a/neo4j/_meta.py +++ b/src/neo4j/_meta.py @@ -29,6 +29,7 @@ # Can be automatically overridden in builds package = "neo4j" version = "5.2.dev0" +deprecated_package = False def get_user_agent(): diff --git a/neo4j/_routing.py b/src/neo4j/_routing.py similarity index 100% rename from neo4j/_routing.py rename to src/neo4j/_routing.py diff --git a/neo4j/_spatial/__init__.py b/src/neo4j/_spatial/__init__.py similarity index 100% rename from neo4j/_spatial/__init__.py rename to src/neo4j/_spatial/__init__.py diff --git a/neo4j/_sync/__init__.py b/src/neo4j/_sync/__init__.py similarity index 100% rename from neo4j/_sync/__init__.py rename to src/neo4j/_sync/__init__.py diff --git a/neo4j/_sync/bookmark_manager.py b/src/neo4j/_sync/bookmark_manager.py similarity index 100% rename from neo4j/_sync/bookmark_manager.py rename to src/neo4j/_sync/bookmark_manager.py diff --git a/neo4j/_sync/driver.py b/src/neo4j/_sync/driver.py similarity index 100% rename from neo4j/_sync/driver.py rename to src/neo4j/_sync/driver.py diff --git a/neo4j/_sync/io/__init__.py b/src/neo4j/_sync/io/__init__.py similarity index 100% rename from neo4j/_sync/io/__init__.py rename to src/neo4j/_sync/io/__init__.py diff --git a/neo4j/_sync/io/_bolt.py b/src/neo4j/_sync/io/_bolt.py similarity index 100% rename from neo4j/_sync/io/_bolt.py rename to src/neo4j/_sync/io/_bolt.py diff --git a/neo4j/_sync/io/_bolt3.py b/src/neo4j/_sync/io/_bolt3.py similarity index 100% rename from neo4j/_sync/io/_bolt3.py rename to src/neo4j/_sync/io/_bolt3.py diff --git a/neo4j/_sync/io/_bolt4.py b/src/neo4j/_sync/io/_bolt4.py similarity index 100% rename from neo4j/_sync/io/_bolt4.py rename to src/neo4j/_sync/io/_bolt4.py diff --git a/neo4j/_sync/io/_bolt5.py b/src/neo4j/_sync/io/_bolt5.py similarity index 100% rename from neo4j/_sync/io/_bolt5.py rename to src/neo4j/_sync/io/_bolt5.py diff --git a/neo4j/_sync/io/_common.py b/src/neo4j/_sync/io/_common.py similarity index 100% rename from neo4j/_sync/io/_common.py rename to src/neo4j/_sync/io/_common.py diff --git a/neo4j/_sync/io/_pool.py b/src/neo4j/_sync/io/_pool.py similarity index 100% rename from neo4j/_sync/io/_pool.py rename to src/neo4j/_sync/io/_pool.py diff --git a/neo4j/_sync/work/__init__.py b/src/neo4j/_sync/work/__init__.py similarity index 100% rename from neo4j/_sync/work/__init__.py rename to src/neo4j/_sync/work/__init__.py diff --git a/neo4j/_sync/work/result.py b/src/neo4j/_sync/work/result.py similarity index 100% rename from neo4j/_sync/work/result.py rename to src/neo4j/_sync/work/result.py diff --git a/neo4j/_sync/work/session.py b/src/neo4j/_sync/work/session.py similarity index 100% rename from neo4j/_sync/work/session.py rename to src/neo4j/_sync/work/session.py diff --git a/neo4j/_sync/work/transaction.py b/src/neo4j/_sync/work/transaction.py similarity index 100% rename from neo4j/_sync/work/transaction.py rename to src/neo4j/_sync/work/transaction.py diff --git a/neo4j/_sync/work/workspace.py b/src/neo4j/_sync/work/workspace.py similarity index 100% rename from neo4j/_sync/work/workspace.py rename to src/neo4j/_sync/work/workspace.py diff --git a/neo4j/addressing.py b/src/neo4j/addressing.py similarity index 100% rename from neo4j/addressing.py rename to src/neo4j/addressing.py diff --git a/neo4j/api.py b/src/neo4j/api.py similarity index 100% rename from neo4j/api.py rename to src/neo4j/api.py diff --git a/neo4j/conf.py b/src/neo4j/conf.py similarity index 100% rename from neo4j/conf.py rename to src/neo4j/conf.py diff --git a/neo4j/data.py b/src/neo4j/data.py similarity index 100% rename from neo4j/data.py rename to src/neo4j/data.py diff --git a/neo4j/debug.py b/src/neo4j/debug.py similarity index 100% rename from neo4j/debug.py rename to src/neo4j/debug.py diff --git a/neo4j/exceptions.py b/src/neo4j/exceptions.py similarity index 100% rename from neo4j/exceptions.py rename to src/neo4j/exceptions.py diff --git a/neo4j/graph/__init__.py b/src/neo4j/graph/__init__.py similarity index 100% rename from neo4j/graph/__init__.py rename to src/neo4j/graph/__init__.py diff --git a/neo4j/meta.py b/src/neo4j/meta.py similarity index 100% rename from neo4j/meta.py rename to src/neo4j/meta.py diff --git a/neo4j/packstream.py b/src/neo4j/packstream.py similarity index 100% rename from neo4j/packstream.py rename to src/neo4j/packstream.py diff --git a/neo4j/py.typed b/src/neo4j/py.typed similarity index 100% rename from neo4j/py.typed rename to src/neo4j/py.typed diff --git a/neo4j/routing.py b/src/neo4j/routing.py similarity index 100% rename from neo4j/routing.py rename to src/neo4j/routing.py diff --git a/neo4j/spatial/__init__.py b/src/neo4j/spatial/__init__.py similarity index 100% rename from neo4j/spatial/__init__.py rename to src/neo4j/spatial/__init__.py diff --git a/neo4j/time/__init__.py b/src/neo4j/time/__init__.py similarity index 100% rename from neo4j/time/__init__.py rename to src/neo4j/time/__init__.py diff --git a/neo4j/time/__main__.py b/src/neo4j/time/__main__.py similarity index 100% rename from neo4j/time/__main__.py rename to src/neo4j/time/__main__.py diff --git a/neo4j/time/_arithmetic.py b/src/neo4j/time/_arithmetic.py similarity index 100% rename from neo4j/time/_arithmetic.py rename to src/neo4j/time/_arithmetic.py diff --git a/neo4j/time/_clock_implementations.py b/src/neo4j/time/_clock_implementations.py similarity index 100% rename from neo4j/time/_clock_implementations.py rename to src/neo4j/time/_clock_implementations.py diff --git a/neo4j/time/_metaclasses.py b/src/neo4j/time/_metaclasses.py similarity index 100% rename from neo4j/time/_metaclasses.py rename to src/neo4j/time/_metaclasses.py diff --git a/neo4j/time/arithmetic.py b/src/neo4j/time/arithmetic.py similarity index 100% rename from neo4j/time/arithmetic.py rename to src/neo4j/time/arithmetic.py diff --git a/neo4j/time/clock_implementations.py b/src/neo4j/time/clock_implementations.py similarity index 100% rename from neo4j/time/clock_implementations.py rename to src/neo4j/time/clock_implementations.py diff --git a/neo4j/time/hydration.py b/src/neo4j/time/hydration.py similarity index 100% rename from neo4j/time/hydration.py rename to src/neo4j/time/hydration.py diff --git a/neo4j/time/metaclasses.py b/src/neo4j/time/metaclasses.py similarity index 100% rename from neo4j/time/metaclasses.py rename to src/neo4j/time/metaclasses.py diff --git a/neo4j/work/__init__.py b/src/neo4j/work/__init__.py similarity index 100% rename from neo4j/work/__init__.py rename to src/neo4j/work/__init__.py diff --git a/neo4j/work/query.py b/src/neo4j/work/query.py similarity index 100% rename from neo4j/work/query.py rename to src/neo4j/work/query.py diff --git a/neo4j/work/summary.py b/src/neo4j/work/summary.py similarity index 100% rename from neo4j/work/summary.py rename to src/neo4j/work/summary.py diff --git a/testkit/build.py b/testkit/build.py index 6bad785ba..a01b93e65 100644 --- a/testkit/build.py +++ b/testkit/build.py @@ -30,5 +30,4 @@ if __name__ == "__main__": run_python(["setup.py", "build"]) run_python(["-m", "pip", "install", "-U", "pip"]) - run_python(["-m", "pip", "install", "-Ur", - "testkitbackend/requirements.txt"]) + run_python(["-m", "pip", "install", "-Ur", "requirements-dev.txt"]) diff --git a/testkitbackend/requirements.txt b/testkitbackend/requirements.txt deleted file mode 100644 index 3c8d7e782..000000000 --- a/testkitbackend/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --r ../requirements.txt diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index 7dbb10a0e..000000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -coverage>=5.5 -pytest>=6.2.5 -pytest-asyncio>=0.16.0 -pytest-benchmark>=3.4.1 -pytest-cov>=3.0.0 -pytest-mock>=3.6.1 -mock>=4.0.3 -teamcity-messages>=1.29 -pandas>=1.0.0 diff --git a/tox.ini b/tox.ini index 27eb4a4dc..ee21d3ce4 100644 --- a/tox.ini +++ b/tox.ini @@ -2,13 +2,13 @@ envlist = py{37,38,39,310,311}-{unit,integration,performance} [testenv] -passenv = - TEST_NEO4J_* -deps = - -r tests/requirements.txt +passenv = TEST_NEO4J_* +deps = -r requirements-dev.txt +setenv = COVERAGE_FILE={envdir}/.coverage +usedevelop = true commands = coverage erase - unit: coverage run -m pytest -W error -v {posargs} tests/unit - integration: coverage run -m pytest -W error -v {posargs} tests/integration + unit: coverage run -m pytest -W error -v {posargs} tests/unit + integration: coverage run -m pytest -W error -v {posargs} tests/integration performance: python -m pytest --benchmark-autosave -v {posargs} tests/performance unit,integration: coverage report From aaa59b063c8e35486fdc7e94bb49a6ade20f93e6 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Thu, 24 Nov 2022 18:24:01 +0100 Subject: [PATCH 2/3] Fix TestKit glue: build step --- testkit/build.py | 1 - 1 file changed, 1 deletion(-) diff --git a/testkit/build.py b/testkit/build.py index a01b93e65..cf926cb74 100644 --- a/testkit/build.py +++ b/testkit/build.py @@ -28,6 +28,5 @@ if __name__ == "__main__": - run_python(["setup.py", "build"]) run_python(["-m", "pip", "install", "-U", "pip"]) run_python(["-m", "pip", "install", "-Ur", "requirements-dev.txt"]) From ef0afb94ac5ec00be63a4e1c58d418c71150d0f9 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 25 Nov 2022 00:14:48 +0100 Subject: [PATCH 3/3] Adjust TestKit backend error source detection --- testkitbackend/_async/backend.py | 2 +- testkitbackend/_sync/backend.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testkitbackend/_async/backend.py b/testkitbackend/_async/backend.py index d05a3d6f9..128916765 100644 --- a/testkitbackend/_async/backend.py +++ b/testkitbackend/_async/backend.py @@ -45,7 +45,7 @@ TESTKIT_BACKEND_PATH = Path(__file__).absolute().resolve().parents[1] -DRIVER_PATH = TESTKIT_BACKEND_PATH.parent / "neo4j" +DRIVER_PATH = TESTKIT_BACKEND_PATH.parent / "src" / "neo4j" class AsyncBackend: diff --git a/testkitbackend/_sync/backend.py b/testkitbackend/_sync/backend.py index 74e864731..d04d7c365 100644 --- a/testkitbackend/_sync/backend.py +++ b/testkitbackend/_sync/backend.py @@ -45,7 +45,7 @@ TESTKIT_BACKEND_PATH = Path(__file__).absolute().resolve().parents[1] -DRIVER_PATH = TESTKIT_BACKEND_PATH.parent / "neo4j" +DRIVER_PATH = TESTKIT_BACKEND_PATH.parent / "src" / "neo4j" class Backend: