openSUSE Commits
Threads by month
- ----- 2024 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2013
- 1 participants
- 1989 discussions
Hello community,
here is the log from the commit of package snapper for openSUSE:Factory checked in at 2013-02-25 20:44:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/snapper (Old)
and /work/SRC/openSUSE:Factory/.snapper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper", Maintainer is "ASchnell(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2013-02-22 17:02:10.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2013-02-25 20:44:42.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Feb 25 10:54:32 CET 2013 - aschnell(a)suse.de
+
+- updated translations
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ snapper-0.1.2.tar.bz2 ++++++
++++ 16835 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package rpm for openSUSE:Factory checked in at 2013-02-25 20:44:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpm (Old)
and /work/SRC/openSUSE:Factory/.rpm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpm", Maintainer is "mls(a)suse.com"
Changes:
--------
rpm-python.changes: same change
--- /work/SRC/openSUSE:Factory/rpm/rpm.changes 2013-01-10 22:34:42.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rpm.new/rpm.changes 2013-02-25 20:44:23.000000000 +0100
@@ -1,0 +2,10 @@
+Fri Feb 15 15:29:25 UTC 2013 - dmueller(a)suse.com
+
+- add ignore-auxv.diff:
+ * avoid auxv parsing for any platform other than powerpc
+- add config-guess-sub-update.diff:
+ * update config.guess/sub for aarch64 support
+- update rpmrc.diff, build.diff:
+ * Support aarch64
+
+-------------------------------------------------------------------
New:
----
config-guess-sub-update.diff
hack-setup-macro.diff
ignore-auxv.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
rpm-python.spec: same change
++++++ rpm.spec ++++++
--- /var/tmp/diff_new_pack.qLqS1B/_old 2013-02-25 20:44:27.000000000 +0100
+++ /var/tmp/diff_new_pack.qLqS1B/_new 2013-02-25 20:44:27.000000000 +0100
@@ -65,6 +65,7 @@
# quilt patches start here
Patch10: rpm-beecrypt.diff
Patch11: debugedit.diff
+Patch13: ignore-auxv.diff
Patch12: localetag.diff
Patch14: nameversioncompare.diff
Patch15: dbfsync.diff
@@ -132,6 +133,7 @@
Patch77: langnoc.diff
Patch78: headerchk2.diff
Patch79: helperenv.diff
+Patch80: config-guess-sub-update.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@@ -211,13 +213,16 @@
# will get linked from db3
rm -f rpmdb/db.h
%patch -P 1 -P 2
-%patch -P 10 -P 11 -P 12 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
+%patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
%patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29
%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39
%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
+%patch -P 80
+cp config.guess config.sub db/dist/
+cp config.guess config.sub beecrypt/
#chmod 755 scripts/find-supplements{,.ksyms}
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
#chmod 755 scripts/firmware.prov
++++++ build.diff ++++++
--- /var/tmp/diff_new_pack.qLqS1B/_old 2013-02-25 20:44:27.000000000 +0100
+++ /var/tmp/diff_new_pack.qLqS1B/_new 2013-02-25 20:44:27.000000000 +0100
@@ -1,6 +1,6 @@
---- ./db3/configure.orig 2012-03-20 08:07:25.000000000 +0000
-+++ ./db3/configure 2012-06-01 12:55:07.000000000 +0000
-@@ -10,9 +10,9 @@ rm -f config.cache
+--- db3/configure
++++ db3/configure
+@@ -10,9 +10,9 @@
# XXX edit CFLAGS= ... out of invocation args ???
ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's% --param=[^ ]*%%g' -e 's%--cache-file=.*$%%'`"
@@ -12,9 +12,22 @@
mv Makefile Makefile.orig
cat Makefile.orig | sed -e '/^install[:-]/c\
---- ./installplatform.orig 2012-03-30 07:05:20.000000000 +0000
-+++ ./installplatform 2012-06-01 13:03:48.000000000 +0000
-@@ -118,6 +118,11 @@ for ARCH in noarch `grep ^arch_canon $RP
+--- installplatform
++++ installplatform
+@@ -95,6 +95,12 @@
+ CANONARCH=arm
+ CANONCOLOR=0
+ ;;
++ aarch64*)
++ ISANAME=aarchh
++ ISABITS=64
++ CANONARCH=aarch64
++ CANONCOLOR=3
++ ;;
+ alpha*)
+ ISANAME=alpha
+ ISABITS=64
+@@ -118,6 +124,11 @@
PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
[ -d $PPD ] || mkdir -p $PPD
++++++ config-guess-sub-update.diff ++++++
++++ 1145 lines (skipped)
++++++ hack-setup-macro.diff ++++++
--- build/parsePrep.c.old
+++ build/parsePrep.c
@@ -351,6 +351,12 @@
appendStringBuf(spec->prep, getStringBuf(after));
+ {
+ char* buf = strdup("for f in config.guess config.sub; do test /usr/share/automake-1.12/$f && ln -sf /usr/share/automake-1.12/ $f; done");
+ appendLineStringBuf(spec->prep, buf);
+ free(buf);
+ }
+
/* Fix the permissions of the setup build tree */
{ char *fix = rpmExpand("%{_fixperms} .", NULL);
if (fix && *fix != '%') {
++++++ ignore-auxv.diff ++++++
--- lib/rpmrc.c
+++ lib/rpmrc.c
@@ -79,10 +79,12 @@
int localize;
};
+#if defined(__linux__) && defined(__powerpc__)
static struct rpmat_s {
const char *platform;
uint64_t hwcap;
} rpmat;
+#endif
typedef struct defaultEntry_s {
char * name;
@@ -907,7 +909,7 @@
#endif
-#if defined(__linux__)
+#if defined(__linux__) && defined(__powerpc__)
/**
* Populate rpmat structure with parsed info from /proc/self/auxv
*/
@@ -957,7 +959,7 @@
canonEntry canon;
int rc;
-#if defined(__linux__)
+#if defined(__linux__) && defined(__powerpc__)
/* Populate rpmat struct with hw info */
parse_auxv();
#endif
++++++ rpmrc.diff ++++++
--- /var/tmp/diff_new_pack.qLqS1B/_old 2013-02-25 20:44:27.000000000 +0100
+++ /var/tmp/diff_new_pack.qLqS1B/_new 2013-02-25 20:44:27.000000000 +0100
@@ -60,7 +60,7 @@
optflags: atarist -O2 -g -fomit-frame-pointer
optflags: atariste -O2 -g -fomit-frame-pointer
-@@ -76,8 +78,8 @@
+@@ -76,12 +78,13 @@
optflags: milan -O2 -g -fomit-frame-pointer
optflags: hades -O2 -g -fomit-frame-pointer
@@ -71,7 +71,12 @@
optflags: sh3 -O2 -g
optflags: sh4 -O2 -g -mieee
-@@ -142,6 +144,7 @@
+ optflags: sh4a -O2 -g -mieee
++optflags: aarch64 -O2 -g
+
+ #############################################################
+ # Canonical arch names and numbers
+@@ -142,6 +145,7 @@
arch_canon: armv5tejl: armv5tejl 12
arch_canon: armv6l: armv6l 12
arch_canon: armv7l: armv7l 12
@@ -79,7 +84,15 @@
arch_canon: m68kmint: m68kmint 13
arch_canon: atarist: m68kmint 13
-@@ -203,17 +206,17 @@
+@@ -166,6 +170,7 @@
+ arch_canon: sh4: sh4 17
+ arch_canon: sh4a: sh4a 17
+ arch_canon: xtensa: xtensa 18
++arch_canon: aarch64: aarch64 19
+
+ #############################################################
+ # Canonical OS names and numbers
+@@ -203,17 +208,17 @@
#############################################################
# For a given uname().machine, the default build arch
@@ -105,7 +118,7 @@
buildarchtranslate: i486: i386
buildarchtranslate: i386: i386
-@@ -243,6 +246,7 @@
+@@ -243,6 +248,7 @@
buildarchtranslate: ppc64iseries: ppc64
buildarchtranslate: ppc64pseries: ppc64
buildarchtranslate: ppc64p7: ppc64
@@ -113,15 +126,16 @@
buildarchtranslate: armv3l: armv3l
buildarchtranslate: armv4b: armv4b
-@@ -252,6 +256,7 @@
+@@ -252,6 +258,8 @@
buildarchtranslate: armv5tejl: armv5tejl
buildarchtranslate: armv6l: armv6l
buildarchtranslate: armv7l: armv7l
+buildarchtranslate: armv7hl: armv7hl
++buildarchtranslate: aarch64: aarch64
buildarchtranslate: atarist: m68kmint
buildarchtranslate: atariste: m68kmint
-@@ -274,6 +279,15 @@
+@@ -274,6 +282,15 @@
buildarchtranslate: sh4: sh4
buildarchtranslate: sh4a: sh4
@@ -137,7 +151,7 @@
#############################################################
# Architecture compatibility
-@@ -330,14 +344,19 @@
+@@ -330,14 +347,19 @@
arch_compat: hppa2.0: hppa1.2
arch_compat: hppa1.2: hppa1.1
arch_compat: hppa1.1: hppa1.0
@@ -159,7 +173,7 @@
arch_compat: armv4tl: armv4l
arch_compat: armv4l: armv3l
arch_compat: armv3l: noarch
-@@ -354,7 +373,7 @@
+@@ -354,7 +376,7 @@
arch_compat: s390: noarch
arch_compat: s390x: s390 noarch
@@ -168,7 +182,16 @@
arch_compat: x86_64: amd64 em64t athlon noarch
arch_compat: amd64: x86_64 em64t athlon noarch
-@@ -439,6 +458,7 @@
+@@ -364,6 +386,8 @@
+ arch_compat: sh4: noarch
+ arch_compat: sh4a: sh4
+
++arch_compat: aarch64: noarch
++
+ os_compat: IRIX64: IRIX
+ os_compat: solaris2.7: solaris2.3 solaris2.4 solaris2.5 solaris2.6
+ os_compat: solaris2.6: solaris2.3 solaris2.4 solaris2.5
+@@ -439,6 +463,7 @@
buildarch_compat: mipsel: noarch
buildarch_compat: armv4b: noarch
@@ -176,7 +199,7 @@
buildarch_compat: armv7l: armv6l
buildarch_compat: armv6l: armv5tejl
buildarch_compat: armv5tejl: armv5tel
-@@ -450,7 +470,8 @@
+@@ -450,7 +475,8 @@
buildarch_compat: hppa2.0: hppa1.2
buildarch_compat: hppa1.2: hppa1.1
buildarch_compat: hppa1.1: hppa1.0
@@ -186,3 +209,11 @@
buildarch_compat: parisc: noarch
buildarch_compat: atarist: m68kmint noarch
+@@ -473,6 +499,7 @@
+ buildarch_compat: sh3: noarch
+ buildarch_compat: sh4: noarch
+ buildarch_compat: sh4a: sh4
++buildarch_compat: aarch64: noarch
+
+ # \endverbatim
+ #*/
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package retext for openSUSE:Factory checked in at 2013-02-25 20:43:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/retext (Old)
and /work/SRC/openSUSE:Factory/.retext.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "retext", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/retext/retext.changes 2012-08-05 15:22:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.retext.new/retext.changes 2013-02-25 20:43:42.000000000 +0100
@@ -1,0 +2,20 @@
+Sun Feb 24 14:12:35 UTC 2013 - i(a)marguerite.su
+
+- add link to %{_bindir}/%{name}
+- correct dependency name python-Markups
+
+-------------------------------------------------------------------
+Sat Feb 2 10:50:20 UTC 2013 - i(a)marguerite.su
+
+- update version 4.0.0
+ * Switch to pymarkups backend
+ * Switch to python3 by default
+ * Split retext.py to smaller files
+ * MathJax support
+ * Tab now inserts 4 spaces by default
+ * Automatic indentation of new lines
+ * External links are now opened in a web browser by default
+ * Support for per-document CSS stylesheets
+
+
+-------------------------------------------------------------------
Old:
----
retext-3.1.0.tar.bz2
New:
----
ReText-4.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ retext.spec ++++++
--- /var/tmp/diff_new_pack.uC8A3O/_old 2013-02-25 20:43:44.000000000 +0100
+++ /var/tmp/diff_new_pack.uC8A3O/_new 2013-02-25 20:43:44.000000000 +0100
@@ -15,42 +15,50 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?py_ver: %global py_ver %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND")}
Name: retext
-Version: 3.1.0
+Version: 4.0.0
Release: 0
License: GPL-3.0+
-Summary: Text editor for Markdown and reStructuredText
+Summary: Simple editor for Markdown and reStructuredText
Url: http://sourceforge.net/p/retext/home/ReText
Group: Productivity/Editors/Other
-Source: %{name}-%{version}.tar.bz2
+Source: ReText-%{version}.tar.gz
Source1: %{name}.desktop
BuildRequires: update-desktop-files
BuildRequires: rsvg-view
+BuildRequires: python-devel
Requires: python-qt4
Requires: python-markdown
Requires: python-docutils
+Requires: python-enchant
+Requires: python-Markups
Provides: ReText = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if 0%{?suse_version} >= 1140
BuildArch: noarch
+%endif
%description
-ReText is a simple but powerful text editor for Markdown and reStructuredText.
+ReText is simple text editor that supports Markdown and reStructuredText
+markup languages. It is written in Python using PyQt libraries.
%prep
-%setup -q
+%setup -q -n ReText-%{version}
%build
+python setup.py build
%install
+python setup.py install --root=%{buildroot} --prefix=%{_prefix}
+
%{__mkdir} -pv %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
-%{__mkdir} -pv %{buildroot}%{_bindir}
%{__mkdir} -pv %{buildroot}%{_datadir}/%{name}/
%{__mkdir} -pv %{buildroot}%{_datadir}/applications/
-%{__cp} -r * %{buildroot}%{_datadir}/%{name}/
-%{__rm} -rf %{buildroot}%{_datadir}/%{name}/icons
-%{__rm} -rf %{buildroot}%{_datadir}/%{name}/LICENSE_GPL
+%{__cp} -r templates %{buildroot}%{_datadir}/%{name}/
%{__cp} -r icons/*.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
ICONSIZE="16 22 32 48 64 128 256"
pushd %{buildroot}%{_datadir}/icons/hicolor/
@@ -59,15 +67,21 @@
rsvg-convert -h $i -w $i scalable/apps/%{name}.svg -o ${i}x${i}/apps/%{name}.png
done
popd
-ln -sf %{_datadir}/%{name}/retext.py %{buildroot}%{_bindir}/retext
%{__cp} -r %{S:1} %{buildroot}%{_datadir}/applications/
+ln -sf %{_bindir}/%{name}.py %{buildroot}%{_bindir}/%{name}
+
%suse_update_desktop_file %{name}
%files
%defattr(-,root,root)
+%doc changelog.md README
%{_bindir}/%{name}
+%{_bindir}/%{name}.py
+%{_bindir}/wpgen.py
+%{python_sitelib}/ReText/
+%{python_sitelib}/ReText-%{version}-py%{py_ver}.egg-info
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/%{name}/
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package qmmp for openSUSE:Factory checked in at 2013-02-25 20:42:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qmmp (Old)
and /work/SRC/openSUSE:Factory/.qmmp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qmmp", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/qmmp/qmmp.changes 2013-01-12 07:56:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qmmp.new/qmmp.changes 2013-02-25 20:42:42.000000000 +0100
@@ -1,0 +2,12 @@
+Thu Feb 21 15:39:41 UTC 2013 - reddwarf(a)opensuse.org
+
+- Update to 0.6.7
+ * added lubuntu integration
+ * improved rtl locales support
+ * fixed latest paranoia support
+ * fixed libav 0.8.x support
+ * fixed 'enter' hotkey in the playlist browser
+ * fixed 24-bit mode support in the src plugin
+ * fixed compiler warnings
+
+-------------------------------------------------------------------
Old:
----
qmmp-0.6.6.tar.bz2
New:
----
qmmp-0.6.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qmmp.spec ++++++
--- /var/tmp/diff_new_pack.FfRfIi/_old 2013-02-25 20:42:44.000000000 +0100
+++ /var/tmp/diff_new_pack.FfRfIi/_new 2013-02-25 20:42:44.000000000 +0100
@@ -23,7 +23,7 @@
%define soname 0
Name: qmmp
-Version: 0.6.6
+Version: 0.6.7
Release: 0
Summary: XMMS-like audio player
License: GPL-2.0+
++++++ qmmp-0.6.6.tar.bz2 -> qmmp-0.6.7.tar.bz2 ++++++
++++ 13418 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package qiv for openSUSE:Factory checked in at 2013-02-25 20:42:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qiv (Old)
and /work/SRC/openSUSE:Factory/.qiv.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qiv", Maintainer is "lnussel(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/qiv/qiv.changes 2012-02-22 15:55:09.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qiv.new/qiv.changes 2013-02-25 20:42:22.000000000 +0100
@@ -1,0 +2,8 @@
+Mon Feb 18 22:39:38 UTC 2013 - jslaby(a)suse.com
+
+- magic-optimization.patch: optimize libmagic invocation
+ (workaround for bnc#804323)
+- update-copying.patch: update README.COPYING to have correct
+ address
+
+-------------------------------------------------------------------
New:
----
magic-optimization.patch
update-copying.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qiv.spec ++++++
--- /var/tmp/diff_new_pack.6ZK3Br/_old 2013-02-25 20:42:23.000000000 +0100
+++ /var/tmp/diff_new_pack.6ZK3Br/_new 2013-02-25 20:42:23.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package qiv
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -16,21 +16,22 @@
#
-
Name: qiv
Version: 2.2.4
-Release: 1
+Release: 0
Summary: Probably the fastest and simplest image viewer on the planet
-Group: Productivity/Graphics/Viewers
License: GPL-2.0+
+Group: Productivity/Graphics/Viewers
Url: http://spiegl.de/qiv/
Source0: http://spiegl.de/qiv/download/qiv-%{version}.tgz
+Patch0: magic-optimization.patch
+Patch1: update-copying.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: file-devel
BuildRequires: gtk2-devel
BuildRequires: imlib2-devel
-BuildRequires: libexif-devel
BuildRequires: libXinerama-devel
+BuildRequires: libexif-devel
# imlib itself only recommends that but we actually need them to
# load images
Requires: imlib2-loaders
@@ -74,6 +75,8 @@
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
sed -i 's/-O2/$(RPM_OPT_FLAGS)/' Makefile
%build
++++++ magic-optimization.patch ++++++
From: Jiri Slaby <jslaby(a)suse.cz>
Subject: Optimize libmagic calls
References: bnc#804323
magic_open, magic_load and magic_close need to be called only once. So
optimize this by moving at appropriate place. This BTW fixes a bug in
libmagic which causes crashes on second invocation of magic_load. That
is to be fixed but it is a different story for libmagic developers.
---
main.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
--- a/main.c
+++ b/main.c
@@ -32,7 +32,7 @@ static gboolean qiv_handle_timer(gpointe
static void qiv_timer_restart(gpointer);
#ifdef HAVE_MAGIC
-static int check_magic(const char *name);
+static int check_magic(magic_t cookie, const char *name);
#endif
int main(int argc, char **argv)
@@ -227,11 +227,17 @@ static void qiv_timer_restart(gpointer d
static void filter_images(int *images, char **image_names)
{
int i = 0;
+#ifdef HAVE_MAGIC
+ magic_t cookie;
+
+ cookie = magic_open(MAGIC_NONE);
+ magic_load(cookie,NULL);
+#endif
while(i < *images) {
if (check_extension(image_names[i])
#ifdef HAVE_MAGIC
- || check_magic(image_names[i])
+ || check_magic(cookie, image_names[i])
#endif
) {
i++;
@@ -246,6 +252,9 @@ static void filter_images(int *images, c
--(*images);
}
}
+#ifdef HAVE_MAGIC
+ magic_close(cookie);
+#endif
if (image_idx < 0)
image_idx = 0;
}
@@ -264,15 +273,12 @@ static int check_extension(const char *n
}
#ifdef HAVE_MAGIC
-static int check_magic(const char *name)
+static int check_magic(magic_t cookie, const char *name)
{
- magic_t cookie;
const char *description=NULL;
int i;
int ret=0;
- cookie = magic_open(MAGIC_NONE);
- magic_load(cookie,NULL);
description = magic_file(cookie, name);
if(description)
{
@@ -283,7 +289,6 @@ static int check_magic(const char *name)
break;
}
}
- magic_close(cookie);
return ret;
}
#endif
++++++ update-copying.patch ++++++
From: Jiri Slaby <jslaby(a)suse.cz>
Subject: Fix FSF address
FSF has moved and we should update the address in the GPLv2 license.
---
README.COPYING | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/README.COPYING
+++ b/README.COPYING
@@ -2,7 +2,8 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-warlock for openSUSE:Factory checked in at 2013-02-25 20:42:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-warlock (Old)
and /work/SRC/openSUSE:Factory/.python-warlock.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-warlock", Maintainer is "radmanic(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-warlock/python-warlock.changes 2012-11-28 14:35:25.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-warlock.new/python-warlock.changes 2013-02-25 20:42:07.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Feb 22 14:05:28 UTC 2013 - saschpe(a)suse.de
+
+- Update to version 0.8.1:
+ + Upstream provides no changelog
+- LICENSE isn't part of upstream sources anymore
+
+-------------------------------------------------------------------
Old:
----
warlock-0.6.0.tar.gz
New:
----
warlock-0.8.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-warlock.spec ++++++
--- /var/tmp/diff_new_pack.fSqgBj/_old 2013-02-25 20:42:09.000000000 +0100
+++ /var/tmp/diff_new_pack.fSqgBj/_new 2013-02-25 20:42:09.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-warlock
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -13,19 +13,22 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
Name: python-warlock
-Version: 0.6.0
+Version: 0.8.1
Release: 0
-License: Apache-2.0
Summary: Python object model built on top of JSON schema
-Url: http://github.com/bcwaldon/warlock
+License: Apache-2.0
Group: Development/Languages/Python
+Url: http://github.com/bcwaldon/warlock
Source: http://pypi.python.org/packages/source/w/warlock/warlock-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-distribute
+BuildRequires: python-jsonpatch
BuildRequires: python-jsonschema
+Requires: python-jsonpatch
Requires: python-jsonschema
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
@@ -51,7 +54,7 @@
%files
%defattr(-,root,root,-)
-%doc LICENSE README.md
+%doc README.md
%{python_sitelib}/*
%changelog
++++++ warlock-0.6.0.tar.gz -> warlock-0.8.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/LICENSE new/warlock-0.8.1/LICENSE
--- old/warlock-0.6.0/LICENSE 2012-07-27 20:15:34.000000000 +0200
+++ new/warlock-0.8.1/LICENSE 1970-01-01 01:00:00.000000000 +0100
@@ -1,176 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/PKG-INFO new/warlock-0.8.1/PKG-INFO
--- old/warlock-0.6.0/PKG-INFO 2012-11-19 23:03:20.000000000 +0100
+++ new/warlock-0.8.1/PKG-INFO 2013-01-31 16:47:28.000000000 +0100
@@ -1,7 +1,7 @@
Metadata-Version: 1.0
Name: warlock
-Version: 0.6.0
-Summary: Python object model built on top of JSON schema
+Version: 0.8.1
+Summary: Python object model built on JSON schema and JSON patch.
Home-page: http://github.com/bcwaldon/warlock
Author: Brian Waldon
Author-email: bcwaldon(a)gmail.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/README.md new/warlock-0.8.1/README.md
--- old/warlock-0.6.0/README.md 2012-07-27 20:15:34.000000000 +0200
+++ new/warlock-0.8.1/README.md 2013-01-31 16:44:57.000000000 +0100
@@ -1,43 +1,46 @@
-# Warlock!
+# Warlock
-## Wat
+Build self-validating python objects using JSON schemas.
-Build self-validating python objects using JSON schemas
+1) Create your schema
-## How
-
-1) Build your schema
-
- >>> schema = {
- 'name': 'Country',
- 'properties': {
- 'name': {'type': 'string'},
- 'abbreviation': {'type': 'string'},
- },
- 'additionalProperties': False,
- }
+ >>> schema = {
+ 'name': 'Country',
+ 'properties': {
+ 'name': {'type': 'string'},
+ 'abbreviation': {'type': 'string'},
+ 'population': {'type': 'integer'},
+ },
+ 'additionalProperties': False,
+ }
2) Create a model
>>> import warlock
- >>> Country = warlock.model_factory(schema)
+ >>> Country = warlock.model_factory(schema)
3) Create an object using your model
- >>> sweden = Country(name='Sweden', abbreviation='SE')
+ >>> sweden = Country(name='Sweden', abbreviation='SE')
-4) Let the object validate itself!
+4) Let the object validate itself
>>> sweden.name = 5
Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
+ File "<stdin>", line 1, in <module>
File "warlock/core.py", line 53, in __setattr__
- raise InvalidOperation()
- warlock.core.InvalidOperation
+ raise InvalidOperation(msg)
+ warlock.core.InvalidOperation: Unable to set 'name' to '5'
>>> sweden.overlord = 'Bears'
Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
+ File "<stdin>", line 1, in <module>
File "warlock/core.py", line 53, in __setattr__
- raise InvalidOperation()
- warlock.core.InvalidOperation
\ No newline at end of file
+ raise InvalidOperation(msg)
+ warlock.core.InvalidOperation: Unable to set 'overlord' to 'Bears'
+
+5) Generate a [JSON Patch document](http://tools.ietf.org/html/draft-ietf-appsawg-json-patch) to track changes
+
+ >>> sweden.population=9453000
+ >>> sweden.patch
+ '[{"path": "/population", "value": 9453000, "op": "add"}]'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/requirements.txt new/warlock-0.8.1/requirements.txt
--- old/warlock-0.6.0/requirements.txt 2012-11-19 22:45:50.000000000 +0100
+++ new/warlock-0.8.1/requirements.txt 2013-01-21 18:27:49.000000000 +0100
@@ -1 +1,2 @@
jsonschema>=0.7,<1
+jsonpatch>=0.10,<=0.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/setup.py new/warlock-0.8.1/setup.py
--- old/warlock-0.6.0/setup.py 2012-11-19 23:00:48.000000000 +0100
+++ new/warlock-0.8.1/setup.py 2013-01-31 16:46:08.000000000 +0100
@@ -1,3 +1,17 @@
+# Copyright 2012 Brian Waldon
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
import setuptools
@@ -6,13 +20,12 @@
raw_req = fap.read()
fap.close()
return raw_req.split('\n')
- return ['jsonschema']
setuptools.setup(
name='warlock',
- version='0.6.0',
- description='Python object model built on top of JSON schema',
+ version='0.8.1',
+ description='Python object model built on JSON schema and JSON patch.',
author='Brian Waldon',
author_email='bcwaldon(a)gmail.com',
url='http://github.com/bcwaldon/warlock',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/test/test_core.py new/warlock-0.8.1/test/test_core.py
--- old/warlock-0.6.0/test/test_core.py 2012-10-09 19:51:12.000000000 +0200
+++ new/warlock-0.8.1/test/test_core.py 2013-01-31 16:14:04.000000000 +0100
@@ -1,3 +1,17 @@
+# Copyright 2012 Brian Waldon
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
import copy
import unittest
@@ -113,15 +127,27 @@
self.assertRaises(exc, sweden.clear)
self.assertRaises(exc, sweden.pop, 0)
self.assertRaises(exc, sweden.popitem)
- self.assertRaises(exc, sweden.__delitem__, 'name')
def test_dict_syntax(self):
Country = warlock.model_factory(fixture)
sweden = Country(name='Sweden', population=9379116)
- self.assertEqual(sweden['name'], 'Sweden')
+
sweden['name'] = 'Finland'
self.assertEqual(sweden['name'], 'Finland')
+ del sweden['name']
+ self.assertRaises(AttributeError, getattr, sweden, 'name')
+
+ def test_attr_syntax(self):
+ Country = warlock.model_factory(fixture)
+ sweden = Country(name='Sweden', population=9379116)
+
+ sweden.name = 'Finland'
+ self.assertEqual(sweden.name, 'Finland')
+
+ delattr(sweden, 'name')
+ self.assertRaises(AttributeError, getattr, sweden, 'name')
+
def test_changes(self):
Country = warlock.model_factory(fixture)
sweden = Country(name='Sweden', population=9379116)
@@ -130,3 +156,47 @@
self.assertEqual(sweden.changes, {'name': 'Finland'})
sweden['name'] = 'Norway'
self.assertEqual(sweden.changes, {'name': 'Norway'})
+
+ def test_patch_no_changes(self):
+ Country = warlock.model_factory(fixture)
+ sweden = Country(name='Sweden', population=9379116)
+ self.assertEqual(sweden.patch, '[]')
+
+ def test_patch_alter_value(self):
+ Country = warlock.model_factory(fixture)
+ sweden = Country(name='Sweden', population=9379116)
+ sweden['name'] = 'Finland'
+ self.assertEqual(
+ sweden.patch,
+ '[{"path": "/name", "value": "Finland", "op": "replace"}]')
+
+ def test_patch_drop_attribute(self):
+ Country = warlock.model_factory(fixture)
+ sweden = Country(name='Sweden', population=9379116)
+ del sweden['name']
+ self.assertEqual(sweden.patch, '[{"path": "/name", "op": "remove"}]')
+
+ def test_patch_reduce_operations(self):
+ Country = warlock.model_factory(fixture)
+ sweden = Country(name='Sweden', population=9379116)
+
+ sweden['name'] = 'Finland'
+ self.assertEqual(
+ sweden.patch,
+ '[{"path": "/name", "value": "Finland", "op": "replace"}]')
+
+ sweden['name'] = 'Norway'
+ self.assertEqual(
+ sweden.patch,
+ '[{"path": "/name", "value": "Norway", "op": "replace"}]')
+
+ def test_patch_multiple_operations(self):
+ Country = warlock.model_factory(fixture)
+ sweden = Country(name='Sweden', population=9379116)
+
+ sweden['name'] = 'Finland'
+ sweden['population'] = 5387000
+ self.assertEqual(
+ sweden.patch,
+ '[{"path": "/name", "value": "Finland", "op": "replace"}, '
+ '{"path": "/population", "value": 5387000, "op": "replace"}]')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/warlock/__init__.py new/warlock-0.8.1/warlock/__init__.py
--- old/warlock-0.6.0/warlock/__init__.py 2012-07-27 20:15:34.000000000 +0200
+++ new/warlock-0.8.1/warlock/__init__.py 2013-01-31 16:37:47.000000000 +0100
@@ -1,5 +1,19 @@
+# Copyright 2012 Brian Waldon
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""Public-facing Warlock API"""
# pylint: disable=W0611
from warlock.core import model_factory
-from warlock.core import InvalidOperation
+from warlock.exceptions import InvalidOperation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/warlock/core.py new/warlock-0.8.1/warlock/core.py
--- old/warlock-0.6.0/warlock/core.py 2012-11-19 22:55:38.000000000 +0100
+++ new/warlock-0.8.1/warlock/core.py 2013-01-31 16:15:12.000000000 +0100
@@ -1,111 +1,35 @@
+# Copyright 2012 Brian Waldon
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
"""Core Warlock functionality"""
import copy
-import jsonschema
-
-
-class InvalidOperation(RuntimeError):
- pass
-
+import model
-class ValidationError(ValueError):
- pass
-
-def model_factory(schema):
+def model_factory(schema, base_class=model.Model):
"""Generate a model class based on the provided JSON Schema
:param schema: dict representing valid JSON schema
"""
schema = copy.deepcopy(schema)
- def validator(obj):
- """Apply a JSON schema to an object"""
- try:
- jsonschema.validate(obj, schema)
- except jsonschema.ValidationError as exc:
- raise ValidationError(str(exc))
-
- class Model(dict):
- """Self-validating model for arbitrary objects"""
-
+ class Model(base_class):
def __init__(self, *args, **kwargs):
- d = dict(*args, **kwargs)
-
- # we overload setattr so set this manually
- self.__dict__['validator'] = validator
- try:
- self.validator(d)
- except ValidationError as exc:
- raise ValueError(str(exc))
- else:
- dict.__init__(self, d)
-
- self.__dict__['changes'] = {}
-
- def __getattr__(self, key):
- try:
- return self.__getitem__(key)
- except KeyError:
- raise AttributeError(key)
-
- def __setitem__(self, key, value):
- mutation = dict(self.items())
- mutation[key] = value
- try:
- self.validator(mutation)
- except ValidationError:
- msg = "Unable to set '%s' to '%s'" % (key, value)
- raise InvalidOperation(msg)
-
- dict.__setitem__(self, key, value)
-
- self.__dict__['changes'][key] = value
-
- def __setattr__(self, key, value):
- self.__setitem__(key, value)
-
- def clear(self):
- raise InvalidOperation()
-
- def pop(self, key, default=None):
- raise InvalidOperation()
-
- def popitem(self):
- raise InvalidOperation()
-
- def __delitem__(self, key):
- raise InvalidOperation()
-
- # NOTE(termie): This is kind of the opposite of what copy usually does
- def copy(self):
- return copy.deepcopy(dict(self))
-
- def update(self, other):
- mutation = dict(self.items())
- mutation.update(other)
- try:
- self.validator(mutation)
- except ValidationError as exc:
- raise InvalidOperation(str(exc))
- dict.update(self, other)
-
- def iteritems(self):
- return copy.deepcopy(dict(self)).iteritems()
-
- def items(self):
- return copy.deepcopy(dict(self)).items()
-
- def itervalues(self):
- return copy.deepcopy(dict(self)).itervalues()
-
- def values(self):
- return copy.deepcopy(dict(self)).values()
-
- @property
- def changes(self):
- return copy.deepcopy(self.__dict__['changes'])
+ self.__dict__['schema'] = schema
+ base_class.__init__(self, *args, **kwargs)
Model.__name__ = str(schema['name'])
return Model
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/warlock/exceptions.py new/warlock-0.8.1/warlock/exceptions.py
--- old/warlock-0.6.0/warlock/exceptions.py 1970-01-01 01:00:00.000000000 +0100
+++ new/warlock-0.8.1/warlock/exceptions.py 2013-01-31 16:12:34.000000000 +0100
@@ -0,0 +1,23 @@
+# Copyright 2012 Brian Waldon
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+""" List of errors used in warlock """
+
+
+class InvalidOperation(RuntimeError):
+ pass
+
+
+class ValidationError(ValueError):
+ pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/warlock/model.py new/warlock-0.8.1/warlock/model.py
--- old/warlock-0.6.0/warlock/model.py 1970-01-01 01:00:00.000000000 +0100
+++ new/warlock-0.8.1/warlock/model.py 2013-01-31 16:12:44.000000000 +0100
@@ -0,0 +1,129 @@
+# Copyright 2012 Brian Waldon
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Self-validating model for arbitrary objects"""
+
+import copy
+
+import jsonpatch
+import jsonschema
+
+import exceptions
+
+
+class Model(dict):
+ def __init__(self, *args, **kwargs):
+ # we overload setattr so set this manually
+ d = dict(*args, **kwargs)
+
+ try:
+ self.validate(d)
+ except exceptions.ValidationError as exc:
+ raise ValueError(str(exc))
+ else:
+ dict.__init__(self, d)
+
+ self.__dict__['changes'] = {}
+ self.__dict__['__original__'] = copy.deepcopy(d)
+
+ def __setitem__(self, key, value):
+ mutation = dict(self.items())
+ mutation[key] = value
+ try:
+ self.validate(mutation)
+ except exceptions.ValidationError:
+ msg = "Unable to set '%s' to '%s'" % (key, value)
+ raise exceptions.InvalidOperation(msg)
+
+ dict.__setitem__(self, key, value)
+
+ self.__dict__['changes'][key] = value
+
+ def __delitem__(self, key):
+ mutation = dict(self.items())
+ del mutation[key]
+ try:
+ self.validate(mutation)
+ except exceptions.ValidationError:
+ msg = "Unable to delete attribute '%s'" % (key)
+ raise exceptions.InvalidOperation(msg)
+
+ dict.__delitem__(self, key)
+
+ def __getattr__(self, key):
+ try:
+ return self.__getitem__(key)
+ except KeyError:
+ raise AttributeError(key)
+
+ def __setattr__(self, key, value):
+ self.__setitem__(key, value)
+
+ def __delattr__(self, key):
+ self.__delitem__(key)
+
+ ### BEGIN dict compatibility methods ###
+
+ def clear(self):
+ raise exceptions.InvalidOperation()
+
+ def pop(self, key, default=None):
+ raise exceptions.InvalidOperation()
+
+ def popitem(self):
+ raise exceptions.InvalidOperation()
+
+ def copy(self):
+ return copy.deepcopy(dict(self))
+
+ def update(self, other):
+ mutation = dict(self.items())
+ mutation.update(other)
+ try:
+ self.validate(mutation)
+ except exceptions.ValidationError as exc:
+ raise exceptions.InvalidOperation(str(exc))
+ dict.update(self, other)
+
+ def iteritems(self):
+ return copy.deepcopy(dict(self)).iteritems()
+
+ def items(self):
+ return copy.deepcopy(dict(self)).items()
+
+ def itervalues(self):
+ return copy.deepcopy(dict(self)).itervalues()
+
+ def values(self):
+ return copy.deepcopy(dict(self)).values()
+
+ ### END dict compatibility methods ###
+
+ @property
+ def patch(self):
+ """Return a jsonpatch object representing the delta"""
+ original = self.__dict__['__original__']
+ return jsonpatch.make_patch(original, dict(self)).to_string()
+
+ @property
+ def changes(self):
+ """Dumber version of 'patch' method - this should be deprecated"""
+ return copy.deepcopy(self.__dict__['changes'])
+
+ def validate(self, obj):
+ """Apply a JSON schema to an object"""
+ try:
+ jsonschema.validate(obj, self.schema)
+ except jsonschema.ValidationError as exc:
+ raise exceptions.ValidationError(str(exc))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/warlock.egg-info/PKG-INFO new/warlock-0.8.1/warlock.egg-info/PKG-INFO
--- old/warlock-0.6.0/warlock.egg-info/PKG-INFO 2012-11-19 23:03:20.000000000 +0100
+++ new/warlock-0.8.1/warlock.egg-info/PKG-INFO 2013-01-31 16:47:28.000000000 +0100
@@ -1,7 +1,7 @@
Metadata-Version: 1.0
Name: warlock
-Version: 0.6.0
-Summary: Python object model built on top of JSON schema
+Version: 0.8.1
+Summary: Python object model built on JSON schema and JSON patch.
Home-page: http://github.com/bcwaldon/warlock
Author: Brian Waldon
Author-email: bcwaldon(a)gmail.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/warlock.egg-info/SOURCES.txt new/warlock-0.8.1/warlock.egg-info/SOURCES.txt
--- old/warlock-0.6.0/warlock.egg-info/SOURCES.txt 2012-11-19 23:03:20.000000000 +0100
+++ new/warlock-0.8.1/warlock.egg-info/SOURCES.txt 2013-01-31 16:47:28.000000000 +0100
@@ -1,4 +1,3 @@
-LICENSE
MANIFEST.in
README.md
requirements.txt
@@ -6,6 +5,8 @@
test/test_core.py
warlock/__init__.py
warlock/core.py
+warlock/exceptions.py
+warlock/model.py
warlock.egg-info/PKG-INFO
warlock.egg-info/SOURCES.txt
warlock.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/warlock-0.6.0/warlock.egg-info/requires.txt new/warlock-0.8.1/warlock.egg-info/requires.txt
--- old/warlock-0.6.0/warlock.egg-info/requires.txt 2012-11-19 23:03:20.000000000 +0100
+++ new/warlock-0.8.1/warlock.egg-info/requires.txt 2013-01-31 16:47:28.000000000 +0100
@@ -1 +1,2 @@
-jsonschema>=0.7,<1
\ No newline at end of file
+jsonschema>=0.7,<1
+jsonpatch>=0.10,<=0.12
\ No newline at end of file
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-pysendfile for openSUSE:Factory checked in at 2013-02-25 20:41:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pysendfile (Old)
and /work/SRC/openSUSE:Factory/.python-pysendfile.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pysendfile", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pysendfile/python-pysendfile.changes 2012-11-28 14:34:29.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-pysendfile.new/python-pysendfile.changes 2013-02-25 20:41:57.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Jan 21 15:50:12 UTC 2013 - p.drouand(a)gmail.com
+
+- Add python3 support
+
+-------------------------------------------------------------------
New Changes file:
--- /dev/null 2013-02-25 16:34:27.356011506 +0100
+++ /work/SRC/openSUSE:Factory/.python-pysendfile.new/python3-pysendfile.changes 2013-02-25 20:41:58.000000000 +0100
@@ -0,0 +1,10 @@
+-------------------------------------------------------------------
+Mon Jan 21 15:50:12 UTC 2013 - p.drouand(a)gmail.com
+
+- Add python3 support
+
+-------------------------------------------------------------------
+Thu Nov 8 11:35:29 UTC 2012 - saschpe(a)suse.de
+
+- Initial version
+
New:
----
pre_checkin.sh
python3-pysendfile.changes
python3-pysendfile.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pysendfile.spec ++++++
--- /var/tmp/diff_new_pack.fqStfY/_old 2013-02-25 20:42:00.000000000 +0100
+++ /var/tmp/diff_new_pack.fqStfY/_new 2013-02-25 20:42:00.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pysendfile
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -14,6 +14,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
+%define mod_name pysendfile
Name: python-pysendfile
Version: 2.0.0
@@ -22,7 +23,7 @@
Summary: A Python interface to sendfile(2)
Url: http://code.google.com/p/pysendfile/
Group: Development/Languages/Python
-Source: http://pysendfile.googlecode.com/files/pysendfile-%{version}.tar.gz
+Source: http://pysendfile.googlecode.com/files/%{mod_name}-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-nose
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -34,10 +35,10 @@
A python interface to sendfile(2) system call.
%prep
-%setup -q -n pysendfile-%{version}
+%setup -q -n %{mod_name}-%{version}
%build
-CFLAGS="%{optflags}" python setup.py build
+python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
++++++ python3-pysendfile.spec ++++++
#
# spec file for package python-pysendfile
#
# Copyright (c) 2013 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/
%define mod_name pysendfile
Name: python3-pysendfile
Version: 2.0.0
Release: 0
License: MIT
Summary: A Python interface to sendfile(2)
Url: http://code.google.com/p/pysendfile/
Group: Development/Languages/Python
Source: http://pysendfile.googlecode.com/files/%{mod_name}-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python3_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
%description
A python interface to sendfile(2) system call.
%prep
%setup -q -n %{mod_name}-%{version}
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
#TODO: Absolute import, fix later
#nosetests
%files
%defattr(-,root,root,-)
%doc LICENSE README
%{python3_sitearch}/*
%changelog
++++++ pre_checkin.sh ++++++
#!/bin/sh
sed 's,^\(Name: *\)python-,\1python3-,;s,^\(Requires: *\)python-,\1python3-,;s,^\(BuildRequires: *\)python-,\1python3-,;s,python setup.py,python3 setup.py,;s,python_sitelib,python3_sitelib,;s,python_sitearch,python3_sitearch,' python-pysendfile.spec > python3-pysendfile.spec
cp python-pysendfile.changes python3-pysendfile.changes
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-jsonschema for openSUSE:Factory checked in at 2013-02-25 20:41:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jsonschema (Old)
and /work/SRC/openSUSE:Factory/.python-jsonschema.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jsonschema", Maintainer is "radmanic(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jsonschema/python-jsonschema.changes 2012-11-25 13:42:22.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-jsonschema.new/python-jsonschema.changes 2013-02-25 20:41:46.000000000 +0100
@@ -1,0 +2,18 @@
+Mon Feb 25 09:17:22 UTC 2013 - p.drouand(a)gmail.com
+
+- Add python3 support
+ Tests with python3 fails for instance
+
+-------------------------------------------------------------------
+Mon Feb 25 08:34:55 UTC 2013 - p.drouand(a)gmail.com
+
+- Update to version 1.0.0:
+ + Support for Draft 4
+ + Support for format
+ + Longs are ints too!
+ + Fixed a number of issues with ``$ref`` support (#66)
+ + Draft4Validator is now the default
+ + ``ValidationError.path`` is now in sequential order
+ + Added ``ValidatorMixin``
+
+-------------------------------------------------------------------
New Changes file:
--- /dev/null 2013-02-25 16:34:27.356011506 +0100
+++ /work/SRC/openSUSE:Factory/.python-jsonschema.new/python3-jsonschema.changes 2013-02-25 20:41:46.000000000 +0100
@@ -0,0 +1,41 @@
+-------------------------------------------------------------------
+Mon Feb 25 09:17:22 UTC 2013 - p.drouand(a)gmail.com
+
+- Add python3 support
+ Tests with python3 fails for instance
+
+-------------------------------------------------------------------
+Mon Feb 25 08:34:55 UTC 2013 - p.drouand(a)gmail.com
+
+- Update to version 1.0.0:
+ + Support for Draft 4
+ + Support for format
+ + Longs are ints too!
+ + Fixed a number of issues with ``$ref`` support (#66)
+ + Draft4Validator is now the default
+ + ``ValidationError.path`` is now in sequential order
+ + Added ``ValidatorMixin``
+
+-------------------------------------------------------------------
+Thu Nov 22 15:41:35 UTC 2012 - saschpe(a)suse.de
+
+- Update to version 0.7:
+ + Partial support for (JSON Pointer) $ref
+ + Deprecations
+ + Validator is replaced by Draft3Validator with a slightly different
+ interface
+ + validator(meta_validate=False)
+- Changes from version 0.6:
+ + Issue #30 - Wrong behavior for the dependencies property validation
+ + Fix a miswritten test
+
+-------------------------------------------------------------------
+Fri Jul 27 10:19:13 UTC 2012 - saschpe(a)suse.de
+
+- Add BuildRequires: python-unittest2 for SLE-11-SP2
+
+-------------------------------------------------------------------
+Thu Jul 26 13:54:29 UTC 2012 - saschpe(a)suse.de
+
+- Initial version
+
Old:
----
jsonschema-0.7.tar.gz
New:
----
jsonschema-1.0.0.tar.gz
pre_checkin.sh
python3-jsonschema.changes
python3-jsonschema.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jsonschema.spec ++++++
--- /var/tmp/diff_new_pack.VtHnq3/_old 2013-02-25 20:41:47.000000000 +0100
+++ /var/tmp/diff_new_pack.VtHnq3/_new 2013-02-25 20:41:47.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-jsonschema
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -17,7 +17,7 @@
Name: python-jsonschema
-Version: 0.7
+Version: 1.0.0
Release: 0
Summary: An implementation of JSON-Schema validation for Python
License: MIT
@@ -48,8 +48,10 @@
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%if 0%{?suse_version} > 1110
%check
python tests.py
+%endif
%files
%defattr(-,root,root,-)
++++++ python3-jsonschema.spec ++++++
#
# spec file for package python-jsonschema
#
# Copyright (c) 2013 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-jsonschema
Version: 1.0.0
Release: 0
Summary: An implementation of JSON-Schema validation for Python
License: MIT
Group: Development/Languages/Python
Url: http://github.com/Julian/jsonschema
Source: http://pypi.python.org/packages/source/j/jsonschema/jsonschema-%{version}.t…
BuildRequires: python3-devel
# Test build requirements
BuildRequires: python3-mock
BuildRequires: python3-unittest2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python3_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
jsonschema is an implementation of JSON Schema (currently in Draft 3)
for Python (supporting 2.6+ including Python 3).
%prep
%setup -q -n jsonschema-%{version}
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%if 0%{?suse_version} > 1110
%check
#python3 tests.py
%endif
%files
%defattr(-,root,root,-)
%doc COPYING README.rst
%{python3_sitelib}/*
%changelog
++++++ jsonschema-0.7.tar.gz -> jsonschema-1.0.0.tar.gz ++++++
++++ 7923 lines of diff (skipped)
++++++ pre_checkin.sh ++++++
#!/bin/sh
sed 's,^\(Name: *\)python-,\1python3-,;s,^\(Requires: *\)python-,\1python3-,;s,^\(BuildRequires: *\)python-,\1python3-,;s,python setup.py,python3 setup.py,;s,python_sitelib,python3_sitelib,;s,python_sitearch,python3_sitearch,;s,python tests.py,python3 tests.py,' python-jsonschema.spec > python3-jsonschema.spec
cp python-jsonschema.changes python3-jsonschema.changes
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package python-httplib2 for openSUSE:Factory checked in at 2013-02-25 20:40:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-httplib2 (Old)
and /work/SRC/openSUSE:Factory/.python-httplib2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-httplib2", Maintainer is "CStender(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-httplib2/python-httplib2.changes 2012-10-08 20:33:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-httplib2.new/python-httplib2.changes 2013-02-25 20:40:49.000000000 +0100
@@ -1,0 +2,23 @@
+Fri Jan 11 19:51:38 UTC 2013 - p.drouand(a)gmail.com
+
+- Drop unneeded python-pyOpenSSL Requires
+
+-------------------------------------------------------------------
+Fri Jan 11 19:39:31 UTC 2013 - p.drouand(a)gmail.com
+
+- Initial python3 support
+
+-------------------------------------------------------------------
+Fri Jan 11 19:38:07 UTC 2013 - p.drouand(a)gmail.com
+
+- Update to 0.7.7 version:
+ * More fixes for App Engine, now less likely to swallow important exceptions.
+ * Adding proxy_info_from_* methods to Python3. Reviewed in https://codereview.appspot.com/6588078/.
+ * Added GeoTrust cert
+ * Make httplib2.Http() instances pickleable. Reviewed in https://codereview.appspot.com/6506074/
+ * The following issues have been fixed:
+ - 229 python3 httplib2 clobbers multiple headers of same key
+ - 230 Expose meaningful exception for App Engine URLFetch ResponseTooLargeError
+ - 231 Expose App Engine URLFetch DeadlineExceededError for debugging purposes
+
+-------------------------------------------------------------------
New Changes file:
--- /dev/null 2013-02-25 16:34:27.356011506 +0100
+++ /work/SRC/openSUSE:Factory/.python-httplib2.new/python3-httplib2.changes 2013-02-25 20:40:50.000000000 +0100
@@ -0,0 +1,120 @@
+-------------------------------------------------------------------
+Fri Jan 11 19:51:38 UTC 2013 - p.drouand(a)gmail.com
+
+- Drop unneeded python-pyOpenSSL Requires
+
+-------------------------------------------------------------------
+Fri Jan 11 19:39:31 UTC 2013 - p.drouand(a)gmail.com
+
+- Initial python3 support
+
+-------------------------------------------------------------------
+Fri Jan 11 19:38:07 UTC 2013 - p.drouand(a)gmail.com
+
+- Update to 0.7.7 version:
+ * More fixes for App Engine, now less likely to swallow important exceptions.
+ * Adding proxy_info_from_* methods to Python3. Reviewed in https://codereview.appspot.com/6588078/.
+ * Added GeoTrust cert
+ * Make httplib2.Http() instances pickleable. Reviewed in https://codereview.appspot.com/6506074/
+ * The following issues have been fixed:
+ - 229 python3 httplib2 clobbers multiple headers of same key
+ - 230 Expose meaningful exception for App Engine URLFetch ResponseTooLargeError
+ - 231 Expose App Engine URLFetch DeadlineExceededError for debugging purposes
+
+-------------------------------------------------------------------
+Sat Oct 6 22:26:47 UTC 2012 - os-dev(a)jacraig.com
+
+- Update to 0.7.6:
+ * Fix app engine
+ * On Python App Engine 2.7 a body can be passed in that is actually a
+ stream. Do a full read of the contents of that stream before proceeding.
+- Update URL to one given in setup.py; also where the old one redirects to.
+
+-------------------------------------------------------------------
+Sun Sep 9 16:29:51 UTC 2012 - os-dev(a)jacraig.com
+
+- Update to 0.7.5, no changelog provided.
+
+-------------------------------------------------------------------
+Mon Jul 23 14:56:00 UTC 2012 - saschpe(a)suse.de
+
+- Require openssl-certs on SLE instead of ca-certificates
+
+-------------------------------------------------------------------
+Tue Jul 17 08:24:44 UTC 2012 - saschpe(a)suse.de
+
+- Add missing runtime requirement on python-pyOpenSSL to gain
+ access to 'ssl' module
+
+-------------------------------------------------------------------
+Mon Jul 9 08:47:20 UTC 2012 - cfarrell(a)suse.com
+
+- license update: MIT and Apache-2.0 and (MPL-1.1 or GPL-2.0+ or LGPL-2.1+)
+ __init__.py contains code derived from a Google owned Apache project.
+ cacerts.txt is Mozilla triple-licensed.
+
+-------------------------------------------------------------------
+Wed Jun 20 11:41:56 UTC 2012 - saschpe(a)suse.de
+
+- Don't ship private copy of Mozilla NSS certs, use system certs
+ instead (bnc#761162)
+
+-------------------------------------------------------------------
+Tue Jun 5 09:56:01 UTC 2012 - cstender(a)opensuse.org
+
+- update to version 0.7.4
+ * See CHANGELOG for all changes and fixes
+
+-------------------------------------------------------------------
+Thu Dec 22 12:52:35 UTC 2011 - cstender(a)suse.com
+
+- updated to version 0.7.2
+
+-------------------------------------------------------------------
+Mon Jul 11 14:06:42 CEST 2011 - cstender(a)suse.de
+
+- updated to version 0.7.1
+ * See CHANGELOG for all changes and fixes
+
+-------------------------------------------------------------------
+Mon Apr 19 13:47:15 CEST 2010 - dmueller(a)suse.de
+
+- update to version 0.6.0:
+ * include python 3 support/compatibility
+
+-------------------------------------------------------------------
+Thu Aug 13 10:55:40 UTC 2009 - cstender(a)novell.com
+
+- build as noarch
+
+-------------------------------------------------------------------
+Tue Aug 4 10:51:26 UTC 2009 - cstender(a)novell.com
+
+- updated to version 0.5.0
+ * Fixed the following bugs:
+ #12 - Cache-Control: only-if-cached incorrectly does request if
+ item not in cache
+ #39 - Deprecation warnings in Python 2.6
+ #54 - Http.request fails accesing Google account via http proxy
+ #56 - Block on response.read() for HEAD requests.
+ #57 - Timeout ignore for Python 2.6
+ #58 - Fixed parsing of Cache-Control: header to make it more
+ robust
+
+-------------------------------------------------------------------
+Tue Sep 9 12:41:28 CEST 2008 - cstender(a)suse.de
+
+- updated package to version 0.4.0
+ o added support for proxies if the Socksipy module is installed
+ o fixed bug with some HEAD responses having content-length set to
+ zero incorrectly
+ o fixed most except's to catch a specific exception
+ o added 'connection_type' parameter to Http.request()
+ o the default for 'force_exception_to_status_code' was changed to
+ False
+
+-------------------------------------------------------------------
+Sat Oct 21 22:37:29 CEST 2006 - dgollub(a)suse.de
+
+- initial version of python-httplib2 (0.2.0)
+
Old:
----
httplib2-0.7.6.tar.gz
New:
----
httplib2-0.7.7.tar.gz
pre_checkin.sh
python3-httplib2.changes
python3-httplib2.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-httplib2.spec ++++++
--- /var/tmp/diff_new_pack.5Ly1JY/_old 2013-02-25 20:40:51.000000000 +0100
+++ /var/tmp/diff_new_pack.5Ly1JY/_new 2013-02-25 20:40:51.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-httplib2
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -15,26 +15,25 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+%define mod_name httplib2
Name: python-httplib2
-Version: 0.7.6
+Version: 0.7.7
Release: 0
Url: http://code.google.com/p/httplib2/
Summary: A Python HTTP client library
License: MIT and Apache-2.0 and (MPL-1.1 or GPL-2.0+ or LGPL-2.1+)
Group: Development/Libraries/Python
-Source0: httplib2-%{version}.tar.gz
+Source0: %{mod_name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE: Don't ship private copy of Mozilla NSS certs, use system certs instead (bnc#761162)
Patch0: httplib2-use-system-certs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
-#BuildRequires: python-pyOpenSSL
%if 0%{?sles_version}
Requires: openssl-certs
%else
Requires: ca-certificates
%endif
-Requires: python-pyOpenSSL
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
@@ -46,7 +45,7 @@
left out of other HTTP libraries.
%prep
-%setup -q -n httplib2-%{version}
+%setup -q -n %{mod_name}-%{version}
%patch0 -p1
%build
++++++ python3-httplib2.spec ++++++
#
# spec file for package python-httplib2
#
# Copyright (c) 2013 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/
#
%define mod_name httplib2
Name: python3-httplib2
Version: 0.7.7
Release: 0
Url: http://code.google.com/p/httplib2/
Summary: A Python HTTP client library
License: MIT and Apache-2.0 and (MPL-1.1 or GPL-2.0+ or LGPL-2.1+)
Group: Development/Libraries/Python
Source0: %{mod_name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE: Don't ship private copy of Mozilla NSS certs, use system certs instead (bnc#761162)
Patch0: httplib2-use-system-certs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python3-devel
%if 0%{?sles_version}
Requires: openssl-certs
%else
Requires: ca-certificates
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python3_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
A comprehensive HTTP client library that supports many features
left out of other HTTP libraries.
%prep
%setup -q -n %{mod_name}-%{version}
%patch0 -p1
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
#%%check
#python python2/httplib2test.py
%files
%defattr(-,root,root)
%doc README
%{python3_sitelib}/*
%changelog
++++++ httplib2-0.7.6.tar.gz -> httplib2-0.7.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/CHANGELOG new/httplib2-0.7.7/CHANGELOG
--- old/httplib2-0.7.6/CHANGELOG 1970-01-01 01:00:00.000000000 +0100
+++ new/httplib2-0.7.7/CHANGELOG 2012-11-16 14:20:22.000000000 +0100
@@ -0,0 +1,199 @@
+0.7.7
+ More fixes for App Engine, now less likely to swallow important exceptions.
+ Adding proxy_info_from_* methods to Python3. Reviewed in https://codereview.appspot.com/6588078/.
+ Added GeoTrust cert
+ Make httplib2.Http() instances pickleable. Reviewed in https://codereview.appspot.com/6506074/
+
+ The following issues have been fixed:
+
+ 229 python3 httplib2 clobbers multiple headers of same key
+ 230 Expose meaningful exception for App Engine URLFetch ResponseTooLargeError
+ 231 Expose App Engine URLFetch DeadlineExceededError for debugging purposes
+
+0.7.6
+ Fixes for App Engine 2.7.
+
+0.7.5
+ Keys are lowercase in a Response object, regardless of how Response object is constructed.
+ Add control so that Authorization: headers aren't forwarded on a 3xx response by default.
+ Set the reason correctly when running on App Engine. Patch from Alain Vongsouvanh. Reviewed in http://codereview.appspot.com/6422051/
+ Fix proxy socks for SSL connections. Fixes issue #199.
+ You can now set httplib2.RETRIES to the number of retries before a request
+ is considered to fail It is set to a default of 2 to mimic the traditional
+ behavior of httplib2.
+
+ The following issues have been addressed:
+
+ 223 HEAD requests fail calling the close() method of ResponseDict instance.
+ 222 Can't disable cert validation in appengine
+ 204 Credentials can leak in HTTP redirects
+ 210 Different API between Python 2 and Python 3 version breaks wsgi_intercept
+ 214 ValueError on malformated cache entries
+ 204 Credentials can leak in HTTP redirects
+
+
+0.7.3
+ ProxyInfo objects now can construct themselves from environment
+ variables commonly-used in Unix environments. By default, the Http
+ class will construct a ProxyInfo instance based on these environment
+ variables. To achieve the previous behavior, where environment
+ variables are ignored, pass proxy_info=None to Http().
+
+ The following issues have been addressed:
+
+ Issue 159: automatic detection of proxy configuration.
+ Issue 179: Allow unicode in proxy hostname.
+ Issue 194: Added support for setuptools.
+ Fixes for HTTP CONNECT proxies.
+
+0.7.1
+ Fix failure to install cacerts.txt for 2.x installs.
+
+0.7.0
+ The two major changes in this release are SSL Certificate
+ checking and App Engine support. By default the certificates
+ of an HTTPS connection are checked, but that can be disabled
+ via disable_ssl_certificate_validation. The second change
+ is that on App Engine there is a new connection object
+ that utilizes the urlfetch capabilities on App Engine, including
+ setting timeouts and validating certificates.
+
+ The following issues have been addressed:
+
+ Fixes issue 72. Always lowercase authorization header.
+ Fix issue 47. Redirects that become a GET should not have a body.
+ Fixes issue 19. Set Content-location on redirected HEAD requests
+ Fixes issue 139. Redirect with a GET on 302 regardless of the originating method.
+ Fixes issue 138. Handle unicode in headers when writing and retrieving cache entries. Who says headers have to be ASCII!
+ Add certificate validation. Work initially started by Christoph Kern.
+ Set a version number. Fixes issue # 135.
+ Sync to latest version of socks.py
+ Add gzip to the user-agent, in case we are making a request to an app engine project: http://code.google.com/appengine/kb/general.html#compression
+ Uses a custom httplib shim on App Engine to wrap urlfetch, as opposed
+ Add default support for optimistic concurrency on PATCH requests
+ Fixes issue 126. IPv6 under various conditions would fail.
+ Fixes issue 131. Handle socket.timeout's that occur during send.
+ proxy support: degrade gracefully when socket.socket is unavailable
+
+
+0.6.0
+
+ The following issues have been addressed:
+
+ #51 - Failure to handle server legitimately closing connection before request body is fully sent
+ #77 - Duplicated caching test
+ #65 - Transform _normalize_headers into a method of Http class
+ #45 - Vary header
+ #73 - All files in Mercurial are executable
+ #81 - Have a useful .hgignore
+ #78 - Add release tags to the Mercurial repository
+ #67 - HEAD requests cause next request to be retried
+
+ Mostly bug fixes, the big enhancement is the addition of proper Vary: header
+ handling. Thanks to Chris Dent for that change.
+
+ The other big change is the build process for distributions so that both python2 and python3
+ are included in the same .tar.gz/.zip file.
+
+0.5.0
+
+ Added Python 3 support
+
+ Fixed the following bugs:
+
+ #12 - Cache-Control: only-if-cached incorrectly does request if item not in cache
+ #39 - Deprecation warnings in Python 2.6
+ #54 - Http.request fails accesing Google account via http proxy
+ #56 - Block on response.read() for HEAD requests.
+ #57 - Timeout ignore for Python 2.6
+ #58 - Fixed parsing of Cache-Control: header to make it more robust
+
+ Also fixed a deprecation warning that appeared between Python 3.0 and 3.1.
+
+0.4.0
+
+ Added support for proxies if the Socksipy module is installed.
+
+ Fixed bug with some HEAD responses having content-length set to
+ zero incorrectly.
+
+ Fixed most except's to catch a specific exception.
+
+ Added 'connection_type' parameter to Http.request().
+
+ The default for 'force_exception_to_status_code' was changed to False. Defaulting
+ to True was causing quite a bit of confusion.
+
+
+0.3.0
+ Calling Http.request() with a relative URI, as opposed to an absolute URI,
+ will now throw a specific exception.
+
+ Http() now has an additional optional parameter for the socket timeout.
+
+ Exceptions can now be forced into responses. That is, instead of
+ throwing an exception, a good httlib2.Response object is returned
+ that describe the error with an appropriate status code.
+
+ Many improvements to the file cache:
+
+ 1. The names in the cache are now much less
+ opaque, which should help with debugging.
+
+ 2. The disk cache is now Apache mod_asis compatible.
+
+ 3. A Content-Location: header is supplied and stored in the
+ cache which points to the original requested URI.
+
+ User supplied If-* headers now override httplib2 supplied
+ versions.
+
+ IRIs are now fully supported. Note that they MUST be passed in
+ as unicode objects.
+
+ Http.add_credentials() now takes an optional domain to restrict
+ the credentials to being only used on that domain.
+
+ Added Http.add_certificate() which allows setting
+ a key and cert for SSL connnections.
+
+ Many other bugs fixed.
+
+
+0.2.0
+ Added support for Google Auth.
+
+ Added experimental support for HMACDigest.
+
+ Added support for a pluggable caching system. Now supports
+ the old system of using the file system and now memcached.
+
+ Added httplib2.debuglevel which turns on debugging.
+
+ Change Response._previous to Response.previous.
+
+ Addded Http.follow_all_redirects which forces
+ httplib2 to follow all redirects, as opposed to
+ following only the safe redirects. This makes the
+ GData protocol easier to use.
+
+ All known bugs fixed to date.
+
+0.1.1
+
+ Fixed several bugs raised by James Antill:
+ 1. HEAD didn't get an Accept: header added like GET.
+ 2. HEAD requests did not use the cache.
+ 3. GET requests with Range: headers would erroneously return a full cached response.
+ 4. Subsequent requests to resources that had timed out would raise an exception.
+ And one feature request for 'method' to default to GET.
+
+ Xavier Verges Farrero supplied what I needed to make the
+ library work with Python 2.3.
+
+ I added distutils based setup.py.
+
+0.1 Rev 86
+
+ Initial Release
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/MANIFEST.in new/httplib2-0.7.7/MANIFEST.in
--- old/httplib2-0.7.6/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100
+++ new/httplib2-0.7.7/MANIFEST.in 2012-11-16 14:20:22.000000000 +0100
@@ -0,0 +1,3 @@
+recursive-include python2 *.py *.txt
+recursive-include python3 *.py *.txt
+include python2/httplib2/test/*.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/PKG-INFO new/httplib2-0.7.7/PKG-INFO
--- old/httplib2-0.7.6/PKG-INFO 2012-09-11 19:22:03.000000000 +0200
+++ new/httplib2-0.7.7/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-Metadata-Version: 1.1
-Name: httplib2
-Version: 0.7.6
-Summary: A comprehensive HTTP client library.
-Home-page: http://code.google.com/p/httplib2/
-Author: Joe Gregorio
-Author-email: joe(a)bitworking.org
-License: MIT
-Download-URL: http://httplib2.googlecode.com/files/httplib2-0.7.6.tar.gz
-Description:
-
- A comprehensive HTTP client library, ``httplib2`` supports many features left out of other HTTP libraries.
-
- **HTTP and HTTPS**
- HTTPS support is only available if the socket module was compiled with SSL support.
-
-
- **Keep-Alive**
- Supports HTTP 1.1 Keep-Alive, keeping the socket open and performing multiple requests over the same connection if possible.
-
-
- **Authentication**
- The following three types of HTTP Authentication are supported. These can be used over both HTTP and HTTPS.
-
- * Digest
- * Basic
- * WSSE
-
- **Caching**
- The module can optionally operate with a private cache that understands the Cache-Control:
- header and uses both the ETag and Last-Modified cache validators. Both file system
- and memcached based caches are supported.
-
-
- **All Methods**
- The module can handle any HTTP request method, not just GET and POST.
-
-
- **Redirects**
- Automatically follows 3XX redirects on GETs.
-
-
- **Compression**
- Handles both 'deflate' and 'gzip' types of compression.
-
-
- **Lost update support**
- Automatically adds back ETags into PUT requests to resources we have already cached. This implements Section 3.2 of Detecting the Lost Update Problem Using Unreserved Checkout
-
-
- **Unit Tested**
- A large and growing set of unit tests.
-
-
-Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
-Classifier: Environment :: Web Environment
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Topic :: Internet :: WWW/HTTP
-Classifier: Topic :: Software Development :: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python2/httplib2/__init__.py new/httplib2-0.7.7/python2/httplib2/__init__.py
--- old/httplib2-0.7.6/python2/httplib2/__init__.py 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python2/httplib2/__init__.py 2012-11-16 14:20:22.000000000 +0100
@@ -22,7 +22,7 @@
"Sam Ruby",
"Louis Nyffenegger"]
__license__ = "MIT"
-__version__ = "0.7.6"
+__version__ = "0.7.7"
import re
import sys
@@ -763,67 +763,6 @@
def isgood(self):
return (self.proxy_host != None) and (self.proxy_port != None)
- @classmethod
- def from_environment(cls, method='http'):
- """
- Read proxy info from the environment variables.
- """
- if method not in ['http', 'https']:
- return
-
- env_var = method + '_proxy'
- url = os.environ.get(env_var, os.environ.get(env_var.upper()))
- if not url:
- return
- pi = cls.from_url(url, method)
-
- no_proxy = os.environ.get('no_proxy', os.environ.get('NO_PROXY', ''))
- bypass_hosts = []
- if no_proxy:
- bypass_hosts = no_proxy.split(',')
- # special case, no_proxy=* means all hosts bypassed
- if no_proxy == '*':
- bypass_hosts = AllHosts
-
- pi.bypass_hosts = bypass_hosts
- return pi
-
- @classmethod
- def from_url(cls, url, method='http'):
- """
- Construct a ProxyInfo from a URL (such as http_proxy env var)
- """
- url = urlparse.urlparse(url)
- username = None
- password = None
- port = None
- if '@' in url[1]:
- ident, host_port = url[1].split('@', 1)
- if ':' in ident:
- username, password = ident.split(':', 1)
- else:
- password = ident
- else:
- host_port = url[1]
- if ':' in host_port:
- host, port = host_port.split(':', 1)
- else:
- host = host_port
-
- if port:
- port = int(port)
- else:
- port = dict(https=443, http=80)[method]
-
- proxy_type = 3 # socks.PROXY_TYPE_HTTP
- return cls(
- proxy_type = proxy_type,
- proxy_host = host,
- proxy_port = port,
- proxy_user = username or None,
- proxy_pass = password or None,
- )
-
def applies_to(self, hostname):
return not self.bypass_host(hostname)
@@ -840,6 +779,66 @@
return bypass
+def proxy_info_from_environment(method='http'):
+ """
+ Read proxy info from the environment variables.
+ """
+ if method not in ['http', 'https']:
+ return
+
+ env_var = method + '_proxy'
+ url = os.environ.get(env_var, os.environ.get(env_var.upper()))
+ if not url:
+ return
+ pi = proxy_info_from_url(url, method)
+
+ no_proxy = os.environ.get('no_proxy', os.environ.get('NO_PROXY', ''))
+ bypass_hosts = []
+ if no_proxy:
+ bypass_hosts = no_proxy.split(',')
+ # special case, no_proxy=* means all hosts bypassed
+ if no_proxy == '*':
+ bypass_hosts = AllHosts
+
+ pi.bypass_hosts = bypass_hosts
+ return pi
+
+def proxy_info_from_url(url, method='http'):
+ """
+ Construct a ProxyInfo from a URL (such as http_proxy env var)
+ """
+ url = urlparse.urlparse(url)
+ username = None
+ password = None
+ port = None
+ if '@' in url[1]:
+ ident, host_port = url[1].split('@', 1)
+ if ':' in ident:
+ username, password = ident.split(':', 1)
+ else:
+ password = ident
+ else:
+ host_port = url[1]
+ if ':' in host_port:
+ host, port = host_port.split(':', 1)
+ else:
+ host = host_port
+
+ if port:
+ port = int(port)
+ else:
+ port = dict(https=443, http=80)[method]
+
+ proxy_type = 3 # socks.PROXY_TYPE_HTTP
+ return ProxyInfo(
+ proxy_type = proxy_type,
+ proxy_host = host,
+ proxy_port = port,
+ proxy_user = username or None,
+ proxy_pass = password or None,
+ )
+
+
class HTTPConnectionWithTimeout(httplib.HTTPConnection):
"""
HTTPConnection subclass that supports timeouts
@@ -1064,16 +1063,15 @@
raise ImportError # Bail out; we're not actually running on App Engine.
from google.appengine.api.urlfetch import fetch
from google.appengine.api.urlfetch import InvalidURLError
- from google.appengine.api.urlfetch import DownloadError
- from google.appengine.api.urlfetch import ResponseTooLargeError
- from google.appengine.api.urlfetch import SSLCertificateError
-
class ResponseDict(dict):
- """Is a dictionary that also has a read() method, so
- that it can pass itself off as an httlib.HTTPResponse()."""
+ """Dictionary with a read() method; can pass off as httplib.HTTPResponse."""
+ def __init__(self, *args, **kwargs):
+ self.content = kwargs.pop('content', None)
+ return super(ResponseDict, self).__init__(*args, **kwargs)
+
def read(self):
- pass
+ return self.content
class AppEngineHttpConnection(object):
@@ -1110,17 +1108,14 @@
headers=headers, allow_truncated=False, follow_redirects=False,
deadline=self.timeout,
validate_certificate=self.validate_certificate)
- self.response = ResponseDict(response.headers)
+ self.response = ResponseDict(response.headers, content=response.content)
self.response['status'] = str(response.status_code)
self.response['reason'] = httplib.responses.get(response.status_code, 'Ok')
self.response.status = response.status_code
- setattr(self.response, 'read', lambda : response.content)
# Make sure the exceptions raised match the exceptions expected.
except InvalidURLError:
raise socket.gaierror('')
- except (DownloadError, ResponseTooLargeError, SSLCertificateError):
- raise httplib.HTTPException()
def getresponse(self):
if self.response:
@@ -1171,7 +1166,7 @@
and more.
"""
def __init__(self, cache=None, timeout=None,
- proxy_info=ProxyInfo.from_environment,
+ proxy_info=proxy_info_from_environment,
ca_certs=None, disable_ssl_certificate_validation=False):
"""If 'cache' is a string then it is used as a directory name for
a disk cache. Otherwise it must be an object that supports the
@@ -1185,7 +1180,7 @@
`proxy_info` may be:
- a callable that takes the http scheme ('http' or 'https') and
returns a ProxyInfo instance per request. By default, uses
- ProxyInfo.from_environment.
+ proxy_nfo_from_environment.
- a ProxyInfo instance (static proxy config).
- None (proxy disabled).
@@ -1239,6 +1234,20 @@
# Keep Authorization: headers on a redirect.
self.forward_authorization_headers = False
+ def __getstate__(self):
+ state_dict = copy.copy(self.__dict__)
+ # In case request is augmented by some foreign object such as
+ # credentials which handle auth
+ if 'request' in state_dict:
+ del state_dict['request']
+ if 'connections' in state_dict:
+ del state_dict['connections']
+ return state_dict
+
+ def __setstate__(self, state):
+ self.__dict__.update(state)
+ self.connections = {}
+
def _auth_from_challenge(self, host, request_uri, headers, response, content):
"""A generator that creates Authorization objects
that can be applied to requests.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python2/httplib2/__init__.py.rej new/httplib2-0.7.7/python2/httplib2/__init__.py.rej
--- old/httplib2-0.7.6/python2/httplib2/__init__.py.rej 1970-01-01 01:00:00.000000000 +0100
+++ new/httplib2-0.7.7/python2/httplib2/__init__.py.rej 2012-11-16 14:20:22.000000000 +0100
@@ -0,0 +1,21 @@
+--- __init__.py
++++ __init__.py
+@@ -828,7 +828,7 @@
+
+ and more.
+ """
+- def __init__(self, cache=None, timeout=None, proxy_info=None):
++ def __init__(self, cache=None, timeout=None, proxy_info=None, tries=2):
+ """
+ The value of proxy_info is a ProxyInfo instance.
+
+@@ -840,6 +840,9 @@
+ then Python's default timeout for sockets will be used. See
+ for example the docs of socket.setdefaulttimeout():
+ http://docs.python.org/library/socket.html#socket.setdefaulttimeout
++
++ A request will be tried `tries` times if it fails.
++
+ """
+ self.proxy_info = proxy_info
+ # Map domain name to an httplib connection
Files old/httplib2-0.7.6/python2/httplib2/__init__.pyc-2.4 and new/httplib2-0.7.7/python2/httplib2/__init__.pyc-2.4 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python2/httplib2/cacerts.txt new/httplib2-0.7.7/python2/httplib2/cacerts.txt
--- old/httplib2-0.7.6/python2/httplib2/cacerts.txt 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python2/httplib2/cacerts.txt 2012-11-16 14:20:22.000000000 +0100
@@ -712,3 +712,28 @@
W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
-----END CERTIFICATE-----
+GeoTrust Global CA
+==================
+
+-----BEGIN CERTIFICATE-----
+MIIDfTCCAuagAwIBAgIDErvmMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT
+MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0
+aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDIwNTIxMDQwMDAwWhcNMTgwODIxMDQwMDAw
+WjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UE
+AxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9m
+OSm9BXiLnTjoBbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIu
+T8rxh0PBFpVXLVDviS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6c
+JmTM386DGXHKTubU1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmR
+Cw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5asz
+PeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo4HwMIHtMB8GA1UdIwQYMBaAFEjm
+aPkr0rKV10fYIyAQTzOYkJ/UMB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrM
+TjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjA6BgNVHR8EMzAxMC+g
+LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDBO
+BgNVHSAERzBFMEMGBFUdIAAwOzA5BggrBgEFBQcCARYtaHR0cHM6Ly93d3cuZ2Vv
+dHJ1c3QuY29tL3Jlc291cmNlcy9yZXBvc2l0b3J5MA0GCSqGSIb3DQEBBQUAA4GB
+AHbhEm5OSxYShjAGsoEIz/AIx8dxfmbuwu3UOx//8PDITtZDOLC5MH0Y0FWDomrL
+NhGc6Ehmo21/uBPUR/6LWlxz/K7ZGzIZOKuXNBSqltLroxwUCEm2u+WR74M26x1W
+b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S
+-----END CERTIFICATE-----
+
Files old/httplib2-0.7.6/python2/httplib2/iri2uri.pyc-2.4 and new/httplib2-0.7.7/python2/httplib2/iri2uri.pyc-2.4 differ
Files old/httplib2-0.7.6/python2/httplib2/socks.pyc-2.4 and new/httplib2-0.7.7/python2/httplib2/socks.pyc-2.4 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python2/httplib2.egg-info/SOURCES.txt new/httplib2-0.7.7/python2/httplib2.egg-info/SOURCES.txt
--- old/httplib2-0.7.6/python2/httplib2.egg-info/SOURCES.txt 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python2/httplib2.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-MANIFEST.in
-README
-setup.py
-python2/httplib2test.py
-python2/httplib2test_appengine.py
-python2/httplib2/__init__.py
-python2/httplib2/iri2uri.py
-python2/httplib2/socks.py
-python2/httplib2.egg-info/PKG-INFO
-python2/httplib2.egg-info/SOURCES.txt
-python2/httplib2.egg-info/dependency_links.txt
-python2/httplib2.egg-info/top_level.txt
-python2/httplib2/test/__init__.py
-python2/httplib2/test/miniserver.py
-python2/httplib2/test/other_cacerts.txt
-python2/httplib2/test/smoke_test.py
-python2/httplib2/test/test_no_socket.py
-python2/httplib2/test/brokensocket/socket.py
-python2/httplib2/test/functional/test_proxies.py
-python3/httplib2test.py
-python3/httplib2/__init__.py
-python3/httplib2/iri2uri.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python2/httplib2.egg-info/dependency_links.txt new/httplib2-0.7.7/python2/httplib2.egg-info/dependency_links.txt
--- old/httplib2-0.7.6/python2/httplib2.egg-info/dependency_links.txt 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python2/httplib2.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python2/httplib2.egg-info/top_level.txt new/httplib2-0.7.7/python2/httplib2.egg-info/top_level.txt
--- old/httplib2-0.7.6/python2/httplib2.egg-info/top_level.txt 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python2/httplib2.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-httplib2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python2/httplib2test.py new/httplib2-0.7.7/python2/httplib2test.py
--- old/httplib2-0.7.6/python2/httplib2test.py 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python2/httplib2test.py 2012-11-16 14:20:22.000000000 +0100
@@ -20,6 +20,7 @@
import httplib
import httplib2
import os
+import pickle
import socket
import sys
import time
@@ -722,21 +723,22 @@
self.assertEqual(response.fromcache, False, msg="Should not be from cache")
def testNoVary(self):
+ pass
# when there is no vary, a different Accept header (e.g.) should not
# impact if the cache is used
# test that the vary header is not sent
- uri = urlparse.urljoin(base, "vary/no-vary.asis")
- (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
- self.assertEqual(response.status, 200)
- self.assertFalse(response.has_key('vary'))
-
- (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
- self.assertEqual(response.status, 200)
- self.assertEqual(response.fromcache, True, msg="Should be from cache")
-
- (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/html'})
- self.assertEqual(response.status, 200)
- self.assertEqual(response.fromcache, True, msg="Should be from cache")
+ # uri = urlparse.urljoin(base, "vary/no-vary.asis")
+ # (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
+ # self.assertEqual(response.status, 200)
+ # self.assertFalse(response.has_key('vary'))
+
+ # (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
+ # self.assertEqual(response.status, 200)
+ # self.assertEqual(response.fromcache, True, msg="Should be from cache")
+ #
+ # (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/html'})
+ # self.assertEqual(response.status, 200)
+ # self.assertEqual(response.fromcache, True, msg="Should be from cache")
def testVaryHeaderDouble(self):
uri = urlparse.urljoin(base, "vary/accept-double.asis")
@@ -1182,6 +1184,40 @@
for c in self.http.connections.values():
self.assertEqual(None, c.sock)
+ def testPickleHttp(self):
+ pickled_http = pickle.dumps(self.http)
+ new_http = pickle.loads(pickled_http)
+
+ self.assertEqual(sorted(new_http.__dict__.keys()),
+ sorted(self.http.__dict__.keys()))
+ for key in new_http.__dict__:
+ if key in ('certificates', 'credentials'):
+ self.assertEqual(new_http.__dict__[key].credentials,
+ self.http.__dict__[key].credentials)
+ elif key == 'cache':
+ self.assertEqual(new_http.__dict__[key].cache,
+ self.http.__dict__[key].cache)
+ else:
+ self.assertEqual(new_http.__dict__[key],
+ self.http.__dict__[key])
+
+ def testPickleHttpWithConnection(self):
+ self.http.request('http://bitworking.org',
+ connection_type=_MyHTTPConnection)
+ pickled_http = pickle.dumps(self.http)
+ new_http = pickle.loads(pickled_http)
+
+ self.assertEqual(self.http.connections.keys(), ['http:bitworking.org'])
+ self.assertEqual(new_http.connections, {})
+
+ def testPickleCustomRequestHttp(self):
+ def dummy_request(*args, **kwargs):
+ return new_request(*args, **kwargs)
+ dummy_request.dummy_attr = 'dummy_value'
+
+ self.http.request = dummy_request
+ pickled_http = pickle.dumps(self.http)
+ self.assertFalse("S'request'" in pickled_http)
try:
import memcache
@@ -1584,13 +1620,13 @@
os.environ.update(self.orig_env)
def test_from_url(self):
- pi = httplib2.ProxyInfo.from_url('http://myproxy.example.com')
+ pi = httplib2.proxy_info_from_url('http://myproxy.example.com')
self.assertEquals(pi.proxy_host, 'myproxy.example.com')
self.assertEquals(pi.proxy_port, 80)
self.assertEquals(pi.proxy_user, None)
def test_from_url_ident(self):
- pi = httplib2.ProxyInfo.from_url('http://zoidberg:fish@someproxy:99')
+ pi = httplib2.proxy_info_from_url('http://zoidberg:fish@someproxy:99')
self.assertEquals(pi.proxy_host, 'someproxy')
self.assertEquals(pi.proxy_port, 99)
self.assertEquals(pi.proxy_user, 'zoidberg')
@@ -1598,7 +1634,7 @@
def test_from_env(self):
os.environ['http_proxy'] = 'http://myproxy.example.com:8080'
- pi = httplib2.ProxyInfo.from_environment()
+ pi = httplib2.proxy_info_from_environment()
self.assertEquals(pi.proxy_host, 'myproxy.example.com')
self.assertEquals(pi.proxy_port, 8080)
self.assertEquals(pi.bypass_hosts, [])
@@ -1607,7 +1643,7 @@
os.environ['http_proxy'] = 'http://myproxy.example.com:80'
os.environ['https_proxy'] = 'http://myproxy.example.com:81'
os.environ['no_proxy'] = 'localhost,otherhost.domain.local'
- pi = httplib2.ProxyInfo.from_environment('https')
+ pi = httplib2.proxy_info_from_environment('https')
self.assertEquals(pi.proxy_host, 'myproxy.example.com')
self.assertEquals(pi.proxy_port, 81)
self.assertEquals(pi.bypass_hosts, ['localhost',
@@ -1615,14 +1651,14 @@
def test_from_env_none(self):
os.environ.clear()
- pi = httplib2.ProxyInfo.from_environment()
+ pi = httplib2.proxy_info_from_environment()
self.assertEquals(pi, None)
def test_applies_to(self):
os.environ['http_proxy'] = 'http://myproxy.example.com:80'
os.environ['https_proxy'] = 'http://myproxy.example.com:81'
os.environ['no_proxy'] = 'localhost,otherhost.domain.local,example.com'
- pi = httplib2.ProxyInfo.from_environment()
+ pi = httplib2.proxy_info_from_environment()
self.assertFalse(pi.applies_to('localhost'))
self.assertTrue(pi.applies_to('www.google.com'))
self.assertFalse(pi.applies_to('www.example.com'))
@@ -1630,7 +1666,7 @@
def test_no_proxy_star(self):
os.environ['http_proxy'] = 'http://myproxy.example.com:80'
os.environ['NO_PROXY'] = '*'
- pi = httplib2.ProxyInfo.from_environment()
+ pi = httplib2.proxy_info_from_environment()
for host in ('localhost', '169.254.38.192', 'www.google.com'):
self.assertFalse(pi.applies_to(host))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python3/README new/httplib2-0.7.7/python3/README
--- old/httplib2-0.7.6/python3/README 1970-01-01 01:00:00.000000000 +0100
+++ new/httplib2-0.7.7/python3/README 2012-11-16 14:20:22.000000000 +0100
@@ -0,0 +1,68 @@
+httplib2 for Python 3
+
+This directory contains a port of httplib2 to Python 3. As you may
+know, Python 3 is not backward-compatible with Python 2. The biggest
+change in Python 3 (that affects httplib2) is the distinction between
+bytes and strings.
+
+To successfully use http2lib for Python 3, you absolutely must
+understand the following sentence:
+
+** THE RESPONSE HEADERS ARE STRINGS, BUT THE CONTENT BODY IS BYTES **
+
+
+Example:
+
+>>> import httplib2, pprint
+>>> h = httplib2.Http(".cache")
+>>> (resp_headers, content) = h.request("http://example.org/", "GET")
+>>> pprint.pprint(resp_headers)
+{'accept-ranges': 'bytes',
+ 'connection': 'close',
+ 'content-length': '438',
+ 'content-location': 'http://example.org/',
+ 'content-type': 'text/html; charset=UTF-8',
+ 'date': 'Fri, 29 May 2009 03:57:29 GMT',
+ 'etag': '"b80f4-1b6-80bfd280"',
+ 'last-modified': 'Tue, 15 Nov 2005 13:24:10 GMT',
+ 'server': 'Apache/2.2.3 (CentOS)',
+ 'status': '200'}
+>>> type(content)
+<class 'bytes'>
+>>> content[:49]
+b'<HTML>\r\n<HEAD>\r\n <TITLE>Example Web Page</TITLE>'
+
+
+Further reading:
+
+ * http://diveintopython3.org/strings.html
+ * http://docs.python.org/3.0/whatsnew/3.0.html#text-vs-data-instead-of-unicod…
+ * http://docs.python.org/3.0/howto/unicode.html
+
+
+--------------------------------------------------------------------
+Httplib2 Software License
+
+Copyright (c) 2006 by Joe Gregorio
+Copyright (c) 2009 by Mark Pilgrim
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python3/httplib2/__init__.py new/httplib2-0.7.7/python3/httplib2/__init__.py
--- old/httplib2-0.7.6/python3/httplib2/__init__.py 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python3/httplib2/__init__.py 2012-11-16 14:20:22.000000000 +0100
@@ -24,7 +24,7 @@
"Louis Nyffenegger",
"Mark Pilgrim"]
__license__ = "MIT"
-__version__ = "0.7.6"
+__version__ = "0.7.7"
import re
import sys
@@ -732,6 +732,56 @@
return socks and (self.proxy_host != None) and (self.proxy_port != None)
+def proxy_info_from_environment(method='http'):
+ """
+ Read proxy info from the environment variables.
+ """
+ if method not in ('http', 'https'):
+ return
+
+ env_var = method + '_proxy'
+ url = os.environ.get(env_var, os.environ.get(env_var.upper()))
+ if not url:
+ return
+ return proxy_info_from_url(url, method)
+
+
+def proxy_info_from_url(url, method='http'):
+ """
+ Construct a ProxyInfo from a URL (such as http_proxy env var)
+ """
+ url = urllib.parse.urlparse(url)
+ username = None
+ password = None
+ port = None
+ if '@' in url[1]:
+ ident, host_port = url[1].split('@', 1)
+ if ':' in ident:
+ username, password = ident.split(':', 1)
+ else:
+ password = ident
+ else:
+ host_port = url[1]
+ if ':' in host_port:
+ host, port = host_port.split(':', 1)
+ else:
+ host = host_port
+
+ if port:
+ port = int(port)
+ else:
+ port = dict(https=443, http=80)[method]
+
+ proxy_type = 3 # socks.PROXY_TYPE_HTTP
+ return ProxyInfo(
+ proxy_type = proxy_type,
+ proxy_host = host,
+ proxy_port = port,
+ proxy_user = username or None,
+ proxy_pass = password or None,
+ )
+
+
class HTTPConnectionWithTimeout(http.client.HTTPConnection):
"""HTTPConnection subclass that supports timeouts
@@ -798,8 +848,9 @@
and more.
"""
- def __init__(self, cache=None, timeout=None, proxy_info=None,
- ca_certs=None, disable_ssl_certificate_validation=False):
+ def __init__(self, cache=None, timeout=None,
+ proxy_info=proxy_info_from_environment,
+ ca_certs=None, disable_ssl_certificate_validation=False):
"""If 'cache' is a string then it is used as a directory name for
a disk cache. Otherwise it must be an object that supports the
same interface as FileCache.
@@ -812,7 +863,7 @@
`proxy_info` may be:
- a callable that takes the http scheme ('http' or 'https') and
returns a ProxyInfo instance per request. By default, uses
- ProxyInfo.from_environment.
+ proxy_info_from_environment.
- a ProxyInfo instance (static proxy config).
- None (proxy disabled).
@@ -865,6 +916,20 @@
# Keep Authorization: headers on a redirect.
self.forward_authorization_headers = False
+ def __getstate__(self):
+ state_dict = copy.copy(self.__dict__)
+ # In case request is augmented by some foreign object such as
+ # credentials which handle auth
+ if 'request' in state_dict:
+ del state_dict['request']
+ if 'connections' in state_dict:
+ del state_dict['connections']
+ return state_dict
+
+ def __setstate__(self, state):
+ self.__dict__.update(state)
+ self.connections = {}
+
def _auth_from_challenge(self, host, request_uri, headers, response, content):
"""A generator that creates Authorization objects
that can be applied to requests.
@@ -1257,8 +1322,12 @@
# info is either an email.message or
# an httplib.HTTPResponse object.
if isinstance(info, http.client.HTTPResponse):
- for key, value in info.getheaders():
- self[key.lower()] = value
+ for key, value in info.getheaders():
+ key = key.lower()
+ prev = self.get(key)
+ if prev is not None:
+ value = ', '.join((prev, value))
+ self[key] = value
self.status = info.status
self['status'] = str(self.status)
self.reason = info.reason
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python3/httplib2/__init__.py.rej new/httplib2-0.7.7/python3/httplib2/__init__.py.rej
--- old/httplib2-0.7.6/python3/httplib2/__init__.py.rej 1970-01-01 01:00:00.000000000 +0100
+++ new/httplib2-0.7.7/python3/httplib2/__init__.py.rej 2012-11-16 14:20:22.000000000 +0100
@@ -0,0 +1,99 @@
+--- __init__.py 2012-02-02 20:53:48.000000000 +0100
++++ __init__.py 2012-02-02 20:52:41.000000000 +0100
+@@ -860,13 +860,24 @@
+ raise ProxiesUnavailableError(
+ 'Proxy support missing but proxy use was requested!')
+ msg = "getaddrinfo returns an empty list"
+- for res in socket.getaddrinfo(self.host, self.port, 0,
+- socket.SOCK_STREAM):
++ if self.proxy_info and self.proxy_info.isgood():
++ use_proxy = True
++ proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass = self.proxy_info.astuple()
++ else:
++ use_proxy = False
++ if use_proxy and proxy_rdns:
++ host = proxy_host
++ port = proxy_port
++ else:
++ host = self.host
++ port = self.port
++
++ for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
+ af, socktype, proto, canonname, sa = res
+ try:
+- if self.proxy_info and self.proxy_info.isgood():
++ if use_proxy:
+ self.sock = socks.socksocket(af, socktype, proto)
+- self.sock.setproxy(*self.proxy_info.astuple())
++ self.sock.setproxy(proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass)
+ else:
+ self.sock = socket.socket(af, socktype, proto)
+ self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
+@@ -875,12 +886,16 @@
+ self.sock.settimeout(self.timeout)
+ # End of difference from httplib.
+ if self.debuglevel > 0:
+- print "connect: (%s, %s)" % (self.host, self.port)
++ print "connect: (%s, %s) ************" % (self.host, self.port)
++ if use_proxy:
++ print "proxy: %s ************" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass))
+
+ self.sock.connect((self.host, self.port) + sa[2:])
+ except socket.error, msg:
+ if self.debuglevel > 0:
+- print 'connect fail:', (self.host, self.port)
++ print "connect fail: (%s, %s)" % (self.host, self.port)
++ if use_proxy:
++ print "proxy: %s" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass))
+ if self.sock:
+ self.sock.close()
+ self.sock = None
+@@ -966,12 +981,25 @@
+ "Connect to a host on a given (SSL) port."
+
+ msg = "getaddrinfo returns an empty list"
++ if self.proxy_info and self.proxy_info.isgood():
++ use_proxy = True
++ proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass = self.proxy_info.astuple()
++ else:
++ use_proxy = False
++ if use_proxy and proxy_rdns:
++ host = proxy_host
++ port = proxy_port
++ else:
++ host = self.host
++ port = self.port
++
+ for family, socktype, proto, canonname, sockaddr in socket.getaddrinfo(
+- self.host, self.port, 0, socket.SOCK_STREAM):
++ host, port, 0, socket.SOCK_STREAM):
+ try:
+- if self.proxy_info and self.proxy_info.isgood():
++ if use_proxy:
+ sock = socks.socksocket(family, socktype, proto)
+- sock.setproxy(*self.proxy_info.astuple())
++
++ sock.setproxy(proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass)
+ else:
+ sock = socket.socket(family, socktype, proto)
+ sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
+@@ -984,6 +1012,8 @@
+ self.disable_ssl_certificate_validation, self.ca_certs)
+ if self.debuglevel > 0:
+ print "connect: (%s, %s)" % (self.host, self.port)
++ if use_proxy:
++ print "proxy: %s" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass))
+ if not self.disable_ssl_certificate_validation:
+ cert = self.sock.getpeercert()
+ hostname = self.host.split(':', 0)[0]
+@@ -1009,7 +1039,9 @@
+ raise
+ except socket.error, msg:
+ if self.debuglevel > 0:
+- print 'connect fail:', (self.host, self.port)
++ print "connect fail: (%s, %s)" % (self.host, self.port)
++ if use_proxy:
++ print "proxy: %s" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass))
+ if self.sock:
+ self.sock.close()
+ self.sock = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python3/httplib2/cacerts.txt new/httplib2-0.7.7/python3/httplib2/cacerts.txt
--- old/httplib2-0.7.6/python3/httplib2/cacerts.txt 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python3/httplib2/cacerts.txt 2012-11-16 14:20:22.000000000 +0100
@@ -712,3 +712,28 @@
W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
-----END CERTIFICATE-----
+GeoTrust Global CA
+==================
+
+-----BEGIN CERTIFICATE-----
+MIIDfTCCAuagAwIBAgIDErvmMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT
+MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0
+aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDIwNTIxMDQwMDAwWhcNMTgwODIxMDQwMDAw
+WjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UE
+AxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9m
+OSm9BXiLnTjoBbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIu
+T8rxh0PBFpVXLVDviS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6c
+JmTM386DGXHKTubU1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmR
+Cw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5asz
+PeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo4HwMIHtMB8GA1UdIwQYMBaAFEjm
+aPkr0rKV10fYIyAQTzOYkJ/UMB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrM
+TjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjA6BgNVHR8EMzAxMC+g
+LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDBO
+BgNVHSAERzBFMEMGBFUdIAAwOzA5BggrBgEFBQcCARYtaHR0cHM6Ly93d3cuZ2Vv
+dHJ1c3QuY29tL3Jlc291cmNlcy9yZXBvc2l0b3J5MA0GCSqGSIb3DQEBBQUAA4GB
+AHbhEm5OSxYShjAGsoEIz/AIx8dxfmbuwu3UOx//8PDITtZDOLC5MH0Y0FWDomrL
+NhGc6Ehmo21/uBPUR/6LWlxz/K7ZGzIZOKuXNBSqltLroxwUCEm2u+WR74M26x1W
+b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S
+-----END CERTIFICATE-----
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/python3/httplib2test.py new/httplib2-0.7.7/python3/httplib2test.py
--- old/httplib2-0.7.6/python3/httplib2test.py 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/python3/httplib2test.py 2012-11-16 14:20:22.000000000 +0100
@@ -19,6 +19,7 @@
import httplib2
import io
import os
+import pickle
import socket
import ssl
import sys
@@ -662,21 +663,22 @@
self.assertEqual(response.fromcache, False, msg="Should not be from cache")
def testNoVary(self):
+ pass
# when there is no vary, a different Accept header (e.g.) should not
# impact if the cache is used
# test that the vary header is not sent
- uri = urllib.parse.urljoin(base, "vary/no-vary.asis")
- (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
- self.assertEqual(response.status, 200)
- self.assertFalse('vary' in response)
-
- (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
- self.assertEqual(response.status, 200)
- self.assertEqual(response.fromcache, True, msg="Should be from cache")
-
- (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/html'})
- self.assertEqual(response.status, 200)
- self.assertEqual(response.fromcache, True, msg="Should be from cache")
+ # uri = urllib.parse.urljoin(base, "vary/no-vary.asis")
+ # (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
+ # self.assertEqual(response.status, 200)
+ # self.assertFalse('vary' in response)
+ #
+ # (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/plain'})
+ # self.assertEqual(response.status, 200)
+ # self.assertEqual(response.fromcache, True, msg="Should be from cache")
+ #
+ # (response, content) = self.http.request(uri, "GET", headers={'Accept': 'text/html'})
+ # self.assertEqual(response.status, 200)
+ # self.assertEqual(response.fromcache, True, msg="Should be from cache")
def testVaryHeaderDouble(self):
uri = urllib.parse.urljoin(base, "vary/accept-double.asis")
@@ -1104,6 +1106,42 @@
for c in self.http.connections.values():
self.assertEqual(None, c.sock)
+ def testPickleHttp(self):
+ pickled_http = pickle.dumps(self.http)
+ new_http = pickle.loads(pickled_http)
+
+ self.assertEqual(sorted(new_http.__dict__.keys()),
+ sorted(self.http.__dict__.keys()))
+ for key in new_http.__dict__:
+ if key in ('certificates', 'credentials'):
+ self.assertEqual(new_http.__dict__[key].credentials,
+ self.http.__dict__[key].credentials)
+ elif key == 'cache':
+ self.assertEqual(new_http.__dict__[key].cache,
+ self.http.__dict__[key].cache)
+ else:
+ self.assertEqual(new_http.__dict__[key],
+ self.http.__dict__[key])
+
+ def testPickleHttpWithConnection(self):
+ self.http.request('http://bitworking.org',
+ connection_type=_MyHTTPConnection)
+ pickled_http = pickle.dumps(self.http)
+ new_http = pickle.loads(pickled_http)
+
+ self.assertEqual(list(self.http.connections.keys()),
+ ['http:bitworking.org'])
+ self.assertEqual(new_http.connections, {})
+
+ def testPickleCustomRequestHttp(self):
+ def dummy_request(*args, **kwargs):
+ return new_request(*args, **kwargs)
+ dummy_request.dummy_attr = 'dummy_value'
+
+ self.http.request = dummy_request
+ pickled_http = pickle.dumps(self.http)
+ self.assertFalse(b"S'request'" in pickled_http)
+
try:
import memcache
class HttpTestMemCached(HttpTest):
@@ -1497,4 +1535,46 @@
end2end = httplib2._get_end2end_headers(response)
self.assertEqual(0, len(end2end))
-unittest.main()
+
+class TestProxyInfo(unittest.TestCase):
+ def setUp(self):
+ self.orig_env = dict(os.environ)
+
+ def tearDown(self):
+ os.environ.clear()
+ os.environ.update(self.orig_env)
+
+ def test_from_url(self):
+ pi = httplib2.proxy_info_from_url('http://myproxy.example.com')
+ self.assertEqual(pi.proxy_host, 'myproxy.example.com')
+ self.assertEqual(pi.proxy_port, 80)
+ self.assertEqual(pi.proxy_user, None)
+
+ def test_from_url_ident(self):
+ pi = httplib2.proxy_info_from_url('http://zoidberg:fish@someproxy:99')
+ self.assertEqual(pi.proxy_host, 'someproxy')
+ self.assertEqual(pi.proxy_port, 99)
+ self.assertEqual(pi.proxy_user, 'zoidberg')
+ self.assertEqual(pi.proxy_pass, 'fish')
+
+ def test_from_env(self):
+ os.environ['http_proxy'] = 'http://myproxy.example.com:8080'
+ pi = httplib2.proxy_info_from_environment()
+ self.assertEqual(pi.proxy_host, 'myproxy.example.com')
+ self.assertEqual(pi.proxy_port, 8080)
+
+ def test_from_env_no_proxy(self):
+ os.environ['http_proxy'] = 'http://myproxy.example.com:80'
+ os.environ['https_proxy'] = 'http://myproxy.example.com:81'
+ pi = httplib2.proxy_info_from_environment('https')
+ self.assertEqual(pi.proxy_host, 'myproxy.example.com')
+ self.assertEqual(pi.proxy_port, 81)
+
+ def test_from_env_none(self):
+ os.environ.clear()
+ pi = httplib2.proxy_info_from_environment()
+ self.assertEqual(pi, None)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httplib2-0.7.6/setup.py new/httplib2-0.7.7/setup.py
--- old/httplib2-0.7.6/setup.py 2012-09-11 19:22:02.000000000 +0200
+++ new/httplib2-0.7.7/setup.py 2012-11-16 14:20:22.000000000 +0100
@@ -5,7 +5,7 @@
import sys
pkgdir = {'': 'python%s' % sys.version_info[0]}
-VERSION = '0.7.6'
+VERSION = '0.7.7'
setup(name='httplib2',
version=VERSION,
++++++ pre_checkin.sh ++++++
#!/bin/sh
sed 's,^\(Name: *\)python-,\1python3-,;s,^\(Requires: *\)python-,\1python3-,;s,^\(BuildRequires: *\)python-,\1python3-,;s,python setup.py,python3 setup.py,;s,python_sitelib,python3_sitelib,;s,python_sitearch,python3_sitearch,' python-httplib2.spec > python3-httplib2.spec
cp python-httplib2.changes python3-httplib2.changes
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ppc64-diag for openSUSE:Factory checked in at 2013-02-25 20:40:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ppc64-diag (Old)
and /work/SRC/openSUSE:Factory/.ppc64-diag.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ppc64-diag", Maintainer is "JLoeser(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ppc64-diag/ppc64-diag.changes 2012-12-21 14:56:04.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ppc64-diag.new/ppc64-diag.changes 2013-02-25 20:40:36.000000000 +0100
@@ -1,0 +2,8 @@
+Sun Feb 24 16:46:41 UTC 2013 - dvaleev(a)suse.com
+
+- Update to 2.6.1:
+ * Add Handler to handle PRRN RTAS notification
+ * Drop upstreamed ppc64-diag.unistd.patch
+ * Update package desription
+
+-------------------------------------------------------------------
Old:
----
ppc64-diag-2.6.0.tar.gz
New:
----
ppc64-diag-2.6.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ppc64-diag.spec ++++++
--- /var/tmp/diff_new_pack.cXiJ8u/_old 2013-02-25 20:40:38.000000000 +0100
+++ /var/tmp/diff_new_pack.cXiJ8u/_new 2013-02-25 20:40:38.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ppc64-diag
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 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
@@ -18,7 +18,7 @@
Url: http://sourceforge.net/projects/linux-diag/files/ppc64-diag
Name: ppc64-diag
-Version: 2.6.0
+Version: 2.6.1
Release: 0
Summary: Linux for Power Platform Diagnostics
License: EPL-1.0
@@ -52,17 +52,16 @@
Patch0: %{name}.makefile.patch
Patch1: %{name}.rtas_errd.patch
Patch2: %{name}.varunused.patch
-Patch3: %{name}.unistd.patch
%description
-Platform diagnostics for Linux for Power writes events reported by the
-System p or System i platform firmware to the servicelog, provides
-automated reponses to urgent events such as environmental conditions
-and predictive failures, and provides notifications of the event to
-system administrators or connected service frameworks. Some error log
-analysis parameters can be configured in
-/etc/ppc64-diag/ppc64-diag.config.
-
+This package contains various diagnostic tools for PowerLinux.
+These tools captures the diagnostic events from Power Systems
+platform firmware, SES enclosures and device drivers, and
+write events to servicelog database. It also provides automated
+responses to urgent events such as environmental conditions and
+predictive failures, if appropriate modifies the FRUs fault
+indicator(s) and provides event notification to system
+administrators or connected service frameworks.
Authors:
@@ -74,7 +73,6 @@
%patch0
%patch1 -p1
%patch2 -p1
-%patch3 -p1
%build
make
++++++ ppc64-diag-2.6.0.tar.gz -> ppc64-diag-2.6.1.tar.gz ++++++
++++ 2527 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0