[ 
https://issues.apache.org/jira/browse/AURORA-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15499420#comment-15499420
 ] 

John Sirois commented on AURORA-1775:
-------------------------------------

Noting that my testing used latest pycharm (2016.2.3) and this fails to run 
py.test with:

{noformat}
/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/bin/python
 /opt/pycharm-community/helpers/pycharm/pytestrunner.py -p pytest_teamcity 
/home/jsirois/dev/apache/jsirois-aurora/src/test/python/apache/aurora/config/test_loader.py
Testing started at 11:52 AM ...

Traceback (most recent call last):
  File "/opt/pycharm-community/helpers/pycharm/pytestrunner.py", line 60, in 
<module>
    main()
  File "/opt/pycharm-community/helpers/pycharm/pytestrunner.py", line 34, in 
main
    pluginmanager=_pluginmanager, args=args)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 413, in __call__
    return self._docall(methods, kwargs)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 424, in _docall
    res = mc.execute()
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 315, in execute
    res = method(**kwargs)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/helpconfig.py",
 line 27, in pytest_cmdline_parse
    config = __multicall__.execute()
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 315, in execute
    res = method(**kwargs)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/config.py",
 line 636, in pytest_cmdline_parse
    self.parse(args)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/config.py",
 line 747, in parse
    self._preparse(args)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/config.py",
 line 713, in _preparse
    self.pluginmanager.consider_preparse(args)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 188, in consider_preparse
    self.consider_pluginarg(opt2)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 198, in consider_pluginarg
    self.import_plugin(arg)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 217, in import_plugin
    mod = importplugin(modname)
  File 
"/home/jsirois/dev/apache/jsirois-aurora/build-support/python/pycharm.venv/lib/python2.7/site-packages/_pytest/core.py",
 line 275, in importplugin
    __import__(importspec)
  File "/opt/pycharm-community/helpers/pycharm/pytest_teamcity.py", line 170, 
in <module>
    @pytest.hookimpl(trylast=True)
AttributeError: 'module' object has no attribute 'hookimpl'

Process finished with exit code 1
Empty test suite.
{noformat}

As it turns out, the @pytest.hookimpl decorator needed by 
/opt/pycharm-community/helpers/pycharm/pytest_teamcity.py is new in py.test 2.7 
and pants own constraint on py.test is >=2.6,<2.7 so the fix for this will 
require a pants change to allow control of pytest version in pants.ini or else 
at least a looser constraint.

> Updating pants to 1.1.0-rc7 breaks the make-pycharm-virtualenv script
> ---------------------------------------------------------------------
>
>                 Key: AURORA-1775
>                 URL: https://issues.apache.org/jira/browse/AURORA-1775
>             Project: Aurora
>          Issue Type: Bug
>            Reporter: Kai Huang
>            Assignee: John Sirois
>
> When I run build-support/python/make-pycharm-virtualenv script locally, 
> exceptions were thrown at: 
> https://github.com/apache/aurora/blob/e67c6a732c00786bc74d63d4fb2b9f5f398c5435/build-support/python/make-pycharm-virtualenv#L24
> "./pants dependencies --external-only src/test/python::” does no longer seem 
> to work for pants 1.1.0-rc7. As a result, the Pycharm project will be 
> generated with a incomplete list of packages, which prevents developers from 
> debugging python code and running tests in IDE. (pants test via command line 
> still works)
> I was wondering if someone can work on it and fix this issue? Thanks!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to