Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with tox and setuptools 64 #2479

Closed
dvarrazzo opened this issue Aug 12, 2022 · 3 comments
Closed

Problems with tox and setuptools 64 #2479

dvarrazzo opened this issue Aug 12, 2022 · 3 comments
Labels
bug:normal affects many people or has quite an impact

Comments

@dvarrazzo
Copy link

Hello,

Since yesterday, running psycopg 3 tests with tox started to fail:

To reproduce:

git clone git@github.com:psycopg/psycopg.git  # current head: `a7d39bf7`
cd psycopg
python3 -m venv .venv
source .venv/bin/activate
pip install tox
tox -rvv -c psycopg_c -e 3.8
Output of the run above
using tox.ini: /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/tox.ini (pid 1163956)
using tox-3.25.1 from /home/piro/dev/psycopg3/tmp/psycopg/.venv/lib/python3.8/site-packages/tox/__init__.py (pid 1163956)
/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3 (/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3) is {'executable': '/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3', 'implementation': 'CPython', 'version_info': [3, 8, 10, 'final', 0], 'version': '3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]', 'is_64': True, 'sysplatform': 'linux', 'os_sep': '/', 'extra_version_info': None}
.package uses /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3
.package start: getenv /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package
.package cannot reuse: -r flag
.package create: /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1163963] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox$ /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3 -m virtualenv --no-download --python /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3 .package
created virtual environment CPython3.8.10.final.0-64 in 119ms
  creator CPython3Posix(dest=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/piro/.local/share/virtualenv)
    added seed packages: pip==22.2.2, setuptools==63.4.1, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
.package installdeps: setuptools>=49.2.0, wheel>=0.37, Cython>=3.0a5
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1163970] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/bin/python -m pip install 'setuptools>=49.2.0' 'wheel>=0.37' 'Cython>=3.0a5'
Requirement already satisfied: setuptools>=49.2.0 in ./.tox/.package/lib/python3.8/site-packages (63.4.1)
Requirement already satisfied: wheel>=0.37 in ./.tox/.package/lib/python3.8/site-packages (0.37.1)
Collecting Cython>=3.0a5
  Using cached Cython-3.0.0a11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (2.6 MB)
Installing collected packages: Cython
Successfully installed Cython-3.0.0a11
.package finish: getenv /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package after 2.73 seconds
.package start: finishvenv 
write config to /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/.tox-config1 as 'c78dac41792167274ef40c7bc3966e82651aa36138450f6e5f8afd783dd38a81 /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3\n3.25.1 0 0 0\n00000000000000000000000000000000 setuptools>=49.2.0\n00000000000000000000000000000000 wheel>=0.37\n00000000000000000000000000000000 Cython>=3.0a5'
.package finish: finishvenv  after 0.02 seconds
.package start: get-build-requires /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1163980] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/bin/python /home/piro/dev/psycopg3/tmp/psycopg/.venv/lib/python3.8/site-packages/tox/helper/build_requires.py setuptools.build_meta '' '' >.tox/.package/log/.package-0.log
/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/lib/python3.8/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
  warnings.warn(msg, warning_class)
.package finish: get-build-requires /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package after 0.36 seconds
.package start: perform-isolated-build /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1163982] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/bin/python /home/piro/dev/psycopg3/tmp/psycopg/.venv/lib/python3.8/site-packages/tox/helper/build_isolated.py .tox/dist setuptools.build_meta '' '' >.tox/.package/log/.package-1.log
/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package/lib/python3.8/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
  warnings.warn(msg, warning_class)
warning: psycopg_c/types/datetime.pyx:34:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:35:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:36:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:37:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:38:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:40:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:41:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:42:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:44:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:45:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:381:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:428:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:574:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:575:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:576:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:577:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:578:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:579:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:610:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:611:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:612:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:613:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:614:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:727:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:728:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:729:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:730:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:731:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:732:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:921:8: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:1060:4: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:1061:4: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:1062:4: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/datetime.pyx:1063:4: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:47:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:146:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:148:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:149:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:150:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:151:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:152:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: psycopg_c/types/numeric.pyx:153:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
running sdist
running egg_info
creating psycopg_c.egg-info
writing psycopg_c.egg-info/PKG-INFO
writing dependency_links to psycopg_c.egg-info/dependency_links.txt
writing top-level names to psycopg_c.egg-info/top_level.txt
writing manifest file 'psycopg_c.egg-info/SOURCES.txt'
Compiling psycopg_c/_psycopg.pyx because it changed.
Compiling psycopg_c/pq.pyx because it changed.
[1/2] Cythonizing psycopg_c/_psycopg.pyx
[2/2] Cythonizing psycopg_c/pq.pyx
reading manifest file 'psycopg_c.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'psycopg_c.egg-info/SOURCES.txt'
running check
creating psycopg-c-3.1.dev0
creating psycopg-c-3.1.dev0/psycopg_c
creating psycopg-c-3.1.dev0/psycopg_c.egg-info
creating psycopg-c-3.1.dev0/psycopg_c/_psycopg
creating psycopg-c-3.1.dev0/psycopg_c/pq
creating psycopg-c-3.1.dev0/psycopg_c/types
copying files to psycopg-c-3.1.dev0...
copying LICENSE.txt -> psycopg-c-3.1.dev0
copying README.rst -> psycopg-c-3.1.dev0
copying pyproject.toml -> psycopg-c-3.1.dev0
copying setup.cfg -> psycopg-c-3.1.dev0
copying setup.py -> psycopg-c-3.1.dev0
copying psycopg_c/__init__.py -> psycopg-c-3.1.dev0/psycopg_c
copying psycopg_c/_psycopg.c -> psycopg-c-3.1.dev0/psycopg_c
copying psycopg_c/_psycopg.pyi -> psycopg-c-3.1.dev0/psycopg_c
copying psycopg_c/pq.c -> psycopg-c-3.1.dev0/psycopg_c
copying psycopg_c/pq.pxd -> psycopg-c-3.1.dev0/psycopg_c
copying psycopg_c/py.typed -> psycopg-c-3.1.dev0/psycopg_c
copying psycopg_c/version.py -> psycopg-c-3.1.dev0/psycopg_c
copying psycopg_c.egg-info/PKG-INFO -> psycopg-c-3.1.dev0/psycopg_c.egg-info
copying psycopg_c.egg-info/SOURCES.txt -> psycopg-c-3.1.dev0/psycopg_c.egg-info
copying psycopg_c.egg-info/dependency_links.txt -> psycopg-c-3.1.dev0/psycopg_c.egg-info
copying psycopg_c.egg-info/not-zip-safe -> psycopg-c-3.1.dev0/psycopg_c.egg-info
copying psycopg_c.egg-info/top_level.txt -> psycopg-c-3.1.dev0/psycopg_c.egg-info
copying psycopg_c/_psycopg/__init__.pxd -> psycopg-c-3.1.dev0/psycopg_c/_psycopg
copying psycopg_c/_psycopg/endian.pxd -> psycopg-c-3.1.dev0/psycopg_c/_psycopg
copying psycopg_c/_psycopg/oids.pxd -> psycopg-c-3.1.dev0/psycopg_c/_psycopg
copying psycopg_c/pq/__init__.pxd -> psycopg-c-3.1.dev0/psycopg_c/pq
copying psycopg_c/pq/libpq.pxd -> psycopg-c-3.1.dev0/psycopg_c/pq
copying psycopg_c/types/numutils.c -> psycopg-c-3.1.dev0/psycopg_c/types
Writing psycopg-c-3.1.dev0/setup.cfg
Creating tar archive
removing 'psycopg-c-3.1.dev0' (and everything under it)
psycopg-c-3.1.dev0.tar.gz

.package finish: perform-isolated-build /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.package after 5.06 seconds
copying new sdistfile to '/home/piro/.tox/distshare/psycopg-c-3.1.dev0.tar.gz'
package .tmp/package/1/psycopg-c-3.1.dev0.tar.gz links to dist/psycopg-c-3.1.dev0.tar.gz (/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox)
3.8 uses /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3
3.8 start: getenv /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8
3.8 cannot reuse: -r flag
3.8 create: /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1164027] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox$ /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3 -m virtualenv --no-download --python /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3 3.8
created virtual environment CPython3.8.10.final.0-64 in 141ms
  creator CPython3Posix(dest=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/piro/.local/share/virtualenv)
    added seed packages: pip==22.2.2, setuptools==63.4.1, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
3.8 installdeps: -e/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/../psycopg[test], -e/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/../psycopg_pool
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1164042] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin/python -m pip install '-e/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/../psycopg[test]' -e/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/../psycopg_pool
Obtaining file:///home/piro/dev/psycopg3/tmp/psycopg/psycopg
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Obtaining file:///home/piro/dev/psycopg3/tmp/psycopg/psycopg_pool
  Preparing metadata (setup.py) ... done
Collecting typing-extensions>=4.1
  Using cached typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Collecting backports.zoneinfo>=0.2.0
  Using cached backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl (74 kB)
Collecting pytest>=6.2.5
  Using cached pytest-7.1.2-py3-none-any.whl (297 kB)
Collecting pytest-cov>=3.0
  Using cached pytest_cov-3.0.0-py3-none-any.whl (20 kB)
Collecting mypy>=0.940
  Using cached mypy-0.971-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (17.3 MB)
Collecting pytest-randomly>=3.10
  Using cached pytest_randomly-3.12.0-py3-none-any.whl (8.5 kB)
Collecting pytest-asyncio>=0.17
  Using cached pytest_asyncio-0.19.0-py3-none-any.whl (14 kB)
Collecting pproxy>=2.7
  Using cached pproxy-2.7.8-py3-none-any.whl (42 kB)
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting tomli>=1.1.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting attrs>=19.2.0
  Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting py>=1.8.2
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting iniconfig
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting coverage[toml]>=5.2.1
  Using cached coverage-6.4.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213 kB)
Collecting importlib-metadata>=3.6.0
  Using cached importlib_metadata-4.12.0-py3-none-any.whl (21 kB)
Collecting zipp>=0.5
  Using cached zipp-3.8.1-py3-none-any.whl (5.6 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Building wheels for collected packages: psycopg
  Building editable for psycopg (pyproject.toml) ... done
  Created wheel for psycopg: filename=psycopg-3.1.dev0-0.editable-py3-none-any.whl size=6293 sha256=cffd4bee6ac06cdf3321f66e6fde43dddbbbfe61985d77b76690e082d108e383
  Stored in directory: /tmp/pip-ephem-wheel-cache-2ay27tm5/wheels/db/cd/5a/aa3125eb1602535dda0df2915788f5d64e8458a393b887b0b4
Successfully built psycopg
Installing collected packages: mypy-extensions, iniconfig, zipp, typing-extensions, tomli, pyparsing, py, pproxy, pluggy, coverage, backports.zoneinfo, attrs, psycopg-pool, psycopg, packaging, mypy, importlib-metadata, pytest, pytest-randomly, pytest-cov, pytest-asyncio
  Running setup.py develop for psycopg-pool
Successfully installed attrs-22.1.0 backports.zoneinfo-0.2.1 coverage-6.4.3 importlib-metadata-4.12.0 iniconfig-1.1.1 mypy-0.971 mypy-extensions-0.4.3 packaging-21.3 pluggy-1.0.0 pproxy-2.7.8 psycopg-3.1.dev0 psycopg-pool-3.1.2.dev0 py-1.11.0 pyparsing-3.0.9 pytest-7.1.2 pytest-asyncio-0.19.0 pytest-cov-3.0.0 pytest-randomly-3.12.0 tomli-2.0.1 typing-extensions-4.3.0 zipp-3.8.1
3.8 finish: getenv /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8 after 10.50 seconds
3.8 start: installpkg /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.tmp/package/1/psycopg-c-3.1.dev0.tar.gz
3.8 inst: /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.tmp/package/1/psycopg-c-3.1.dev0.tar.gz
write config to /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/.tox-config1 as 'c78dac41792167274ef40c7bc3966e82651aa36138450f6e5f8afd783dd38a81 /home/piro/dev/psycopg3/tmp/psycopg/.venv/bin/python3\n3.25.1 0 0 0\n00000000000000000000000000000000 -e/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/../psycopg[test]\n00000000000000000000000000000000 -e/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/../psycopg_pool'
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1164159] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin/python -m pip install --exists-action w .tox/.tmp/package/1/psycopg-c-3.1.dev0.tar.gz
Processing ./.tox/.tmp/package/1/psycopg-c-3.1.dev0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psycopg-c
  Building wheel for psycopg-c (pyproject.toml) ... done
  Created wheel for psycopg-c: filename=psycopg_c-3.1.dev0-cp38-cp38-linux_x86_64.whl size=3879983 sha256=a3cffd58dfdd04359e158ba3464ce7f22fceeecda34a450675204244fda6975b
  Stored in directory: /home/piro/.cache/pip/wheels/f5/f9/a6/7905d84777d76fc0f4c41f1b6fd84fe14d2fe58eff0726b16b
Successfully built psycopg-c
Installing collected packages: psycopg-c
Successfully installed psycopg-c-3.1.dev0
3.8 finish: installpkg /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.tmp/package/1/psycopg-c-3.1.dev0.tar.gz after 54.27 seconds
3.8 start: envreport 
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1164557] /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin/python -m pip freeze >.tox/3.8/log/3.8-0.log
3.8 finish: envreport  after 0.41 seconds
3.8 installed: attrs==22.1.0,backports.zoneinfo==0.2.1,coverage==6.4.3,importlib-metadata==4.12.0,iniconfig==1.1.1,mypy==0.971,mypy-extensions==0.4.3,packaging==21.3,pluggy==1.0.0,pproxy==2.7.8,-e git+ssh://git@github.com/psycopg/psycopg.git@a7d39bf740d0d97dbe230d07177463668327431a#egg=psycopg&subdirectory=psycopg,psycopg-c @ file:///home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.tmp/package/1/psycopg-c-3.1.dev0.tar.gz,-e git+ssh://git@github.com/psycopg/psycopg.git@a7d39bf740d0d97dbe230d07177463668327431a#egg=psycopg_pool&subdirectory=psycopg_pool,py==1.11.0,pyparsing==3.0.9,pytest==7.1.2,pytest-asyncio==0.19.0,pytest-cov==3.0.0,pytest-randomly==3.12.0,tomli==2.0.1,typing_extensions==4.3.0,zipp==3.8.1
3.8 start: run-test-pre 
3.8 run-test-pre: PYTHONHASHSEED='2992809816'
3.8 finish: run-test-pre  after 0.00 seconds
3.8 start: run-test 
3.8 run-test: commands[0] | -python -bb -m pytest
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1164569] /home/piro/dev/psycopg3/tmp/psycopg$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin/python -bb -m pytest
================================================ test session starts ================================================
platform linux -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
cachedir: psycopg_c/.tox/3.8/.pytest_cache
Using --randomly-seed=412419892
libpq wrapper implementation: c
libpq used: 140004
libpq compiled: 140004
rootdir: /home/piro/dev/psycopg3/tmp/psycopg, configfile: pyproject.toml, testpaths: tests
plugins: asyncio-0.19.0, randomly-3.12.0, cov-3.0.0
asyncio: mode=auto
collected 2760 items / 15 errors / 1 skipped                                                                        

====================================================== ERRORS =======================================================
___________________________________ ERROR collecting tests/test_client_cursor.py ____________________________________
tests/test_client_cursor.py:15: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
________________________________ ERROR collecting tests/test_client_cursor_async.py _________________________________
tests/test_client_cursor_async.py:12: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
_____________________________________ ERROR collecting tests/test_connection.py _____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_connection.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_connection.py:9: in <module>
    from psycopg import Notify, errors as e
E   ImportError: cannot import name 'Notify' from 'psycopg' (unknown location)
__________________________________ ERROR collecting tests/test_connection_async.py __________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_connection_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_connection_async.py:8: in <module>
    from psycopg import Notify, errors as e
E   ImportError: cannot import name 'Notify' from 'psycopg' (unknown location)
______________________________________ ERROR collecting tests/test_conninfo.py ______________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_conninfo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_conninfo.py:8: in <module>
    from psycopg import ProgrammingError
E   ImportError: cannot import name 'ProgrammingError' from 'psycopg' (unknown location)
_______________________________________ ERROR collecting tests/test_cursor.py _______________________________________
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
____________________________________ ERROR collecting tests/test_cursor_async.py ____________________________________
tests/test_cursor_async.py:12: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
______________________________________ ERROR collecting tests/test_pipeline.py ______________________________________
tests/test_pipeline.py:37: in <module>
    def test_pipeline_status(conn: psycopg.Connection[Any]) -> None:
E   AttributeError: module 'psycopg' has no attribute 'Connection'
___________________________________ ERROR collecting tests/test_pipeline_async.py ___________________________________
tests/test_pipeline_async.py:13: in <module>
    from .test_pipeline import pipeline_aborted
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_pipeline.py:37: in <module>
    def test_pipeline_status(conn: psycopg.Connection[Any]) -> None:
E   AttributeError: module 'psycopg' has no attribute 'Connection'
__________________________________ ERROR collecting tests/test_psycopg_dbapi20.py ___________________________________
tests/test_psycopg_dbapi20.py:155: in <module>
    ((), {"nosuchparam": 42}, psycopg.ProgrammingError),
E   AttributeError: module 'psycopg' has no attribute 'ProgrammingError'
________________________________________ ERROR collecting tests/test_sql.py _________________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_sql.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_sql.py:10: in <module>
    from psycopg import pq, sql, ProgrammingError
E   ImportError: cannot import name 'ProgrammingError' from 'psycopg' (unknown location)
____________________________________ ERROR collecting tests/test_transaction.py _____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_transaction.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_transaction.py:8: in <module>
    from psycopg import Rollback
E   ImportError: cannot import name 'Rollback' from 'psycopg' (unknown location)
_________________________________ ERROR collecting tests/test_transaction_async.py __________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_transaction_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_transaction_async.py:6: in <module>
    from psycopg import Rollback
E   ImportError: cannot import name 'Rollback' from 'psycopg' (unknown location)
___________________________________ ERROR collecting tests/types/test_datetime.py ___________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/types/test_datetime.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/types/test_datetime.py:5: in <module>
    from psycopg import DataError, pq, sql
E   ImportError: cannot import name 'DataError' from 'psycopg' (unknown location)
____________________________________ ERROR collecting tests/types/test_string.py ____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/types/test_string.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/types/test_string.py:8: in <module>
    from psycopg import Binary
E   ImportError: cannot import name 'Binary' from 'psycopg' (unknown location)
============================================== short test summary info ==============================================
ERROR tests/test_client_cursor.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_client_cursor_async.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_connection.py
ERROR tests/test_connection_async.py
ERROR tests/test_conninfo.py
ERROR tests/test_cursor.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_cursor_async.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_pipeline.py - AttributeError: module 'psycopg' has no attribute 'Connection'
ERROR tests/test_pipeline_async.py - AttributeError: module 'psycopg' has no attribute 'Connection'
ERROR tests/test_psycopg_dbapi20.py - AttributeError: module 'psycopg' has no attribute 'ProgrammingError'
ERROR tests/test_sql.py
ERROR tests/test_transaction.py
ERROR tests/test_transaction_async.py
ERROR tests/types/test_datetime.py
ERROR tests/types/test_string.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 15 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=========================================== 1 skipped, 15 errors in 3.65s ===========================================
3.8 run-test: commands[1] | -python -bb -m pytest --lf --lfnf=none --no-collect-ok --randomly-seed=last
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1164640] /home/piro/dev/psycopg3/tmp/psycopg$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin/python -bb -m pytest --lf --lfnf=none --no-collect-ok --randomly-seed=last
================================================ test session starts ================================================
platform linux -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
cachedir: psycopg_c/.tox/3.8/.pytest_cache
Using --randomly-seed=412419892
libpq wrapper implementation: c
libpq used: 140004
libpq compiled: 140004
rootdir: /home/piro/dev/psycopg3/tmp/psycopg, configfile: pyproject.toml, testpaths: tests
plugins: asyncio-0.19.0, randomly-3.12.0, cov-3.0.0
asyncio: mode=auto
collected 2760 items / 15 errors / 1 skipped                                                                        
run-last-failure: 15 known failures not in selected tests

====================================================== ERRORS =======================================================
___________________________________ ERROR collecting tests/test_client_cursor.py ____________________________________
tests/test_client_cursor.py:15: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
________________________________ ERROR collecting tests/test_client_cursor_async.py _________________________________
tests/test_client_cursor_async.py:12: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
_____________________________________ ERROR collecting tests/test_connection.py _____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_connection.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_connection.py:9: in <module>
    from psycopg import Notify, errors as e
E   ImportError: cannot import name 'Notify' from 'psycopg' (unknown location)
__________________________________ ERROR collecting tests/test_connection_async.py __________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_connection_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_connection_async.py:8: in <module>
    from psycopg import Notify, errors as e
E   ImportError: cannot import name 'Notify' from 'psycopg' (unknown location)
______________________________________ ERROR collecting tests/test_conninfo.py ______________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_conninfo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_conninfo.py:8: in <module>
    from psycopg import ProgrammingError
E   ImportError: cannot import name 'ProgrammingError' from 'psycopg' (unknown location)
_______________________________________ ERROR collecting tests/test_cursor.py _______________________________________
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
____________________________________ ERROR collecting tests/test_cursor_async.py ____________________________________
tests/test_cursor_async.py:12: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
______________________________________ ERROR collecting tests/test_pipeline.py ______________________________________
tests/test_pipeline.py:37: in <module>
    def test_pipeline_status(conn: psycopg.Connection[Any]) -> None:
E   AttributeError: module 'psycopg' has no attribute 'Connection'
___________________________________ ERROR collecting tests/test_pipeline_async.py ___________________________________
tests/test_pipeline_async.py:13: in <module>
    from .test_pipeline import pipeline_aborted
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_pipeline.py:37: in <module>
    def test_pipeline_status(conn: psycopg.Connection[Any]) -> None:
E   AttributeError: module 'psycopg' has no attribute 'Connection'
__________________________________ ERROR collecting tests/test_psycopg_dbapi20.py ___________________________________
tests/test_psycopg_dbapi20.py:155: in <module>
    ((), {"nosuchparam": 42}, psycopg.ProgrammingError),
E   AttributeError: module 'psycopg' has no attribute 'ProgrammingError'
________________________________________ ERROR collecting tests/test_sql.py _________________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_sql.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_sql.py:10: in <module>
    from psycopg import pq, sql, ProgrammingError
E   ImportError: cannot import name 'ProgrammingError' from 'psycopg' (unknown location)
____________________________________ ERROR collecting tests/test_transaction.py _____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_transaction.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_transaction.py:8: in <module>
    from psycopg import Rollback
E   ImportError: cannot import name 'Rollback' from 'psycopg' (unknown location)
_________________________________ ERROR collecting tests/test_transaction_async.py __________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_transaction_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_transaction_async.py:6: in <module>
    from psycopg import Rollback
E   ImportError: cannot import name 'Rollback' from 'psycopg' (unknown location)
___________________________________ ERROR collecting tests/types/test_datetime.py ___________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/types/test_datetime.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/types/test_datetime.py:5: in <module>
    from psycopg import DataError, pq, sql
E   ImportError: cannot import name 'DataError' from 'psycopg' (unknown location)
____________________________________ ERROR collecting tests/types/test_string.py ____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/types/test_string.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/types/test_string.py:8: in <module>
    from psycopg import Binary
E   ImportError: cannot import name 'Binary' from 'psycopg' (unknown location)
============================================== short test summary info ==============================================
ERROR tests/test_client_cursor.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_client_cursor_async.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_connection.py
ERROR tests/test_connection_async.py
ERROR tests/test_conninfo.py
ERROR tests/test_cursor.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_cursor_async.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_pipeline.py - AttributeError: module 'psycopg' has no attribute 'Connection'
ERROR tests/test_pipeline_async.py - AttributeError: module 'psycopg' has no attribute 'Connection'
ERROR tests/test_psycopg_dbapi20.py - AttributeError: module 'psycopg' has no attribute 'ProgrammingError'
ERROR tests/test_sql.py
ERROR tests/test_transaction.py
ERROR tests/test_transaction_async.py
ERROR tests/types/test_datetime.py
ERROR tests/types/test_string.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 15 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=========================================== 1 skipped, 15 errors in 1.13s ===========================================
3.8 run-test: commands[2] | python -bb -m pytest --lf --lfnf=none --no-collect-ok --randomly-seed=last
setting PATH=/home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin:/home/piro/dev/psycopg3/tmp/psycopg/.venv/bin:/home/piro/etc/bin:/home/piro/.cargo/bin:/home/piro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[1164651] /home/piro/dev/psycopg3/tmp/psycopg$ /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin/python -bb -m pytest --lf --lfnf=none --no-collect-ok --randomly-seed=last
================================================ test session starts ================================================
platform linux -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
cachedir: psycopg_c/.tox/3.8/.pytest_cache
Using --randomly-seed=412419892
libpq wrapper implementation: c
libpq used: 140004
libpq compiled: 140004
rootdir: /home/piro/dev/psycopg3/tmp/psycopg, configfile: pyproject.toml, testpaths: tests
plugins: asyncio-0.19.0, randomly-3.12.0, cov-3.0.0
asyncio: mode=auto
collected 2760 items / 15 errors / 1 skipped                                                                        
run-last-failure: 15 known failures not in selected tests

====================================================== ERRORS =======================================================
___________________________________ ERROR collecting tests/test_client_cursor.py ____________________________________
tests/test_client_cursor.py:15: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
________________________________ ERROR collecting tests/test_client_cursor_async.py _________________________________
tests/test_client_cursor_async.py:12: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
_____________________________________ ERROR collecting tests/test_connection.py _____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_connection.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_connection.py:9: in <module>
    from psycopg import Notify, errors as e
E   ImportError: cannot import name 'Notify' from 'psycopg' (unknown location)
__________________________________ ERROR collecting tests/test_connection_async.py __________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_connection_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_connection_async.py:8: in <module>
    from psycopg import Notify, errors as e
E   ImportError: cannot import name 'Notify' from 'psycopg' (unknown location)
______________________________________ ERROR collecting tests/test_conninfo.py ______________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_conninfo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_conninfo.py:8: in <module>
    from psycopg import ProgrammingError
E   ImportError: cannot import name 'ProgrammingError' from 'psycopg' (unknown location)
_______________________________________ ERROR collecting tests/test_cursor.py _______________________________________
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
____________________________________ ERROR collecting tests/test_cursor_async.py ____________________________________
tests/test_cursor_async.py:12: in <module>
    from .test_cursor import my_row_factory
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_cursor.py:881: in <module>
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
______________________________________ ERROR collecting tests/test_pipeline.py ______________________________________
tests/test_pipeline.py:37: in <module>
    def test_pipeline_status(conn: psycopg.Connection[Any]) -> None:
E   AttributeError: module 'psycopg' has no attribute 'Connection'
___________________________________ ERROR collecting tests/test_pipeline_async.py ___________________________________
tests/test_pipeline_async.py:13: in <module>
    from .test_pipeline import pipeline_aborted
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
psycopg_c/.tox/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_pipeline.py:37: in <module>
    def test_pipeline_status(conn: psycopg.Connection[Any]) -> None:
E   AttributeError: module 'psycopg' has no attribute 'Connection'
__________________________________ ERROR collecting tests/test_psycopg_dbapi20.py ___________________________________
tests/test_psycopg_dbapi20.py:155: in <module>
    ((), {"nosuchparam": 42}, psycopg.ProgrammingError),
E   AttributeError: module 'psycopg' has no attribute 'ProgrammingError'
________________________________________ ERROR collecting tests/test_sql.py _________________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_sql.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_sql.py:10: in <module>
    from psycopg import pq, sql, ProgrammingError
E   ImportError: cannot import name 'ProgrammingError' from 'psycopg' (unknown location)
____________________________________ ERROR collecting tests/test_transaction.py _____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_transaction.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_transaction.py:8: in <module>
    from psycopg import Rollback
E   ImportError: cannot import name 'Rollback' from 'psycopg' (unknown location)
_________________________________ ERROR collecting tests/test_transaction_async.py __________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/test_transaction_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_transaction_async.py:6: in <module>
    from psycopg import Rollback
E   ImportError: cannot import name 'Rollback' from 'psycopg' (unknown location)
___________________________________ ERROR collecting tests/types/test_datetime.py ___________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/types/test_datetime.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/types/test_datetime.py:5: in <module>
    from psycopg import DataError, pq, sql
E   ImportError: cannot import name 'DataError' from 'psycopg' (unknown location)
____________________________________ ERROR collecting tests/types/test_string.py ____________________________________
ImportError while importing test module '/home/piro/dev/psycopg3/tmp/psycopg/tests/types/test_string.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/types/test_string.py:8: in <module>
    from psycopg import Binary
E   ImportError: cannot import name 'Binary' from 'psycopg' (unknown location)
============================================== short test summary info ==============================================
ERROR tests/test_client_cursor.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_client_cursor_async.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_connection.py
ERROR tests/test_connection_async.py
ERROR tests/test_conninfo.py
ERROR tests/test_cursor.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_cursor_async.py - AttributeError: module 'psycopg' has no attribute 'Cursor'
ERROR tests/test_pipeline.py - AttributeError: module 'psycopg' has no attribute 'Connection'
ERROR tests/test_pipeline_async.py - AttributeError: module 'psycopg' has no attribute 'Connection'
ERROR tests/test_psycopg_dbapi20.py - AttributeError: module 'psycopg' has no attribute 'ProgrammingError'
ERROR tests/test_sql.py
ERROR tests/test_transaction.py
ERROR tests/test_transaction_async.py
ERROR tests/types/test_datetime.py
ERROR tests/types/test_string.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 15 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=========================================== 1 skipped, 15 errors in 1.26s ===========================================
ERROR: InvocationError for command /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/3.8/bin/python -bb -m pytest --lf --lfnf=none --no-collect-ok --randomly-seed=last (exited with code 2)
3.8 finish: run-test  after 7.48 seconds
3.8 start: run-test-post 
3.8 finish: run-test-post  after 0.00 seconds
______________________________________________________ summary ______________________________________________________
ERROR:   3.8: commands failed
cleanup /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/.tox/.tmp/package/1/psycopg-c-3.1.dev0.tar.gz

The psycopg_c/tox.ini file looks like:

[tox]
envlist = {3.7,3.8,3.9,3.10}
isolated_build = True

[testenv]
changedir = ..
commands =
    -python -bb -m pytest {posargs}
    -python -bb -m pytest --lf --lfnf=none --no-collect-ok --randomly-seed=last {posargs}
    python -bb -m pytest --lf --lfnf=none --no-collect-ok --randomly-seed=last {posargs}
passenv = PG* PSYCOPG_TEST_* PYTEST_ADDOPTS PSYCOPG_IMPL PIP_CONSTRAINT
deps =
    -e {toxinidir}/../psycopg[test]
    -e {toxinidir}/../psycopg_pool

The error seems related to psycopg not recognized as package, although installed as above: running:

$ tox -c psycopg_c -e 3.8 --  --pdb
...
    cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
E   AttributeError: module 'psycopg' has no attribute 'Cursor'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /home/piro/dev/psycopg3/tmp/psycopg/tests/test_cursor.py(881)<module>()
-> cursor: Union[psycopg.Cursor[List[str]], psycopg.AsyncCursor[List[str]]]
(Pdb) p psycopg
<module 'psycopg' (namespace)>

However, changing the execution directory doesn't fix the problem. What fixes the problem is to pip install ./psycopg without the -e, but specifying it in tox.ini fails with a:

tox.exception.MissingDependency: MissingDependency: /home/piro/dev/psycopg3/tmp/psycopg/psycopg_c/../psycopg[test]

I can see that tox didn't release any new version in the last couple of days, but maybe some dependency changed? Running tests outside tox doesn't show the same problem.

@dvarrazzo dvarrazzo added the bug:normal affects many people or has quite an impact label Aug 12, 2022
@gaborbernat
Copy link
Member

Sounds to me like you're being broken by setuptools adding PEP-660 support - https://setuptools.pypa.io/en/latest/history.html#v64-0-0, either way this doesn't seem to be a tox issue.

@dvarrazzo
Copy link
Author

@gaborbernat I will check the issue with pypa, thank you for pointing it out. I actually tried to specify setuptools < 64 in the pyproject.toml files, but it didn't change the result - I'm not sure if I did something wrong in my test.

However - why is it necessary to specify -e for local tox deps? Is it possible to install them in a non-editable way?

Cheers

@dvarrazzo
Copy link
Author

After further tests:

  • specifying setuptools < 64 in the pyproject files makes tests pass in tox;
  • testing outside tox using setuptools 64 works ok. Tried different combination of -e installs of the psycopg and psycopg_c modules.

So, ISTM that tox is being broken by setuptools 64, not so much psycopg.

@dvarrazzo dvarrazzo changed the title Suddenly, tox started failing Problems with tox and setuptools 64 Aug 12, 2022
dvarrazzo added a commit to psycopg/psycopg that referenced this issue Aug 12, 2022
Work around tox-dev/tox#2479 (editable installs in tox broken by setuptools
v64) and tox-dev/tox#2480 (failure to use `toxinidir` in `deps`).

Use -e consistently in the linting steps instead, because they are
defined with skip_install=True so it seems a good idea to use it. These
steps don't seem affect by the setuptools issue.
dvarrazzo added a commit to psycopg/psycopg that referenced this issue Aug 13, 2022
Work around tox-dev/tox#2479 (editable installs in tox broken by setuptools
v64) and tox-dev/tox#2480 (failure to use `toxinidir` in `deps`).

Use -e consistently in the linting steps instead, because they are
defined with skip_install=True so it seems a good idea to use it. These
steps don't seem affect by the setuptools issue.
dvarrazzo added a commit to psycopg/psycopg that referenced this issue Aug 22, 2022
Something else that broke after setuptools 64 release. See tox-dev/tox#2479
for more details.

Reported something at pypa/setuptools#3557
dvarrazzo added a commit to psycopg/psycopg that referenced this issue Aug 22, 2022
Something else that broke after setuptools 64 release. See tox-dev/tox#2479
for more details.

Reported something at pypa/setuptools#3557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:normal affects many people or has quite an impact
Projects
None yet
Development

No branches or pull requests

2 participants