ClearcodeHQ / pytest-postgresql

This is a pytest plugin, that enables you to test your code that relies on a running PostgreSQL Database. It allows you to specify fixtures for PostgreSQL process and client.
https://pypi.python.org/pypi/pytest-postgresql/
GNU Lesser General Public License v3.0
415 stars 44 forks source link

Version 6.1.0 breaks due to port-for dependency not updated #1015

Closed miketheman closed 3 weeks ago

miketheman commented 4 weeks ago

The recent update to 6.1.0 breaks clients that are still pinned to earlier port-for versions.

An example error:

   File "/opt/warehouse/lib/python3.12/site-packages/pytest_postgresql/factories/process.py", line 36, in <module>
    PortType = port_for.PortType  # mypy requires explicit export
               ^^^^^^^^^^^^^^^^^
AttributeError: module 'port_for' has no attribute 'PortType'

The Pipfile update https://github.com/ClearcodeHQ/pytest-postgresql/pull/1007/files#diff-230078d672f10d17463a8a6265cad825b790885898256a3365be90685caac58dL8-R8 does not control what clients install, rather https://github.com/ClearcodeHQ/pytest-postgresql/blob/a03fc46fae27b5459188442261b47fa5726ba505/pyproject.toml#L32

The correct action is to update the dependency on port-for to be at least 0.7.3 and release pytest-postgresql 6.1.1

fizyk commented 4 weeks ago

Oh..... sorry for that. Question would 0.7.1 minimum still work? That's when the type got introduced there https://github.com/fizyk/port-for/blob/master/CHANGES.rst#071-2023-07-14

fizyk commented 4 weeks ago

no, at this place, it'd be 0.7.3