
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
pytest thread safety should be better documented Β· Issue #12356 Β· pytest-dev/pytest
Description:
a detailed description of the bug or problem you are having output of pip list from the virtual environment you are using pytest and operating system versions minimal example if possible pytest.warns is a subclass of the standard library...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Social Networks
- Technology & Computing
- Mobile Technology & AI
Content Management System {π}
What CMS is github.com built with?
Github.com is powered by WORDPRESS.
Traffic Estimate {π}
What is the average monthly size of github.com audience?
ππ Tremendous Traffic: 10M - 20M visitors per month
Based on our best estimate, this website will receive around 10,653,780 visitors per month in the current month.
check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush
How Does Github.com Make Money? {πΈ}
Subscription Packages {π³}
We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.How Much Does Github.com Make? {π°}
Subscription Packages {π³}
Prices on github.com are in US Dollars ($).
They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 5,316,107 paying customers.
The estimated monthly recurring revenue (MRR) is $22,327,651.
The estimated annual recurring revenues (ARR) are $267,931,808.
Wordpress Themes and Plugins {π¨}
What WordPress theme does this site use?
It is strange but we were not able to detect any theme on the page.
What WordPress plugins does this website use?
It is strange but we were not able to detect any plugins on the page.
Keywords {π}
thread, pytest, ngoldbaum, docs, issue, safety, pytestwarns, safe, commented, sign, nicoddemus, projects, documented, description, noted, threadsafe, implemented, def, flaky, test, member, terms, stdlib, helper, navigation, pull, requests, actions, security, closed, library, warningscatchwarnings, note, import, raisewarning, task, threadingthreadtargetcatchwarning, taskstart, taskjoin, mentioned, thecompiler, entirety, intended, iirc, ronnypfannschmidt, catchwarnings, inherently, threadsave, contributor, author,
Topics {βοΈ}
activity ngoldbaum mentioned pytest constructs inside thread-safe version thread-safe iirc flaky test docs comment metadata assignees standard library warnings catch_warnings context manager type projects projects milestone verified 889d9b2 sign compiler commented issue description flaky test stdlib helper thread safe def test_pytest_warns def catch_warning detailed description constructs/helpers task1 = threading task2 = threading pip list virtual environment macos sonoma target=catch_warning terms unhandled exceptions threadsave issue assigned labels labels type milestone relationships pytest pytest 8 pytest' thread raise_warning github warnings free = threading docs catch_warnings library sign task1 task2 skip jump
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:pytest thread safety should be better documented
articleBody:<!--
Thanks for submitting an issue!
Quick check-list while reporting bugs:
-->
- [x] a detailed description of the bug or problem you are having
- [x] output of `pip list` from the virtual environment you are using
- [x] pytest and operating system versions
- [x] minimal example if possible
`pytest.warns` is a subclass of the standard library `warnings.catch_warnings` context manager, which is not thread safe (this is noted in [the docs](https://docs.python.org/3/library/warnings.html#warnings.catch_warnings)).
If it's not possible for pytest to have a thread-safe version, it would be nice if the docs for `pytest.warns` could note that it's implemented using `warnings.catch_warnings` and is not thread safe for the same reason.
pytest 8.2.1 on MacOS Sonoma.
Fails about 10-20% of the time on my machine:
```python
import warnings
import threading
def raise_warning():
warnings.warn(RuntimeWarning())
def test_pytest_warns():
b = threading.Barrier(2)
def catch_warning():
b.wait()
with pytest.warns(RuntimeWarning):
raise_warning()
task1 = threading.Thread(target=catch_warning)
task2 = threading.Thread(target=catch_warning)
task1.start()
task2.start()
task1.join()
task2.join()
```
author:
url:https://github.com/ngoldbaum
type:Person
name:ngoldbaum
datePublished:2024-05-22T18:46:57.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:5
url:https://github.com/12356/pytest/issues/12356
context:https://schema.org
headline:pytest thread safety should be better documented
articleBody:<!--
Thanks for submitting an issue!
Quick check-list while reporting bugs:
-->
- [x] a detailed description of the bug or problem you are having
- [x] output of `pip list` from the virtual environment you are using
- [x] pytest and operating system versions
- [x] minimal example if possible
`pytest.warns` is a subclass of the standard library `warnings.catch_warnings` context manager, which is not thread safe (this is noted in [the docs](https://docs.python.org/3/library/warnings.html#warnings.catch_warnings)).
If it's not possible for pytest to have a thread-safe version, it would be nice if the docs for `pytest.warns` could note that it's implemented using `warnings.catch_warnings` and is not thread safe for the same reason.
pytest 8.2.1 on MacOS Sonoma.
Fails about 10-20% of the time on my machine:
```python
import warnings
import threading
def raise_warning():
warnings.warn(RuntimeWarning())
def test_pytest_warns():
b = threading.Barrier(2)
def catch_warning():
b.wait()
with pytest.warns(RuntimeWarning):
raise_warning()
task1 = threading.Thread(target=catch_warning)
task2 = threading.Thread(target=catch_warning)
task1.start()
task2.start()
task1.join()
task2.join()
```
author:
url:https://github.com/ngoldbaum
type:Person
name:ngoldbaum
datePublished:2024-05-22T18:46:57.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:5
url:https://github.com/12356/pytest/issues/12356
Person:
url:https://github.com/ngoldbaum
name:ngoldbaum
url:https://github.com/ngoldbaum
name:ngoldbaum
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:5
interactionType:https://schema.org/CommentAction
userInteractionCount:5
External Links {π}(4)
- How much profit does https://github.blog generate?
- What's the revenue for https://docs.python.org/3/library/warnings.html#warnings.catch_warnings?
- Financial intake of https://docs.pytest.org/en/latest/how-to/failures.html#warning-about-unraisable-exceptions-and-unhandled-thread-exceptions
- What's the financial gain of https://www.githubstatus.com/?
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- Lodash
Emails and Hosting {βοΈ}
Mail Servers:
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- alt2.aspmx.l.google.com
- alt3.aspmx.l.google.com
- alt4.aspmx.l.google.com
Name Servers:
- dns1.p08.nsone.net
- dns2.p08.nsone.net
- dns3.p08.nsone.net
- dns4.p08.nsone.net
- ns-1283.awsdns-32.org
- ns-1707.awsdns-21.co.uk
- ns-421.awsdns-52.com
- ns-520.awsdns-01.net