Patchwork [1,of,5,stable] py3: unbyteify arguments to warnings.filterwarnings()

login
register
mail settings
Submitter Manuel Jacob
Date June 16, 2020, 1:50 a.m.
Message ID <0dddc84a6a1ac5bb027b.1592272226@tmp>
Download mbox | patch
Permalink /patch/46514/
State Accepted
Headers show

Comments

Manuel Jacob - June 16, 2020, 1:50 a.m.
# HG changeset patch
# User Manuel Jacob <me@manueljacob.de>
# Date 1592183395 -7200
#      Mon Jun 15 03:09:55 2020 +0200
# Branch stable
# Node ID 0dddc84a6a1ac5bb027b66c12d79aa5916d2b05b
# Parent  6c8384afbf770be2167478fff3cb9b92e1182a06
# EXP-Topic convert-svn
py3: unbyteify arguments to warnings.filterwarnings()

This fixes a crash when trying to import the convert extension on Python 3.
Yuya Nishihara - June 16, 2020, 9:42 a.m.
On Tue, 16 Jun 2020 03:50:26 +0200, Manuel Jacob wrote:
> # HG changeset patch
> # User Manuel Jacob <me@manueljacob.de>
> # Date 1592183395 -7200
> #      Mon Jun 15 03:09:55 2020 +0200
> # Branch stable
> # Node ID 0dddc84a6a1ac5bb027b66c12d79aa5916d2b05b
> # Parent  6c8384afbf770be2167478fff3cb9b92e1182a06
> # EXP-Topic convert-svn
> py3: unbyteify arguments to warnings.filterwarnings()

Queued 1-4, thanks.

Patch

diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -55,7 +55,7 @@ 
     import warnings
 
     warnings.filterwarnings(
-        b'ignore', module=b'svn.core', category=DeprecationWarning
+        'ignore', module='svn.core', category=DeprecationWarning
     )
     svn.core.SubversionException  # trigger import to catch error