Repository navigation
Closed
Labels
Description
As of 7946471, when using astropy.test(pastebin='failed'), an exception related to XML is raised:
============================================================================ Sending information to Paste Service =============================================================================
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/Users/tom/<ipython-input-3-144d52ea8b0a> in <module>()
----> 1 astropy.test(pastebin='failed')
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/tests/helper.py in run_tests(module, args, plugins, verbose, pastebin, remote_data)
121 all_args += ' --remotedata'
122
--> 123 return pytest.main(args=all_args, plugins=plugins)
124
125
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in main(args, plugins)
455 config = hook.pytest_cmdline_parse(
456 pluginmanager=_pluginmanager, args=args)
--> 457 exitstatus = hook.pytest_cmdline_main(config=config)
458 except UsageError:
459 e = sys.exc_info()[1]
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in __call__(self, **kwargs)
409 def __call__(self, **kwargs):
410 methods = self.hookrelay._pm.listattr(self.name)
--> 411 return self._docall(methods, kwargs)
412
413 def pcall(self, plugins, **kwargs):
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in _docall(self, methods, kwargs)
420 mc = MultiCall(methods, kwargs, firstresult=self.firstresult)
421 try:
--> 422 res = mc.execute()
423 if res:
424 self.trace("finish", self.name, "-->", res)
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in execute(self)
338 method = self.methods.pop()
339 kwargs = self.getkwargs(method)
--> 340 res = method(**kwargs)
341 if res is not None:
342 self.results.append(res)
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.main in pytest_cmdline_main(config)
88
89 def pytest_cmdline_main(config):
---> 90 return wrap_session(config, _main)
91
92 def _main(config, session):
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.main in wrap_session(config, doit)
82 if initstate >= 2:
83 config.hook.pytest_sessionfinish(session=session,
---> 84 exitstatus=session.exitstatus)
85 if initstate >= 1:
86 config.pluginmanager.do_unconfigure(config)
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in __call__(self, **kwargs)
409 def __call__(self, **kwargs):
410 methods = self.hookrelay._pm.listattr(self.name)
--> 411 return self._docall(methods, kwargs)
412
413 def pcall(self, plugins, **kwargs):
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in _docall(self, methods, kwargs)
420 mc = MultiCall(methods, kwargs, firstresult=self.firstresult)
421 try:
--> 422 res = mc.execute()
423 if res:
424 self.trace("finish", self.name, "-->", res)
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in execute(self)
338 method = self.methods.pop()
339 kwargs = self.getkwargs(method)
--> 340 res = method(**kwargs)
341 if res is not None:
342 self.results.append(res)
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.terminal in pytest_sessionfinish(self, exitstatus, __multicall__)
316 self.summary_errors()
317 self.summary_failures()
--> 318 self.config.hook.pytest_terminal_summary(terminalreporter=self)
319 if exitstatus == 2:
320 self._report_keyboardinterrupt()
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in __call__(self, **kwargs)
409 def __call__(self, **kwargs):
410 methods = self.hookrelay._pm.listattr(self.name)
--> 411 return self._docall(methods, kwargs)
412
413 def pcall(self, plugins, **kwargs):
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in _docall(self, methods, kwargs)
420 mc = MultiCall(methods, kwargs, firstresult=self.firstresult)
421 try:
--> 422 res = mc.execute()
423 if res:
424 self.trace("finish", self.name, "-->", res)
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in execute(self)
338 method = self.methods.pop()
339 kwargs = self.getkwargs(method)
--> 340 res = method(**kwargs)
341 if res is not None:
342 self.results.append(res)
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.pastebin in pytest_terminal_summary(terminalreporter)
49 if tr.config.option.debug:
50 terminalreporter.write_line("xmlrpcurl: %s" %(url.xmlrpc,))
---> 51 serverproxy = getproxy()
52 for rep in terminalreporter.stats.get('failed'):
53 try:
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.pastebin in getproxy()
39
40 def getproxy():
---> 41 return py.std.xmlrpclib.ServerProxy(url.xmlrpc).pastes
42
43 def pytest_terminal_summary(terminalreporter):
/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/py._std in __getattr__(self, name)
13 m = __import__(name)
14 except ImportError:
---> 15 raise AttributeError("py.std: could not import %s" % name)
16 return m
17
AttributeError: py.std: could not import xmlrpclib
@jiffyclub - Is this fixable, or do we need to report this as a bug in py.test?
Activity
jiffyclub commentedon Nov 7, 2011
My guess is a bug, but I'm not an expert in Python 3. Could you try it with an installed py.test, instead of the astropy packaged py.test, and see whether the same thing happens?
embray commentedon Nov 7, 2011
This would be a py.test bug I think. In Python 3 xmlrpclib became just xmlrpc. So py.test should be doing a different import for Python 3.
jiffyclub commentedon Nov 7, 2011
I've filed an issue with py.test on this: https://bitbucket.org/hpk42/pytest/issue/87/pastebin-fails-under-python-3
eteq commentedon Nov 9, 2011
Is this something we can monkeypatch to get around, or should we just close this but for now? (or wait until py.test fixes it?)
jiffyclub commentedon Nov 9, 2011
It may be possible to fix this in our packaged py.test by getting and fixing the source code, then regenerating the stand-alone script. I will give that a shot and see what happens. If I get it working I can also give the fix back to py.test.
astrofrog commentedon Nov 9, 2011
@eteq - I think we should definitely keep this ticket open until the issue is fixed either by us or by the py.test developers.
@jiffyclub - great!
jiffyclub commentedon Nov 15, 2011
This issue has been fixed in the py.test trunk but I don't know when the next official release will be. I haven't tested it yet with our py.test standalone script due to problems getting the latest astropy built on my computer. Once I've verified that the standalone script is working in both Python 2 and Python 3 I'll open a pull request with the new py.test script and we can close this one, unless we want to leave it open until pastebin also works in a py.test official release.
Merge pull request astropy#68 from jiffyclub/pytest-py3k
Merge pull request astropy#51 from sergiopasra/sphinx-py3
Merge pull request astropy#51 from astrofrog/announce-1.0