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

testcontainers-core and testcontainers share the .core package #352

Closed
jankatins opened this issue May 11, 2023 · 5 comments
Closed

testcontainers-core and testcontainers share the .core package #352

jankatins opened this issue May 11, 2023 · 5 comments

Comments

@jankatins
Copy link
Contributor

Describe the bug

I wanted to switch to testcontainers to work around the testcontainers.kafka dependency on kafka-python (didn#t work out because of #351). Anyyway, I did the below steps and ended up without a testcontainers.core package installed.

To Reproduce

  1. Install testcontainers-postgres (with poetry, but I think this shouldn't matter)
  2. Install testcontainers
  3. Deinstall testcontainers-postgres (and testcontainers-core)

Try to import something from testcontainers.core -> It's missing now because it got deinstalled when deinstalling testcontainers-postgres (which also deinstalls testcontainers-core because testcontainers does not depend on it but has the files directly in it)

@tillahoffmann
Copy link
Collaborator

This is likely a consequence of 4.x not yet being released but only a release candidate being available. We'll try to merge #314 and then release the major version. Could you share the output of pip freeze | grep test?

@jankatins
Copy link
Contributor Author

Sorry, I don't have the package directory anymore :-(

@tillahoffmann
Copy link
Collaborator

Sorry, I don't have the package directory anymore :-(

Does this mean the issue is resolved?

@jankatins
Copy link
Contributor Author

jankatins commented May 20, 2023

I don't think the issue us resolved: here is the result of a throwaway venv with both testcontainers-postgres and the plain testcontainers package. The below shows that the files owned by two packages at the same time:

[23:34:13] λ  cat lib/python3.11/site-packages/testcontainers_core-0.0.1rc1.dist-info/RECORD
testcontainers/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
testcontainers/core/config.py,sha256=L70FDm9sB1JURAf7FA61FahKG6QCPEzheCB6VQ8nnhs,130
testcontainers/core/container.py,sha256=2HibEXuzgKU-cGmSy603YhkrAUhqOdDIyt7SQlbnNeI,5542
testcontainers/core/docker_client.py,sha256=jJgBzPCtIkPOIoguFtZrnZ5ZikSWpm20Brwm7v__wog,3869
testcontainers/core/exceptions.py,sha256=6Fsc_vgRo6Absz_T-rrB5woQql9OV3Exc64GtN8-5mI,772
testcontainers/core/generic.py,sha256=9wTXqpcll4Q95867SWFAxCice8wz2AT04phmsL6t1R0,2042
testcontainers/core/utils.py,sha256=DXc2sbtebnApQ-QojO1-S4TzgfmD1SkoyjukYagJmLc,1723
testcontainers/core/waiting_utils.py,sha256=FfJ_wWJL3seBpBNX7MtGcFumGWr0IhMc--mKTSTNqys,3480

[23:34:16] λ  cat lib/python3.11/site-packages/testcontainers-3.7.1.dist-info/RECORD | grep core
testcontainers/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
testcontainers/core/config.py,sha256=L70FDm9sB1JURAf7FA61FahKG6QCPEzheCB6VQ8nnhs,130
testcontainers/core/container.py,sha256=mVilYvOVf1P83nEBcEvNCvCUCOfhdnnmPWsLYudq4I0,5355
testcontainers/core/docker_client.py,sha256=E6S-JMuYfr9pYKcg2wveX7UU5-w5NYY29qZdO5lAWMQ,3346
testcontainers/core/exceptions.py,sha256=6Fsc_vgRo6Absz_T-rrB5woQql9OV3Exc64GtN8-5mI,772
testcontainers/core/generic.py,sha256=_HHzQrs3IbiyCarmg7ELrYe5wZu1Y_z95FEcdoE8x5Q,2254
testcontainers/core/utils.py,sha256=DXc2sbtebnApQ-QojO1-S4TzgfmD1SkoyjukYagJmLc,1723
testcontainers/core/waiting_utils.py,sha256=FfJ_wWJL3seBpBNX7MtGcFumGWr0IhMc--mKTSTNqys,3480

@tillahoffmann
Copy link
Collaborator

Yes, you can't install the 3.x version of testcontainers and one of the release candidates at the same time. You can resolve the error by installing pip install testcontainers==4.0.0rc1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants