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

Combined fix for unicode and include fedora 21+ fixes #6739

Merged
merged 2 commits into from
Jan 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion rosdep/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,13 @@ libpopt-dev:
libpq-dev:
arch: [postgresql-libs]
debian: [libpq-dev]
fedora: [derelict-postgresql-devel, postgresql-devel]
fedora:
'21': [derelict-PQ-devel, postgresql-devel]
'22': [derelict-PQ-devel, postgresql-devel]
beefy: [derelict-postgresql-devel, postgresql-devel]
heisenbug: [derelict-postgresql-devel, postgresql-devel]
schrödinger’s: [derelict-postgresql-devel, postgresql-devel]
spherical: [derelict-postgresql-devel, postgresql-devel]
gentoo:
portage:
packages: [dev-libs/libpqxx]
Expand Down
6 changes: 4 additions & 2 deletions test/test_url_validity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import print_function


from io import BytesIO
from io import StringIO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the unit tests run with Python 2 this should not use the io package but cStringIO instead (http:https://wiki.ros.org/python_2_and_3_compatible_code#StringIO).

import os
import subprocess
import yaml
Expand Down Expand Up @@ -51,7 +51,9 @@ def detect_lines(diffstr):
"""Take a diff string and return a dict of
files with line numbers changed"""
resultant_lines = {}
io = BytesIO(diffstr)
# Force utf-8 re: https://github.com/ros/rosdistro/issues/6637
encoding = 'utf-8'
io = StringIO(unicode(diffstr, encoding))
udiff = unidiff.PatchSet(io)
for file in udiff:
target_lines = []
Expand Down