[Python-modules-commits] [yarl] 05/16: Import yarl_0.7.1.orig.tar.gz

Piotr Ożarowski piotr at moszumanska.debian.org
Wed Dec 21 12:00:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

piotr pushed a commit to branch master
in repository yarl.

commit 603ecca142eb0150e1f66eaeaa6a1caf5f24c208
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Tue Nov 29 13:08:11 2016 +0100

    Import yarl_0.7.1.orig.tar.gz
---
 CHANGES.rst            |  5 +++++
 PKG-INFO               |  7 ++++++-
 setup.cfg              |  2 +-
 setup.py               |  1 -
 tests/test_quoting.py  | 12 ++++++++++++
 yarl.egg-info/PKG-INFO |  7 ++++++-
 yarl/__init__.py       |  2 +-
 yarl/_quoting.c        | 11 +++++------
 yarl/_quoting.pyx      |  2 +-
 9 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/CHANGES.rst b/CHANGES.rst
index 64b348f..2452982 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,11 @@
 CHANGES
 =======
 
+0.7.1 (2016-11-18)
+------------------
+
+* Accept not only `str` but all classes inherited from `str` also #25
+
 0.7.0 (2016-11-07)
 ------------------
 
diff --git a/PKG-INFO b/PKG-INFO
index 3cd1bf6..f00128b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: yarl
-Version: 0.7.0
+Version: 0.7.1
 Summary: Yet another URL library
 Home-page: https://github.com/aio-libs/yarl/
 Author: Andrew Svetlov
@@ -164,6 +164,11 @@ Description: yarl
         CHANGES
         =======
         
+        0.7.1 (2016-11-18)
+        ------------------
+        
+        * Accept not only `str` but all classes inherited from `str` also #25
+        
         0.7.0 (2016-11-07)
         ------------------
         
diff --git a/setup.cfg b/setup.cfg
index b4e7cea..57223b6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,6 +3,6 @@ test = pytest
 
 [egg_info]
 tag_svn_revision = 0
-tag_date = 0
 tag_build = 
+tag_date = 0
 
diff --git a/setup.py b/setup.py
index 7885ec9..5a7b698 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,3 @@
-import codecs
 import pathlib
 import re
 
diff --git a/tests/test_quoting.py b/tests/test_quoting.py
index bd2514c..7ff946c 100644
--- a/tests/test_quoting.py
+++ b/tests/test_quoting.py
@@ -254,3 +254,15 @@ def test_quote_non_ascii(quote):
 
 def test_quote_non_ascii2(quote):
     assert quote('a%F8b') == 'a%F8b'
+
+
+class StrLike(str):
+    pass
+
+
+def test_quote_str_like(quote):
+    assert quote(StrLike('abc')) == 'abc'
+
+
+def test_unquote_str_like(unquote):
+    assert unquote(StrLike('abc')) == 'abc'
diff --git a/yarl.egg-info/PKG-INFO b/yarl.egg-info/PKG-INFO
index 3cd1bf6..f00128b 100644
--- a/yarl.egg-info/PKG-INFO
+++ b/yarl.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: yarl
-Version: 0.7.0
+Version: 0.7.1
 Summary: Yet another URL library
 Home-page: https://github.com/aio-libs/yarl/
 Author: Andrew Svetlov
@@ -164,6 +164,11 @@ Description: yarl
         CHANGES
         =======
         
+        0.7.1 (2016-11-18)
+        ------------------
+        
+        * Accept not only `str` but all classes inherited from `str` also #25
+        
         0.7.0 (2016-11-07)
         ------------------
         
diff --git a/yarl/__init__.py b/yarl/__init__.py
index 82aabb8..196dee1 100644
--- a/yarl/__init__.py
+++ b/yarl/__init__.py
@@ -9,7 +9,7 @@ from multidict import MultiDict, MultiDictProxy
 
 from .quoting import quote, unquote
 
-__version__ = '0.7.0'
+__version__ = '0.7.1'
 
 __all__ = ['URL', 'quote', 'unquote']
 
diff --git a/yarl/_quoting.c b/yarl/_quoting.c
index 9da1a09..dbec3b5 100644
--- a/yarl/_quoting.c
+++ b/yarl/_quoting.c
@@ -1406,7 +1406,7 @@ static PyObject *__pyx_pf_4yarl_8_quoting__quote(CYTHON_UNUSED PyObject *__pyx_s
  *         raise TypeError("Argument should be str")
  *     if not val:             # <<<<<<<<<<<<<<
  *         return ''
- *     return _do_quote(val, safe, plus)
+ *     return _do_quote(<str>val, safe, plus)
  */
   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 47, __pyx_L1_error)
   __pyx_t_2 = ((!__pyx_t_1) != 0);
@@ -1416,7 +1416,7 @@ static PyObject *__pyx_pf_4yarl_8_quoting__quote(CYTHON_UNUSED PyObject *__pyx_s
  *         raise TypeError("Argument should be str")
  *     if not val:
  *         return ''             # <<<<<<<<<<<<<<
- *     return _do_quote(val, safe, plus)
+ *     return _do_quote(<str>val, safe, plus)
  * 
  */
     __Pyx_XDECREF(__pyx_r);
@@ -1429,19 +1429,18 @@ static PyObject *__pyx_pf_4yarl_8_quoting__quote(CYTHON_UNUSED PyObject *__pyx_s
  *         raise TypeError("Argument should be str")
  *     if not val:             # <<<<<<<<<<<<<<
  *         return ''
- *     return _do_quote(val, safe, plus)
+ *     return _do_quote(<str>val, safe, plus)
  */
   }
 
   /* "yarl/_quoting.pyx":49
  *     if not val:
  *         return ''
- *     return _do_quote(val, safe, plus)             # <<<<<<<<<<<<<<
+ *     return _do_quote(<str>val, safe, plus)             # <<<<<<<<<<<<<<
  * 
  * 
  */
   __Pyx_XDECREF(__pyx_r);
-  if (!(likely(PyUnicode_CheckExact(__pyx_v_val))||((__pyx_v_val) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_val)->tp_name), 0))) __PYX_ERR(0, 49, __pyx_L1_error)
   __pyx_t_3 = __pyx_f_4yarl_8_quoting__do_quote(((PyObject*)__pyx_v_val), __pyx_v_safe, __pyx_v_plus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error)
   __Pyx_GOTREF(__pyx_t_3);
   __pyx_r = __pyx_t_3;
@@ -3031,10 +3030,10 @@ static PyObject *__pyx_f_4yarl_8_quoting__do_unquote(PyObject *__pyx_v_val, stru
       goto __pyx_L27_try_end;
       __pyx_L20_error:;
       __Pyx_PyThreadState_assign
-      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
       /* "yarl/_quoting.pyx":172
  *         try:
diff --git a/yarl/_quoting.pyx b/yarl/_quoting.pyx
index 535639e..4d4d82d 100644
--- a/yarl/_quoting.pyx
+++ b/yarl/_quoting.pyx
@@ -46,7 +46,7 @@ def _quote(val, *, str safe='', bint plus=False):
         raise TypeError("Argument should be str")
     if not val:
         return ''
-    return _do_quote(val, safe, plus)
+    return _do_quote(<str>val, safe, plus)
 
 
 cdef str _do_quote(str val, str safe, bint plus):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/yarl.git



More information about the Python-modules-commits mailing list