#6 Update to 6.0.2 (#1600318)
Merged 4 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python-tornado tornado6  into  master

file modified
+1
@@ -17,3 +17,4 @@ 

  /tornado-4.5.2.tar.gz

  /tornado-5.0.2.tar.gz

  /tornado-5.1.1.tar.gz

+ /tornado-6.0.2.tar.gz

@@ -1,25 +1,24 @@ 

- From eccbc528d9800bdfef5e1795e6bada446aafaf43 Mon Sep 17 00:00:00 2001

+ From 58f264d25c9dc427733a6a72fedc7b0e3b9c8e06 Mon Sep 17 00:00:00 2001

  From: Lumir Balhar <lbalhar@redhat.com>

  Date: Thu, 16 May 2019 13:50:14 +0200

  Subject: [PATCH] Do not turn DeprecationWarning into Exception

  

  ---

-  tornado/test/runtests.py | 2 --

-  1 file changed, 2 deletions(-)

+  tornado/test/runtests.py | 1 -

+  1 file changed, 1 deletion(-)

  

  diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py

- index e4f938d3..cd2a5b87 100644

+ index dab76a2..117fd1c 100644

  --- a/tornado/test/runtests.py

  +++ b/tornado/test/runtests.py

- @@ -127,8 +127,6 @@ def main():

+ @@ -124,7 +124,6 @@ def main():

       # Tornado generally shouldn't use anything deprecated, but some of

       # our dependencies do (last match wins).

       warnings.filterwarnings("ignore", category=DeprecationWarning)

- -    warnings.filterwarnings("error", category=DeprecationWarning,

- -                            module=r"tornado\..*")

+ -    warnings.filterwarnings("error", category=DeprecationWarning, module=r"tornado\..*")

       warnings.filterwarnings("ignore", category=PendingDeprecationWarning)

-      warnings.filterwarnings("error", category=PendingDeprecationWarning,

-                              module=r"tornado\..*")

+      warnings.filterwarnings(

+          "error", category=PendingDeprecationWarning, module=r"tornado\..*"

  -- 

  2.21.0

  

@@ -1,39 +0,0 @@ 

- diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py

- index 16938c4..b1ae474 100644

- --- a/tornado/test/web_test.py

- +++ b/tornado/test/web_test.py

- @@ -398,7 +398,7 @@ class AuthRedirectTest(WebTestCase):

-                                follow_redirects=False)

-          self.assertEqual(response.code, 302)

-          self.assertTrue(re.match(

- -            'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute',

- +            r'http://example.com/login\?next=http%3A%2F%2F127.0.0.1%3A[0-9]+%2Fabsolute',

-              response.headers['Location']), response.headers['Location'])

-  

-  

- diff --git a/tornado/util.py b/tornado/util.py

- index a42ebeb..0b93ff9 100644

- --- a/tornado/util.py

- +++ b/tornado/util.py

- @@ -252,7 +252,7 @@ _re_unescape_pattern = re.compile(r'\\(.)', re.DOTALL)

-  

-  def re_unescape(s):

-      # type: (str) -> str

- -    """Unescape a string escaped by `re.escape`.

- +    r"""Unescape a string escaped by `re.escape`.

-  

-      May raise ``ValueError`` for regular expressions which could not

-      have been produced by `re.escape` (for example, strings containing

- diff --git a/tornado/web.py b/tornado/web.py

- index 6760b0b..4340b16 100644

- --- a/tornado/web.py

- +++ b/tornado/web.py

- @@ -1887,7 +1887,7 @@ class _ApplicationRouter(ReversibleRuleRouter):

-  

-  

-  class Application(ReversibleRouter):

- -    """A collection of request handlers that make up a web application.

- +    r"""A collection of request handlers that make up a web application.

-  

-      Instances of this class are callable and can be passed directly to

-      HTTPServer to serve the application::

file modified
+11 -56
@@ -1,37 +1,20 @@ 

- # python2 is not available on RHEL > 7

- %if 0%{?rhel} > 7

- %bcond_with python2

- %else

- %bcond_without python2

- %endif

- 

  %global srcname tornado

  

  Name:           python-%{srcname}

- Version:        5.1.1

- Release:        2%{?dist}

+ Version:        6.0.2

+ Release:        1%{?dist}

  Summary:        Scalable, non-blocking web server and tools

  

  License:        ASL 2.0

  URL:            http://www.tornadoweb.org

  Source0:        %{pypi_source}

  

- # Python 3.8 introduces SyntaxWarnings on invalid escape sequences

- # Tornado has them, mostly in docstrings and the tests treat them as errors

- # Fixed upstream: https://github.com/tornadoweb/tornado/commit/6dceb64ed27c1d48af22142f2ebae946f0e85e95

- Patch0:         fix-syntax-warnings.patch

  # Do not turn DeprecationWarning in tornado module into Exception

  # fixes FTBFS with Python 3.8

  Patch1:         Do-not-turn-DeprecationWarning-into-Exception.patch

  

  BuildRequires:  gcc

  

- %if %{with python2}

- BuildRequires:  python2-devel

- BuildRequires:  python2-backports_abc

- BuildRequires:  python2-singledispatch

- BuildRequires:  python2-futures

- %endif # with python2

  BuildRequires:  python%{python3_pkgversion}-setuptools

  BuildRequires:  python%{python3_pkgversion}-devel

  
@@ -45,14 +28,12 @@ 

  handle thousands of simultaneous standing connections, which means it is

  ideal for real-time web services.

  

- %if %{with python2}

- %package -n python2-%{srcname}

+ %package -n python%{python3_pkgversion}-%{srcname}

  Summary:        Scalable, non-blocking web server and tools

- %{?python_provide:%python_provide python2-%{srcname}}

- 

- Requires:       python2-pycurl

+ %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

+ Requires:       python%{python3_pkgversion}-pycurl

  

- %description -n python2-%{srcname}

+ %description -n python%{python3_pkgversion}-%{srcname}

  Tornado is an open source version of the scalable, non-blocking web

  server and tools.

  
@@ -61,7 +42,6 @@ 

  reasonably fast. Because it is non-blocking and uses epoll, it can

  handle thousands of simultaneous standing connections, which means it is

  ideal for real-time web services.

- %endif  # with python2

  

  %package doc

  Summary:        Examples for python-tornado
@@ -72,21 +52,6 @@ 

  Tornado is an open source version of the scalable, non-blocking web

  server and and tools. This package contains some example applications.

  

- %package -n python%{python3_pkgversion}-%{srcname}

- Summary:        Scalable, non-blocking web server and tools

- %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

- Requires:       python%{python3_pkgversion}-pycurl

- 

- %description -n python%{python3_pkgversion}-%{srcname}

- Tornado is an open source version of the scalable, non-blocking web

- server and tools.

- 

- The framework is distinct from most mainstream web server frameworks

- (and certainly most Python frameworks) because it is non-blocking and

- reasonably fast. Because it is non-blocking and uses epoll, it can

- handle thousands of simultaneous standing connections, which means it is

- ideal for real-time web services.

- 

  %prep 

  %autosetup -p1 -n %{srcname}-%{version}

  # remove shebang from files
@@ -94,28 +59,13 @@ 

  

  %build

  %py3_build

- %{?with_python2:%py2_build}

- 

  

  %install

  %py3_install

- %{?with_python2:%py2_install}

  

  %check

  export ASYNC_TEST_TIMEOUT=10

  %{__python3} -m tornado.test.runtests --verbose

- %{?with_python2:%{__python2} -m tornado.test.runtests --verbose}

- 

- %if %{with python2}

- %files -n python2-%{srcname}

- %license LICENSE

- %doc README.rst

- %{python2_sitearch}/%{srcname}/

- %{python2_sitearch}/%{srcname}-%{version}-*.egg-info

- %endif # with python2

- 

- %files doc

- %doc demos

  

  %files -n python%{python3_pkgversion}-%{srcname}

  %license LICENSE
@@ -123,8 +73,13 @@ 

  %{python3_sitearch}/%{srcname}/

  %{python3_sitearch}/%{srcname}-%{version}-*.egg-info

  

+ %files doc

+ %doc demos

  

  %changelog

+ * Mon Jun 03 2019 Miro Hrončok <mhroncok@redhat.com> - 6.0.2-1

+ - Update to 6.0.2 (#1600318)

+ 

  * Thu May 16 2019 Lumír Balhar <lbalhar@redhat.com> - 5.1.1-2

  - New patch to not turn DeprecationWarning in tornado module into Exception

  - Fixes FTBFS with Python 3.8

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (tornado-5.1.1.tar.gz) = f9ecedb20c055981f482c9a2a8bb30082dcc479674f75f6c8654afcf40f2ce5a45e82c7e2b5a6ce5d1c9da7896e865e78c7d29a64b6b1d28d6e74a718be62dc7

+ SHA512 (tornado-6.0.2.tar.gz) = 1167043a7661ca882b59de44a1e43df9ac09b4ffcfc1bf406bd796c7d899b95083881168607864106fb438829d447b41db981be39870cb87d560e00caf62fafc

This removes python2-tornado and others still have one week to claim that bit before we remove it.

rawhide scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=35246795
Python 3.8 Copr build: https://copr.fedorainfracloud.org/coprs/churchyard/dirty3.8/build/920236/

%check has passed.

$ rpm -qp --requires python3-tornado-6.0.2-1.fc31.x86_64.rpm 
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libpython3.7m.so.1.0()(64bit)
python(abi) = 3.7
python3-pycurl
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rtld(GNU_HASH)

$ rpm -qp --provides python3-tornado-6.0.2-1.fc31.x86_64.rpm 
python3-tornado = 6.0.2-1.fc31
python3-tornado(x86-64) = 6.0.2-1.fc31
python3.7dist(tornado) = 6.0.2
python3dist(tornado) = 6.0.2

$ rpmlint python3-tornado-6.0.2-1.fc31.x86_64.rpm 
python3-tornado.x86_64: W: spelling-error Summary(en_US) Scalable -> Salable, Callable, Calculable
python3-tornado.x86_64: W: spelling-error %description -l en_US epoll -> poll, e poll
python3-tornado.x86_64: E: zero-length /usr/lib64/python3.7/site-packages/tornado/py.typed
python3-tornado.x86_64: W: file-not-in-%lang /usr/lib64/python3.7/site-packages/tornado/test/gettext_translations/fr_FR/LC_MESSAGES/tornado_test.mo
1 packages and 0 specfiles checked; 1 errors, 3 warnings.

$ rpmlint python-tornado-6.0.2-1.fc31.src.rpm 
python-tornado.src: W: spelling-error Summary(en_US) Scalable -> Salable, Callable, Calculable
python-tornado.src: W: spelling-error %description -l en_US epoll -> poll, e poll
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

rebased onto 86d1ca8

5 years ago

From a SPEC sanity perspective it looks good to me.

I'd like to investigate a bit those rpmlint issues:

python3-tornado.x86_64: E: zero-length /usr/lib64/python3.7/site-packages/tornado/py.typed
python3-tornado.x86_64: W: file-not-in-%lang /usr/lib64/python3.7/site-packages/tornado/test/gettext_translations/fr_FR/LC_MESSAGES/tornado_test.mo

python3-tornado.x86_64: E: zero-length /usr/lib64/python3.7/site-packages/tornado/py.typed

Empty file makes sense here.

python3-tornado.x86_64: W: file-not-in-%lang /usr/lib64/python3.7/site-packages/tornado/test/gettext_translations/fr_FR/LC_MESSAGES/tornado_test.mo

This is used for tests only, it is not an actual translation to be marked as %lang.

Pull-Request has been merged by churchyard

4 years ago