Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring over lots of Py3 changes from master #1

Merged
merged 166 commits into from
Feb 3, 2020
Merged

Conversation

dwbapst
Copy link
Owner

@dwbapst dwbapst commented Feb 3, 2020

No description provided.

sjohannes and others added 30 commits September 8, 2019 12:59
xl.unicode.strxfrm has been removed because it's not needed anymore.
In python2, the alldatadir received via command-line was a byte
string, and thus we did a sequence of decode() and encode() to
remove any non-ASCII characters. This was necessary because if
there were UTF-8 characters in the string, the os.path.join()
call threw exception.

In python3, the alldatadir is a unicode string, so we need to
change the sequence to encode(), followed by decode(). It is also
worth noting that os.path.join() does not take issues with UTF-8
characters anymore, so perhaps the whole code block can be removed.

But for now, we replace the non-ASCII characters to ? to keep the
behavior consistent with the old version...
Python3 file object returns unicode str objects, so GioFileInputStream
needs to mimic that behavior...
Use urllib.parse instead of urllib2.
Use 'unicode' when converting ETree to string in order to obtain
a python3 str object.
Because response.read() returns a byte string.
In both plugins, removed encode('utf-8') calls on artist
and title tag, which converted str to bytes and in turn caused errors
with replace() calls.

Similarly in lyricwiki plugin, the web page content, obtained via
renderContents(), needs to be converted from bytes to str before
subsequent replace() and split() calls.
We were comparing int(m.props.position * track_length) against
playback_time, but because the latter was a float, the comparison
was never true. So convert the playback_time to int before the
comparison to catch the moment when marker is reached.

Should fix the segment repeating in A-B repeat plugin.
genodeftest and others added 29 commits January 16, 2020 18:46
Prior to this commit, this function would leak file descriptors to PLUGININFO
imp is deprecated. Requires Python 3.6+
py3: fix documentation generation on python 3.7+
Fixes #667, this time both on python 3.6 (Ubuntu 18.04) and 3.7
(Fedora 31).
[py3] Several fixes for the plugins module
[py3] Some python 3.x meta stuff
py3: fix documentation generation on python 3.6+ (try 2)
Changes:
* bump libmodplug soname version to match fedora31, debian8+, ubuntu12.10+
* add logging to give a hint if metadata fetching does not work for the
  MOD file format
logging.warning() is just the same without deprecation notice.
Python: Replace calls to deprecated logging.warn()
Mod format: bump soname version, mention in DEPS, add logging
Currently translated at 100.0% (1068 of 1068 strings)
@dwbapst dwbapst merged commit 95f04fd into dwbapst:master Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants