Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The --merge option of version 0.50 seems not to be Python 3 compatible #67

Closed
siebenkopf opened this issue Mar 31, 2015 · 4 comments
Closed

Comments

@siebenkopf
Copy link

Hi,

we have mixed C++/Python packages, that we would like to test with coverage. I have created an environment on Travis, in which we are able to integrate the coverage of the cpp-coverage package and this package, by first creating the C++ coverage, paste it into a file, and then use the --merge option of this package. Under Python 2 this is working flawlessly, as you can see here:
https://travis-ci.org/bioidiap/bob.core
and here:
https://coveralls.io/r/bioidiap/bob.core

However, under Python 3 I get the following error message:

$ coveralls --merge=cpp_cov.json
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.2.5/bin/coveralls", line 9, in <module>
load_entry_point('coveralls==0.5', 'console_scripts', 'coveralls')()
File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/coveralls/cli.py", line 50, in main
coverallz.merge(options['--merge'])
File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/coveralls/api.py", line 72, in merge
extra = json.load(fh)
File "/opt/python/3.2.5/lib/python3.2/json/__init__.py", line 274, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/opt/python/3.2.5/lib/python3.2/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/opt/python/3.2.5/lib/python3.2/json/decoder.py", line 353, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: can't use a string pattern on a bytes-like object

(can be seen in the Travis link above) and, obviously, no report is uploaded.

In fact, I am not sure if the issue is an issue of this package, but since cpp-coveralls finishes without an error, I assume that the error is related to coveralls-python.

Do you think that you will find the time to investigate on that issue, or should I wait until the new version 1.0 is coming out?

Thanks
Manuel

@coagulant
Copy link
Contributor

Hi! The issue has been fixed in #57.

Please, use pip install coveralls>=1.0a, it's quite stable )
We're not releasing 1.0 yet, but it should be safe to use it.

Let us know if you run into any problems.

@siebenkopf
Copy link
Author

pip install coveralls>=1.0a didn't work out, it actually didn't install anything. On the other hand, it seems that coveralls-0.5 is already installed on Travis.

I guess, pip doesn't like to upgrade the package with an unstable version. Do I have to add another option to pip to force it to upgrade?

On the other hand, for me it would be better if you could simply release version 1.0, or to fix the issue in 0.5 and upload a new version (e.g. 0.5.1) to PyPI? What do you think about that?

Thanks
Manuel

@coagulant
Copy link
Contributor

@siebenkopf
You can manually specify package version if you already have coveralls installed. Like pip install coveralls==1.0a2

1.0 is planned to be released after coverage 4.0 release

@jessamynsmith
Copy link
Contributor

I already know that we will have to make some changes to make it work with coverage 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants