From 69b93b0f72b1c44b56e15f079409e54a4589e0d4 Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Fri, 2 Apr 2021 22:07:53 -0400 Subject: [PATCH 1/9] Update package name --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0754d37..56eff4d 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ long_description = f.read() setup( - name='internet-sabotage', + name='internet-sabotage2', version='0.1.2', description='Disable network connection for Testing', long_description=long_description, From 50708ca3cb47e4cc0d7d894249360a950eb0a92a Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Fri, 2 Apr 2021 22:08:15 -0400 Subject: [PATCH 2/9] Minimal word fix --- README.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 794e270..6d5bd80 100644 --- a/README.rst +++ b/README.rst @@ -3,12 +3,14 @@ Internet Sabotage Python package to simulate internet failures for testing purposes. -Instalation +This fork fix error in original repository. + +Installation ----------- .. code:: shell - $ pip install internet-sabotage + $ pip install internet-sabotage2 Usage ----- From 6e48654b75d7d5beffcd83fb976910e5e548ac07 Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Fri, 2 Apr 2021 22:10:26 -0400 Subject: [PATCH 3/9] Update to python projects --- .gitignore | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 60ace6f..3bf872a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,130 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so +.pypirc + +# Distribution / packaging +.Python +build/ +develop-eggs/ dist/ -*.egg-info +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ From df635c35797ab92a6e46c46e8f739662cbb02933 Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Fri, 2 Apr 2021 22:50:52 -0400 Subject: [PATCH 4/9] Fix missing lib --- __init__.py => internet_sabotage/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 1529 bytes 2 files changed, 0 insertions(+), 0 deletions(-) rename __init__.py => internet_sabotage/__init__.py (100%) create mode 100644 internet_sabotage/__pycache__/__init__.cpython-39.pyc diff --git a/__init__.py b/internet_sabotage/__init__.py similarity index 100% rename from __init__.py rename to internet_sabotage/__init__.py diff --git a/internet_sabotage/__pycache__/__init__.cpython-39.pyc b/internet_sabotage/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8e461db0272e50e283c1356c3e6f306e297b1ed0 GIT binary patch literal 1529 zcmb7E%Wl&^6rHh?*h$lepp=KG=z;}aG-3@^g(wttQx@&YiZmF{Gi$@#CFI9#dz!DFcy8h7dUxEi*!#_ z!R&%44~C!J_(^-9h0^VVDDCdc_iZlYK~H2xxBE(VRMd-NxZGBvFLeU>CK67L%)ZQ4 z6R3pBgjvXqP+ea)+@bOAKSJ{!#9iizY^E)1bqpspMLvNld|}Y&b^(ZI(A+ zV#tUb*fJgiWteT?Zs!Y3%eX5H;|buWf^S03o)#uDM&%ysNj^x$1ywb0Ve>CKAC~zX z6B%9_`P1>+{9fAXMru|d`a!t8)~7%cAB-}@;|Ys zs6tI$z8nM}ku!2m3N!FjUNEan~c31MCtg%)kiw_ir1kn5xKYZ`lV7*sX7K? zqp`I>vegoHwiZ_%(xXuJctK-5eGo&_^<96)ckM|~RmiWp2VJ-TKQ#Q0^722bkPK`0 UC)c^ZR>Ze%pBBo^r#|@q1>ne8<^TWy literal 0 HcmV?d00001 From 4ebb1094ea693c08a6075ce1e07cebd4feb5de1b Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Fri, 2 Apr 2021 23:31:02 -0400 Subject: [PATCH 5/9] Add `long_description_content_type` argument --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 56eff4d..54ac1fb 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,7 @@ version='0.1.2', description='Disable network connection for Testing', long_description=long_description, + long_description_content_type='text/x-rst', author='André Luiz', author_email='contato@xdvl.info', url='https://github.com/dvl/python-internet-sabotage', From d7020c6d801259dc3fd738609e98b432fd05c7d5 Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Fri, 2 Apr 2021 23:31:37 -0400 Subject: [PATCH 6/9] Fix underline title --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6d5bd80..db43ad2 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ Python package to simulate internet failures for testing purposes. This fork fix error in original repository. Installation ------------ +------------ .. code:: shell From 9876848d697a09cbe753c1e23531769389f1e4ea Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Fri, 2 Apr 2021 23:33:00 -0400 Subject: [PATCH 7/9] Update version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 54ac1fb..76aab17 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='internet-sabotage2', - version='0.1.2', + version='0.1.3', description='Disable network connection for Testing', long_description=long_description, long_description_content_type='text/x-rst', From 4bef94bf2babeacd0f20549625a07c104c29bc4e Mon Sep 17 00:00:00 2001 From: Pedro Torcatt Date: Sat, 3 Apr 2021 07:23:38 -0400 Subject: [PATCH 8/9] Add simple advice --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index db43ad2..ee3cb40 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ Internet Sabotage Python package to simulate internet failures for testing purposes. -This fork fix error in original repository. +This fork fix error in original repository. The library is working at 100%. Installation ------------ From d6b3508885b049a2fc1b09911b1db97b4821c4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Tue, 18 Jan 2022 11:20:45 +0100 Subject: [PATCH 9/9] fix __exit__ if there are exit details --- internet_sabotage/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internet_sabotage/__init__.py b/internet_sabotage/__init__.py index 0577b9c..6ccb6f0 100644 --- a/internet_sabotage/__init__.py +++ b/internet_sabotage/__init__.py @@ -29,5 +29,5 @@ def guarded(*args, **kwargs): def __enter__(self): self._disable_socket() - def __exit__(self): + def __exit__(self, *exc_details): self._enable_socket()