[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#850664: RFS: python-pynzb/0.1.0-3



Control: tag -1 -moreinfo

Hi Sean,

Thanks for your review!


 The Python 2 module can still be built fine, but I removed it since
there were no rdeps.

As in my reponse to your other RFS, I'd like to confirm that this is
DPMT policy.

I don't think that it's a team policy specifically, I was just prompted by the lintian tag which was enabled to inform about the slowly approaching EOL of Python 2 in Debian, aimed at packages in the buster cycle (https://bugs.debian.org/829744) which is where this package is going.

If you prefer to keep the Python 2 module then I'm happy to reinstate it.


Changes since the last upload:

  * 0001-set-message_id-properly-in-expat-parser.patch: fix an upstream code.
    Tests pass for Python 2 with only this change.

Your grammar is misleading.  ITYM "Tests pass for Python 2 only with
this change."

Now reads: "This change allows the tests to pass for Python 2."


  * Move lxml to Suggests since there are fallbacks, but Build-Depend on it to
    run the tests.

It would be clearer to split this into two changlog entries, i.e.

    * Move lxml to Suggests [from ??].
    * Add build-dep on lxml to run the tests.

Now reads:

  * Move lxml to Suggests rather than Depends since there are fallbacks using
    standard library XML parsers.
  * Build-Depend on lxml in order to run the test for the implementation of the
    NZB parser using lxml (LXMLNZBParser).


  * For Python 3, decode strings -> bytes as utf-8 for lxml.

How did you make this change?  With a patch to the upstream code?
Please explain.

Actually this was something I wasn't quite sure about. Although I'm only building the Python 3 package, I wanted the source package to be able to easily build both the Python 2 & 3 packages in case that was desired. For that reason I put the Python 3 specific changes in d/rules instead of making a patch. I'm not sure if that's considered bad practice, but I think the only alternatives would be (a) forget about Python 2 support and just add a patch or (b) add a patch with a branch in the code based on the runtime version.

Anyway I clarified the changelog entry for now:

  * For Python 3, add a command to PYBUILD_AFTTER_BUILD_python3 in d/rules to
    change the code to decode strings -> bytes as utf-8 for lxml's benefit.

And this is the relevant line of d/rules:

# lxml expects a bytes object in Python 3 so we simply decode the string as
# utf-8 for the Python 3 build. If this turns out to be problematic, we can
# instead disable lxml support for the Python 3 build in pynzb/__init__.py and
# rely on the standard library fallbacks for XML parsing.
export PYBUILD_AFTER_BUILD_python3=2to3 -n -w {build_dir}/pynzb/; sed -i -e 's/StringIO/BytesIO/g' -e 's/BytesIO(xml)/BytesIO(bytes(xml,"utf-8"))/' {build_dir}/pynzb/lxml_nzb.py


  * Fix watch file (although the last release was some time ago).

Please consider dropping the parathetical remark.  It's not really
appropriate for a packaging changelog.

Done. There is a new version in mentors and git.


Cheers,
Carl


Reply to: