Unicode by default (was: Py3k port of python-daemon)
Ben Finney
ben+python at benfinney.id.au
Wed May 30 00:54:32 UTC 2012
Aaron Maxwell <amax at redsymbol.net> writes:
> Based on my experiences porting Python-daemon 1.5.5 to work on our
> Python 3.2 stack, I have ported it to over to the (recent) tip of the
> mainline branch. Ben, you can get the merge bundles here (created via
> bzr send):
Thanks very much for this work.
Wow, all those Python 2 unicode literals just make the diff really noisy
don't they? I now regret the work that went into specifying every
unicode literal; at the time, though, I was needing to support older
versions in the Python 2.x series.
To help this process, I will make the code base use unicode literals by
default (with ‘from __future__ import unicode_literals’) and specify
bytes literals in those few places where they're needed.
Specifying a bytes literal only works in Python versions 2.6 or newer,
which we've already declared a while ago, so it's fine.
> http://files.redsymbol.net/bfinney/lockfile-amax-py3k.gz
>
> http://files.redsymbol.net/bfinney/python-daemon-amax-py3k.gz
>
> (Please let me know if they are in a usable format for you - I'm still
> kind of learning bzr.)
Uncompressed is better, since I can just point Bazaar straight at them;
but otherwise, that's great.
Can you merge from the public ‘python-daemon.devel’ branch, which will
give you the changes to literals. You should have few merge conflicts,
because most of the string literals change exactly as you've done, but
there will be a few bytes literals for you to incorporate into your
branch.
Then you can re-generate a merge request, which should be considerably
smaller without all the unicode-literal noise.
Thanks again for working on this!
--
\ “When I was a kid I used to pray every night for a new bicycle. |
`\ Then I realised that the Lord doesn't work that way so I stole |
_o__) one and asked Him to forgive me.” —Emo Philips |
Ben Finney
More information about the python-daemon-devel
mailing list