[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: mailer.py py2/py3 change: non-UTF-8 environments

From: Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org>
Date: Wed, 23 Dec 2020 03:13:42 +0900

On 2020/12/21 16:15, Daniel Shahaf wrote:
> stsp_at_apache.org wrote on Mon, 14 Dec 2020 16:57 -0000:
>> URL: http://svn.apache.org/viewvc?rev=1884427&view=rev
>> Log:
>> Make mailer.py work properly with Python 3, and drop Python 2 support.
>>
>> Most of the changes deal with the handling binary data vs Python strings.
>>
>> I've made sure that mailer.py will work in a UTF-8 environment. In general,
>> UTF-8 is recommended for hook scripts. See the SVNUseUTF8 mod_dav_svn option.
>> Environments using other encodings may not work as expected, but those will
>> be problematic for hook scripts in general.
>
> Correct me if I'm wrong, but it sounds like you haven't ruled out the
> possibility that this commit will constitute a regression for anyone
> who runs mailer.py in a non-UTF-8 environment and will upgrade to this
> commit.

It is not for the commit message, but for the committed code, it rather
supports non-UTF-8 (or C) locale, at least the handling of REPOS-PATH
(as I wrote another thread).

It seems the code before commit for Python 2 could not handle REPOS-PATH
if it contains non ascii character on non-UTF-8 environment because it
didn't care that svn.core.svn_path_canonicalize and svn.repos.open only
accept bytes object of UTF-8 path. Even if a user might pass REPOS-PATH
as transcoded to UTF-8, the script searches for a default config file
under the transcoded REPOS-PATH and it is not desirable behavior.

For Python 2/3 support, I don't want to drop Python 2 support for mailer.py
if we can easily, but I also think Python 3 support is higher priority.

And as also I wrote another thread, it seems still incomplete to support
Python 3. I'll take a look this, but it has not made progress at all
since I then, sorry.

Cheers,

-- 
Yasuhito FUTATSUKI <futatuki_at_yf.bsclub.org>
Received on 2020-12-22 19:14:48 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.