mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Use our existing drop-in, no-op decorator instead of redefining it.
Patch by Francisco Martin Brugue.
This commit is contained in:
parent
54dbfbd675
commit
4460abea64
1 changed files with 2 additions and 6 deletions
|
@ -3,18 +3,14 @@
|
|||
from packaging.pypi.xmlrpc import Client, InvalidSearchField, ProjectNotFound
|
||||
|
||||
from packaging.tests import unittest
|
||||
from packaging.tests.support import fake_dec
|
||||
|
||||
try:
|
||||
import threading
|
||||
from packaging.tests.pypi_server import use_xmlrpc_server
|
||||
except ImportError:
|
||||
threading = None
|
||||
def use_xmlrpc_server():
|
||||
def _use(func):
|
||||
def __use(*args, **kw):
|
||||
return func(*args, **kw)
|
||||
return __use
|
||||
return _use
|
||||
use_xmlrpc_server = fake_dec
|
||||
|
||||
|
||||
@unittest.skipIf(threading is None, "Needs threading")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue