Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ repos:
- portend
- pylint-pytest ~= 2.0.0a0
- pyOpenSSL # needed by pylint-pytest since it picks up pytest's args
- pypytools
- pytest-cov # needed by pylint-pytest since it picks up pytest's args
- pytest-mock # needed by pylint-pytest since it picks up pytest's args
- >- # needed by pylint-pytest since it picks up pytest's args
Expand Down
7 changes: 4 additions & 3 deletions cheroot/test/test_server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Tests for the HTTP server."""

import gc
import os
import pathlib
import queue
Expand All @@ -17,7 +18,6 @@

import requests
import requests_unixsocket
from pypytools.gc.custom import DefaultGc

from .._compat import IS_LINUX, IS_MACOS, IS_WINDOWS, SYS_PLATFORM, bton, ntob
from ..server import IS_UID_GID_RESOLVABLE, Gateway, HTTPServer
Expand Down Expand Up @@ -418,8 +418,9 @@ def test_reuse_port(http_server, ip_addr, mocker):
@pytest.fixture
def _garbage_bin():
"""Disable garbage collection when this fixture is in use."""
with DefaultGc().nogc():
yield
gc.disable()
yield
gc.enable()


@pytest.fixture
Expand Down
5 changes: 0 additions & 5 deletions dependencies/direct/py.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ portend

pyopenssl

# The pypytools library provides a cross-implementation context
# manager for disabling garbage collection in specific blocks
# of the control flow:
pypytools

pytest-clarity
pytest-cov
pytest-mock >= 1.11.0
Expand Down
9 changes: 9 additions & 0 deletions docs/changelog-fragments.d/880.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Made the test of high file descriptor numbers disable garbage
collection while it runs, as its fixture intended: the
:pypi:`pypytools` context manager that it used only pauses the
collections that :pypi:`pypytools` starts itself, so the interpreter's
collector kept running and could free a low file descriptor for the
server to take. Nothing else used :pypi:`pypytools`, so it is no
longer a test dependency.

-- by :user:`rm-you`
Loading