Hello community,

here is the log from the commit of package python-Beaker for openSUSE:Factory 
checked in at 2012-05-29 10:34:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Beaker (Old)
 and      /work/SRC/openSUSE:Factory/.python-Beaker.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Beaker", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Beaker/python-Beaker.changes      
2012-02-02 17:59:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-Beaker.new/python-Beaker.changes 
2012-05-29 10:34:59.000000000 +0200
@@ -1,0 +2,12 @@
+Wed May 23 03:08:32 UTC 2012 - highwaystar...@gmail.com
+
+- update to version 1.6.3
+ * Fix bug with cookie deletion on leap years. Patch contributed 
+   by Greg Nelson and Michael Wirth.
+ * Fix issue with referencing same module via different import paths.
+   Patch contributed by brianfrantz.
+ * Fix cookie expiration check. Patch contributed by Mike Dirolf.
+- python3 package added
+- minor spec improvement 
+
+-------------------------------------------------------------------
New Changes file:

--- /dev/null   2012-05-03 01:24:41.895590051 +0200
+++ /work/SRC/openSUSE:Factory/.python-Beaker.new/python3-Beaker.changes        
2012-05-29 10:34:59.000000000 +0200
@@ -0,0 +1,11 @@
+-------------------------------------------------------------------
+Fri May 25 08:33:12 UTC 2012 - toddrme2...@gmail.com
+
+- Fix building on openSUSE 11.4
+- spec file cleanups
+
+-------------------------------------------------------------------
+Wed May 23 03:08:21 UTC 2012 - highwaystar...@gmail.com
+
+- python3 package added 
+

Old:
----
  Beaker-1.6.2.tar.gz

New:
----
  Beaker-1.6.3.tar.gz
  python3-Beaker.changes
  python3-Beaker.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Beaker.spec ++++++
--- /var/tmp/diff_new_pack.ZgpZNz/_old  2012-05-29 10:35:00.000000000 +0200
+++ /var/tmp/diff_new_pack.ZgpZNz/_new  2012-05-29 10:35:00.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-Beaker
-Version:        1.6.2
+Version:        1.6.3
 Release:        0
 Url:            http://beaker.groovie.org
 Summary:        A Session and Caching library with WSGI Middleware
@@ -79,6 +79,7 @@
 %files
 %defattr(-,root,root,-)
 %doc CHANGELOG LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/beaker/
+%{python_sitelib}/Beaker-%{version}-py%{py_ver}.egg-info
 
 %changelog

++++++ python3-Beaker.spec ++++++
#
# spec file for package python3-Beaker
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           python3-Beaker
Version:        1.6.3
Release:        0
Url:            http://beaker.groovie.org
Summary:        A Session and Caching library with WSGI Middleware
License:        BSD-3-Clause
Group:          Development/Languages/Python
Source:         
http://pypi.python.org/packages/source/B/Beaker/Beaker-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python3-devel
BuildRequires:  python3-distribute
BuildRequires:  python3-2to3
%if 0%{?suse_version} && 0%{?suse_version} <= 1140
%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from 
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?py3_ver: %global py3_ver %(python3 -c "import sys; 
version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); 
print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)}
%else
BuildRequires:  python3-base
%endif
Requires:       python(abi) = %{py3_ver}
BuildArch: noarch

%description
Beaker is a web session and general caching library that includes WSGI 
middleware for use in web applications.

As a general caching library, Beaker can handle storing for various times
any Python object that can be pickled with optional back-ends on a 
fine-grained basis.

Beaker was built largely on the code from MyghtyUtils, then refactored and
extended with database support.

Beaker includes Cache and Session WSGI middleware to ease integration with
WSGI capable frameworks, and is automatically used by Pylons.

Features:

* Fast, robust performance
* Multiple reader/single writer lock system to avoid duplicate simultaneous
  cache creation
* Cache back-ends include dbm, file, memory, memcached, and database (Using
  SQLAlchemy for multiple-db vendor support)
* Signed cookie's to prevent session hijacking/spoofing
* Cookie-only sessions to remove the need for a db or file backend (ideal
  for clustered systems)
* Extensible Container object to support new back-ends
* Cache's can be divided into namespaces (to represent templates, objects,
  etc.) then keyed for different copies
* Create functions for automatic call-backs to create new cache copies after
  expiration
* Fine-grained toggling of back-ends, keys, and expiration per Cache object

%prep
%setup -q -n Beaker-%{version}
sed -i "id" beaker/crypto/pbkdf2.py # Fix non-executable script

%build
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}

%files
%defattr(-,root,root,-)
%doc CHANGELOG LICENSE
%{python3_sitelib}/beaker/
%{python3_sitelib}/Beaker-%{version}-py%{py3_ver}.egg-info
%if 0%{?suse_version} <= 1140
%dir %{_prefix}/lib/python%{py3_ver}
%endif

%changelog
++++++ Beaker-1.6.2.tar.gz -> Beaker-1.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/.hgtags new/Beaker-1.6.3/.hgtags
--- old/Beaker-1.6.2/.hgtags    2011-10-20 18:53:27.000000000 +0200
+++ new/Beaker-1.6.3/.hgtags    2011-12-14 01:30:06.000000000 +0100
@@ -41,3 +41,4 @@
 1389359f2097384d7842394bb5fcb98894b897f7 v1.5.4
 123078d900cb10703a76a9616d1c6f874bac72b0 v1.6
 bf403d3a8acbc29080fb33ca1d2faf542d290c58 v.1.6.1
+0ac0a62ddfd9d2833842c96304761f2526538ed3 v1.6.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/Beaker.egg-info/PKG-INFO 
new/Beaker-1.6.3/Beaker.egg-info/PKG-INFO
--- old/Beaker-1.6.2/Beaker.egg-info/PKG-INFO   2011-12-14 01:29:55.000000000 
+0100
+++ new/Beaker-1.6.3/Beaker.egg-info/PKG-INFO   2012-03-01 01:29:41.000000000 
+0100
@@ -1,8 +1,8 @@
 Metadata-Version: 1.0
 Name: Beaker
-Version: 1.6.2
+Version: 1.6.3
 Summary: A Session and Caching library with WSGI Middleware
-Home-page: http://beaker.groovie.org
+Home-page: http://beaker.rtfd.org/
 Author: Ben Bangert, Mike Bayer, Philip Jenvey
 Author-email: b...@groovie.org, pjen...@groovie.org
 License: BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/Beaker.egg-info/SOURCES.txt 
new/Beaker-1.6.3/Beaker.egg-info/SOURCES.txt
--- old/Beaker-1.6.2/Beaker.egg-info/SOURCES.txt        2011-12-14 
01:29:55.000000000 +0100
+++ new/Beaker-1.6.3/Beaker.egg-info/SOURCES.txt        2012-03-01 
01:29:42.000000000 +0100
@@ -37,4 +37,7 @@
 tests/test_increment.py
 tests/test_memcached.py
 tests/test_syncdict.py
-tests/test_synchronizer.py
\ No newline at end of file
+tests/test_synchronizer.py
+tests/test_namespacing_files/__init__.py
+tests/test_namespacing_files/namespace_get.py
+tests/test_namespacing_files/namespace_go.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/Beaker.egg-info/top_level.txt 
new/Beaker-1.6.3/Beaker.egg-info/top_level.txt
--- old/Beaker-1.6.2/Beaker.egg-info/top_level.txt      2011-12-14 
01:29:55.000000000 +0100
+++ new/Beaker-1.6.3/Beaker.egg-info/top_level.txt      2012-03-01 
01:29:41.000000000 +0100
@@ -1 +1,2 @@
 beaker
+tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/CHANGELOG new/Beaker-1.6.3/CHANGELOG
--- old/Beaker-1.6.2/CHANGELOG  2011-12-14 01:01:15.000000000 +0100
+++ new/Beaker-1.6.3/CHANGELOG  2012-03-01 01:28:16.000000000 +0100
@@ -1,3 +1,12 @@
+Release 1.6.3 (2/29/2012)
+=========================
+
+* Fix bug with cookie deletion on leap years. Patch contributed by Greg
+  Nelson and Michael Wirth.
+* Fix issue with referencing same module via different import paths. Patch
+  contributed by brianfrantz.
+* Fix cookie expiration check. Patch contributed by Mike Dirolf.
+
 Release 1.6.2 (12/13/2011)
 ==========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/PKG-INFO new/Beaker-1.6.3/PKG-INFO
--- old/Beaker-1.6.2/PKG-INFO   2011-12-14 01:29:57.000000000 +0100
+++ new/Beaker-1.6.3/PKG-INFO   2012-03-01 01:29:43.000000000 +0100
@@ -1,8 +1,8 @@
 Metadata-Version: 1.0
 Name: Beaker
-Version: 1.6.2
+Version: 1.6.3
 Summary: A Session and Caching library with WSGI Middleware
-Home-page: http://beaker.groovie.org
+Home-page: http://beaker.rtfd.org/
 Author: Ben Bangert, Mike Bayer, Philip Jenvey
 Author-email: b...@groovie.org, pjen...@groovie.org
 License: BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/beaker/__init__.py 
new/Beaker-1.6.3/beaker/__init__.py
--- old/Beaker-1.6.2/beaker/__init__.py 2011-11-14 21:20:42.000000000 +0100
+++ new/Beaker-1.6.3/beaker/__init__.py 2012-02-29 05:09:52.000000000 +0100
@@ -1 +1 @@
-__version__ = '1.6.2'
+__version__ = '1.6.3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/beaker/session.py 
new/Beaker-1.6.3/beaker/session.py
--- old/Beaker-1.6.2/beaker/session.py  2011-11-15 02:44:18.000000000 +0100
+++ new/Beaker-1.6.3/beaker/session.py  2012-02-29 18:38:05.000000000 +0100
@@ -292,7 +292,7 @@
 
     def _delete_cookie(self):
         self.request['set_cookie'] = True
-        expires = datetime.utcnow().replace(year=2003)
+        expires = datetime.utcnow() - timedelta(365)
         self._set_cookie_values(expires)
         self._update_cookie_out()
 
@@ -579,6 +579,12 @@
             self['_id'] = _session_id()
         self['_accessed_time'] = time.time()
 
+        val = self._encrypt_data()
+        if len(val) > 4064:
+            raise BeakerException("Cookie value is too long to store")
+
+        self.cookie[self.key] = val
+
         if '_expires' in self:
             expires = self['_expires']
         else:
@@ -587,11 +593,6 @@
         if expires is not None:
             self['_expires'] = expires
 
-        val = self._encrypt_data()
-        if len(val) > 4064:
-            raise BeakerException("Cookie value is too long to store")
-
-        self.cookie[self.key] = val
         if '_domain' in self:
             self.cookie[self.key]['domain'] = self['_domain']
         elif self._domain:
@@ -630,7 +631,7 @@
         self.__dict__['_params'] = params
         self.__dict__['_environ'] = environ
         self.__dict__['_sess'] = None
-        self.__dict__['_headers'] = []
+        self.__dict__['_headers'] = {}
 
     def _session(self):
         """Lazy initial creation of session object"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/beaker/util.py 
new/Beaker-1.6.3/beaker/util.py
--- old/Beaker-1.6.2/beaker/util.py     2011-12-14 00:50:50.000000000 +0100
+++ new/Beaker-1.6.3/beaker/util.py     2012-02-29 18:25:59.000000000 +0100
@@ -386,4 +386,4 @@
     if kls:
         return '%s.%s' % (kls.__module__, kls.__name__)
     else:
-        return '%s.%s' % (func.__module__, func.__name__)
+        return '%s|%s' % (inspect.getsourcefile(func), func.__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/setup.cfg new/Beaker-1.6.3/setup.cfg
--- old/Beaker-1.6.2/setup.cfg  2011-12-14 01:29:57.000000000 +0100
+++ new/Beaker-1.6.3/setup.cfg  2012-03-01 01:29:43.000000000 +0100
@@ -1,13 +1,13 @@
 [egg_info]
 tag_build = 
-tag_date = 0
 tag_svn_revision = 0
+tag_date = 0
 
 [nosetests]
-cover-package = beaker
+where = tests
 verbose = True
 detailed-errors = True
 with-doctest = True
-where = tests
+cover-package = beaker
 cover-inclusive = True
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/setup.py new/Beaker-1.6.3/setup.py
--- old/Beaker-1.6.2/setup.py   2011-11-14 21:08:51.000000000 +0100
+++ new/Beaker-1.6.3/setup.py   2011-12-14 01:33:19.000000000 +0100
@@ -99,7 +99,7 @@
       keywords='wsgi myghty session web cache middleware',
       author='Ben Bangert, Mike Bayer, Philip Jenvey',
       author_email='b...@groovie.org, pjen...@groovie.org',
-      url='http://beaker.groovie.org',
+      url='http://beaker.rtfd.org/',
       license='BSD',
       packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
       zip_safe=False,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Beaker-1.6.2/tests/test_cookie_only.py 
new/Beaker-1.6.3/tests/test_cookie_only.py
--- old/Beaker-1.6.2/tests/test_cookie_only.py  2011-03-23 04:21:56.000000000 
+0100
+++ new/Beaker-1.6.3/tests/test_cookie_only.py  2012-02-29 18:25:33.000000000 
+0100
@@ -1,3 +1,4 @@
+import datetime
 import re
 import os
 
@@ -34,6 +35,14 @@
     res = app.get('/')
     assert 'current value is: 3' in res
 
+def test_expires():
+    options = {'session.validate_key':'hoobermas', 'session.type':'cookie',
+               'session.cookie_expires': datetime.timedelta(days=1)}
+    app = TestApp(SessionMiddleware(simple_app, **options))
+    res = app.get('/')
+    assert 'expires=' in res.headers.getall('Set-Cookie')[0]
+    assert 'current value is: 1' in res
+
 def test_different_sessions():
     options = {'session.validate_key':'hoobermas', 'session.type':'cookie'}
     app = TestApp(SessionMiddleware(simple_app, **options))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Beaker-1.6.2/tests/test_namespacing_files/namespace_get.py 
new/Beaker-1.6.3/tests/test_namespacing_files/namespace_get.py
--- old/Beaker-1.6.2/tests/test_namespacing_files/namespace_get.py      
1970-01-01 01:00:00.000000000 +0100
+++ new/Beaker-1.6.3/tests/test_namespacing_files/namespace_get.py      
2012-02-29 18:25:59.000000000 +0100
@@ -0,0 +1,15 @@
+from beaker.cache import CacheManager
+from beaker.util import parse_cache_config_options
+from datetime import datetime
+
+defaults = {'cache.data_dir':'./cache', 'cache.type':'dbm', 'cache.expire': 
60, 'cache.regions': 'short_term'}
+
+cache = CacheManager(**parse_cache_config_options(defaults))
+
+def get_cached_value():
+    @cache.region('short_term', 'test_namespacing')
+    def get_value():
+        return datetime.now()
+
+    return get_value()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Beaker-1.6.2/tests/test_namespacing_files/namespace_go.py 
new/Beaker-1.6.3/tests/test_namespacing_files/namespace_go.py
--- old/Beaker-1.6.2/tests/test_namespacing_files/namespace_go.py       
1970-01-01 01:00:00.000000000 +0100
+++ new/Beaker-1.6.3/tests/test_namespacing_files/namespace_go.py       
2012-02-29 18:25:59.000000000 +0100
@@ -0,0 +1,25 @@
+import time
+
+def go():
+    import namespace_get
+    a = namespace_get.get_cached_value()
+    time.sleep(0.3)
+    b = namespace_get.get_cached_value()
+
+    time.sleep(0.3)
+
+    import test_namespacing_files.namespace_get
+    c = test_namespacing_files.namespace_get.get_cached_value()
+    time.sleep(0.3)
+    d = test_namespacing_files.namespace_get.get_cached_value()
+
+    print a
+    print b
+    print c
+    print d
+
+    assert a==b, 'Basic caching problem - should never happen'
+    assert c==d, 'Basic caching problem - should never happen'
+    assert a==c, 'Namespaces not consistent when using different import paths'
+
+

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to