forked from pool/python-paginate
		
	- Add python312.patch and build for python 3.12
gh#Pylons/paginate#19 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-paginate?expand=0&rev=5
This commit is contained in:
		| @@ -17,7 +17,6 @@ | ||||
|  | ||||
|  | ||||
| %{?sle15_python_module_pythons} | ||||
| %global skip_python312 1 | ||||
| Name:           python-paginate | ||||
| Version:        0.5.6 | ||||
| Release:        0 | ||||
| @@ -26,6 +25,8 @@ License:        MIT | ||||
| URL:            https://github.com/Signum/paginate | ||||
| # PyPI tarball does not include tests... | ||||
| Source:         https://github.com/Signum/paginate/archive/%{version}.tar.gz#/paginate-%{version}.tar.gz | ||||
| # PATCH-FIX-OPENSUSE python312.patch gh#Pylons/paginate#19 | ||||
| Patch0:         python312.patch | ||||
| BuildRequires:  %{python_module pip} | ||||
| BuildRequires:  %{python_module setuptools} | ||||
| BuildRequires:  %{python_module wheel} | ||||
|   | ||||
							
								
								
									
										13
									
								
								python312.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								python312.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| Index: paginate-0.5.6/paginate/__init__.py | ||||
| =================================================================== | ||||
| --- paginate-0.5.6.orig/paginate/__init__.py | ||||
| +++ paginate-0.5.6/paginate/__init__.py | ||||
| @@ -250,7 +250,7 @@ class Page(list): | ||||
|              first = (self.page - 1) * items_per_page | ||||
|              last = first + items_per_page | ||||
|              self.items = list(self.collection[first:last]) | ||||
| -        except TypeError: | ||||
| +        except (TypeError, KeyError): | ||||
|              raise TypeError("Your collection of type {} cannot be handled " | ||||
|                              "by paginate.".format(type(self.collection))) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user