Giter VIP home page Giter VIP logo

Comments (11)

handrews avatar handrews commented on July 25, 2024

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.

csernazs avatar csernazs commented on July 25, 2024

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.

handrews avatar handrews commented on July 25, 2024

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.

handrews avatar handrews commented on July 25, 2024

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.

csernazs avatar csernazs commented on July 25, 2024

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.

csernazs avatar csernazs commented on July 25, 2024

If I could reproduce it, I would start by removing the lines form that pytest_plugin.py and bisect it. :)

from pytest-httpserver.

handrews avatar handrews commented on July 25, 2024

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.

vlaci avatar vlaci commented on July 25, 2024

My hunch is that the issue occurs via implicit imports coming from __init__.py, not from the plugin itself.

from pytest-httpserver.

CharString avatar CharString commented on July 25, 2024

@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.

handrews avatar handrews commented on July 25, 2024

@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.

csernazs avatar csernazs commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.