openSUSE Commits
Threads by month
- ----- 2024 -----
- 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
September 2019
- 1 participants
- 2151 discussions
Hello community,
here is the log from the commit of package metamath for openSUSE:Factory checked in at 2019-09-30 15:58:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/metamath (Old)
and /work/SRC/openSUSE:Factory/.metamath.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "metamath"
Mon Sep 30 15:58:01 2019 rev:3 rq:733250 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/metamath/metamath.changes 2019-06-26 16:04:00.347626998 +0200
+++ /work/SRC/openSUSE:Factory/.metamath.new.2352/metamath.changes 2019-09-30 15:58:02.717432772 +0200
@@ -1,0 +2,7 @@
+Wed Sep 25 20:34:17 UTC 2019 - Aaron Puchert <aaronpuchert(a)alice-dsl.net>
+
+- Update to version 0.178.
+- Update book to version 20190602.
+- Remove Windows executable from sources before building.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ metamath.spec ++++++
--- /var/tmp/diff_new_pack.quQBpK/_old 2019-09-30 15:58:04.321428503 +0200
+++ /var/tmp/diff_new_pack.quQBpK/_new 2019-09-30 15:58:04.325428493 +0200
@@ -1,5 +1,7 @@
-# Specification for package metamath
#
+# spec file for package metamath
+#
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016-2019 by Aaron Puchert
#
# All modifications and additions to the file contributed by third parties
@@ -11,6 +13,10 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
+
# Do not build LaTeX docs on SLES.
%if 0%{?is_opensuse}
%bcond_without latex_doc
@@ -18,11 +24,11 @@
%bcond_with latex_doc
%endif
-%define book_version 20190407
+%define book_version 20190602
# Global definitions
Name: metamath
-Version: 0.177
+Version: 0.178
Release: 0
Summary: Formal proof verifier and proof assistant
License: GPL-2.0-or-later
@@ -61,9 +67,10 @@
%package book
Summary: The Metamath book
-Version: %{book_version}
License: CC0-1.0
Group: Productivity/Scientific/Math
+Version: %{book_version}
+Release: 0
Requires: %{name} = %{VERSION}-%{release}
BuildArch: noarch
@@ -95,6 +102,7 @@
%prep
%setup -q -n %{name}
+rm metamath.exe
%build
autoreconf -fi
++++++ metamath.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/metamath/metamath.tar.bz2 /work/SRC/openSUSE:Factory/.metamath.new.2352/metamath.tar.bz2 differ: char 11, line 1
++++++ metamath.tex ++++++
++++ 2913 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/metamath/metamath.tex
++++ and /work/SRC/openSUSE:Factory/.metamath.new.2352/metamath.tex
1
0
Hello community,
here is the log from the commit of package openQA for openSUSE:Factory checked in at 2019-09-30 15:57:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openQA (Old)
and /work/SRC/openSUSE:Factory/.openQA.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openQA"
Mon Sep 30 15:57:54 2019 rev:80 rq:731726 version:4.6.1568795030.c377d780b
Changes:
--------
--- /work/SRC/openSUSE:Factory/openQA/openQA-test.changes 2019-09-18 13:12:53.248671628 +0200
+++ /work/SRC/openSUSE:Factory/.openQA.new.2352/openQA-test.changes 2019-09-30 15:57:58.573443801 +0200
@@ -1,0 +2,21 @@
+Wed Sep 18 11:58:58 UTC 2019 - coolo(a)suse.com
+
+- Update to version 4.6.1568795030.c377d780b:
+ * Fix test failures on Leap 15.1
+ * Fix warning in 24-worker-overall.t
+ * Test scheduler code for assigning multiple jobs to a worker
+ * Sort directly chained children within same parent by test name
+ * Adapt existing tests to adjustments for directly chained dependencies
+ * Assign cluster of directly chained jobs to worker
+ * Show assigned jobs as such under 'All tests'
+ * Enforce consistent WORKER_CLASS when creating directly chained dependencies
+ * Add compution of directly chained job hierarchy
+ * Verify that inserting dependency cycles is prevented
+ * Improve string formatting in scheduler code
+ * Add circleci
+ * Fix formatting of developer mode documentation
+ * Update dep graph desc for START_DIRECTLY_AFTER_TEST
+ * Update documentation for START_DIRECTLY_AFTER_TEST
+ * Ignore SQL deprecate warning when querying job modules that are running
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/openQA/openQA-worker-test.changes 2019-09-18 13:12:55.364671183 +0200
+++ /work/SRC/openSUSE:Factory/.openQA.new.2352/openQA-worker-test.changes 2019-09-30 15:57:58.609443705 +0200
@@ -2 +2 @@
-Tue Sep 17 11:09:08 UTC 2019 - coolo(a)suse.com
+Wed Sep 18 11:58:58 UTC 2019 - coolo(a)suse.com
@@ -4,226 +4,17 @@
-- Update to version 4.6.1568387059.db88ff48d:
- * Add Storable dependency
- * Remove debugging
- * Create a deepcopy of the settings
- * Always sort keys to make behaviour reproducible
- * Demonstrate what's going wrong on staging yaml
- * Fix duplicate path name
- * Update YAML guide and schema to explain custom job template names
- * Publish API schema(s) along with other docs
- * Fix some issues in the doc markup reported by asciidoc
- * Always build docs and allow local generation
- * Fix warning caused by filename getting removed from reused form hashref in Mojo::UserAgent
- * Cleanup disabled code about 'Sereal'
- * Non-experimental YAML routes with explicit schema
- * Revert back to duplicating dependencies in dockerfile (#2315)
- * Extend the requires of openQA-devel and make them easier to review (#2313)
- * Implement optional defaults.settings key in YAML
- * Fix container image to use repository paths (#2310)
- * Improve test coverage for more background jobs
- * Increase coverage by allowing Devel::Cover to collect stats for background jobs
- * Fix printing usage when invoking openqa-clone-job --help
- * Remove codecov hack that was only added to increase coverage percentage, but does not actually test anything useful
- * Scenarios can have different settings
- * docker: Use devel package instead of spelling out duplicate dependencies (#2308)
- * Cut the test result directory shorter when its length is more than 255
- * Support branch url on openqa-clone-custom-git-refspec
- * docs: Hint to 'openQA-devel' for pulling in dependencies
- * Delete unused screenshots in separate loop
- * docs: Render code correctly (#2306)
- * Allow CodeMirror to render off screen
- * Show context for REST-API errors to make debugging a little bit easier
- * Fix artefact upload errors to show the message instead of the hash address
- * Reduce coverage requirement a bit until we can make Devel::Cover include subprocesses in stats
- * Don't use 3rd set of names for passing dependencies to JS
- * Use capitalized names for module-scoped variables
- * Consider directly chained deps in several places
- * Support _START_DIRECTLY_AFTER_JOBS
- * Add dependency type for START_DIRECTLY_AFTER_TEST
- * Failed isotovideo status checks are fairly harmless, but a log message can be useful for debugging
- * Since we now expect there to be more subprocesses, there is no reason to log them as unexpected anymore
- * Do not try to reconnect the WebSocket connection in subprocesses
- * Make annoying log message debug level instead of info for now
- * Test API and upload errors
- * Test asset uploads too
- * Move artefact upload into a webui connection method so it can be easily mocked for testing
- * Add more worker upload tests
- * Fix fake WebSocket transaction to correctly defer callback execution
- * Improve test coverage of the worker job life cycle
- * Move all direct uses of Mojo::UserAgent from OpenQA::Worker::Job to client modules
- * Add new worker tests and an isotovideo client module that can be mocked easily
- * Perform isotovideo status checks non-blocking too
- * Try to defer all callbacks correctly to the next reactor tick
- * Handle exceptions in uploads
- * Make image uploads non-blocking too
- * Callbacks cannot be optional in an async application
- * Update mock worker tests to be able to deal with multiple processes handling uploads
- * Handle asset and logfile uploads in a subprocess
- * Split up upload handling into more manageable parts
- * Reuse t/test_postgresql in container test as well
- * Harmonize dependencies in cpanfile+openQA.spec
- * spec: Specify more dependencies needed for local development
- * spec: Fix test dependencies after os-autoinst removed dependencies
- * Move codemirror javascript file to javascript label (#2297)
- * spec: Fix 'devel' package (for real) with proper macro definition
- * spec: Fix error about python shebang
- * Fix 'devel' package
- * docs: Update openSUSE repos using $releasever, priorities, better names
- * spec: Add 'devel' package
- * worker job: Add log of second virtio console to upload list
- * Fix accidentally removed dependency
- * Add missing apparmor permission (#2285)
- * Remove shellcheck disable
- * Modernize bash tests
- * Fix test that did nothing
- * Fix argument handling of a function and turn background job into a real plugin
- * Remove print from test
- * Avoid using HAVING on ScreenshotLinks
- * No longer delete job modules one by one
- * Remove support for old migration
- * Use IPC::Run instead of IPC::Run::Simple
- * More code style fixes
- * Tidy developer mode test
- * Test assert_screen args with array of needle tags
- * Code style changes and unit test for current_api_function handling
- * Increase lock timeouts a bit because some jobs might just need a little more time and the risk or locks not getting cleared at the end is very low (#2280)
- * Show needle tags for assert_screen/check_screen
- * Validate tag input field in needleeditor
- * Render a diff of the job group YAML in preview/ save
- * Use purple for blocked jobs
- * Distinguish scheduled and blocked jobs on test result overview
- * Delete vim footer in files that still have it
- * Makefile: Allow again to select single test cases with PROVE_ARGS
- * Preserve QEMU PID file on pool dir cleanup if QEMU still running
- * Improve tests for triggering pool directory cleanup
- * Test support for non-ASCII chars in needle JSON only in description
- * Tweaks according to code review
- * Handle newline characters in form parameters correctly
- * Use single gru job
- * Always include the group property editor
- * Do not delete assets based on empty size
- * Remove useless quoting
- * Check finished job cout in async test
- * Increase timeout in async test
- * Remove unconditional sleeps from async test
- * Add Gru Test with Mock Api Server
- * Split Folders and Gru controllers
- * Add Rsync Queue UI
- * Use Gru for rsync
- * ObsRsync handle requests asynchronously
- * job cancel: Explicitly return a number to avoid warning
- * Fix warning about undefined $testresdir
- * Fix flaky test t/api/11-bugs.t
- * scheduler: Fix warnings about undefined variables
- * Fix rendering of the openqa.cmd
- * openqa-bootstrap: Fix logic of git clone
- * Add machine filter in 'Test result overview'
- * docs: Mention most simple installation instructions and "clone-job" first
- * docs: Add documentation for immediate bootstrap+clone
- * docs: Fix internal link
- * branding: Prevent undefined flavor in external_reporting.html.ep
- * apparmor: Allow virtio_console based on named PIPE
- * spec: Split out all dependencies properly per sub-package
- * apparmor: Allow loading of client.conf in usual home of geekotest
- * apparmor: Allow loading override templates in /etc/openqa/templates/
- * branding: Prevent warnings about undefined $distri in external_reporting.html.ep
- * Test worker behavior if _upload_log_file fails
- * Improve needle editor test
- * Change iso scheduling behavior to not obsolete older jobs anymore
- * Improve calculating preferred machine
- * Fix error when saving needle JSON with non-ASCII characters
- * Modify workaround property to support adding reason
- * Fix 30-test_parser.t warnings
- * Remove exported functions from OpenQA::File and stop using private methods as part of the public API
- * docs: Fix explanation for masquerading which is needed on all involved zones
- * docs: Simplify firewalld commands by using the runtime variants
- * docs: Make the current "firewalld" approach more prominent than old SuSEfirewall2
- * Fix PROVE_ARGS in spec file
- * docs: Remove obsolete section about "wicked < 0.6.23"
- * load_templates: fix --clean and reading perl templates
- * Do not handle arguments in reverse and move OpenQA::Files class into a proper package
- * Make worker retry-delay configurable
- * Test retry behavior of worker
- * Extend retry delay of worker to 60 seconds if web UI busy
- * Adapt codecov target to current coverage of 85%
- * Allow * placeholders in product names
- * docs: Fix marking for 2nd level list about "wicked pros"
- * Prevent over-escaping of bug titles in test result overview
- * Adjust web socket server test
- * Avoid 'return;' in web socket code
- * Fix sending web socket message when job not exists
- * Improve transaction handling in web socket server
- * AMQP: allow no message prefix
- * Fix '--no-cleanup' on worker start regression
- * Remove OpenQA::Schema::Result::Jobs::set_scheduling_worker
- * Replace Text::Markdown and HTML::Restrict with CommonMark for much better comment rendering speed and security
- * Adding a new parameter to support not schedule parent test suite
- * Timeout for wait_for_ajax
- * Let prove handle @INC for us
- * Expose saving and hiding of the legacy editor in the UI
- * Scrub dangerous HTML from comments
- * Abstract out markdown handling into a new class
- * worker: Consider ws disconnects as uncritical during job execution
- * Fix worker crash when sending job ID
- * YAML: don't merge scenarios with multiple machines with defaults
- * Add dependency on CommonMark, which will soon replace Text::Markdown for a 1000% performance increase (#2228)
- * Ignore cpu_modelname in worker test
- * Let worker pass current job ID on re-registration
- * Allow worker to pass its current job on registration
- * Improve test for checking job status and output
- * Improve error message when rejecting status update
- * Add YAML support to {dump,load}_templates
- * Add systemd timer to trigger daily audit event cleanup
- * Delete old audit events according to configured storage duration
- * AMQP: don't encode message body to JSON before publishing
- * Handle reusing existing connection in devel fullstack test
- * Improve documentation about running test of openQA itself
- * Timeout for wait_for_developer_console_contains_log_message
- * Override default exception handler in extra daemons
- * Fix default route of live handler to prevent template errors
- * Docs for the job group editor and YAML REST
- * AMQP: allow passing headers to publish_amqp
- * Add note about openQA's CLI interface
- * openqa-bootstrap: Fix lookup of configure-web-proxy
- * Improve rendering summary in test result overview
- * t/api/03-auth.t: don't actually wipe asset files from disk
- * Mojo::Pg 4.14 requires the "delete $dbh->{private_...}" feature from DBI 1.632
- * Log errors when reading worker config
- * Add type/additionalProperties to products spec
- * spec: Fix SLE12 build with patched out python subpackage
- * Start a documentation section on how to build openQA plugins
- * templates: Update references to documentation in help texts
- * docs: Update references to target versions in our issue tracker
- * Document adding new dependencies
- * Improve doc section about starting webserver from Git
++++ 49 more lines (skipped)
++++ between /work/SRC/openSUSE:Factory/openQA/openQA-worker-test.changes
++++ and /work/SRC/openSUSE:Factory/.openQA.new.2352/openQA-worker-test.changes
--- /work/SRC/openSUSE:Factory/openQA/openQA.changes 2019-09-18 13:12:56.916670856 +0200
+++ /work/SRC/openSUSE:Factory/.openQA.new.2352/openQA.changes 2019-09-30 15:57:58.653443588 +0200
@@ -1,0 +2,21 @@
+Wed Sep 18 11:58:58 UTC 2019 - coolo(a)suse.com
+
+- Update to version 4.6.1568795030.c377d780b:
+ * Fix test failures on Leap 15.1
+ * Fix warning in 24-worker-overall.t
+ * Test scheduler code for assigning multiple jobs to a worker
+ * Sort directly chained children within same parent by test name
+ * Adapt existing tests to adjustments for directly chained dependencies
+ * Assign cluster of directly chained jobs to worker
+ * Show assigned jobs as such under 'All tests'
+ * Enforce consistent WORKER_CLASS when creating directly chained dependencies
+ * Add compution of directly chained job hierarchy
+ * Verify that inserting dependency cycles is prevented
+ * Improve string formatting in scheduler code
+ * Add circleci
+ * Fix formatting of developer mode documentation
+ * Update dep graph desc for START_DIRECTLY_AFTER_TEST
+ * Update documentation for START_DIRECTLY_AFTER_TEST
+ * Ignore SQL deprecate warning when querying job modules that are running
+
+-------------------------------------------------------------------
Old:
----
openQA-4.6.1568387059.db88ff48d.obscpio
New:
----
openQA-4.6.1568795030.c377d780b.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openQA-test.spec ++++++
--- /var/tmp/diff_new_pack.XoWiZj/_old 2019-09-30 15:57:59.577441129 +0200
+++ /var/tmp/diff_new_pack.XoWiZj/_new 2019-09-30 15:57:59.581441118 +0200
@@ -18,7 +18,7 @@
%define short_name openQA
Name: %{short_name}-test
-Version: 4.6.1568387059.db88ff48d
+Version: 4.6.1568795030.c377d780b
Release: 0
Summary: Test package for openQA
License: GPL-2.0-or-later
++++++ openQA-worker-test.spec ++++++
--- /var/tmp/diff_new_pack.XoWiZj/_old 2019-09-30 15:57:59.613441033 +0200
+++ /var/tmp/diff_new_pack.XoWiZj/_new 2019-09-30 15:57:59.617441022 +0200
@@ -18,7 +18,7 @@
%define short_name openQA-worker
Name: %{short_name}-test
-Version: 4.6.1568387059.db88ff48d
+Version: 4.6.1568795030.c377d780b
Release: 0
Summary: Test package for %{short_name}
License: GPL-2.0-or-later
++++++ openQA.spec ++++++
--- /var/tmp/diff_new_pack.XoWiZj/_old 2019-09-30 15:57:59.637440969 +0200
+++ /var/tmp/diff_new_pack.XoWiZj/_new 2019-09-30 15:57:59.641440958 +0200
@@ -60,7 +60,7 @@
%define devel_requires %build_requires %test_requires rsync curl postgresql-devel qemu qemu-kvm tar postgresql-server xorg-x11-fonts sudo perl(Devel::Cover) perl(Devel::Cover::Report::Codecov) perl(Perl::Tidy)
Name: openQA
-Version: 4.6.1568387059.db88ff48d
+Version: 4.6.1568795030.c377d780b
Release: 0
Summary: The openQA web-frontend, scheduler and tools
License: GPL-2.0-or-later
++++++ openQA-4.6.1568387059.db88ff48d.obscpio -> openQA-4.6.1568795030.c377d780b.obscpio ++++++
/work/SRC/openSUSE:Factory/openQA/openQA-4.6.1568387059.db88ff48d.obscpio /work/SRC/openSUSE:Factory/.openQA.new.2352/openQA-4.6.1568795030.c377d780b.obscpio differ: char 19, line 1
++++++ openQA.obsinfo ++++++
--- /var/tmp/diff_new_pack.XoWiZj/_old 2019-09-30 15:57:59.753440661 +0200
+++ /var/tmp/diff_new_pack.XoWiZj/_new 2019-09-30 15:57:59.757440649 +0200
@@ -1,5 +1,5 @@
name: openQA
-version: 4.6.1568387059.db88ff48d
-mtime: 1568387059
-commit: db88ff48d65421d03959b543fe826cbddaca846e
+version: 4.6.1568795030.c377d780b
+mtime: 1568795030
+commit: c377d780b5414476e252b799775e081ba75f1f25
1
0
Hello community,
here is the log from the commit of package texlive for openSUSE:Factory checked in at 2019-09-30 15:57:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texlive (Old)
and /work/SRC/openSUSE:Factory/.texlive.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "texlive"
Mon Sep 30 15:57:32 2019 rev:56 rq:733764 version:unknown
Changes:
--------
--- /work/SRC/openSUSE:Factory/texlive/texlive.changes 2019-08-23 11:03:48.686511334 +0200
+++ /work/SRC/openSUSE:Factory/.texlive.new.2352/texlive.changes 2019-09-30 15:57:34.641507490 +0200
@@ -1,0 +2,8 @@
+Fri Sep 20 20:12:25 UTC 2019 - Michael Gorse <mgorse(a)suse.com>
+
+- Ensure that pdftoepdf-poppler-0.75.0.cc is used for any version
+ of poppler >= 0.79.0. Fixes the build with 0.80.0.
+- Update source-poppler0.79.0.patch, since we now patch before
+ copying.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ texlive.spec ++++++
--- /var/tmp/diff_new_pack.h3equs/_old 2019-09-30 15:57:36.989501242 +0200
+++ /var/tmp/diff_new_pack.h3equs/_new 2019-09-30 15:57:36.993501231 +0200
@@ -3664,9 +3664,12 @@
%if %{?pkg_vcmp:%{pkg_vcmp libpoppler-devel >= 0.69.0}}%{!?pkg_vcmp:0}
%patch57 -p1 -b .popplerdict
%endif
-cp ./texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc ./texk/web2c/pdftexdir/pdftoepdf-poppler0.79.0.cc
%if %{?pkg_vcmp:%{pkg_vcmp libpoppler-devel >= 0.73.0}}%{!?pkg_vcmp:0}
-%patch58 -p1 -b .poppler79
+%patch58 -p1 -b .poppler75
+%endif
+pver=$(pkg-config --modversion poppler)
+%if %{?pkg_vcmp:%{pkg_vcmp libpoppler-devel >= 0.79.0}}%{!?pkg_vcmp:0}
+cp ./texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc ./texk/web2c/pdftexdir/pdftoepdf-poppler${pver}.cc
%endif
if pkg-config --atleast-version=0.59 poppler
@@ -3685,7 +3688,6 @@
test -e "$old" && mv -fv $old $old.oldpoppler || :
mv -fv $cc $old
done
- pver=$(pkg-config --modversion poppler)
for cc in $(find -name "*-poppler${pver}.cc")
do
test -e "$cc" || continue
++++++ source-poppler0.79.0.patch ++++++
--- /var/tmp/diff_new_pack.h3equs/_old 2019-09-30 15:57:37.057501060 +0200
+++ /var/tmp/diff_new_pack.h3equs/_new 2019-09-30 15:57:37.057501060 +0200
@@ -35,10 +35,10 @@
for (n = 0; n < nObjects; ++n) {
obj1 = parser->getObj();
obj2 = parser->getObj();
-diff --git a/texk/web2c/pdftexdir/pdftoepdf-poppler0.79.0.cc b/texk/web2c/pdftexdir/pdftoepdf-poppler0.79.0.cc
+diff --git a/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc b/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc
index 13c3bd5..ea78179 100644
---- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.79.0.cc
-+++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.79.0.cc
+--- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc
++++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc
@@ -760,8 +760,8 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
LinkDest *link = pdf_doc->doc->findDest(&name);
if (link == 0 || !link->isOk())
1
0
Hello community,
here is the log from the commit of package python-web.py for openSUSE:Factory checked in at 2019-09-30 15:57:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-web.py (Old)
and /work/SRC/openSUSE:Factory/.python-web.py.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-web.py"
Mon Sep 30 15:57:24 2019 rev:9 rq:733746 version:0.40
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-web.py/python-web.py.changes 2019-03-19 10:01:00.155915375 +0100
+++ /work/SRC/openSUSE:Factory/.python-web.py.new.2352/python-web.py.changes 2019-09-30 15:57:27.905525416 +0200
@@ -1,0 +2,25 @@
+Fri Sep 27 19:16:21 UTC 2019 - Michael Ströder <michael(a)stroeder.com>
+
+- Updated to 0.40
+ * Fixed lots of Python-3 compatibility issues.
+ * Drop support for Python 2.3 and 2.4.
+ * Allow to get data from PATCH request (fixes #259, tx @kufd)
+ * Only store new session data if the data is non-default (fixes #161, tx @shish)
+ * Supports `SameSite` cookie attribute (fixes #61 #99 #337)
+ * Cookie expire time is now set to same as session `timeout` (fixes #409 #410)
+ * Supports url for SQLite database like `sqlite:///mydb.sqlite`,
+ `sqlite:////absolute/path/mydb.sqlite` (fixes #209, tx @iamFIREcracker)
+ * Allow HTML5 form input elements in `web.form.Input()` (fixes #440, tx @jimgregory)
+ * Return body for `NoMethod` error handler (fixes #240, tx @waldhol)
+ * Fixed unicode in request url (fixes #461, tx @schneidersoft)
+ * Fixed inline comment in Templator which leads to unexpected behavior (fixes #432, tx @lucylqe)
+ * Fixed missing exception (ValueError) for socket.inet_pton to be compatible
+ with twisted patched `socket.inet_pton` (fixes #464, tx @tclh123)
+ * Fixed incorrect order of arguments for sending email with boto (fixes #204, tx @asldevi)
+ * Fixed notfound message is not utf-8 charset (fixes #500, tx @by-z)
+ * Fixed error in creating pooled PostgresDB with pgdb driver (fixes #255, tx @PriceChild)
+ * Fixed: IP address which contains space should not pass validation (fixes #140, tx @chuangbo)
+ * Fixed incorrect returned row ids with `multiple_insert()` (fixes #263 #447)
+ * Fixed not correctly render the `id` attribute after changed (fixes #339, tx @jimgregory)
+
+-------------------------------------------------------------------
Old:
----
web.py-0.39.tar.gz
New:
----
web.py-0.40.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-web.py.spec ++++++
--- /var/tmp/diff_new_pack.ZO1xrr/_old 2019-09-30 15:57:28.821522979 +0200
+++ /var/tmp/diff_new_pack.ZO1xrr/_new 2019-09-30 15:57:28.825522968 +0200
@@ -15,9 +15,10 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-web.py
-Version: 0.39
+Version: 0.40
Release: 0
Url: http://webpy.org/
Summary: web.py: makes web apps
@@ -26,12 +27,10 @@
Source: https://pypi.io/packages/source/w/web.py/web.py-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
-BuildRequires: python-setuptools
-%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
+BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
BuildArch: noarch
-%endif
+%python_subpackages
%description
Think about the ideal way to write a web app. Write the code to make it happen.
@@ -40,12 +39,13 @@
%setup -q -n web.py-%{version}
%build
-python setup.py build
+%python_build
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%files
+%files %{python_files}
%defattr(-,root,root,-)
%{python_sitelib}/*
++++++ web.py-0.39.tar.gz -> web.py-0.40.tar.gz ++++++
++++ 17300 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-dateparser for openSUSE:Factory checked in at 2019-09-30 15:57:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dateparser (Old)
and /work/SRC/openSUSE:Factory/.python-dateparser.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dateparser"
Mon Sep 30 15:57:06 2019 rev:2 rq:733872 version:0.7.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dateparser/python-dateparser.changes 2019-09-23 12:16:50.097812403 +0200
+++ /work/SRC/openSUSE:Factory/.python-dateparser.new.2352/python-dateparser.changes 2019-09-30 15:57:09.505574384 +0200
@@ -1,0 +2,25 @@
+Sat Sep 21 19:14:39 UTC 2019 - Arun Persaud <arun(a)gmx.de>
+
+- specfile:
+ * be more precise in %file section
+
+- update to version 0.7.2:
+ * Features:
+ + Extended Czech support
+ + Added time to valid periods
+ + Added timezone information to dates found with search_dates()
+ + Support strings as date formats
+ * Improvements:
+ + Fixed Collections ABCs depreciation warning
+ + Fixed dates with trailing colons not being parsed
+ + Fixed date format override on any settings change
+ + Fixed parsing current weekday as past date, regardless of
+ settings
+ + Added UTC -2:30 as a valid offset
+ + Added Python 3.7 to supported versions, dropped support for
+ Python 3.3 and 3.4
+ + Moved to importlib from imp where possible
+ + Improved support for Catalan
+ + Documentation improvements
+
+-------------------------------------------------------------------
Old:
----
dateparser-0.7.1.tar.gz
New:
----
dateparser-0.7.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-dateparser.spec ++++++
--- /var/tmp/diff_new_pack.NqfNgC/_old 2019-09-30 15:57:10.081572851 +0200
+++ /var/tmp/diff_new_pack.NqfNgC/_new 2019-09-30 15:57:10.085572840 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-dateparser
-Version: 0.7.1
+Version: 0.7.2
Release: 0
Summary: Date parsing library designed to parse dates from HTML pages
License: BSD-3-Clause
@@ -74,6 +74,11 @@
%files %{python_files}
%doc AUTHORS.rst README.rst
%license LICENSE
-%{python_sitelib}/*
+%dir %{python_sitelib}/dateparser
+%{python_sitelib}/dateparser/*
+%dir %{python_sitelib}/dateparser_data
+%{python_sitelib}/dateparser_data/*
+%dir %{python_sitelib}/dateparser-%{version}-py*.egg-info
+%{python_sitelib}/dateparser-%{version}-py*.egg-info
%changelog
++++++ dateparser-0.7.1.tar.gz -> dateparser-0.7.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/AUTHORS.rst new/dateparser-0.7.2/AUTHORS.rst
--- old/dateparser-0.7.1/AUTHORS.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/AUTHORS.rst 2019-09-17 12:57:56.000000000 +0200
@@ -7,16 +7,19 @@
----------
* Adam LeVasseur
+* Adrián Chaves
* Ahmad Musaffa
* Alec Koumjian
* Alexis Svinartchouk
* Ammar Azif
+* Anderson Berg
* Andrés Portillo
-* Andrey Zhelnin
* Andrey Rahmatullin
+* Andrey Zhelnin
* Artur Sadurski
* Artur Gaspar
* atchoum31
+* Atul Krishna
* Benjamin Bach
* Bruno Alla
* Cesar Flores
@@ -26,6 +29,8 @@
* David Beitey
* Dawid Wolski
* demelziraptor
+* Derek Schmidt
+* Dongkuo Ma
* Edwin Zhang
* Elena Zakharova
* Elias Dorneles
@@ -34,13 +39,18 @@
* Fernando Tricas García
* Georgi Valkov
* Hristo Vrigazov
+* Hugo van Kemenade
* ishirav
* Ismael Carnales
* James M. Allen
* Ján Jančár
+* Jan Rygl
+* Jakub Kukul
* Jolo Balbin
* Joseph Kahn
+* Kishan Mehta
* Konstantin Lopuhin
+* Marc Hernández
* Mark Baas
* Marko Horvatić
* Mateusz Golewski
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/HISTORY.rst new/dateparser-0.7.2/HISTORY.rst
--- old/dateparser-0.7.1/HISTORY.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/HISTORY.rst 2019-09-17 12:57:56.000000000 +0200
@@ -3,6 +3,30 @@
History
=======
+0.7.2 (2019-09-17)
+------------------
+
+Features:
+
+* Extended Czech support
+* Added `time` to valid periods
+* Added timezone information to dates found with `search_dates()`
+* Support strings as date formats
+
+
+Improvements:
+
+* Fixed Collections ABCs depreciation warning
+* Fixed dates with trailing colons not being parsed
+* Fixed date format override on any settings change
+* Fixed parsing current weekday as past date, regardless of settings
+* Added UTC -2:30 as a valid offset
+* Added Python 3.7 to supported versions, dropped support for Python 3.3 and 3.4
+* Moved to importlib from imp where possible
+* Improved support for Catalan
+* Documentation improvements
+
+
0.7.1 (2019-02-12)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/PKG-INFO new/dateparser-0.7.2/PKG-INFO
--- old/dateparser-0.7.1/PKG-INFO 2019-02-12 22:44:08.000000000 +0100
+++ new/dateparser-0.7.2/PKG-INFO 2019-09-17 12:59:32.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: dateparser
-Version: 0.7.1
+Version: 0.7.2
Summary: Date parsing library designed to parse dates from HTML pages
Home-page: https://github.com/scrapinghub/dateparser
Author: Scrapinghub
@@ -11,16 +11,16 @@
====================================================
.. image:: https://img.shields.io/travis/scrapinghub/dateparser/master.svg?style=flat-…
- :target: https://travis-ci.org/scrapinghub/dateparser
- :alt: travis build status
+ :target: https://travis-ci.org/scrapinghub/dateparser
+ :alt: travis build status
.. image:: https://img.shields.io/pypi/v/dateparser.svg?style=flat-square
- :target: https://pypi.python.org/pypi/dateparser
- :alt: pypi version
+ :target: https://pypi.python.org/pypi/dateparser
+ :alt: pypi version
.. image:: https://readthedocs.org/projects/dateparser/badge/?version=latest
- :target: http://dateparser.readthedocs.org/en/latest/?badge=latest
- :alt: Documentation Status
+ :target: http://dateparser.readthedocs.org/en/latest/?badge=latest
+ :alt: Documentation Status
.. image:: https://codecov.io/gh/scrapinghub/dateparser/branch/master/graph/badge.svg
:target: https://codecov.io/gh/scrapinghub/dateparser
@@ -474,13 +474,13 @@
* Hijri/Islamic Calendar. For more information, refer to `Hijri Calendar <https://en.wikipedia.org/wiki/Islamic_calendar>`_.
- >>> from dateparser.calendars.jalali import JalaliCalendar
- >>> JalaliCalendar(u'جمعه سی ام اسفند ۱۳۸۷').get_date()
- {'date_obj': datetime.datetime(2009, 3, 20, 0, 0), 'period': 'day'}
-
- >>> from dateparser.calendars.hijri import HijriCalendar
- >>> HijriCalendar(u'17-01-1437 هـ 08:30 مساءً').get_date()
- {'date_obj': datetime.datetime(2015, 10, 30, 20, 30), 'period': 'day'}
+ >>> from dateparser.calendars.jalali import JalaliCalendar
+ >>> JalaliCalendar(u'جمعه سی ام اسفند ۱۳۸۷').get_date()
+ {'date_obj': datetime.datetime(2009, 3, 20, 0, 0), 'period': 'day'}
+
+ >>> from dateparser.calendars.hijri import HijriCalendar
+ >>> HijriCalendar(u'17-01-1437 هـ 08:30 مساءً').get_date()
+ {'date_obj': datetime.datetime(2015, 10, 30, 20, 30), 'period': 'day'}
.. note:: `HijriCalendar` has some limitations with Python 3.
.. note:: For `Finnish` language, please specify `settings={'SKIP_TOKENS': []}` to correctly parse freshness dates.
@@ -497,6 +497,30 @@
History
=======
+ 0.7.2 (2019-09-17)
+ ------------------
+
+ Features:
+
+ * Extended Czech support
+ * Added `time` to valid periods
+ * Added timezone information to dates found with `search_dates()`
+ * Support strings as date formats
+
+
+ Improvements:
+
+ * Fixed Collections ABCs depreciation warning
+ * Fixed dates with trailing colons not being parsed
+ * Fixed date format override on any settings change
+ * Fixed parsing current weekday as past date, regardless of settings
+ * Added UTC -2:30 as a valid offset
+ * Added Python 3.7 to supported versions, dropped support for Python 3.3 and 3.4
+ * Moved to importlib from imp where possible
+ * Improved support for Catalan
+ * Documentation improvements
+
+
0.7.1 (2019-02-12)
------------------
@@ -744,9 +768,9 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/README.rst new/dateparser-0.7.2/README.rst
--- old/dateparser-0.7.1/README.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/README.rst 2019-09-17 12:57:56.000000000 +0200
@@ -3,16 +3,16 @@
====================================================
.. image:: https://img.shields.io/travis/scrapinghub/dateparser/master.svg?style=flat-…
- :target: https://travis-ci.org/scrapinghub/dateparser
- :alt: travis build status
+ :target: https://travis-ci.org/scrapinghub/dateparser
+ :alt: travis build status
.. image:: https://img.shields.io/pypi/v/dateparser.svg?style=flat-square
- :target: https://pypi.python.org/pypi/dateparser
- :alt: pypi version
+ :target: https://pypi.python.org/pypi/dateparser
+ :alt: pypi version
.. image:: https://readthedocs.org/projects/dateparser/badge/?version=latest
- :target: http://dateparser.readthedocs.org/en/latest/?badge=latest
- :alt: Documentation Status
+ :target: http://dateparser.readthedocs.org/en/latest/?badge=latest
+ :alt: Documentation Status
.. image:: https://codecov.io/gh/scrapinghub/dateparser/branch/master/graph/badge.svg
:target: https://codecov.io/gh/scrapinghub/dateparser
@@ -466,13 +466,13 @@
* Hijri/Islamic Calendar. For more information, refer to `Hijri Calendar <https://en.wikipedia.org/wiki/Islamic_calendar>`_.
- >>> from dateparser.calendars.jalali import JalaliCalendar
- >>> JalaliCalendar(u'جمعه سی ام اسفند ۱۳۸۷').get_date()
- {'date_obj': datetime.datetime(2009, 3, 20, 0, 0), 'period': 'day'}
-
- >>> from dateparser.calendars.hijri import HijriCalendar
- >>> HijriCalendar(u'17-01-1437 هـ 08:30 مساءً').get_date()
- {'date_obj': datetime.datetime(2015, 10, 30, 20, 30), 'period': 'day'}
+ >>> from dateparser.calendars.jalali import JalaliCalendar
+ >>> JalaliCalendar(u'جمعه سی ام اسفند ۱۳۸۷').get_date()
+ {'date_obj': datetime.datetime(2009, 3, 20, 0, 0), 'period': 'day'}
+
+ >>> from dateparser.calendars.hijri import HijriCalendar
+ >>> HijriCalendar(u'17-01-1437 هـ 08:30 مساءً').get_date()
+ {'date_obj': datetime.datetime(2015, 10, 30, 20, 30), 'period': 'day'}
.. note:: `HijriCalendar` has some limitations with Python 3.
.. note:: For `Finnish` language, please specify `settings={'SKIP_TOKENS': []}` to correctly parse freshness dates.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/__init__.py new/dateparser-0.7.2/dateparser/__init__.py
--- old/dateparser-0.7.1/dateparser/__init__.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/__init__.py 2019-09-17 12:57:56.000000000 +0200
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-__version__ = '0.7.1'
+__version__ = '0.7.2'
from .date import DateDataParser
from .conf import apply_settings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/calendars/__init__.py new/dateparser-0.7.2/dateparser/calendars/__init__.py
--- old/dateparser-0.7.1/dateparser/calendars/__init__.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/calendars/__init__.py 2019-09-17 12:57:56.000000000 +0200
@@ -115,7 +115,7 @@
directive == '%m' and
token_len <= 2 and
is_digit and
- int(token) >= 1 and int(token) <= 12
+ 1 <= int(token) <= 12
):
month = int(token)
elif directive == '%B' and self._months and token in self._months:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/conf.py new/dateparser-0.7.2/dateparser/conf.py
--- old/dateparser-0.7.1/dateparser/conf.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/conf.py 2019-09-17 12:57:56.000000000 +0200
@@ -17,6 +17,8 @@
* `TIMEZONE`: defaults to `UTC`. Can be timezone abbreviation or any of `tz database name as given here <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`_.
* `RETURN_AS_TIMEZONE_AWARE`: return tz aware datetime objects in case timezone is detected in the date string.
* `RELATIVE_BASE`: count relative date from this base date. Should be datetime object.
+ * `RETURN_TIME_AS_PERIOD`: returns period as `time` in case time component is detected in the date string.
+ Default: False.
"""
_default = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/data/date_translation_data/ca.py new/dateparser-0.7.2/dateparser/data/date_translation_data/ca.py
--- old/dateparser-0.7.1/dateparser/data/date_translation_data/ca.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/data/date_translation_data/ca.py 2019-09-17 12:57:56.000000000 +0200
@@ -160,13 +160,17 @@
"in 1 week": [
"la setmana que ve",
"la setm que ve",
- "setm vinent"
+ "setm vinent",
+ "la setmana vinent",
+ "la pròxima setmana",
+ "la propera setmana"
],
"1 day ago": [
"ahir"
],
"0 day ago": [
- "avui"
+ "avui",
+ "hui"
],
"in 1 day": [
"demà"
@@ -179,6 +183,21 @@
],
"0 second ago": [
"ara"
+ ],
+ "2 day ago": [
+ "despús-ahir",
+ "abans-d’ahir",
+ "dellà-ahir"
+ ],
+ "in 2 day": [
+ "endemà",
+ "sendemà",
+ "despús-demà",
+ "demà passat",
+ "passat demà"
+ ],
+ "in 3 day": [
+ "endemà passat"
]
},
"relative-type-regex": {
@@ -260,6 +279,10 @@
}
},
"skip": [
+ "de",
+ "del",
+ "l'",
+ "i",
" ",
".",
",",
@@ -272,5 +295,20 @@
"[",
"]",
","
+ ],
+ "pertain": [
+ "de",
+ "del"
+ ],
+ "in": [
+ "en"
+ ],
+ "simplifications": [
+ {
+ "una": "1"
+ },
+ {
+ "un": "1"
+ }
]
}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/data/date_translation_data/cs.py new/dateparser-0.7.2/dateparser/data/date_translation_data/cs.py
--- old/dateparser-0.7.1/dateparser/data/date_translation_data/cs.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/data/date_translation_data/cs.py 2019-09-17 12:57:56.000000000 +0200
@@ -76,7 +76,8 @@
"wednesday": [
"středa",
"st",
- "Stř"
+ "Stř",
+ "Středu"
],
"thursday": [
"čtvrtek",
@@ -91,12 +92,14 @@
"saturday": [
"sobota",
"so",
- "Sob"
+ "Sob",
+ "Sobotu"
],
"sunday": [
"neděle",
"ne",
- "Ned"
+ "Ned",
+ "Neděli"
],
"am": [
"dop"
@@ -107,7 +110,8 @@
"year": [
"rok",
"r",
- "roků"
+ "roků",
+ "roky"
],
"month": [
"měsíc",
@@ -118,7 +122,8 @@
"week": [
"týden",
"týd",
- "týdnů"
+ "týdnů",
+ "týdny"
],
"day": [
"den",
@@ -130,17 +135,23 @@
"h",
"hodin",
"hodiny",
+ "hodinu",
"hodinami"
],
"minute": [
"minuta",
"min",
- "minut"
+ "minut",
+ "minuty"
],
"second": [
"sekunda",
"s",
- "sekundy"
+ "sekundy",
+ "sekund",
+ "vteřina",
+ "vteřin",
+ "vteřiny"
],
"relative-type": {
"1 year ago": [
@@ -289,6 +300,7 @@
"před"
],
"in": [
- "ve"
+ "ve",
+ "v"
]
}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/data/date_translation_data/en.py new/dateparser-0.7.2/dateparser/data/date_translation_data/en.py
--- old/dateparser-0.7.1/dateparser/data/date_translation_data/en.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/data/date_translation_data/en.py 2019-09-17 12:57:56.000000000 +0200
@@ -782,6 +782,39 @@
},
{
"less than 1 minute ago": "45 second ago"
+ },
+ {
+ "two": "2"
+ },
+ {
+ "three": "3"
+ },
+ {
+ "four": "4"
+ },
+ {
+ "five": "5"
+ },
+ {
+ "six": "6"
+ },
+ {
+ "seven": "7"
+ },
+ {
+ "eight": "8"
+ },
+ {
+ "nine": "9"
+ },
+ {
+ "ten": "10"
+ },
+ {
+ "eleven": "11"
+ },
+ {
+ "twelve": "12"
}
]
}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/date.py new/dateparser-0.7.2/dateparser/date.py
--- old/dateparser-0.7.1/dateparser/date.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/date.py 2019-09-17 12:57:56.000000000 +0200
@@ -17,6 +17,12 @@
from dateparser.timezone_parser import pop_tz_offset_from_string
from dateparser.utils import apply_timezone_from_settings
+try:
+ # Python 3
+ from collections.abc import Set
+except ImportError:
+ # Python 2.7
+ from collections import Set
APOSTROPHE_LOOK_ALIKE_CHARS = [
u'\N{RIGHT SINGLE QUOTATION MARK}', # u'\u2019'
@@ -33,6 +39,7 @@
RE_NBSP = re.compile(u'\xa0', flags=re.UNICODE)
RE_SPACES = re.compile(r'\s+')
RE_TRIM_SPACES = re.compile(r'^\s+(\S.*?)\s+$')
+RE_TRIM_COLONS = re.compile(r'(\S.*?):*$')
RE_SANITIZE_SKIP = re.compile(r'\t|\n|\r|\u00bb|,\s\u0432|\u200e|\xb7|\u200f|\u064e|\u064f', flags=re.M)
RE_SANITIZE_RUSSIAN = re.compile(r'([\W\d])\u0433\.', flags=re.I | re.U)
@@ -107,6 +114,7 @@
date_string = sanitize_spaces(date_string)
date_string = RE_SANITIZE_PERIOD.sub('', date_string)
date_string = RE_SANITIZE_ON.sub(r'\1', date_string)
+ date_string = RE_TRIM_COLONS.sub(r'\1', date_string)
date_string = RE_SANITIZE_APOSTROPHE.sub(u"'", date_string)
@@ -130,6 +138,9 @@
:returns: :class:`datetime.datetime`, dict or None
"""
+ if isinstance(date_formats, six.string_types):
+ warn(_DateLocaleParser.DATE_FORMATS_ERROR_MESSAGE, FutureWarning)
+ date_formats = [date_formats]
period = 'day'
for date_format in date_formats:
try:
@@ -163,7 +174,7 @@
if isinstance(date_formats, six.string_types):
warn(self.DATE_FORMATS_ERROR_MESSAGE, FutureWarning)
date_formats = [date_formats]
- elif not (date_formats is None or isinstance(date_formats, (list, tuple, collections.Set))):
+ elif not (date_formats is None or isinstance(date_formats, (list, tuple, Set))):
raise TypeError(self.DATE_FORMATS_ERROR_MESSAGE)
self.locale = locale
@@ -202,9 +213,10 @@
def _try_parser(self):
_order = self._settings.DATE_ORDER
+ _default_date_order = self._settings._pyfile_data.get('DATE_ORDER')
try:
if self._settings.PREFER_LOCALE_DATE_ORDER:
- if self._settings._default:
+ if _order == _default_date_order:
self._settings.DATE_ORDER = self.locale.info.get('date_order', _order)
date_obj, period = date_parser.parse(
self._get_translated_date(), settings=self._settings)
@@ -264,7 +276,7 @@
return False
if not date_obj['date_obj']:
return False
- if date_obj['period'] not in ('day', 'week', 'month', 'year'):
+ if date_obj['period'] not in ('time', 'day', 'week', 'month', 'year'):
return False
return True
@@ -317,10 +329,10 @@
def __init__(self, languages=None, locales=None, region=None, try_previous_locales=True,
use_given_order=False, settings=None):
- if not isinstance(languages, (list, tuple, collections.Set)) and languages is not None:
+ if not isinstance(languages, (list, tuple, Set)) and languages is not None:
raise TypeError("languages argument must be a list (%r given)" % type(languages))
- if not isinstance(locales, (list, tuple, collections.Set)) and locales is not None:
+ if not isinstance(locales, (list, tuple, Set)) and locales is not None:
raise TypeError("locales argument must be a list (%r given)" % type(locales))
if not isinstance(region, six.string_types) and region is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/languages/loader.py new/dateparser-0.7.2/dateparser/languages/loader.py
--- old/dateparser-0.7.1/dateparser/languages/loader.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/languages/loader.py 2019-09-17 12:57:56.000000000 +0200
@@ -70,7 +70,7 @@
:param use_given_order:
If True, the returned mapping is ordered in the order locales are given.
- :type allow_redetect_language: bool
+ :type use_given_order: bool
:param allow_conflicting_locales:
if True, locales with same language and different region can be loaded.
@@ -106,7 +106,7 @@
:param use_given_order:
If True, the returned mapping is ordered in the order locales are given.
- :type allow_redetect_language: bool
+ :type use_given_order: bool
:param allow_conflicting_locales:
if True, locales with same language and different region can be loaded.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/languages/locale.py new/dateparser-0.7.2/dateparser/languages/locale.py
--- old/dateparser-0.7.1/dateparser/languages/locale.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/languages/locale.py 2019-09-17 12:57:56.000000000 +0200
@@ -8,7 +8,7 @@
from dateutil import parser
-from dateparser.timezone_parser import pop_tz_offset_from_string
+from dateparser.timezone_parser import pop_tz_offset_from_string, word_is_tz
from dateparser.utils import normalize_unicode, combine_dicts
from .dictionary import Dictionary, NormalizedDictionary, ALWAYS_KEEP_TOKENS
@@ -207,6 +207,10 @@
elif self._token_with_digits_is_ok(word):
translated_chunk.append(word)
original_chunk.append(original_tokens[i])
+ # Use original token because word_is_tz is case sensitive
+ elif translated_chunk and word_is_tz(original_tokens[i]):
+ translated_chunk.append(word)
+ original_chunk.append(original_tokens[i])
else:
if translated_chunk:
translated.append(translated_chunk)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/parser.py new/dateparser-0.7.2/dateparser/parser.py
--- old/dateparser-0.7.1/dateparser/parser.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/parser.py 2019-09-17 12:57:56.000000000 +0200
@@ -276,6 +276,10 @@
setattr(self, attr, int(token))
def _get_period(self):
+ if self.settings.RETURN_TIME_AS_PERIOD:
+ if getattr(self, 'time', None):
+ return 'time'
+
for period in ['time', 'day']:
if getattr(self, period, None):
return 'day'
@@ -376,7 +380,10 @@
delta = timedelta(days=steps)
else:
if days[day_index] == day:
- steps = 7
+ if self.settings.PREFER_DATES_FROM == 'past':
+ steps = 7
+ else:
+ steps = 0
else:
while days[day_index] != day:
day_index -= 1
@@ -445,8 +452,9 @@
# correction for preference of day: beginning, current, end
dateobj = po._correct_for_day(dateobj)
+ period = po._get_period()
- return dateobj, po._get_period()
+ return dateobj, period
def _parse(self, type, token, fuzzy, skip_component=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/search/search.py new/dateparser-0.7.2/dateparser/search/search.py
--- old/dateparser-0.7.1/dateparser/search/search.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/search/search.py 2019-09-17 12:57:56.000000000 +0200
@@ -5,7 +5,13 @@
from dateparser.date import DateDataParser
from dateparser.search.text_detection import FullTextLanguageDetector
import regex as re
-import collections
+
+try:
+ # Python 3
+ from collections.abc import Set
+except ImportError:
+ # Python 2.7
+ from collections import Set
RELATIVE_REG = re.compile("(ago|in|from now|tomorrow|today|yesterday)")
@@ -174,7 +180,7 @@
self.search = ExactLanguageSearch(self.loader)
def detect_language(self, text, languages):
- if isinstance(languages, (list, tuple, collections.Set)):
+ if isinstance(languages, (list, tuple, Set)):
if all([language in self.available_language_map for language in languages]):
languages = [self.available_language_map[language] for language in languages]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/timezone_parser.py new/dateparser-0.7.2/dateparser/timezone_parser.py
--- old/dateparser-0.7.1/dateparser/timezone_parser.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/timezone_parser.py 2019-09-17 12:57:56.000000000 +0200
@@ -44,11 +44,15 @@
return date_string, None
+def word_is_tz(word):
+ return bool(_search_regex.match(word))
+
+
def convert_to_local_tz(datetime_obj, datetime_tz_offset):
return datetime_obj - datetime_tz_offset + local_tz_offset
-def get_tz_offsets():
+def build_tz_offsets(search_regex_parts):
def get_offset(tz_obj, regex, repl='', replw=''):
return (
@@ -62,11 +66,13 @@
for tz_info in timezone_info_list:
for regex in tz_info['regex_patterns']:
for tz_obj in tz_info['timezones']:
+ search_regex_parts.append(tz_obj[0])
yield get_offset(tz_obj, regex)
# alternate patterns
for replace, replacewith in tz_info.get('replace', []):
for tz_obj in tz_info['timezones']:
+ search_regex_parts.append(re.sub(replace, replacewith, tz_obj[0]))
yield get_offset(tz_obj, regex, repl=replace, replw=replacewith)
@@ -76,5 +82,7 @@
return offset
-_tz_offsets = list(get_tz_offsets())
+_search_regex_parts = []
+_tz_offsets = list(build_tz_offsets(_search_regex_parts))
+_search_regex = re.compile('|'.join(_search_regex_parts))
local_tz_offset = get_local_tz_offset()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/timezones.py new/dateparser-0.7.2/dateparser/timezones.py
--- old/dateparser-0.7.1/dateparser/timezones.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/timezones.py 2019-09-17 12:57:56.000000000 +0200
@@ -32,6 +32,7 @@
('UTC\-04:00', -14400),
('UTC\-03:30', -12600),
('UTC\-03:00', -10800),
+ ('UTC\-02:30', -9000),
('UTC\-02:00', -7200),
('UTC\-01:00', -3600),
('UTC\+00:00', 0),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser/utils/strptime.py new/dateparser-0.7.2/dateparser/utils/strptime.py
--- old/dateparser-0.7.1/dateparser/utils/strptime.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser/utils/strptime.py 2019-09-17 12:57:56.000000000 +0200
@@ -1,4 +1,8 @@
-import imp
+import sys
+if sys.version_info[0:2] < (3, 3):
+ import imp
+else:
+ import importlib.util
import regex as re
from datetime import datetime
@@ -21,14 +25,24 @@
For example, if system's locale is set to fr_FR. Parser won't recognize
any date since all languages are translated to english dates.
"""
-
- _strptime = imp.load_module(
- 'strptime_patched', *imp.find_module('_strptime')
- )
-
- _calendar = imp.load_module(
- 'calendar_patched', *imp.find_module('_strptime')
- )
+ if sys.version_info[0:2] < (3, 3):
+ _strptime = imp.load_module(
+ 'strptime_patched', *imp.find_module('_strptime')
+ )
+
+ _calendar = imp.load_module(
+ 'calendar_patched', *imp.find_module('_strptime')
+ )
+ else:
+ _strptime_spec = importlib.util.find_spec('_strptime')
+
+ _strptime = importlib.util.module_from_spec(_strptime_spec)
+ _strptime_spec.loader.exec_module(_strptime)
+ sys.modules['strptime_patched'] = _strptime
+
+ _calendar = importlib.util.module_from_spec(_strptime_spec)
+ _strptime_spec.loader.exec_module(_calendar)
+ sys.modules['calendar_patched'] = _calendar
_strptime._getlang = lambda: ('en_US', 'UTF-8')
_strptime.calendar = _calendar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser.egg-info/PKG-INFO new/dateparser-0.7.2/dateparser.egg-info/PKG-INFO
--- old/dateparser-0.7.1/dateparser.egg-info/PKG-INFO 2019-02-12 22:44:08.000000000 +0100
+++ new/dateparser-0.7.2/dateparser.egg-info/PKG-INFO 2019-09-17 12:59:32.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: dateparser
-Version: 0.7.1
+Version: 0.7.2
Summary: Date parsing library designed to parse dates from HTML pages
Home-page: https://github.com/scrapinghub/dateparser
Author: Scrapinghub
@@ -11,16 +11,16 @@
====================================================
.. image:: https://img.shields.io/travis/scrapinghub/dateparser/master.svg?style=flat-…
- :target: https://travis-ci.org/scrapinghub/dateparser
- :alt: travis build status
+ :target: https://travis-ci.org/scrapinghub/dateparser
+ :alt: travis build status
.. image:: https://img.shields.io/pypi/v/dateparser.svg?style=flat-square
- :target: https://pypi.python.org/pypi/dateparser
- :alt: pypi version
+ :target: https://pypi.python.org/pypi/dateparser
+ :alt: pypi version
.. image:: https://readthedocs.org/projects/dateparser/badge/?version=latest
- :target: http://dateparser.readthedocs.org/en/latest/?badge=latest
- :alt: Documentation Status
+ :target: http://dateparser.readthedocs.org/en/latest/?badge=latest
+ :alt: Documentation Status
.. image:: https://codecov.io/gh/scrapinghub/dateparser/branch/master/graph/badge.svg
:target: https://codecov.io/gh/scrapinghub/dateparser
@@ -474,13 +474,13 @@
* Hijri/Islamic Calendar. For more information, refer to `Hijri Calendar <https://en.wikipedia.org/wiki/Islamic_calendar>`_.
- >>> from dateparser.calendars.jalali import JalaliCalendar
- >>> JalaliCalendar(u'جمعه سی ام اسفند ۱۳۸۷').get_date()
- {'date_obj': datetime.datetime(2009, 3, 20, 0, 0), 'period': 'day'}
-
- >>> from dateparser.calendars.hijri import HijriCalendar
- >>> HijriCalendar(u'17-01-1437 هـ 08:30 مساءً').get_date()
- {'date_obj': datetime.datetime(2015, 10, 30, 20, 30), 'period': 'day'}
+ >>> from dateparser.calendars.jalali import JalaliCalendar
+ >>> JalaliCalendar(u'جمعه سی ام اسفند ۱۳۸۷').get_date()
+ {'date_obj': datetime.datetime(2009, 3, 20, 0, 0), 'period': 'day'}
+
+ >>> from dateparser.calendars.hijri import HijriCalendar
+ >>> HijriCalendar(u'17-01-1437 هـ 08:30 مساءً').get_date()
+ {'date_obj': datetime.datetime(2015, 10, 30, 20, 30), 'period': 'day'}
.. note:: `HijriCalendar` has some limitations with Python 3.
.. note:: For `Finnish` language, please specify `settings={'SKIP_TOKENS': []}` to correctly parse freshness dates.
@@ -497,6 +497,30 @@
History
=======
+ 0.7.2 (2019-09-17)
+ ------------------
+
+ Features:
+
+ * Extended Czech support
+ * Added `time` to valid periods
+ * Added timezone information to dates found with `search_dates()`
+ * Support strings as date formats
+
+
+ Improvements:
+
+ * Fixed Collections ABCs depreciation warning
+ * Fixed dates with trailing colons not being parsed
+ * Fixed date format override on any settings change
+ * Fixed parsing current weekday as past date, regardless of settings
+ * Added UTC -2:30 as a valid offset
+ * Added Python 3.7 to supported versions, dropped support for Python 3.3 and 3.4
+ * Moved to importlib from imp where possible
+ * Improved support for Catalan
+ * Documentation improvements
+
+
0.7.1 (2019-02-12)
------------------
@@ -744,9 +768,9 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/dateparser_data/settings.py new/dateparser-0.7.2/dateparser_data/settings.py
--- old/dateparser-0.7.1/dateparser_data/settings.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/dateparser_data/settings.py 2019-09-17 12:57:56.000000000 +0200
@@ -12,5 +12,6 @@
'DATE_ORDER': 'MDY',
'PREFER_LOCALE_DATE_ORDER': True,
'FUZZY': False,
- 'STRICT_PARSING': False
+ 'STRICT_PARSING': False,
+ 'RETURN_TIME_AS_PERIOD': False,
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/docs/dateparser.calendars.rst new/dateparser-0.7.2/docs/dateparser.calendars.rst
--- old/dateparser-0.7.1/docs/dateparser.calendars.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/docs/dateparser.calendars.rst 2019-09-17 12:57:56.000000000 +0200
@@ -9,13 +9,12 @@
----------------------------------
.. automodule:: dateparser.calendars.jalali
- :members: JalaliParser
- :show-inheritance:
+ :members: JalaliParser
+ :show-inheritance:
Module contents
---------------
.. automodule:: dateparser.calendars
- :members:
- :show-inheritance:
-
+ :members:
+ :show-inheritance:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/docs/dateparser.languages.rst new/dateparser-0.7.2/docs/dateparser.languages.rst
--- old/dateparser-0.7.1/docs/dateparser.languages.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/docs/dateparser.languages.rst 2019-09-17 12:57:56.000000000 +0200
@@ -8,47 +8,47 @@
-------------------------------------
.. automodule:: dateparser.languages.detection
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.languages.dictionary module
--------------------------------------
.. automodule:: dateparser.languages.dictionary
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.languages.language module
------------------------------------
.. automodule:: dateparser.languages.language
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.languages.loader module
----------------------------------
.. automodule:: dateparser.languages.loader
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.languages.validation module
--------------------------------------
.. automodule:: dateparser.languages.validation
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
Module contents
---------------
.. automodule:: dateparser.languages
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/docs/dateparser.rst new/dateparser-0.7.2/docs/dateparser.rst
--- old/dateparser-0.7.1/docs/dateparser.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/docs/dateparser.rst 2019-09-17 12:57:56.000000000 +0200
@@ -16,63 +16,63 @@
----------------------
.. automodule:: dateparser.conf
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.date module
----------------------
.. automodule:: dateparser.date
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.date_parser module
-----------------------------
.. automodule:: dateparser.date_parser
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.freshness_date_parser module
---------------------------------------
.. automodule:: dateparser.freshness_date_parser
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.timezone_parser module
---------------------------------
.. automodule:: dateparser.timezone_parser
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.timezones module
---------------------------
.. automodule:: dateparser.timezones
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
dateparser.utils module
-----------------------
.. automodule:: dateparser.utils
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
Module contents
---------------
.. automodule:: dateparser
- :members:
- :undoc-members:
- :show-inheritance:
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/docs/template.rst new/dateparser-0.7.2/docs/template.rst
--- old/dateparser-0.7.1/docs/template.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/docs/template.rst 2019-09-17 12:57:56.000000000 +0200
@@ -5,77 +5,77 @@
.. sourcecode:: none
- two-letter language code as defined in ISO-639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). e.g. for English - en:
- name: language name (e.g. English)
- no_word_spacing: False (set to True for languages that do not use spaces between words)
-
- skip: ["words", "to", "skip", "such", "as", "and", "or", "at"]
-
- pertain: []
-
- monday:
- - name for Monday
- - abbreviation for Monday
- tuesday:
- - as above
- wednesday:
- - as above
- thursday:
- - as above
- friday:
- - as above
- saturday:
- - as above
- sunday:
- - as above
-
- january:
- - name for January
- - abbreviation for January
- february:
- - as above
- march:
- - as above
- april:
- - as above
- may:
- - as above
- june:
- - as above
- july:
- - as above
- august:
- - as above
- september:
- - as above
- october:
- - as above
- november:
- - as above
- december:
- - as above
-
- year:
- - name for year
- - abbreviation for year
- month:
- - as above
- week:
- - as above
- day:
- - as above
- hour:
- - as above
- minute:
- - as above
- second:
- - as above
-
- ago:
- - words that stand
- - for "ago"
-
- simplifications:
- - word: replacement
- - regex: replacement
- - day before yesterday: 2 days ago
+ two-letter language code as defined in ISO-639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). e.g. for English - en:
+ name: language name (e.g. English)
+ no_word_spacing: False (set to True for languages that do not use spaces between words)
+
+ skip: ["words", "to", "skip", "such", "as", "and", "or", "at"]
+
+ pertain: []
+
+ monday:
+ - name for Monday
+ - abbreviation for Monday
+ tuesday:
+ - as above
+ wednesday:
+ - as above
+ thursday:
+ - as above
+ friday:
+ - as above
+ saturday:
+ - as above
+ sunday:
+ - as above
+
+ january:
+ - name for January
+ - abbreviation for January
+ february:
+ - as above
+ march:
+ - as above
+ april:
+ - as above
+ may:
+ - as above
+ june:
+ - as above
+ july:
+ - as above
+ august:
+ - as above
+ september:
+ - as above
+ october:
+ - as above
+ november:
+ - as above
+ december:
+ - as above
+
+ year:
+ - name for year
+ - abbreviation for year
+ month:
+ - as above
+ week:
+ - as above
+ day:
+ - as above
+ hour:
+ - as above
+ minute:
+ - as above
+ second:
+ - as above
+
+ ago:
+ - words that stand
+ - for "ago"
+
+ simplifications:
+ - word: replacement
+ - regex: replacement
+ - day before yesterday: 2 days ago
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/docs/usage.rst new/dateparser-0.7.2/docs/usage.rst
--- old/dateparser-0.7.1/docs/usage.rst 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/docs/usage.rst 2019-09-17 12:57:56.000000000 +0200
@@ -139,6 +139,13 @@
>>> parse(u'March', settings={'STRICT_PARSING': True})
None
+``RETURN_TIME_AS_PERIOD`` returns `time` as period in date object, if time component was present in date string.
+Defaults to `False`.
+
+ >>> ddp = DateDataParser(settings={'RETURN_TIME_AS_PERIOD': True})
+ >>> ddp.get_date_data(u'vr jan 24, 2014 12:49')
+ {'date_obj': datetime.datetime(2014, 1, 24, 12, 49), 'period': 'time', 'locale': 'nl'}
+
Language Detection
++++++++++++++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/setup.py new/dateparser-0.7.2/setup.py
--- old/dateparser-0.7.1/setup.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/setup.py 2019-09-17 12:57:56.000000000 +0200
@@ -37,6 +37,7 @@
license="BSD",
zip_safe=False,
keywords='dateparser',
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
@@ -45,10 +46,9 @@
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
- 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/tests/test_date.py new/dateparser-0.7.2/tests/test_date.py
--- old/dateparser-0.7.1/tests/test_date.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/tests/test_date.py 2019-09-17 12:57:56.000000000 +0200
@@ -287,6 +287,15 @@
month=expected_month,
day=get_last_day_of_month(expected_year, expected_month)))
+ @parameterized.expand([
+ param(date_string='25-03-14', date_formats='%d-%m-%y', expected_result=datetime(2014, 3, 25)),
+ ])
+ def test_should_support_a_string_as_date_formats(self, date_string, date_formats, expected_result):
+ self.when_date_is_parsed_with_formats(date_string, date_formats)
+ self.then_date_was_parsed()
+ self.then_parsed_period_is('day')
+ self.then_parsed_date_is(expected_result)
+
def given_now(self, year, month, day, **time):
now = datetime(year, month, day, **time)
datetime_mock = Mock(wraps=datetime)
@@ -638,6 +647,10 @@
self.assertEqual(date.sanitize_date(u'2005 г.'), u'2005 ')
self.assertEqual(date.sanitize_date(u'Авг.'), u'Авг')
+ def test_sanitize_date_colons(self):
+ self.assertEqual(date.sanitize_date(u'2019:'), u'2019')
+ self.assertEqual(date.sanitize_date(u'31/07/2019:'), u'31/07/2019')
+
class TestDateLocaleParser(BaseTestCase):
def setUp(self):
@@ -650,6 +663,7 @@
param(date_obj={'period': 'hour'}),
param(date_obj=[datetime(2007, 1, 22, 0, 0), 'day']),
param(date_obj={'date_obj': None, 'period': 'day'}),
+ param(date_obj={'date': datetime(2018, 1, 10, 2, 0), 'period': 'time'}),
])
def test_is_valid_date_obj(self, date_obj):
self.given_parser(language=['en'], date_string='10 jan 2000',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/tests/test_date_parser.py new/dateparser-0.7.2/tests/test_date_parser.py
--- old/dateparser-0.7.1/tests/test_date_parser.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/tests/test_date_parser.py 2019-09-17 12:57:56.000000000 +0200
@@ -121,7 +121,7 @@
# Vietnamese dates
param('Thứ năm', datetime(2012, 11, 8)), # Thursday
param('Thứ sáu', datetime(2012, 11, 9)), # Friday
- param('Tháng Mười Hai 29, 2013, 14:14', datetime(2013, 12, 29, 14, 14)), # bpsosrcs.wordpress.com
+ param('Tháng Mười Hai 29, 2013, 14:14', datetime(2013, 12, 29, 14, 14)), # bpsosrcs.wordpress.com # NOQA
param('05 Tháng một 2015 - 03:54 AM', datetime(2015, 1, 5, 3, 54)),
# Belarusian dates
param('11 траўня', datetime(2012, 5, 11)),
@@ -133,7 +133,7 @@
param('2015-кві-12', datetime(2015, 4, 12)),
param('21 чер 2013 3:13', datetime(2013, 6, 21, 3, 13)),
param('12 лютого 2012, 13:12:23', datetime(2012, 2, 12, 13, 12, 23)),
- param('вів о 14:04', datetime(2012, 11, 6, 14, 4)),
+ param('вів о 14:04', datetime(2012, 11, 13, 14, 4)),
# Tagalog dates
param('12 Hulyo 2003 13:01', datetime(2003, 7, 12, 13, 1)),
param('1978, 1 Peb, 7:05 PM', datetime(1978, 2, 1, 19, 5)),
@@ -291,7 +291,7 @@
# Vietnamese dates
param('Thứ năm', datetime(2012, 11, 8)), # Thursday
param('Thứ sáu', datetime(2012, 11, 9)), # Friday
- param('Tháng Mười Hai 29, 2013, 14:14', datetime(2013, 12, 29, 14, 14)), # bpsosrcs.wordpress.com
+ param('Tháng Mười Hai 29, 2013, 14:14', datetime(2013, 12, 29, 14, 14)), # bpsosrcs.wordpress.com # NOQA
param('05 Tháng một 2015 - 03:54 AM', datetime(2015, 1, 5, 3, 54)),
# Belarusian dates
param('11 траўня', datetime(2012, 5, 11)),
@@ -303,7 +303,7 @@
param('2015-кві-12', datetime(2015, 4, 12)),
param('21 чер 2013 3:13', datetime(2013, 6, 21, 3, 13)),
param('12 лютого 2012, 13:12:23', datetime(2012, 2, 12, 13, 12, 23)),
- param('вів о 14:04', datetime(2012, 11, 6, 14, 4)),
+ param('вів о 14:04', datetime(2012, 11, 13, 14, 4)),
# Filipino dates
param('12 Hulyo 2003 13:01', datetime(2003, 7, 12, 13, 1)),
param('1978, 1 Peb, 7:05 PM', datetime(1978, 2, 1, 19, 5)),
@@ -433,6 +433,7 @@
param('March', datetime(2014, 3, 15)),
param('Friday', datetime(2015, 2, 13)),
param('Monday', datetime(2015, 2, 9)),
+ param('Sunday', datetime(2015, 2, 8)), # current day
param('10:00PM', datetime(2015, 2, 14, 22, 0)),
param('16:10', datetime(2015, 2, 14, 16, 10)),
param('14:05', datetime(2015, 2, 15, 14, 5)),
@@ -451,6 +452,7 @@
param('10 December', datetime(2015, 12, 10)),
param('March', datetime(2015, 3, 15)),
param('Friday', datetime(2015, 2, 20)),
+ param('Sunday', datetime(2015, 2, 22)), # current day
param('Monday', datetime(2015, 2, 16)),
param('10:00PM', datetime(2015, 2, 15, 22, 0)),
param('16:10', datetime(2015, 2, 15, 16, 10)),
@@ -470,6 +472,7 @@
param('10 December', datetime(2015, 12, 10)),
param('March', datetime(2015, 3, 15)),
param('Friday', datetime(2015, 2, 13)),
+ param('Sunday', datetime(2015, 2, 15)), # current weekday
param('10:00PM', datetime(2015, 2, 15, 22, 00)),
param('16:10', datetime(2015, 2, 15, 16, 10)),
param('14:05', datetime(2015, 2, 15, 14, 5)),
@@ -606,6 +609,60 @@
self.then_period_is(period)
@parameterized.expand([
+ param('12th December 2019 19:00', expected=datetime(2019, 12, 12, 19, 0), period='time'),
+ param('9 Jan 11 0:00', expected=datetime(2011, 1, 9, 0, 0), period='time'),
+ ])
+ def test_period_is_time_if_return_time_as_period_setting_applied_and_time_component_present(
+ self, date_string, expected=None, period=None
+ ):
+ self.given_parser(settings={'RETURN_TIME_AS_PERIOD': True})
+ self.when_date_is_parsed(date_string)
+ self.then_date_was_parsed_by_date_parser()
+ self.then_date_obj_exactly_is(expected)
+ self.then_period_is(period)
+
+ @parameterized.expand([
+ param('16:00', expected=datetime(2018, 12, 13, 16, 0), period='time'),
+ param('Monday 7:15 AM', expected=datetime(2018, 12, 10, 7, 15), period='time'),
+ ])
+ def test_period_is_time_if_return_time_as_period_and_relative_base_settings_applied_and_time_component_present(
+ self, date_string, expected=None, period=None
+ ):
+ self.given_parser(settings={'RETURN_TIME_AS_PERIOD': True,
+ 'RELATIVE_BASE': datetime(2018, 12, 13, 15, 15)})
+ self.when_date_is_parsed(date_string)
+ self.then_date_was_parsed_by_date_parser()
+ self.then_date_obj_exactly_is(expected)
+ self.then_period_is(period)
+
+ @parameterized.expand([
+ param('12th March 2010', expected=datetime(2010, 3, 12, 0, 0), period='day'),
+ param('21-12-19', expected=datetime(2019, 12, 21, 0, 0), period='day'),
+ ])
+ def test_period_is_day_if_return_time_as_period_setting_applied_and_time_component_is_not_present(
+ self, date_string, expected=None, period=None
+ ):
+ self.given_parser(settings={'RETURN_TIME_AS_PERIOD': True})
+ self.when_date_is_parsed(date_string)
+ self.then_date_was_parsed_by_date_parser()
+ self.then_date_obj_exactly_is(expected)
+ self.then_period_is(period)
+
+ @parameterized.expand([
+ param('16:00', expected=datetime(2017, 1, 10, 16, 0), period='day'),
+ param('Monday 7:15 AM', expected=datetime(2017, 1, 9, 7, 15), period='day'),
+ ])
+ def test_period_is_day_if_return_time_as_period_setting_not_applied(
+ self, date_string, expected=None, period=None
+ ):
+ self.given_parser(settings={'RETURN_TIME_AS_PERIOD': False,
+ 'RELATIVE_BASE': datetime(2017, 1, 10, 15, 15)})
+ self.when_date_is_parsed(date_string)
+ self.then_date_was_parsed_by_date_parser()
+ self.then_date_obj_exactly_is(expected)
+ self.then_period_is(period)
+
+ @parameterized.expand([
param('15-12-18 06:00', expected=datetime(2015, 12, 18, 6, 0), order='YMD'),
param('15-18-12 06:00', expected=datetime(2015, 12, 18, 6, 0), order='YDM'),
param('10-11-12 06:00', expected=datetime(2012, 10, 11, 6, 0), order='MDY'),
@@ -630,6 +687,21 @@
self.when_date_is_parsed(date_string)
self.then_date_was_parsed_by_date_parser()
self.then_date_obj_exactly_is(expected)
+
+ @parameterized.expand([
+ param('10.1.2019', expected=datetime(2019, 1, 10, 0, 0), languages=['de'],
+ settings={'PREFER_DAY_OF_MONTH': 'first'}),
+ param('10.1.2019', expected=datetime(2019, 1, 10, 0, 0), languages=['de']),
+ param('10.1.2019', expected=datetime(2019, 10, 1, 0, 0),
+ settings={'DATE_ORDER': 'MDY'}),
+ ])
+ def test_if_settings_provided_date_order_is_retained(
+ self, date_string, expected=None, languages=None, settings=None
+ ):
+ self.given_parser(languages=languages, settings=settings)
+ self.when_date_is_parsed(date_string)
+ self.then_date_was_parsed_by_date_parser()
+ self.then_date_obj_exactly_is(expected)
def given_local_tz_offset(self, offset):
self.add_patch(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/tests/test_freshness_date_parser.py new/dateparser-0.7.2/tests/test_freshness_date_parser.py
--- old/dateparser-0.7.1/tests/test_freshness_date_parser.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/tests/test_freshness_date_parser.py 2019-09-17 12:57:56.000000000 +0200
@@ -59,6 +59,12 @@
ago={'years': 1, 'months': 1, 'weeks': 1, 'days': 1, 'hours': 1, 'minutes': 1},
period='day'),
param('just now', ago={'seconds': 0}, period='day'),
+ # Fix for #291, work till one to twelve only
+ param('nine hours ago', ago={'hours': 9}, period='day'),
+ param('three week ago', ago={'weeks': 3}, period='week'),
+ param('eight months ago', ago={'months': 8}, period='month'),
+ param('six days ago', ago={'days': 6}, period='day'),
+ param('five years ago', ago={'years': 5}, period='year'),
# French dates
param("Aujourd'hui", ago={'days': 0}, period='day'),
@@ -176,6 +182,9 @@
param('1 rok 11 měsíců', ago={'years': 1, 'months': 11}, period='month'),
param('3 dny', ago={'days': 3}, period='day'),
param('3 hodiny', ago={'hours': 3}, period='day'),
+ param('2 roky, 2 týdny, 1 den, 1 hodinu, 5 vteřin před',
+ ago={'years': 2, 'weeks': 2, 'days': 1, 'hours': 1, 'seconds': 5},
+ period='day'),
param('1 rok, 1 měsíc, 1 týden, 1 den, 1 hodina, 1 minuta před',
ago={'years': 1, 'months': 1, 'weeks': 1, 'days': 1, 'hours': 1, 'minutes': 1},
period='day'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/tests/test_languages.py new/dateparser-0.7.2/tests/test_languages.py
--- old/dateparser-0.7.1/tests/test_languages.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/tests/test_languages.py 2019-09-17 12:57:56.000000000 +0200
@@ -1107,6 +1107,10 @@
param('ca', "d'aquí a 22 hores", "in 22 hour"),
param('ca', "fa 17 anys", "17 year ago"),
param('ca', "el mes passat", "1 month ago"),
+ param('ca', "la pròxima setmana", "in 1 week"),
+ param('ca', "despús-ahir", "2 day ago"),
+ param('ca', "en un dia", "in 1 day"),
+ param('ca', "demà passat", "in 2 day"),
# ce
param('ce', "72 сахьт даьлча", "in 72 hour"),
param('ce', "42 шо хьалха", "42 year ago"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/tests/test_search.py new/dateparser-0.7.2/tests/test_search.py
--- old/dateparser-0.7.1/tests/test_search.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/tests/test_search.py 2019-09-17 12:57:56.000000000 +0200
@@ -2,6 +2,7 @@
from __future__ import unicode_literals
from parameterized import parameterized, param
from tests import BaseTestCase
+from dateparser.timezone_parser import StaticTzInfo
from dateparser.search.search import DateSearchWithDetection
from dateparser.search import search_dates
from dateparser.conf import Settings, apply_settings
@@ -34,6 +35,7 @@
@parameterized.expand([
param('en', "Sep 03 2014"),
param('en', "friday, 03 september 2014"),
+ param('en', 'Aug 06, 2018 05:05 PM CDT'),
# Chinese
param('zh', "1年11个月"),
param('zh', "1年11個月"),
@@ -267,6 +269,11 @@
[('July 13th', datetime.datetime(2000, 7, 13, 0, 0)),
('July 14th', datetime.datetime(2000, 7, 14, 0, 0))],
settings={'RELATIVE_BASE': datetime.datetime(2000, 1, 1)}),
+ param('en', 'last updated Aug 06, 2018 05:05 PM CDT',
+ [(
+ 'Aug 06, 2018 05:05 PM CDT',
+ datetime.datetime(2018, 8, 6, 17, 5, tzinfo=StaticTzInfo('CDT', datetime.timedelta(seconds=-18000))))],
+ settings={'RELATIVE_BASE': datetime.datetime(2000, 1, 1)}),
# Filipino / Tagalog
param('tl', 'Maraming namatay sa mga Hapon hanggang sila\'y sumuko noong Agosto 15, 1945.',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dateparser-0.7.1/tests/test_timezone_parser.py new/dateparser-0.7.2/tests/test_timezone_parser.py
--- old/dateparser-0.7.1/tests/test_timezone_parser.py 2019-02-12 22:42:27.000000000 +0100
+++ new/dateparser-0.7.2/tests/test_timezone_parser.py 2019-09-17 12:57:56.000000000 +0200
@@ -46,6 +46,8 @@
param('April 10, 2016 at 12:00:00 UTC-09:30', -9.5),
param('Thu, 24 Nov 2016 16:03:00 UT', 0),
param('Fri Sep 23 2016 10:34:51 GMT+0800 (CST)', 8),
+ param('2019-07-17T12:30:00.000-03:30', -3.5),
+ param('2019-07-17T12:30:00.000-02:30', -2.5),
])
def test_extracting_valid_offset(self, initial_string, expected_offset):
self.given_string(initial_string)
1
0
Hello community,
here is the log from the commit of package python-urllib3 for openSUSE:Factory checked in at 2019-09-30 15:56:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-urllib3 (Old)
and /work/SRC/openSUSE:Factory/.python-urllib3.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-urllib3"
Mon Sep 30 15:56:55 2019 rev:34 rq:733657 version:1.25.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-urllib3/python-urllib3.changes 2019-09-23 12:18:39.521794504 +0200
+++ /work/SRC/openSUSE:Factory/.python-urllib3.new.2352/python-urllib3.changes 2019-09-30 15:57:01.197596494 +0200
@@ -1,0 +2,21 @@
+Fri Sep 27 10:39:28 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Restrict the tornado dep from tom to 5 or older release as the
+ 6.x changed the API
+
+-------------------------------------------------------------------
+Fri Sep 20 12:14:13 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.25.5:
+ * Add mitigation for BPO-37428 affecting Python <3.7.4 and OpenSSL 1.1.1+ which caused certificate verification to be enabled when using cert_reqs=CERT_NONE. (Issue #1682)
+ * Propagate Retry-After header settings to subsequent retries. (Pull #1607)
+ * Fix edge case where Retry-After header was still respected even when explicitly opted out of. (Pull #1607)
+ * Remove dependency on rfc3986 for URL parsing.
+ * Fix issue where URLs containing invalid characters within Url.auth would raise an exception instead of percent-encoding those characters.
+ * Add support for HTTPResponse.auto_close = False which makes HTTP responses work well with BufferedReaders and other io module features. (Pull #1652)
+ * Percent-encode invalid characters in URL for HTTPConnectionPool.request() (Pull #1673)
+- Drop patch urllib3-ssl-default-context.patch
+- Drop patch python-urllib3-recent-date.patch the date is recent
+ enough on its own
+
+-------------------------------------------------------------------
Old:
----
python-urllib3-recent-date.patch
urllib3-1.25.3.tar.gz
urllib3-ssl-default-context.patch
New:
----
urllib3-1.25.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-urllib3.spec ++++++
--- /var/tmp/diff_new_pack.kgSmRI/_old 2019-09-30 15:57:02.965591788 +0200
+++ /var/tmp/diff_new_pack.kgSmRI/_new 2019-09-30 15:57:02.965591788 +0200
@@ -28,7 +28,7 @@
%endif
%bcond_without python2
Name: python-urllib3%{psuffix}
-Version: 1.25.3
+Version: 1.25.5
Release: 0
Summary: HTTP library with thread-safe connection pooling, file post, and more
License: MIT
@@ -37,24 +37,16 @@
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}…
# Wrapper for ssl to unbundle ssl_match_hostname
Source1: ssl_match_hostname_py3.py
-# PATCH-FEATURE-UPSTREAM -- use set_default_verify_paths() if no certificate path is supplied
-# should be removed in the future, see SR#437853
-Patch0: urllib3-ssl-default-context.patch
-# PATCH-FIX-UPSTREAM python-urllib3-recent-date.patch gh#shazow/urllib3#1303, boo#1074247 dimstar(a)opensuse.org -- Fix test suite, use correct date
-Patch1: python-urllib3-recent-date.patch
-BuildRequires: %{python_module PySocks}
-BuildRequires: %{python_module psutil}
-BuildRequires: %{python_module rfc3986}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
#!BuildIgnore: python-requests
Requires: ca-certificates-mozilla
-Requires: python-cryptography
-Requires: python-idna
+Requires: python-certifi
+Requires: python-cryptography >= 1.3.4
+Requires: python-idna >= 2.0.0
Requires: python-pyOpenSSL
-Requires: python-rfc3986
Requires: python-six
BuildArch: noarch
# for SSL module on older distros
@@ -69,15 +61,21 @@
Requires: python-backports.ssl_match_hostname
%endif
%if %{with test}
-BuildRequires: %{python_module brotlipy}
-BuildRequires: %{python_module idna}
+BuildRequires: %{python_module PySocks}
+BuildRequires: %{python_module brotlipy >= 0.6.0}
+BuildRequires: %{python_module certifi}
+BuildRequires: %{python_module cryptography >= 1.3.4}
+BuildRequires: %{python_module idna >= 2.0.0}
BuildRequires: %{python_module mock >= 1.3.0}
-BuildRequires: %{python_module pytest < 4.0}
-BuildRequires: %{python_module tornado >= 4.2.1}
+BuildRequires: %{python_module psutil}
+BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module six}
+BuildRequires: %{python_module tornado < 6}
BuildRequires: %{python_module urllib3 >= %{version}}
%endif
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
-Recommends: python-brotlipy
+Recommends: python-PySocks >= 1.5.6
+Recommends: python-brotlipy >= 0.6.0
%endif
%ifpython2
Requires: python-ipaddress
@@ -104,7 +102,6 @@
%prep
%setup -q -n urllib3-%{version}
-%autopatch -p1
find . -type f -exec chmod a-x '{}' \;
find . -name __pycache__ -type d -exec rm -fr {} +
@@ -130,7 +127,6 @@
# Unbundle the Python 2 build
rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py*
rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname/
-rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/rfc3986/
mkdir -p %{buildroot}/%{python2_sitelib}/urllib3/packages/
ln -s %{python2_sitelib}/six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py
@@ -138,8 +134,6 @@
ln -s %{python2_sitelib}/six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo
ln -s %{python2_sitelib}/backports/ssl_match_hostname \
%{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname
-ln -s %{python2_sitelib}/rfc3986/ \
- %{buildroot}/%{python2_sitelib}/urllib3/packages/rfc3986
%endif
%if 0%{?have_python3} && ! 0%{?skip_python3}
@@ -147,7 +141,6 @@
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py*
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six*
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
-rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/rfc3986/
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py
@@ -156,8 +149,6 @@
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
-ln -s %{python3_sitelib}/rfc3986/ \
- %{buildroot}/%{python3_sitelib}/urllib3/packages/rfc3986
%endif
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -182,17 +173,12 @@
ppc*)
skiplist="$skiplist and not test_select_timing and not test_select_multiple_interrupts_with_event and not test_interrupt_wait_for_read_with_event and not test_select_interrupt_with_event";;
esac
-# the tls13 tests are not run in upstream travis and they fail for us
-# lets wait for upstream to sort it out first
-skiplist="$skiplist and not test_set_ssl_version_to_tls_version"
# the certificate validation is much stricter in new openssl so skip
# tests which would not validate it
skiplist="$skiplist and not test_client_no_intermediate"
-# we have patch to fix source address errors in python and raise different
-# error than urllib3 expects in its tests
-skiplist="$skiplist and not test_source_address_error"
export PYTHONDONTWRITEBYTECODE=1
+export LANG="en_US.UTF8"
%pytest -k "${skiplist}"
%endif
++++++ urllib3-1.25.3.tar.gz -> urllib3-1.25.5.tar.gz ++++++
++++ 24613 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package python-cloudpickle for openSUSE:Factory checked in at 2019-09-30 15:56:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cloudpickle (Old)
and /work/SRC/openSUSE:Factory/.python-cloudpickle.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cloudpickle"
Mon Sep 30 15:56:31 2019 rev:8 rq:733396 version:1.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cloudpickle/python-cloudpickle.changes 2019-07-31 14:15:18.638794685 +0200
+++ /work/SRC/openSUSE:Factory/.python-cloudpickle.new.2352/python-cloudpickle.changes 2019-09-30 15:56:32.597672606 +0200
@@ -1,0 +2,8 @@
+Thu Sep 26 10:40:19 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 1.2.2:
+ * Revert the change introduced in (issue #276) attempting to pickle functions annotations for Python 3.4 to 3.6. It is not possible to pickle complex typing constructs for those versions (see issue #193)
+ * Fix a bug affecting bound classmethod saving on Python 2. (issue #288)
+ * Add support for pickling "getset" descriptors (issue #290)
+
+-------------------------------------------------------------------
Old:
----
cloudpickle-1.2.1.tar.gz
New:
----
cloudpickle-1.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cloudpickle.spec ++++++
--- /var/tmp/diff_new_pack.OuVfmM/_old 2019-09-30 15:56:33.149671137 +0200
+++ /var/tmp/diff_new_pack.OuVfmM/_new 2019-09-30 15:56:33.149671137 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cloudpickle
-Version: 1.2.1
+Version: 1.2.2
Release: 0
Summary: Extended pickling support for Python objects
License: BSD-3-Clause
++++++ cloudpickle-1.2.1.tar.gz -> cloudpickle-1.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloudpickle-1.2.1/PKG-INFO new/cloudpickle-1.2.2/PKG-INFO
--- old/cloudpickle-1.2.1/PKG-INFO 2019-06-10 21:56:01.000000000 +0200
+++ new/cloudpickle-1.2.2/PKG-INFO 2019-09-10 14:27:06.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: cloudpickle
-Version: 1.2.1
+Version: 1.2.2
Summary: Extended pickling support for Python objects
Home-page: https://github.com/cloudpipe/cloudpickle
Author: Cloudpipe
@@ -23,11 +23,15 @@
along with **functions and classes defined interactively** in the
`__main__` module (for instance in a script, a shell or a Jupyter notebook).
- **`cloudpickle` uses `pickle.HIGHEST_PROTOCOL` by default**: it is meant to
- send objects between processes running the **same version of Python**.
+ Cloudpickle can only be used to send objects between the **exact same version
+ of Python**.
Using `cloudpickle` for **long-term object storage is not supported and
- discouraged.**
+ strongly discouraged.**
+
+ **Security notice**: one should **only load pickle data from trusted sources** as
+ otherwise `pickle.load` can lead to arbitrary code execution resulting in a critical
+ security vulnerability.
Installation
@@ -89,6 +93,25 @@
PYTHONPATH='.:tests' py.test
+ Note about function Annotations
+ -------------------------------
+
+ Note that because of design issues `Python`'s `typing` module, `cloudpickle`
+ supports pickling type annotations of dynamic functions for `Python` 3.7 and
+ later. On `Python` 3.4, 3.5 and 3.6, those type annotations will be dropped
+ silently during pickling (example below):
+
+ ```python
+ >>> import typing
+ >>> import cloudpickle
+ >>> def f(x: typing.Union[list, int]):
+ ... return x
+ >>> f
+ <function __main__.f(x:Union[list, int])>
+ >>> cloudpickle.loads(cloudpickle.dumps(f)) # drops f's annotations
+ <function __main__.f(x)>
+ ```
+
History
-------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloudpickle-1.2.1/README.md new/cloudpickle-1.2.2/README.md
--- old/cloudpickle-1.2.1/README.md 2019-04-17 11:27:32.000000000 +0200
+++ new/cloudpickle-1.2.2/README.md 2019-09-10 14:19:13.000000000 +0200
@@ -15,11 +15,15 @@
along with **functions and classes defined interactively** in the
`__main__` module (for instance in a script, a shell or a Jupyter notebook).
-**`cloudpickle` uses `pickle.HIGHEST_PROTOCOL` by default**: it is meant to
-send objects between processes running the **same version of Python**.
+Cloudpickle can only be used to send objects between the **exact same version
+of Python**.
Using `cloudpickle` for **long-term object storage is not supported and
-discouraged.**
+strongly discouraged.**
+
+**Security notice**: one should **only load pickle data from trusted sources** as
+otherwise `pickle.load` can lead to arbitrary code execution resulting in a critical
+security vulnerability.
Installation
@@ -81,6 +85,25 @@
PYTHONPATH='.:tests' py.test
+Note about function Annotations
+-------------------------------
+
+Note that because of design issues `Python`'s `typing` module, `cloudpickle`
+supports pickling type annotations of dynamic functions for `Python` 3.7 and
+later. On `Python` 3.4, 3.5 and 3.6, those type annotations will be dropped
+silently during pickling (example below):
+
+```python
+>>> import typing
+>>> import cloudpickle
+>>> def f(x: typing.Union[list, int]):
+... return x
+>>> f
+<function __main__.f(x:Union[list, int])>
+>>> cloudpickle.loads(cloudpickle.dumps(f)) # drops f's annotations
+<function __main__.f(x)>
+```
+
History
-------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloudpickle-1.2.1/cloudpickle/__init__.py new/cloudpickle-1.2.2/cloudpickle/__init__.py
--- old/cloudpickle-1.2.1/cloudpickle/__init__.py 2019-06-10 21:55:30.000000000 +0200
+++ new/cloudpickle-1.2.2/cloudpickle/__init__.py 2019-09-10 14:19:34.000000000 +0200
@@ -8,4 +8,4 @@
if sys.version_info[:2] >= (3, 8):
from cloudpickle.cloudpickle_fast import CloudPickler, dumps, dump
-__version__ = '1.2.1'
+__version__ = '1.2.2'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloudpickle-1.2.1/cloudpickle/cloudpickle.py new/cloudpickle-1.2.2/cloudpickle/cloudpickle.py
--- old/cloudpickle-1.2.1/cloudpickle/cloudpickle.py 2019-06-10 21:54:13.000000000 +0200
+++ new/cloudpickle-1.2.2/cloudpickle/cloudpickle.py 2019-09-10 14:19:13.000000000 +0200
@@ -274,41 +274,80 @@
return subimports
-def _make_cell_set_template_code():
- """Get the Python compiler to emit LOAD_FAST(arg); STORE_DEREF
-
- Notes
- -----
- In Python 3, we could use an easier function:
-
- .. code-block:: python
-
- def f():
- cell = None
+def cell_set(cell, value):
+ """Set the value of a closure cell.
- def _stub(value):
- nonlocal cell
- cell = value
+ The point of this function is to set the cell_contents attribute of a cell
+ after its creation. This operation is necessary in case the cell contains a
+ reference to the function the cell belongs to, as when calling the
+ function's constructor
+ ``f = types.FunctionType(code, globals, name, argdefs, closure)``,
+ closure will not be able to contain the yet-to-be-created f.
+
+ In Python3.7, cell_contents is writeable, so setting the contents of a cell
+ can be done simply using
+ >>> cell.cell_contents = value
+
+ In earlier Python3 versions, the cell_contents attribute of a cell is read
+ only, but this limitation can be worked around by leveraging the Python 3
+ ``nonlocal`` keyword.
+
+ In Python2 however, this attribute is read only, and there is no
+ ``nonlocal`` keyword. For this reason, we need to come up with more
+ complicated hacks to set this attribute.
+
+ The chosen approach is to create a function with a STORE_DEREF opcode,
+ which sets the content of a closure variable. Typically:
+
+ >>> def inner(value):
+ ... lambda: cell # the lambda makes cell a closure
+ ... cell = value # cell is a closure, so this triggers a STORE_DEREF
+
+ (Note that in Python2, A STORE_DEREF can never be triggered from an inner
+ function. The function g for example here
+ >>> def f(var):
+ ... def g():
+ ... var += 1
+ ... return g
+
+ will not modify the closure variable ``var```inplace, but instead try to
+ load a local variable var and increment it. As g does not assign the local
+ variable ``var`` any initial value, calling f(1)() will fail at runtime.)
+
+ Our objective is to set the value of a given cell ``cell``. So we need to
+ somewhat reference our ``cell`` object into the ``inner`` function so that
+ this object (and not the smoke cell of the lambda function) gets affected
+ by the STORE_DEREF operation.
+
+ In inner, ``cell`` is referenced as a cell variable (an enclosing variable
+ that is referenced by the inner function). If we create a new function
+ cell_set with the exact same code as ``inner``, but with ``cell`` marked as
+ a free variable instead, the STORE_DEREF will be applied on its closure -
+ ``cell``, which we can specify explicitly during construction! The new
+ cell_set variable thus actually sets the contents of a specified cell!
+
+ Note: we do not make use of the ``nonlocal`` keyword to set the contents of
+ a cell in early python3 versions to limit possible syntax errors in case
+ test and checker libraries decide to parse the whole file.
+ """
- return _stub
+ if sys.version_info[:2] >= (3, 7): # pragma: no branch
+ cell.cell_contents = value
+ else:
+ _cell_set = types.FunctionType(
+ _cell_set_template_code, {}, '_cell_set', (), (cell,),)
+ _cell_set(value)
- _cell_set_template_code = f().__code__
- This function is _only_ a LOAD_FAST(arg); STORE_DEREF, but that is
- invalid syntax on Python 2. If we use this function we also don't need
- to do the weird freevars/cellvars swap below
- """
- def inner(value):
- lambda: cell # make ``cell`` a closure so that we get a STORE_DEREF
+def _make_cell_set_template_code():
+ def _cell_set_factory(value):
+ lambda: cell
cell = value
- co = inner.__code__
+ co = _cell_set_factory.__code__
- # NOTE: we are marking the cell variable as a free variable intentionally
- # so that we simulate an inner function instead of the outer function. This
- # is what gives us the ``nonlocal`` behavior in a Python 2 compatible way.
if PY2: # pragma: no branch
- return types.CodeType(
+ _cell_set_template_code = types.CodeType(
co.co_argcount,
co.co_nlocals,
co.co_stacksize,
@@ -321,62 +360,32 @@
co.co_name,
co.co_firstlineno,
co.co_lnotab,
- co.co_cellvars, # this is the trickery
- (),
+ co.co_cellvars, # co_freevars is initialized with co_cellvars
+ (), # co_cellvars is made empty
)
else:
- if hasattr(types.CodeType, "co_posonlyargcount"): # pragma: no branch
- return types.CodeType(
- co.co_argcount,
- co.co_posonlyargcount, # Python3.8 with PEP570
- co.co_kwonlyargcount,
- co.co_nlocals,
- co.co_stacksize,
- co.co_flags,
- co.co_code,
- co.co_consts,
- co.co_names,
- co.co_varnames,
- co.co_filename,
- co.co_name,
- co.co_firstlineno,
- co.co_lnotab,
- co.co_cellvars, # this is the trickery
- (),
- )
- else:
- return types.CodeType(
- co.co_argcount,
- co.co_kwonlyargcount,
- co.co_nlocals,
- co.co_stacksize,
- co.co_flags,
- co.co_code,
- co.co_consts,
- co.co_names,
- co.co_varnames,
- co.co_filename,
- co.co_name,
- co.co_firstlineno,
- co.co_lnotab,
- co.co_cellvars, # this is the trickery
- (),
- )
-
-_cell_set_template_code = _make_cell_set_template_code()
-
+ _cell_set_template_code = types.CodeType(
+ co.co_argcount,
+ co.co_kwonlyargcount, # Python 3 only argument
+ co.co_nlocals,
+ co.co_stacksize,
+ co.co_flags,
+ co.co_code,
+ co.co_consts,
+ co.co_names,
+ co.co_varnames,
+ co.co_filename,
+ co.co_name,
+ co.co_firstlineno,
+ co.co_lnotab,
+ co.co_cellvars, # co_freevars is initialized with co_cellvars
+ (), # co_cellvars is made empty
+ )
+ return _cell_set_template_code
-def cell_set(cell, value):
- """Set the value of a closure cell.
- """
- return types.FunctionType(
- _cell_set_template_code,
- {},
- '_cell_set_inner',
- (),
- (cell,),
- )(value)
+if sys.version_info[:2] < (3, 7):
+ _cell_set_template_code = _make_cell_set_template_code()
# relevant opcodes
STORE_GLOBAL = opcode.opmap['STORE_GLOBAL']
@@ -738,7 +747,9 @@
'doc': func.__doc__,
'_cloudpickle_submodules': submodules
}
- if hasattr(func, '__annotations__') and sys.version_info >= (3, 4):
+ if hasattr(func, '__annotations__') and sys.version_info >= (3, 7):
+ # Although annotations were added in Python3.4, It is not possible
+ # to properly pickle them until Python3.7. (See #193)
state['annotations'] = func.__annotations__
if hasattr(func, '__qualname__'):
state['qualname'] = func.__qualname__
@@ -839,6 +850,11 @@
method_descriptor = type(str.upper)
dispatch[method_descriptor] = save_builtin_function_or_method
+ def save_getset_descriptor(self, obj):
+ return self.save_reduce(getattr, (obj.__objclass__, obj.__name__))
+
+ dispatch[types.GetSetDescriptorType] = save_getset_descriptor
+
def save_global(self, obj, name=None, pack=struct.pack):
"""
Save a "global".
@@ -873,8 +889,9 @@
if PY3: # pragma: no branch
self.save_reduce(types.MethodType, (obj.__func__, obj.__self__), obj=obj)
else:
- self.save_reduce(types.MethodType, (obj.__func__, obj.__self__, obj.__self__.__class__),
- obj=obj)
+ self.save_reduce(
+ types.MethodType,
+ (obj.__func__, obj.__self__, type(obj.__self__)), obj=obj)
dispatch[types.MethodType] = save_instancemethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloudpickle-1.2.1/cloudpickle/cloudpickle_fast.py new/cloudpickle-1.2.2/cloudpickle/cloudpickle_fast.py
--- old/cloudpickle-1.2.1/cloudpickle/cloudpickle_fast.py 2019-06-07 19:01:53.000000000 +0200
+++ new/cloudpickle-1.2.2/cloudpickle/cloudpickle_fast.py 2019-08-02 21:50:49.000000000 +0200
@@ -260,6 +260,10 @@
return _file_reconstructor, (retval,)
+def _getset_descriptor_reduce(obj):
+ return getattr, (obj.__objclass__, obj.__name__)
+
+
def _mappingproxy_reduce(obj):
return types.MappingProxyType, (dict(obj),)
@@ -405,6 +409,7 @@
dispatch[staticmethod] = _classmethod_reduce
dispatch[types.CellType] = _cell_reduce
dispatch[types.CodeType] = _code_reduce
+ dispatch[types.GetSetDescriptorType] = _getset_descriptor_reduce
dispatch[types.ModuleType] = _module_reduce
dispatch[types.MethodType] = _method_reduce
dispatch[types.MappingProxyType] = _mappingproxy_reduce
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloudpickle-1.2.1/cloudpickle.egg-info/PKG-INFO new/cloudpickle-1.2.2/cloudpickle.egg-info/PKG-INFO
--- old/cloudpickle-1.2.1/cloudpickle.egg-info/PKG-INFO 2019-06-10 21:56:01.000000000 +0200
+++ new/cloudpickle-1.2.2/cloudpickle.egg-info/PKG-INFO 2019-09-10 14:27:06.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: cloudpickle
-Version: 1.2.1
+Version: 1.2.2
Summary: Extended pickling support for Python objects
Home-page: https://github.com/cloudpipe/cloudpickle
Author: Cloudpipe
@@ -23,11 +23,15 @@
along with **functions and classes defined interactively** in the
`__main__` module (for instance in a script, a shell or a Jupyter notebook).
- **`cloudpickle` uses `pickle.HIGHEST_PROTOCOL` by default**: it is meant to
- send objects between processes running the **same version of Python**.
+ Cloudpickle can only be used to send objects between the **exact same version
+ of Python**.
Using `cloudpickle` for **long-term object storage is not supported and
- discouraged.**
+ strongly discouraged.**
+
+ **Security notice**: one should **only load pickle data from trusted sources** as
+ otherwise `pickle.load` can lead to arbitrary code execution resulting in a critical
+ security vulnerability.
Installation
@@ -89,6 +93,25 @@
PYTHONPATH='.:tests' py.test
+ Note about function Annotations
+ -------------------------------
+
+ Note that because of design issues `Python`'s `typing` module, `cloudpickle`
+ supports pickling type annotations of dynamic functions for `Python` 3.7 and
+ later. On `Python` 3.4, 3.5 and 3.6, those type annotations will be dropped
+ silently during pickling (example below):
+
+ ```python
+ >>> import typing
+ >>> import cloudpickle
+ >>> def f(x: typing.Union[list, int]):
+ ... return x
+ >>> f
+ <function __main__.f(x:Union[list, int])>
+ >>> cloudpickle.loads(cloudpickle.dumps(f)) # drops f's annotations
+ <function __main__.f(x)>
+ ```
+
History
-------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloudpickle-1.2.1/tests/cloudpickle_test.py new/cloudpickle-1.2.2/tests/cloudpickle_test.py
--- old/cloudpickle-1.2.1/tests/cloudpickle_test.py 2019-06-10 21:54:13.000000000 +0200
+++ new/cloudpickle-1.2.2/tests/cloudpickle_test.py 2019-09-10 14:19:13.000000000 +0200
@@ -431,6 +431,15 @@
self.assertEqual(A.test_sm(), "sm")
self.assertEqual(A.test_cm(), "cm")
+ def test_bound_classmethod(self):
+ class A:
+ @classmethod
+ def test_cm(cls):
+ return "cm"
+
+ A.test_cm = pickle_depickle(A.test_cm, protocol=self.protocol)
+ self.assertEqual(A.test_cm(), "cm")
+
def test_method_descriptors(self):
f = pickle_depickle(str.upper)
self.assertEqual(f('abc'), 'ABC')
@@ -661,10 +670,9 @@
# builtin function from the __builtin__ module
assert pickle_depickle(zip, protocol=self.protocol) is zip
- from sys import getcheckinterval
+ from os import mkdir
# builtin function from a "regular" module
- assert pickle_depickle(
- getcheckinterval, protocol=self.protocol) is getcheckinterval
+ assert pickle_depickle(mkdir, protocol=self.protocol) is mkdir
@pytest.mark.skipif(platform.python_implementation() == 'PyPy' and
sys.version_info[:2] == (3, 5),
@@ -975,6 +983,11 @@
# logging.Logger object
self.check_logger('cloudpickle.dummy_test_logger')
+ def test_getset_descriptor(self):
+ assert isinstance(float.real, types.GetSetDescriptorType)
+ depickled_descriptor = pickle_depickle(float.real)
+ self.assertIs(depickled_descriptor, float.real)
+
def test_abc(self):
@abc.abstractmethod
@@ -1607,9 +1620,9 @@
self.assertEqual(f2.__doc__, f.__doc__)
- @unittest.skipIf(sys.version_info < (3, 4),
- """This syntax won't work on py2 and pickling annotations
- isn't supported for py34 and below.""")
+ @unittest.skipIf(sys.version_info < (3, 7),
+ "This syntax won't work on py2 and pickling annotations "
+ "isn't supported for py37 and below.")
def test_wraps_preserves_function_annotations(self):
from functools import wraps
@@ -1626,6 +1639,16 @@
self.assertEqual(f2.__annotations__, f.__annotations__)
+ @unittest.skipIf(sys.version_info < (3, 7),
+ """This syntax won't work on py2 and pickling annotations
+ isn't supported for py37 and below.""")
+ def test_type_hint(self):
+ # Try to pickle compound typing constructs. This would typically fail
+ # on Python < 3.7 (See #193)
+ import typing
+ t = typing.Union[list, int]
+ assert pickle_depickle(t) == t
+
def test_instance_with_slots(self):
for slots in [["registered_attribute"], "registered_attribute"]:
class ClassWithSlots(object):
1
0
Hello community,
here is the log from the commit of package python-PyNaCl for openSUSE:Factory checked in at 2019-09-30 15:56:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyNaCl (Old)
and /work/SRC/openSUSE:Factory/.python-PyNaCl.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyNaCl"
Mon Sep 30 15:56:24 2019 rev:6 rq:733177 version:1.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyNaCl/python-PyNaCl.changes 2019-07-30 13:01:00.154441340 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyNaCl.new.2352/python-PyNaCl.changes 2019-09-30 15:56:26.709688275 +0200
@@ -1,0 +2,5 @@
+Wed Sep 25 14:15:57 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Add missing runtime dependency on cffi
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PyNaCl.spec ++++++
--- /var/tmp/diff_new_pack.YzP4e4/_old 2019-09-30 15:56:27.713685604 +0200
+++ /var/tmp/diff_new_pack.YzP4e4/_new 2019-09-30 15:56:27.713685604 +0200
@@ -23,25 +23,25 @@
Summary: Python binding to the Networking and Cryptography (NaCl) library
License: Apache-2.0
Group: Development/Languages/Python
-Url: https://github.com/pyca/pynacl/
+URL: https://github.com/pyca/pynacl/
Source: https://pypi.org/packages/source/P/PyNaCl/PyNaCl-%{version}.tar.gz
# https://github.com/pyca/pynacl/commit/a8c08b18f3a2e8f2140c531afaf42715fcab6…
Patch0: python-PyNaCl-hypothesis-remove-average_size.patch
Patch1: fix_tests.patch
-BuildRequires: %{python_module base}
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pycparser}
BuildRequires: %{python_module setuptools}
-# SECTION test requirements
-BuildRequires: %{python_module hypothesis >= 3.27.0}
-BuildRequires: %{python_module pytest >= 3.2.1}
-# /SECTION
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(libsodium)
+Requires: python-cffi
Requires: python-six
+# SECTION test requirements
+BuildRequires: %{python_module hypothesis >= 3.27.0}
+BuildRequires: %{python_module pytest >= 3.2.1}
+# /SECTION
%python_subpackages
%description
@@ -63,7 +63,7 @@
%python_expand %fdupes %{buildroot}/%{$python_sitearch}
%check
-%pytest_arch -v
+%pytest_arch
%files %{python_files}
%license LICENSE
1
0
Hello community,
here is the log from the commit of package python-raven for openSUSE:Factory checked in at 2019-09-30 15:56:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-raven (Old)
and /work/SRC/openSUSE:Factory/.python-raven.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-raven"
Mon Sep 30 15:56:04 2019 rev:10 rq:732924 version:6.10.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-raven/python-raven.changes 2019-09-02 12:44:15.993758967 +0200
+++ /work/SRC/openSUSE:Factory/.python-raven.new.2352/python-raven.changes 2019-09-30 15:56:16.041716666 +0200
@@ -1,0 +2,7 @@
+Mon Sep 23 16:56:47 UTC 2019 - John Vandenberg <jayvdb(a)gmail.com>
+
+- Undo tornado version change causing package to break
+- Re-enable test suite
+- Remove unnecessary build dependencies on dev tools
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-raven.spec ++++++
--- /var/tmp/diff_new_pack.X3yQmH/_old 2019-09-30 15:56:17.917711673 +0200
+++ /var/tmp/diff_new_pack.X3yQmH/_new 2019-09-30 15:56:17.921711663 +0200
@@ -27,6 +27,7 @@
Source: https://files.pythonhosted.org/packages/source/r/raven/raven-%{version}.tar…
# https://github.com/getsentry/raven-python/issues/1284
Patch0: remove-unittest2.patch
+BuildRequires: %{python_module Django}
BuildRequires: %{python_module Flask >= 0.8}
BuildRequires: %{python_module Flask-Login >= 0.2.0}
BuildRequires: %{python_module Logbook}
@@ -39,22 +40,16 @@
BuildRequires: %{python_module bottle}
BuildRequires: %{python_module celery >= 2.5}
BuildRequires: %{python_module exam >= 0.5.2}
-BuildRequires: %{python_module flake8 >= 2.6}
BuildRequires: %{python_module kombu}
BuildRequires: %{python_module mock}
-BuildRequires: %{python_module nose}
-BuildRequires: %{python_module pycodestyle}
-BuildRequires: %{python_module pytest >= 3.0.0}
-BuildRequires: %{python_module pytest-cov}
-BuildRequires: %{python_module pytest-flake8}
+BuildRequires: %{python_module pytest < 4}
+BuildRequires: %{python_module pytest-django}
BuildRequires: %{python_module pytest-pythonpath}
BuildRequires: %{python_module pytest-timeout >= 0.4}
-BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tornado >= 4.1}
-BuildConflicts: %{python_module tornado >= 5}
BuildRequires: %{python_module vine}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -72,6 +67,7 @@
%prep
%setup -q -n raven-%{version}
%autopatch -p1
+rm -f setup.cfg tox.ini pytest.ini
%build
%python_build
@@ -81,11 +77,9 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_expand rm -rf %{buildroot}/%{$python_sitelib}/raven/data/cacert.pem
-# Tests are completely broken https://github.com/getsentry/raven-python/issues/1283
-# %%check
-# %%{python_expand export PYTHONPATH=%{buildroot}%%{$python_sitelib}
-# py.test-%%{$python_bin_suffix} -k 'not (TornadoAsyncClientTestCase or TornadoTransportTests)'
-# }
+%check
+export DJANGO_SETTINGS_MODULE=tests.contrib.django.settings
+%pytest -k 'not (TornadoAsyncClientTestCase or TornadoTransportTests)'
%files %{python_files}
%license LICENSE
1
0
Hello community,
here is the log from the commit of package python-contextlib2 for openSUSE:Factory checked in at 2019-09-30 15:55:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-contextlib2 (Old)
and /work/SRC/openSUSE:Factory/.python-contextlib2.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-contextlib2"
Mon Sep 30 15:55:44 2019 rev:4 rq:732920 version:0.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-contextlib2/python-contextlib2.changes 2018-05-23 16:09:36.960852240 +0200
+++ /work/SRC/openSUSE:Factory/.python-contextlib2.new.2352/python-contextlib2.changes 2019-09-30 15:55:53.429776842 +0200
@@ -1,0 +2,8 @@
+Tue Sep 24 11:44:26 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 0.6.0:
+ * Various minor fixes and metadata updates
+ * Add nullcontext
+ * Add AbstractContextManager
+
+-------------------------------------------------------------------
Old:
----
contextlib2-0.5.5.tar.gz
New:
----
contextlib2-0.6.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-contextlib2.spec ++++++
--- /var/tmp/diff_new_pack.KUtQ0N/_old 2019-09-30 15:55:54.209774767 +0200
+++ /var/tmp/diff_new_pack.KUtQ0N/_new 2019-09-30 15:55:54.213774757 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-contextlib2
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2014 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -13,13 +13,13 @@
# 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/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-contextlib2
-Version: 0.5.5
+Version: 0.6.0
Release: 0
Summary: Backports and enhancements for the contextlib module
License: Python-2.0
++++++ contextlib2-0.5.5.tar.gz -> contextlib2-0.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/NEWS.rst new/contextlib2-0.6.0/NEWS.rst
--- old/contextlib2-0.5.5/NEWS.rst 2017-04-25 05:51:01.000000000 +0200
+++ new/contextlib2-0.6.0/NEWS.rst 2019-09-21 15:16:23.000000000 +0200
@@ -1,6 +1,13 @@
Release History
---------------
+0.6.0 (Unreleased)
+^^^^^^^^^^^^^^^^^^
+
+* Issue `#16 <https://github.com/jazzband/contextlib2/issues/16>`__:
+ Backport `AbstractContextManager` from Python 3.6 and `nullcontext`
+ from Python 3.7 (patch by John Vandenberg)
+
0.5.5 (2017-04-25)
^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/PKG-INFO new/contextlib2-0.6.0/PKG-INFO
--- old/contextlib2-0.5.5/PKG-INFO 2017-04-25 05:51:27.000000000 +0200
+++ new/contextlib2-0.6.0/PKG-INFO 2019-09-21 15:16:50.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: contextlib2
-Version: 0.5.5
+Version: 0.6.0
Summary: Backports and enhancements for the contextlib module
Home-page: http://contextlib2.readthedocs.org
Author: Nick Coghlan
@@ -47,29 +47,22 @@
Versions currently tested in both tox and Travis CI are:
- * CPython 2.6
* CPython 2.7
* CPython 3.4
* CPython 3.5
* CPython 3.6
- * CPython 3.7 (CPython development branch)
+ * CPython 3.7
* PyPy
-
- Versions currently tested only in tox are:
-
* PyPy3
- This is due to an exception chaining compatibility bug that was fixed in
- the PyPy3 5.5 alpha release, while the version on Travis CI (as of April 2017)
- is still the older PyPy3 2.4.0 release.
-
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/README.rst new/contextlib2-0.6.0/README.rst
--- old/contextlib2-0.5.5/README.rst 2017-04-25 05:51:01.000000000 +0200
+++ new/contextlib2-0.6.0/README.rst 2019-09-21 15:16:23.000000000 +0200
@@ -39,18 +39,10 @@
Versions currently tested in both tox and Travis CI are:
-* CPython 2.6
* CPython 2.7
* CPython 3.4
* CPython 3.5
* CPython 3.6
-* CPython 3.7 (CPython development branch)
+* CPython 3.7
* PyPy
-
-Versions currently tested only in tox are:
-
* PyPy3
-
-This is due to an exception chaining compatibility bug that was fixed in
-the PyPy3 5.5 alpha release, while the version on Travis CI (as of April 2017)
-is still the older PyPy3 2.4.0 release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/VERSION.txt new/contextlib2-0.6.0/VERSION.txt
--- old/contextlib2-0.5.5/VERSION.txt 2017-04-25 05:51:01.000000000 +0200
+++ new/contextlib2-0.6.0/VERSION.txt 2019-09-21 15:16:23.000000000 +0200
@@ -1 +1 @@
-0.5.5
+0.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/contextlib2.egg-info/PKG-INFO new/contextlib2-0.6.0/contextlib2.egg-info/PKG-INFO
--- old/contextlib2-0.5.5/contextlib2.egg-info/PKG-INFO 2017-04-25 05:51:27.000000000 +0200
+++ new/contextlib2-0.6.0/contextlib2.egg-info/PKG-INFO 2019-09-21 15:16:50.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: contextlib2
-Version: 0.5.5
+Version: 0.6.0
Summary: Backports and enhancements for the contextlib module
Home-page: http://contextlib2.readthedocs.org
Author: Nick Coghlan
@@ -47,29 +47,22 @@
Versions currently tested in both tox and Travis CI are:
- * CPython 2.6
* CPython 2.7
* CPython 3.4
* CPython 3.5
* CPython 3.6
- * CPython 3.7 (CPython development branch)
+ * CPython 3.7
* PyPy
-
- Versions currently tested only in tox are:
-
* PyPy3
- This is due to an exception chaining compatibility bug that was fixed in
- the PyPy3 5.5 alpha release, while the version on Travis CI (as of April 2017)
- is still the older PyPy3 2.4.0 release.
-
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/contextlib2.py new/contextlib2-0.6.0/contextlib2.py
--- old/contextlib2-0.5.5/contextlib2.py 2017-04-25 05:51:01.000000000 +0200
+++ new/contextlib2-0.6.0/contextlib2.py 2019-09-21 15:16:23.000000000 +0200
@@ -1,18 +1,77 @@
"""contextlib2 - backports and enhancements to the contextlib module"""
+import abc
import sys
import warnings
from collections import deque
from functools import wraps
-__all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack",
+__all__ = ["contextmanager", "closing", "nullcontext",
+ "AbstractContextManager",
+ "ContextDecorator", "ExitStack",
"redirect_stdout", "redirect_stderr", "suppress"]
# Backwards compatibility
__all__ += ["ContextStack"]
+
+# Backport abc.ABC
+if sys.version_info[:2] >= (3, 4):
+ _abc_ABC = abc.ABC
+else:
+ _abc_ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()})
+
+
+# Backport classic class MRO
+def _classic_mro(C, result):
+ if C in result:
+ return
+ result.append(C)
+ for B in C.__bases__:
+ _classic_mro(B, result)
+ return result
+
+
+# Backport _collections_abc._check_methods
+def _check_methods(C, *methods):
+ try:
+ mro = C.__mro__
+ except AttributeError:
+ mro = tuple(_classic_mro(C, []))
+
+ for method in methods:
+ for B in mro:
+ if method in B.__dict__:
+ if B.__dict__[method] is None:
+ return NotImplemented
+ break
+ else:
+ return NotImplemented
+ return True
+
+
+class AbstractContextManager(_abc_ABC):
+ """An abstract base class for context managers."""
+
+ def __enter__(self):
+ """Return `self` upon entering the runtime context."""
+ return self
+
+ @abc.abstractmethod
+ def __exit__(self, exc_type, exc_value, traceback):
+ """Raise any exception triggered within the runtime context."""
+ return None
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ """Check whether subclass is considered a subclass of this ABC."""
+ if cls is AbstractContextManager:
+ return _check_methods(C, "__enter__", "__exit__")
+ return NotImplemented
+
+
class ContextDecorator(object):
- "A base class or mixin that enables context managers to work as decorators."
+ """A base class or mixin that enables context managers to work as decorators."""
def refresh_cm(self):
"""Returns the context manager used to actually wrap the call to the
@@ -176,8 +235,10 @@
"""
def __init__(self, thing):
self.thing = thing
+
def __enter__(self):
return self.thing
+
def __exit__(self, *exc_info):
self.thing.close()
@@ -289,7 +350,7 @@
# but use exec to avoid SyntaxError in Python 3
def _reraise_with_existing_context(exc_details):
exc_type, exc_value, exc_tb = exc_details
- exec ("raise exc_type, exc_value, exc_tb")
+ exec("raise exc_type, exc_value, exc_tb")
# Handle old-style classes if they exist
try:
@@ -302,8 +363,9 @@
def _get_type(obj):
obj_type = type(obj)
if obj_type is InstanceType:
- return obj.__class__ # Old-style class
- return obj_type # New-style class
+ return obj.__class__ # Old-style class
+ return obj_type # New-style class
+
# Inspired by discussions on http://bugs.python.org/issue13585
class ExitStack(object):
@@ -417,6 +479,7 @@
_reraise_with_existing_context(exc_details)
return received_exc and suppressed_exc
+
# Preserve backwards compatibility
class ContextStack(ExitStack):
"""Backwards compatibility alias for ExitStack"""
@@ -434,3 +497,22 @@
def preserve(self):
return self.pop_all()
+
+
+class nullcontext(AbstractContextManager):
+ """Context manager that does no additional processing.
+ Used as a stand-in for a normal context manager, when a particular
+ block of code is only sometimes used with a normal context manager:
+ cm = optional_cm if condition else nullcontext()
+ with cm:
+ # Perform operation, using optional_cm if condition is True
+ """
+
+ def __init__(self, enter_result=None):
+ self.enter_result = enter_result
+
+ def __enter__(self):
+ return self.enter_result
+
+ def __exit__(self, *excinfo):
+ pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/docs/index.rst new/contextlib2-0.6.0/docs/index.rst
--- old/contextlib2-0.5.5/docs/index.rst 2017-04-25 05:51:01.000000000 +0200
+++ new/contextlib2-0.6.0/docs/index.rst 2019-09-21 15:16:23.000000000 +0200
@@ -21,11 +21,13 @@
Additions Relative to the Standard Library
------------------------------------------
-This module is primarily a backport of the Python 3.5 version of
-:mod:`contextlib` to earlier releases. However, it is also a proving ground
-for new features not yet part of the standard library.
+This module is primarily a backport of the Python 3.6 version of
+:mod:`contextlib` to earlier releases. It includes `nullcontext` from
+Python 3.7, however it does not yet provide async context management
+support from Python 3.7.
-There are currently no such features in the module.
+However, it is also a proving ground for new features not yet part of the
+standard library. There are currently no such features in the module.
Refer to the :mod:`contextlib` documentation for details of which
versions of Python 3 introduce the various APIs provided in this module.
@@ -36,6 +38,19 @@
Functions and classes provided:
+
+.. class:: AbstractContextManager
+
+ An :term:`abstract base class` for classes that implement
+ :meth:`object.__enter__` and :meth:`object.__exit__`. A default
+ implementation for :meth:`object.__enter__` is provided which returns
+ ``self`` while :meth:`object.__exit__` is an abstract method which by default
+ returns ``None``.
+
+ .. versionadded:: 0.6.0
+ Part of the standard library in Python 3.6 and later
+
+
.. decorator:: contextmanager
This function is a :term:`decorator` that can be used to define a factory
@@ -110,6 +125,39 @@
``page.close()`` will be called when the :keyword:`with` block is exited.
+.. function:: nullcontext(enter_result=None)
+
+ Return a context manager that returns *enter_result* from ``__enter__``, but
+ otherwise does nothing. It is intended to be used as a stand-in for an
+ optional context manager, for example::
+
+ def myfunction(arg, ignore_exceptions=False):
+ if ignore_exceptions:
+ # Use suppress to ignore all exceptions.
+ cm = contextlib.suppress(Exception)
+ else:
+ # Do not ignore any exceptions, cm has no effect.
+ cm = contextlib.nullcontext()
+ with cm:
+ # Do something
+
+ An example using *enter_result*::
+
+ def process_file(file_or_path):
+ if isinstance(file_or_path, str):
+ # If string, open file
+ cm = open(file_or_path)
+ else:
+ # Caller is responsible for closing file
+ cm = nullcontext(file_or_path)
+
+ with cm as file:
+ # Perform processing on the file
+
+ .. versionadded:: 0.6.0
+ Part of the standard library in Python 3.7 and later
+
+
.. function:: suppress(*exceptions)
Return a context manager that suppresses any of the specified exceptions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/setup.py new/contextlib2-0.6.0/setup.py
--- old/contextlib2-0.5.5/setup.py 2017-04-25 05:51:01.000000000 +0200
+++ new/contextlib2-0.6.0/setup.py 2019-09-21 15:16:23.000000000 +0200
@@ -7,6 +7,7 @@
setup(
name='contextlib2',
version=open('VERSION.txt').read().strip(),
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
py_modules=['contextlib2'],
license='PSF License',
description='Backports and enhancements for the contextlib module',
@@ -19,12 +20,12 @@
'License :: OSI Approved :: Python Software Foundation License',
# These are the Python versions tested, it may work on others
'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/contextlib2-0.5.5/test_contextlib2.py new/contextlib2-0.6.0/test_contextlib2.py
--- old/contextlib2-0.5.5/test_contextlib2.py 2017-04-25 05:51:01.000000000 +0200
+++ new/contextlib2-0.6.0/test_contextlib2.py 2019-09-21 15:16:23.000000000 +0200
@@ -15,6 +15,58 @@
requires_docstrings = unittest.skipIf(sys.flags.optimize >= 2,
"Test requires docstrings")
+
+class TestAbstractContextManager(unittest.TestCase):
+
+ def test_enter(self):
+ class DefaultEnter(AbstractContextManager):
+ def __exit__(self, *args):
+ super().__exit__(*args)
+
+ manager = DefaultEnter()
+ self.assertIs(manager.__enter__(), manager)
+
+ def test_exit_is_abstract(self):
+ class MissingExit(AbstractContextManager):
+ pass
+
+ with self.assertRaises(TypeError):
+ MissingExit()
+
+ def test_structural_subclassing(self):
+ # New style classes used here
+ class ManagerFromScratch(object):
+ def __enter__(self):
+ return self
+ def __exit__(self, exc_type, exc_value, traceback):
+ return None
+
+ self.assertTrue(issubclass(ManagerFromScratch, AbstractContextManager))
+
+ class DefaultEnter(AbstractContextManager):
+ def __exit__(self, *args):
+ super().__exit__(*args)
+
+ self.assertTrue(issubclass(DefaultEnter, AbstractContextManager))
+
+ if sys.version_info[:2] <= (3, 0):
+ def test_structural_subclassing_classic(self):
+ # Old style classes used here
+ class ManagerFromScratch:
+ def __enter__(self):
+ return self
+ def __exit__(self, exc_type, exc_value, traceback):
+ return None
+
+ self.assertTrue(issubclass(ManagerFromScratch, AbstractContextManager))
+
+ class DefaultEnter(AbstractContextManager):
+ def __exit__(self, *args):
+ super().__exit__(*args)
+
+ self.assertTrue(issubclass(DefaultEnter, AbstractContextManager))
+
+
class ContextManagerTestCase(unittest.TestCase):
def test_contextmanager_plain(self):
@@ -911,6 +963,16 @@
# This shouldn't raise an exception.
stack.enter_context(suppress())
+
+class NullcontextTestCase(unittest.TestCase):
+ def test_nullcontext(self):
+ class C:
+ pass
+ c = C()
+ with nullcontext(c) as c_in:
+ self.assertIs(c_in, c)
+
+
if __name__ == "__main__":
import unittest
unittest.main()
1
0