Skip to content

Fix exception on Python 3 when displaying warning about configuration generation - #952

Merged
mdboom merged 1 commit into
astropy:masterfrom
mdboom:setup/error-message-encoding
Apr 15, 2013
Merged

mdboom merged 1 commit into
astropy:masterfrom
mdboom:setup/error-message-encoding

Conversation

@mdboom

@mdboom mdboom commented Apr 8, 2013

Copy link
Copy Markdown
Contributor

Fixes the original part of #950

Comment thread astropy/setup_helpers.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be msg = msg.decode('UTF-8'), right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Duh. Of course. Thanks.

@embray

embray commented Apr 8, 2013

Copy link
Copy Markdown
Member

Just as another possibility, in astropy.io.fits.py3compat I added a couple u() and b() helper functions which act as replacements for the u and b string markers that work across Python versions. Maybe we should just move that into Astropy's compat module and use them here?

@mdboom

mdboom commented Apr 8, 2013

Copy link
Copy Markdown
Contributor Author

@iguananaut: Sure. Seems fine to me.

@eteq

eteq commented Apr 13, 2013

Copy link
Copy Markdown
Member

So does that mean this should be closed in favor of a new one that does that, or should we merge this now and switch to u() and b() in a later PR, @iguananaut and @mdboom ?

@embray

embray commented Apr 15, 2013

Copy link
Copy Markdown
Member

I'm fine either way. If this is blocking anything please go ahead and merge it.

@mdboom

mdboom commented Apr 15, 2013

Copy link
Copy Markdown
Contributor Author

Merging. When we abandon Python 3.2 support, we can just use the u prefix everywhere.

mdboom added a commit that referenced this pull request Apr 15, 2013
Fix exception on Python 3 when displaying warning about configuration generation
@mdboom
mdboom merged commit 24fd0e6 into astropy:master Apr 15, 2013
@embray

embray commented Apr 15, 2013

Copy link
Copy Markdown
Member

Or we could just abandon Python 2 support ;)

mdboom added a commit that referenced this pull request May 13, 2013
Fix exception on Python 3 when displaying warning about configuration generation
@mdboom
mdboom deleted the setup/error-message-encoding branch May 21, 2014 23:56
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

Successfully merging this pull request may close these issues.

3 participants