Notification time stamped 2018-08-01 00:26:52 UTC
From 5d1fbc1fb95347fbeb319a3c6ce6121a07730f93 Mon Sep 17 00:00:00 2001
From: Miro Hrončok <miro(a)hroncok.cz>
Date: Aug 01 2018 00:24:31 +0000
Subject: Update to 1.10.0 (#860617) (#1605613)
---
diff --git a/.gitignore b/.gitignore
index 3c7cd12..4798df4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
Beaker-1.5.3.tar.gz
/Beaker-1.5.4.tar.gz
+/Beaker-1.10.0.tar.gz
+/beaker-1.10.0.tar.gz
diff --git a/beaker-anydbm.patch b/beaker-anydbm.patch
deleted file mode 100644
index 7de82c9..0000000
--- a/beaker-anydbm.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: Beaker-1.5.4/beaker/container.py
-===================================================================
---- Beaker-1.5.4.orig/beaker/container.py
-+++ Beaker-1.5.4/beaker/container.py
-@@ -1,5 +1,6 @@
- """Container and Namespace classes"""
--import anydbm
-+# For python3 (will be converted as import dbsm as anydbm)
-+import anydbm as anydbm
- import cPickle
- import logging
- import os
diff --git a/beaker-disable-badtest.patch b/beaker-disable-badtest.patch
deleted file mode 100644
index 9d12fed..0000000
--- a/beaker-disable-badtest.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-The current upstream has not fixed an imperfect test that fails if there is any
-load on the machine. This renders Beaker unbuildable, so I'm turning it off for
-now.
-
-diff -r 251c42a5f849 tests/test_container.py
---- a/tests/test_container.py Tue Jul 27 11:07:50 2010 -0700
-+++ b/tests/test_container.py Thu Aug 12 17:01:53 2010 -0700
-@@ -109,8 +109,8 @@
- def test_memory_container_3():
- test_memory_container(expiretime=5, delay=2)
-
--def test_dbm_container_2():
-- test_dbm_container(expiretime=2)
-+#def test_dbm_container_2():
-+# test_dbm_container(expiretime=2)
-
- def test_dbm_container_3():
- test_dbm_container(expiretime=5, delay=2)
diff --git a/beaker-use-system-paste.patch b/beaker-use-system-paste.patch
index 98d34dd..46ca81b 100644
--- a/beaker-use-system-paste.patch
+++ b/beaker-use-system-paste.patch
@@ -1,11 +1,14 @@
-diff -up Beaker-1.3.1/beaker/converters.py.bak Beaker-1.3.1/beaker/converters.py
---- Beaker-1.3.1/beaker/converters.py.bak 2008-02-28 16:02:30.000000000 -0500
-+++ Beaker-1.3.1/beaker/converters.py 2010-06-28 20:58:33.032604522 -0400
-@@ -1,26 +1,29 @@
+diff --git a/beaker/converters.py b/beaker/converters.py
+index a8fb3c9..63c411c 100644
+--- a/beaker/converters.py
++++ b/beaker/converters.py
+@@ -1,29 +1 @@
+-from beaker._compat import string_type
+-
-# (c) 2005 Ian Bicking and contributors; written for Paste (
http://pythonpaste.org)
-# Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php
-def asbool(obj):
-- if isinstance(obj, (str, unicode)):
+- if isinstance(obj, string_type):
- obj = obj.strip().lower()
- if obj in ['true', 'yes', 'on', 'y',
't', '1']:
- return True
@@ -15,25 +18,10 @@ diff -up Beaker-1.3.1/beaker/converters.py.bak
Beaker-1.3.1/beaker/converters.py
- raise ValueError(
- "String is not true/false: %r" % obj)
- return bool(obj)
-+try:
-+ from paste.util.converters import asbool, aslist
-+except ImportError:
-+ # (c) 2005 Ian Bicking and contributors; written for Paste (
http://pythonpaste.org)
-+ # Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php
-+ def asbool(obj):
-+ if isinstance(obj, (str, unicode)):
-+ obj = obj.strip().lower()
-+ if obj in ['true', 'yes', 'on', 'y',
't', '1']:
-+ return True
-+ elif obj in ['false', 'no', 'off', 'n',
'f', '0']:
-+ return False
-+ else:
-+ raise ValueError(
-+ "String is not true/false: %r" % obj)
-+ return bool(obj)
-
+-
+-
-def aslist(obj, sep=None, strip=True):
-- if isinstance(obj, (str, unicode)):
+- if isinstance(obj, string_type):
- lst = obj.split(sep)
- if strip:
- lst = [v.strip() for v in lst]
@@ -44,15 +32,4 @@ diff -up Beaker-1.3.1/beaker/converters.py.bak
Beaker-1.3.1/beaker/converters.py
- return []
- else:
- return [obj]
-+ def aslist(obj, sep=None, strip=True):
-+ if isinstance(obj, (str, unicode)):
-+ lst = obj.split(sep)
-+ if strip:
-+ lst = [v.strip() for v in lst]
-+ return lst
-+ elif isinstance(obj, (list, tuple)):
-+ return obj
-+ elif obj is None:
-+ return []
-+ else:
-+ return [obj]
++from paste.util.converters import asbool, aslist
diff --git a/python-beaker.spec b/python-beaker.spec
index 4a462ba..2923558 100644
--- a/python-beaker.spec
+++ b/python-beaker.spec
@@ -1,36 +1,17 @@
-%if 0%{?fedora} || 0%{?rhel} >= 8
-%global with_python3 1
-%else
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%endif
-
Name: python-beaker
-Version: 1.5.4
-Release: 22%{?dist}
+Version: 1.10.0
+Release: 1%{?dist}
Summary: WSGI middleware layer to provide sessions
-
-Group: Development/Languages
License: BSD and MIT
-URL:
http://beaker.groovie.org/
-Source0:
http://pypi.python.org/packages/source/B/Beaker/Beaker-%{version}.tar.gz
+URL:
http://beaker.readthedocs.io
+Source0:
https://github.com/bbangert/beaker/archive/%{version}/beaker-%{version}.t...
Patch0: beaker-use-system-paste.patch
-Patch1: beaker-disable-badtest.patch
-Patch2: beaker-anydbm.patch
BuildArch: noarch
-BuildRequires: python2-devel
-BuildRequires: python2-setuptools
-# Needed for the test suite
-BuildRequires: python2-nose
-BuildRequires: python2-webtest
-%if 0%{?with_python3}
-BuildRequires: /usr/bin/2to3
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-# Needed for complete test suite
-#BuildRequires: python3-webtest
-BuildRequires: python3-nose
-%endif # if with_python3
+BuildRequires: %{_bindir}/mongod
+BuildRequires: %{_bindir}/redis-server
+BuildRequires: %{_bindir}/pkill
+BuildRequires: %{_bindir}/netstat
%global _description\
Beaker is a caching library that includes Session and Cache objects built on\
@@ -41,12 +22,25 @@ manage Session objects and signed cookies.
%package -n python2-beaker
Summary: %summary
-Requires: python2-paste
-%if 0%{?with_python3}
-Requires: pycryptopp
-%else
-Requires: python2-crypto
-%endif
+BuildRequires: python2-devel
+BuildRequires: python2dist(cryptography)
+BuildRequires: python2dist(funcsigs)
+BuildRequires: python2dist(mock)
+BuildRequires: python2dist(nose)
+BuildRequires: python2dist(paste)
+BuildRequires: python2dist(pycrypto)
+BuildRequires: python2dist(pymongo)
+BuildRequires: python2dist(redis)
+BuildRequires: python2dist(setuptools)
+BuildRequires: python2dist(sqlalchemy)
+BuildRequires: python2dist(webtest)
+Requires: python2dist(funcsigs)
+Requires: python2dist(paste)
+Recommends: python2dist(cryptography)
+Recommends: python2dist(pycrypto)
+Recommends: python2dist(pycryptodome)
+Recommends: python2dist(pycryptopp)
+
%{?python_provide:%python_provide python2-beaker}
# Remove before F30
Provides: %{name} = %{version}-%{release}
@@ -55,83 +49,80 @@ Obsoletes: %{name} < %{version}-%{release}
%description -n python2-beaker %_description
-%if 0%{?with_python3}
%package -n python3-beaker
Summary: %summary
-# Paste is not python3 compatible at the moment
-#Requires: python3-paste
-# Without one of these there's no aes implementation which means there's no way
to
-# have encrypted cookies. This is a reduction in features over the python2 version.
-# Currently there's no working python3 port for either:
-#
http://allmydata.org/trac/pycryptopp/ticket/35
-#
http://lists.dlitz.net/pipermail/pycrypto/2010q2/000253.html
-#%if 0%{?fedora}
-#Requires: python3-pycryptopp
-#%else
-#Requires: python3-crypto
-#%endif
+BuildRequires: python3-devel
+BuildRequires: python3dist(cryptography)
+BuildRequires: python3dist(funcsigs)
+BuildRequires: python3dist(mock)
+BuildRequires: python3dist(nose)
+BuildRequires: python3dist(paste)
+BuildRequires: python3dist(pycrypto)
+BuildRequires: python3dist(pymongo)
+BuildRequires: python3dist(redis)
+BuildRequires: python3dist(setuptools)
+BuildRequires: python3dist(sqlalchemy)
+BuildRequires: python3dist(webtest)
+Requires: python3dist(paste)
+Recommends: python3dist(cryptography)
+Recommends: python3dist(pycrypto)
+Recommends: python3dist(pycryptodome)
+Recommends: python3dist(pycryptopp)
+
%{?python_provide:%python_provide python3-beaker}
%description -n python3-beaker %_description
-%endif # with_python3
%prep
-%setup -q -n Beaker-%{version}
-%patch0 -p1 -b .system
-%patch1 -p1 -b .badtest
-%patch2 -p1 -b .anydbm
-
-%if 0%{?with_python3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-%endif # with_python3
+%autosetup -p1 -n beaker-%{version}
%build
%py2_build
-
-%if 0%{?with_python3}
-pushd %{py3dir}
-%{__python3} setup.py build
-popd
-%endif # with_python3
+%py3_build
%install
-rm -rf $RPM_BUILD_ROOT
%py2_install
-
-%if 0%{?with_python3}
-pushd %{py3dir}
-%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
-popd
-%endif # with_python3
+%py3_install
%check
-PYTHONPATH=$(pwd) nosetests
+redis-server &
+if [ "$(netstat -ln | grep :27017)" != "" ]; then pkill mongod; fi
+mkdir ./mongod
+mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log
+while [ "$(netstat -ln | grep :27017)" == "" ]; do sleep 1; done
-#%%if 0%{?with_python3} && 0%{?fedora} > 14
-#pushd %{py3dir}
-#PYTHONPATH=$(pwd) nosetests-%{python3_version}
-#popd
-#%%endif
+rm -rf /tmp/beaker-tests
+PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m nose -v
+
+rm -rf /tmp/beaker-tests
+PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m nose -v
+
+pkill mongod
+kill %1
%files -n python2-beaker
-%doc LICENSE CHANGELOG
+%license LICENSE
+%doc README.rst CHANGELOG
%{python2_sitelib}/beaker/
%{python2_sitelib}/Beaker*
-%if 0%{?with_python3}
%files -n python3-beaker
+%license LICENSE
+%doc README.rst CHANGELOG
%{python3_sitelib}/beaker/
%{python3_sitelib}/Beaker*
-%endif
%changelog
+* Tue Jul 31 2018 Miro Hrončok <mhroncok(a)redhat.com> - 1.10.0-1
+- Update to 1.10.0 (#860617)
+- Rebuilt for Python 3.7 (#1605613)
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.4-22
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
diff --git a/sources b/sources
index e46079a..99b4287 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-de84e7511119dc0b8eb4ac177d3e2512 Beaker-1.5.4.tar.gz
+SHA512 (beaker-1.10.0.tar.gz) =
2a8a6e10f771aaa33190598a52bf1110f1ae1116828c1e9cd42aeceb3dc7a9af896f20c809f165c50940de44d48628d6cacb6f2b480a128bae05f902898ed2b5
https://src.fedoraproject.org/rpms/python-beaker/c/5d1fbc1fb95347fbeb319a...