[Python-checkins] cpython: Issue #12167: Fix a reafleak in packaging.tests.PyPIServer constructor
victor.stinner
python-checkins at python.org
Thu Jun 16 00:01:06 CEST 2011
http://hg.python.org/cpython/rev/fd6446a88fe3
changeset: 70821:fd6446a88fe3
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Wed Jun 15 23:58:57 2011 +0200
summary:
Issue #12167: Fix a reafleak in packaging.tests.PyPIServer constructor
Don't modify mutable default arguments...
files:
Lib/packaging/tests/pypi_server.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/packaging/tests/pypi_server.py b/Lib/packaging/tests/pypi_server.py
--- a/Lib/packaging/tests/pypi_server.py
+++ b/Lib/packaging/tests/pypi_server.py
@@ -88,7 +88,7 @@
"""
def __init__(self, test_static_path=None,
- static_filesystem_paths=["default"],
+ static_filesystem_paths=None,
static_uri_paths=["simple", "packages"], serve_xmlrpc=False):
"""Initialize the server.
@@ -105,6 +105,8 @@
threading.Thread.__init__(self)
self._run = True
self._serve_xmlrpc = serve_xmlrpc
+ if static_filesystem_paths is None:
+ static_filesystem_paths = ["default"]
#TODO allow to serve XMLRPC and HTTP static files at the same time.
if not self._serve_xmlrpc:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list