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

Fix: support docker-py #901

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

insuyun
Copy link

@insuyun insuyun commented Jan 13, 2025

Hello,
This commit addresses issue #519. There are several things to discuss.

  1. I copied and modified the code currently for urllib3. I thought this approach is cleaner than adding the code directly for urllib3, but if there's a better alternative, please let me know.

  2. The tests are very limited. At the moment, they only ensure that Docker does not fall into an infinite loop.

  3. As for Docker, there's actually no strong reason to replay it using vcrpy. Since the behavior can vary depending on the local environment, replaying it doesn’t seem particularly meaningful. For example, currently I’ve been ignoring cases from Docker using the ignore_localhost option. However, I’m unsure whether it would be better to enforce this approach for others.

Let me know your thoughts!

@luke-engle
Copy link

luke-engle commented Jan 14, 2025

Out of curiosity, how are you bypassing this issue using ignore_localhost? When using vcrpy in conjunction with pytest-recording and setting @pytest.mark.vcr(ignore_localhost=True), I still get stuck in the infinite loop. FWIW, I'm with you in that for my particular use case, replaying docker isn't something that's useful.

Unless you mean you're using ignore_localhost alongside the changes in this PR 😄

@insuyun
Copy link
Author

insuyun commented Jan 17, 2025

@luke-engle Hi! As you mentioned, I am using ignore_locahost alongside this change.

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

Successfully merging this pull request may close these issues.

2 participants