Skip to content

Python 3 support #3

@vadmium

Description

@vadmium

You might be interested in some small changes I made to a version of this package. They are in the /usenet/pynzb/ directory at https://bitbucket.org/vadmium/pyrescene/src/py3/usenet/pynzb/. Unfortunately I don’t think Bitbucket provides a page with a log or diff of a directory, but here is a summary of my changes:

  • Fix NZBSegment.set_message_id() method call in “expat_nzb.py”
  • Use encoded byte string instead of text in the tests suite
  • Handle “basestring” removal from Python 3 in “base.py”
  • Use BytesIO rather than StringIO in the Element Tree and “lxml” implementations

The result should work on Python 3 and Python 2 with the same code, although it would drop Python < 2.6 support. Let me know if you would like to me to migrate these changes from Mercurial to Git.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions