Ned Batchelder
Ned Batchelder
*Originally reported by* **Lorenzo Boffelli (Bitbucket: [lboff](https://bitbucket.org/lboff), GitHub: [lboff](https://github.com/lboff))** ---------------------------------------- Hello, I am using pytest with pytest-cov and coverage. I wrote some tests where I run a process (multiprocessing.Process) The...
### Describe the bug I am trying to upgrade my development pins in coverage.py, and I get incompatible requirements: ``` Could not find a version that matches docutils-r doc/requirements.in (line...
**Describe the bug** My project (https://deps.dev/pypi/coverage) gets a warning about pinned dependencies: ``` Warn: pipCommand not pinned by hash: .github/workflows/coverage.yml:114 ``` [The line](https://github.com/nedbat/coveragepy/blob/master/.github/workflows/coverage.yml#L114) in question is: ``` python -m pip...
`not_safe_exec` is for running tests that use CodeJail but don't want to require an actual CodeJail configured. Now, it runs the code directly in the current process. This is bad...
This code will run outside of a sandbox: ``` import codejail.jail_code import codejail.safe_exec codejail.jail_code.configure('python', '/home/pmitros/jail/jailbox/bin/python') codejail.safe_exec.safe_exec("import os\nos.system('ls /etc')", {}) ``` This code will run in a sandbox: ``` import codejail.jail_code...
On Ubuntu, sitecustomize.py is linked to /etc/python2.7/sitecustomize.py, which tries to import apport_python_hook. This fails due to the AppArmor profile, but I would rather not import it at all. I tried...
It isn't a great way to coordinate with Django, since it doesn't get invoked for manage.py commands. It isn't testable in this repo.
At Python Study Group this week, we looked at context managers. When we got to `@contextlib.contextmanager`, we learned that this is wrong: ``` @contextmanager def my_context_manager(): #... set up yield...
This code runs two tests in nose and pytest: ``` # Three-layer cake. class BaseTest(unittest.TestCase): __test__ = False def test_it(self): self.fail("Hello, world!") class Middle(BaseTest): __test__ = True class MoreTests(Middle): __test__...
Django 3.2.16 security patch will be released October 4th: https://groups.google.com/g/django-announce/c/Oe6C9yJlCEc/m/QObPKVxuAgAJ