diff --git a/README.rst b/README.rst index 9a3383e..ea80653 100644 --- a/README.rst +++ b/README.rst @@ -22,6 +22,9 @@ are `Mezzanine `_ and `ObsPy Features -------- +.. image:: https://travis-ci.org/PythonCharmers/python-future.svg?branch=master + :target: https://travis-ci.org/PythonCharmers/python-future + - ``future.builtins`` package (also available as ``builtins`` on Py2) provides backports and remappings for 20 builtins with different semantics on Py3 versus Py2 diff --git a/debian/changelog b/debian/changelog index 945d210..cad5000 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -pytohn-future (0.18.2-ok2) yangtze; urgency=medium +python-future (0.18.2-1-ok1) nile; urgency=medium - * zfj_h CVE-2022-40899 安全更新:Python Charmers Future 0.18.2版本及之前版本安全漏洞. + * update upstream version - -- huang Tue, 21 Feb 2023 14:14:10 +0800 + -- liyang Thu, 13 Jun 2024 19:03:57 +0800 python-future (0.18.2-ok1) yangtze; urgency=medium diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 57b385c..c979ab2 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -13,6 +13,15 @@ {% block footer %} {{ super() }} {% endblock %} diff --git a/docs/_templates/sidebartoc.html b/docs/_templates/sidebartoc.html index 2edf636..0d119af 100644 --- a/docs/_templates/sidebartoc.html +++ b/docs/_templates/sidebartoc.html @@ -1 +1 @@ -{{ toctree(maxdepth=toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }} +{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=True, includehidden=theme_globaltoc_includehidden|tobool) }} diff --git a/docs/conf.py b/docs/conf.py index ccb73fb..fd106fa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,7 @@ from __future__ import absolute_import, print_function import sys, os from future import __version__ +import sphinx_bootstrap_theme # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -97,6 +98,79 @@ pygments_style = 'sphinx' # 'futureext.FutureStyle' # -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'bootstrap' +html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + # Navigation bar title. (Default: ``project`` value) + #'navbar_title': "Python-Future", + + # Tab name for entire site. (Default: "Site") + 'navbar_site_name': "Contents", + + # A list of tuples containing pages or urls to link to. + # Valid tuples should be in the following forms: + # (name, page) # a link to a page + # (name, "/aa/bb", 1) # a link to an arbitrary relative url + # (name, "http://example.com", True) # arbitrary absolute url + # Note the "1" or "True" value above as the third argument to indicate + # an arbitrary url. + 'navbar_links': [ + ("Overview", "overview"), + ("Cheat Sheet", "compatible_idioms.html", True), + ("FAQ", "faq.html", True), + # ("Link", "http://example.com", True), + ], + + # Render the next and previous page links in navbar. (Default: true) + 'navbar_sidebarrel': False, + + # Render the current pages TOC in the navbar. (Default: true) + 'navbar_pagenav': True, + + # Global TOC depth for "site" navbar tab. (Default: 1) + # Switching to -1 shows all levels. + 'globaltoc_depth': 3, + + # Include hidden TOCs in Site navbar? + # + # Note: If this is "false", you cannot have mixed ``:hidden:`` and + # non-hidden ``toctree`` directives in the same page, or else the build + # will break. + # + # Values: "true" (default) or "false" + 'globaltoc_includehidden': "true", + + # HTML navbar class (Default: "navbar") to attach to
element. + # For black navbar, do "navbar navbar-inverse" + 'navbar_class': "navbar navbar-inverse", + + # Fix navigation bar to top of page? + # Values: "true" (default) or "false" + 'navbar_fixed_top': "true", + + # Location of link to source. + # Options are "nav" (default), "footer" or anything else to exclude. + 'source_link_position': "none", + + # Bootswatch (http://bootswatch.com/) theme. + # + # Options are nothing with "" (default) or the name of a valid theme + # such as "amelia" or "cosmo" or "united". + 'bootswatch_theme': "cerulean", + + # Choose Bootstrap version. + # Values: "3" (default) or "2" (in quotes) + 'bootstrap_version': "3", +} + + # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] diff --git a/setup.py b/setup.py index 96090d6..11d694c 100755 --- a/setup.py +++ b/setup.py @@ -133,6 +133,7 @@ try: 'builtins', # Catch the case that configparser is in the build folder # from a previous version of `future`: + 'configparser', 'copyreg', 'html', 'http', diff --git a/src/future/backports/http/cookiejar.py b/src/future/backports/http/cookiejar.py index 0ad80a0..af3ef41 100644 --- a/src/future/backports/http/cookiejar.py +++ b/src/future/backports/http/cookiejar.py @@ -225,14 +225,10 @@ LOOSE_HTTP_DATE_RE = re.compile( (?::(\d\d))? # optional seconds )? # optional clock \s* - (?: - ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+) # timezone + ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone \s* - )? - (?: - \(\w+\) # ASCII representation of timezone in parens. - \s* - )?$""", re.X | re.ASCII) + (?:\(\w+\))? # ASCII representation of timezone in parens. + \s*$""", re.X | re.ASCII) def http2time(text): """Returns time in seconds since epoch of time represented by a string. @@ -302,11 +298,9 @@ ISO_DATE_RE = re.compile( (?::?(\d\d(?:\.\d*)?))? # optional seconds (and fractional) )? # optional clock \s* - (?: - ([-+]?\d\d?:?(:?\d\d)? - |Z|z) # timezone (Z is "zero meridian", i.e. GMT) - \s* - )?$""", re.X | re. ASCII) + ([-+]?\d\d?:?(:?\d\d)? + |Z|z)? # timezone (Z is "zero meridian", i.e. GMT) + \s*$""", re.X | re. ASCII) def iso2time(text): """ As for http2time, but parses the ISO 8601 formats: diff --git a/tests/test_future/test_bytes.py b/tests/test_future/test_bytes.py index bf3135f..b9b157d 100644 --- a/tests/test_future/test_bytes.py +++ b/tests/test_future/test_bytes.py @@ -7,8 +7,6 @@ from __future__ import absolute_import, unicode_literals, print_function from future.builtins import * from future import utils -import sys - from numbers import Integral from future.tests.base import unittest, expectedFailurePY2