!15 [sync] PR-14: Upgrade version to 1.0.4
From: @openeuler-sync-bot Reviewed-by: @yueyaoqiang Signed-off-by: @yueyaoqiang
This commit is contained in:
commit
5af28b69df
@ -1,83 +0,0 @@
|
||||
From 3441d6b8ca010f7153d2b13680409ab571b9d3a1 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Mon, 22 Jun 2020 00:49:58 +0200
|
||||
Subject: [PATCH] factory: replace ':' with '_' in profile names
|
||||
|
||||
---
|
||||
precis_i18n/factory.py | 27 ++++++++++++++-------------
|
||||
1 file changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/precis_i18n/factory.py b/precis_i18n/factory.py
|
||||
index 0b01568..afa1c67 100644
|
||||
--- a/precis_i18n/factory.py
|
||||
+++ b/precis_i18n/factory.py
|
||||
@@ -1,5 +1,6 @@
|
||||
"""Implements the `get_profile` factory function used to create profiles."""
|
||||
|
||||
+import encodings
|
||||
import precis_i18n.baseclass as _base
|
||||
import precis_i18n.profile as _profile
|
||||
import precis_i18n.unicode as _unicode
|
||||
@@ -21,13 +22,13 @@ _PROFILES = {
|
||||
_factory(_profile.Username, name='UsernameCasePreserved'),
|
||||
'usernamecasemapped':
|
||||
_factory(_profile.Username, name='UsernameCaseMapped', casemap='lower'),
|
||||
- 'usernamecasemapped:casefold':
|
||||
+ 'usernamecasemapped_casefold':
|
||||
_factory(_profile.Username,
|
||||
- name='UsernameCaseMapped:CaseFold',
|
||||
+ name='UsernameCaseMapped_CaseFold',
|
||||
casemap='fold'),
|
||||
- 'usernamecasemapped:tolower':
|
||||
+ 'usernamecasemapped_tolower':
|
||||
_factory(_profile.Username,
|
||||
- name='UsernameCaseMapped:ToLower',
|
||||
+ name='UsernameCaseMapped_ToLower',
|
||||
casemap='lower'),
|
||||
'opaquestring':
|
||||
_factory(_profile.OpaqueString, name='OpaqueString'),
|
||||
@@ -35,13 +36,13 @@ _PROFILES = {
|
||||
_factory(_profile.Nickname, name='NicknameCasePreserved'),
|
||||
'nicknamecasemapped':
|
||||
_factory(_profile.Nickname, name='NicknameCaseMapped', casemap='lower'),
|
||||
- 'nicknamecasemapped:casefold':
|
||||
+ 'nicknamecasemapped_casefold':
|
||||
_factory(_profile.Nickname,
|
||||
- name='NicknameCaseMapped:CaseFold',
|
||||
+ name='NicknameCaseMapped_CaseFold',
|
||||
casemap='fold'),
|
||||
- 'nicknamecasemapped:tolower':
|
||||
+ 'nicknamecasemapped_tolower':
|
||||
_factory(_profile.Nickname,
|
||||
- name='NicknameCaseMapped:ToLower',
|
||||
+ name='NicknameCaseMapped_ToLower',
|
||||
casemap='lower'),
|
||||
|
||||
# Alias for backward-compatibility with previous version of codec.
|
||||
@@ -58,13 +59,13 @@ def get_profile(name, *, unicodedata=None):
|
||||
"FreeFormClass"
|
||||
"UsernameCasePreserved"
|
||||
"UsernameCaseMapped"
|
||||
- "UsernameCaseMapped:CaseFold"
|
||||
- "UsernameCaseMapped:ToLower"
|
||||
+ "UsernameCaseMapped_CaseFold"
|
||||
+ "UsernameCaseMapped_ToLower"
|
||||
"OpaqueString"
|
||||
"NicknameCasePreserved"
|
||||
"NicknameCaseMapped"
|
||||
- "NicknameCaseMapped:CaseFold"
|
||||
- "NicknameCaseMapped:ToLower"
|
||||
+ "NicknameCaseMapped_CaseFold"
|
||||
+ "NicknameCaseMapped_ToLower"
|
||||
"Nickname" (alias for "NicknameCaseMapped")
|
||||
|
||||
This function constructs a new profile each time; there is no cache.
|
||||
@@ -83,4 +84,4 @@ def get_profile(name, *, unicodedata=None):
|
||||
Raises:
|
||||
KeyError: Profile not found.
|
||||
"""
|
||||
- return _PROFILES[name.lower()](_unicode.UnicodeData(unicodedata))
|
||||
+ return _PROFILES[encodings.normalize_encoding(name.lower())](_unicode.UnicodeData(unicodedata))
|
||||
--
|
||||
2.26.2
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
precis_i18n-1.0.4.tar.gz
Normal file
BIN
precis_i18n-1.0.4.tar.gz
Normal file
Binary file not shown.
@ -1,23 +1,12 @@
|
||||
%global srcname precis_i18n
|
||||
%global gitcommit 1498def50914b8d4f670874cc282072790619399
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 1.0.1
|
||||
Release: 4
|
||||
Version: 1.0.4
|
||||
Release: 1
|
||||
Summary: Python library for internationalized usernames and passwords
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/byllyfish/precis_i18n
|
||||
#Source0: https://github.com/byllyfish/precis_i18n/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
||||
Source0: https://github.com/byllyfish/precis_i18n/archive/%{gitcommit}.tar.gz
|
||||
# Support Unicode 12.1 for Python 3.8:
|
||||
Source1: https://raw.githubusercontent.com/byllyfish/precis_i18n/7b6987e206881b002ddcc87dde16f978c080eedd/test/derived-props-12.1.txt
|
||||
# Support Unicode 13.0 for Python 3.9
|
||||
# File generated by running "python3 test/test_derived_props.py > derived-props-13.0.txt" with Python 3.9:
|
||||
Source2: derived-props-13.0.txt
|
||||
|
||||
Patch0001: 0001-factory-replace-with-_-in-profile-names.patch
|
||||
|
||||
Source0: https://github.com/byllyfish/precis_i18n/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
%global desc If you want your application to accept Unicode user names and passwords, you\
|
||||
@ -40,7 +29,7 @@ This Python module implements the PRECIS Framework as described in:\
|
||||
%description
|
||||
%{desc}
|
||||
|
||||
%package -n python3-%{srcname}
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{summary}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
@ -50,9 +39,7 @@ BuildRequires: python3-setuptools
|
||||
%{desc}
|
||||
|
||||
%prep
|
||||
#autosetup -p1 -n %{srcname}-%{version}
|
||||
%autosetup -p1 -n %{srcname}-%{gitcommit}
|
||||
cp -p %{SOURCE1} %{SOURCE2} test/
|
||||
%autosetup -p1 -n %{srcname}-%{version}
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -70,6 +57,9 @@ cp -p %{SOURCE1} %{SOURCE2} test/
|
||||
%{python3_sitelib}/%{srcname}/
|
||||
|
||||
%changelog
|
||||
* Mon Aug 21 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 1.0.4-1
|
||||
- Upgrade version to 1.0.4
|
||||
|
||||
* Wed Jun 08 2022 tanyulong <tanyulong@kylinos.cn> - 1.0.1-4
|
||||
- update upstream version
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user