Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
.. image:: https://img.shields.io/travis/AntoineCezar/timeoutcontext.svg :target: https://travis-ci.org/AntoineCezar/timeoutcontext
.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg :target: http://timeoutcontext.readthedocs.org/
.. image:: https://img.shields.io/coveralls/AntoineCezar/timeoutcontext.svg :target: https://coveralls.io/github/AntoineCezar/timeoutcontext
.. image:: https://img.shields.io/pypi/v/timeoutcontext.svg :target: https://pypi.python.org/pypi/timeoutcontext
A signal <https://docs.python.org/library/signal.html#>
_ based
timeout context manager and decorator.
Since it is signal based this package can not work under Windows operating system.
As a context manager:
.. code:: python
import sys
from time import sleep
from timeoutcontext import timeout
if sys.version_info < (3, 3):
from timeoutcontext._timeout import TimeoutError
try:
with timeout(1):
sleep(2)
except TimeoutError:
print('timeout')
As a decorator:
.. code:: python
import sys
from time import sleep
from timeoutcontext import timeout
if sys.version_info < (3, 3):
from timeoutcontext._timeout import TimeoutError
@timeout(1)
def wait():
sleep(2)
try:
wait()
except TimeoutError:
print('timeout')
FAQs
A signal based timeout context manager
We found that timeoutcontext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.