Comments (11)
Note that it is not necessary to do anything with pytest-httpserver
to reproduce the bug. It just needs to be installed and noticed by pytest
as a plugin.
from pytest-httpserver.
hi!
Thanks for the report, I need some time to look at your gist and to understand it. I'm also not familiar with hypothesis.
I find it very strange that pytest-httpserver comes into the picture without using any fixture of it. If by any chance pytest-httpserver could start the server in a thread without any fixture use, then that's a problem.
Did you have a chance to test it on a non-apple hw? I'm courious if it is linked to the hardware in any way or not (I guess it is probably not linked).
from pytest-httpserver.
Thanks! There's no need to rush on my account as I can just pin hypothesis to 6.0.3 and everything works fine for me.
I do not have easy access to another machine at the moment, but the gist should have everything you need to reproduce it on any Python 3.10 installation in less than 5 minutes. Three packages (pytest, pytest-httpserver, and hypothesis), one file (included in the gist), and one run of pytest without any arguments will do it.
from pytest-httpserver.
And yes, it's strange that you don't need to do anything with it. That's one reason I also filed HypothesisWorks/hypothesis#3585
from pytest-httpserver.
I couldn't reproduce your issue on an AMD (Linux) system. It works fine with python 3.10 and 3.11 as well.
pytest imports the plugin to obtain the fixtures. This file gets imported:
https://github.com/csernazs/pytest-httpserver/blob/master/pytest_httpserver/pytest_plugin.py
This imports werkzeug and others. Maybe some of the imports breaking this (import threading
maybe?)
from pytest-httpserver.
If I could reproduce it, I would start by removing the lines form that pytest_plugin.py and bisect it. :)
from pytest-httpserver.
Yeah, it could be another package - I don't even know what werkzeug does :-)
Thanks for replying so quickly and giving it a try. Let's see what the hypothesis folks say as they definitely did something with threads on their end. I've spent two days on this already (between a messed-up venv situation and the fact that a package the test wasn't using was involved, it was confusing), so I'm going to set it aside for now. But if the hypothesis folks don't get anywhere with it I'll give your ideas a try and let you know what happens.
from pytest-httpserver.
My hunch is that the issue occurs via implicit imports coming from __init__.py
, not from the plugin itself.
from pytest-httpserver.
@csernazs Have you tried 3.10.10 and 3.11.2? I suspect it has something to do with these changes: python/cpython#100892 . They landed in 3.10.10 and 3.11.2. I can reproduce the issue on AMD with 3.10.10 where 3.10.9 passes.
from pytest-httpserver.
@CharString I found the issue on 3.10.10 and 3.11.2. I have just now verified that it does not appear on 3.10.9 and 3.11.1.
@csernazs Looks like python/cpython#102126 has been filed for it, so there's probably no need to keep this issue open unless you just want to remind yourself to check the other one.
from pytest-httpserver.
Thanks for the report and the research into this issue! Trying to understand the the linked issues now...
I ran it on python 3.11.1 and 3.10.9 (whatever is in nix), so that answers why I could not reproduce it.
I'm closing this now.
from pytest-httpserver.
Related Issues (20)
- Considering bringing plugin under pytest-dev HOT 2
- Add all the necessary imports in the code examples in the doc HOT 2
- Can HTTPServer().handlers be modified from user code? HOT 3
- Recommendations for running both http (non-s) and https test within the same session HOT 2
- header auth matching breaks with Werkzeug>=2.3.0 HOT 5
- `werkzeug.urls` deprecation warnings with Werkzeug 2.3.0 HOT 2
- Twine dependency in 1.0.7 HOT 2
- Waiting without pytest and without starting the server HOT 6
- RFE: please start making github releases HOT 4
- Program stuck on server.stop() HOT 3
- Support Werkzeug 3.0 HOT 2
- Remove `<4` Python version constraint
- Not compatible with werkzeug >= 3.0 HOT 1
- Documentation: a small correction and adding a note for request handler HOT 5
- Add __repr__ to RequestHandler
- Add ability to simulate faults HOT 9
- Add verification for calls recieved HOT 9
- Multiple responses per endpoint HOT 4
- Am I missing something here? Everything seems to require `httpserver.url_for` which breaks everything HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-httpserver.