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

Re: swig-py3 str/bytes difference in svn_config_*()

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 13 Dec 2019 10:47:54 +0000

Yasuhito FUTATSUKI wrote on Fri, Dec 13, 2019 at 17:28:18 +0900:
> Thank you for testing. I also tested and same result on FreeBSD
> with Python 3.6. It seems "z*" format in PyArg_ParseTuple() doesn't
> work I expected.
>
> On the other hand, I can't find good reason to care typemap for
> "const char *config_dir" input different from other MAY_BE_NULL types
> on Python bindings only, so I removed this special handling.
> Then, it works :)

I don't see any reason either, and I confirm this version of the patch fixes
both issues. Thanks again for the quick fix.

> [[[
> Index: subversion/bindings/swig/core.i
> ===================================================================
> --- subversion/bindings/swig/core.i (revision 1871319)
> +++ subversion/bindings/swig/core.i (working copy)
> @@ -362,7 +362,9 @@
> /* svn_config_get */
> const char *default_value,
> /* svn_config_read_auth_data */
> - const char *config_dir,
> + const char *config_dir,

I forgot to say this earlier, but I ran into some problems trying to apply your
patch. The indentation was corrupted: the line that start with spaces, above,
had an extra leading space. To cut a long story short, your email was formatted
with format=flowed, which means two things:

- Your MUA correctly space-stuffed the unidiff context lines, but on my end,
  Mutt did not un-space-stuff them before piping them to patch(1). Therefore,
  patch(1) saw one leading space too many on the context lines, and (correctly)
  failed.

- In general, format=flowed and inline patches don't mix — IIRC, the problem is
  that unidiffs that contain lines with trailing spaces will be corrupted — so
  you should either disable format=flowed on your end or send patches as
  attachments (as opposed to inline). See:
  https://wiki.openstack.org/wiki/MailingListEtiquette#Thunderbird

Cheers,

Daniel
Received on 2019-12-13 11:48:01 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.