The HTML5 output from Sphinx 2.x adds '<p>' tags within list elements. Using a new prevtag attribute, ignore these instead of emitting unwanted '\n\n'.
Also stop looking for 'first' classes on tags (no longer present) and fix the bug of double-spacing instead of single spacing after <pre> blocks.
(cherry picked from commit 580bdb0ece)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
…aders. (GH-15239)
Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
- a case without trailing whitespace
- an invalid encoded word
https://bugs.python.org/issue37764
This fix should also be backported to 3.7 and 3.8
https://bugs.python.org/issue37764
(cherry picked from commit c5b242f87f)
Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
https://bugs.python.org/issue37764
Extending the hover delay in test_tooltip should avoid spurious test_idle failures.
One longer delay instead of two shorter delays results in a net speedup.
(cherry picked from commit 132acaba5a)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
Adds a link to `dateutil.parser.isoparse` in the documentation.
It would be nice to set up intersphinx for things like this, but I think we can leave that for a separate PR.
CC: @pitrou
[bpo-37979](https://bugs.python.org/issue37979)
https://bugs.python.org/issue37979
Automerge-Triggered-By: @pitrou
(cherry picked from commit 59725f3bad)
Co-authored-by: Paul Ganssle <paul@ganssle.io>
* Fix call_matcher for mock when using methods
* Add NEWS entry
* Use None check and convert doctest to unittest
* Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests.
* Use reset_mock instead of reinitialization. Change inner class constructor signature for check
* Reword comment regarding call object lookup logic
(cherry picked from commit c96127821e)
Co-authored-by: Xtreak <tir.karthi@gmail.com>
These appeared in commit c5ae169e1. The comment on them, as well as
the presence among them of a rule for the .gitignore file itself,
indicate that the author intended these lines to remain only in their
own local working tree -- not to get committed even to their own repo,
let alone merged upstream.
They did nevertheless get committed, because it turns out that Git
takes no notice of what .gitignore says about files that it's already
tracking... for example, this .gitignore file itself.
Give effect to these lines' original intention, by deleting them. :-)
Git tip, for reference: the `.git/info/exclude` file is a handy way
to do exactly what these lines were originally intended to do. A
related handy file is `~/.config/git/ignore`. See gitignore(5),
aka `git help ignore`, for details.
https://bugs.python.org/issue37936
Automerge-Triggered-By: @zware
(cherry picked from commit 8c9e9b0cd5)
Co-authored-by: Greg Price <gnprice@gmail.com>
In a38e9d1399 pyconfig.h.in was
manually edited and that edit was overwritten when running autoreconf.
(cherry picked from commit 52c1a6a15a)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
These were caused by keeping around a reference to the Squeezer
instance and calling it's load_font() upon config changes, which
sometimes happened even if the shell window no longer existed.
This change completely removes that mechanism, instead having the
editor window properly update its width attribute, which can then
be used by Squeezer.
(cherry picked from commit d4b4c00b57)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
"Arguments may be integers... " could be misunderstand as they also
could be strings.
New wording makes it clear that arguments have to be integers.
modified: Doc/library/datetime.rst
Automerge-Triggered-By: @pganssle
(cherry picked from commit c5218fce02)
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
Fix typo in description of link to mozilla bug report writing guidelines.
Though the URL is misleading, we're indeed trying to write bug _reports_, not to add bugs.
Automerge-Triggered-By: @ned-deily
(cherry picked from commit e17f201cd9)
Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
_PyTime_t type is defined as int64_t, and so min/max are INT64_MIN/INT64_MAX,
not PY_LLONG_MIN/PY_LLONG_MAX.
(cherry picked from commit 8e76c45622)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Special characters in email address header display names are normally
put within double quotes. However, encoded words (=?charset?x?...?=) are
not allowed withing double quotes. When the header contains a word with
special characters and another word that must be encoded, the first one
must also be encoded.
In the next example, the display name in the From header is quoted and
therefore the comma is allowed; in the To header, the comma is not
within quotes and not encoded, which is not allowed and therefore
rejected by some mail servers.
From: "Foo Bar, France" <foo@example.com>
To: Foo Bar, =?utf-8?q?Espa=C3=B1a?= <foo@example.com>
https://bugs.python.org/issue37482
(cherry picked from commit df0c21ff46)
Co-authored-by: bsiem <52461103+bsiem@users.noreply.github.com>
Added back mention that ensure_future actually scheduled obj. This documentation just mentions what ensure_future returns, so I did not realize that ensure_future also schedules obj.
(cherry picked from commit 092911d5c0)
Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
Fixed wrong link to Telnet.open() method in telnetlib documentation.
(cherry picked from commit e0b6117e27)
Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
If this service had thoroughly vanished, we could just ignore the
test until someone gets around to either recreating such a service
or redesigning the test to somehow work locally. The
`support.transient_internet` mechanism catches the failure to
resolve the domain name, and skips the test.
But in fact the domain snakebite.net does still exist, as do its
nameservers -- and they can be quite slow to reply. As a result
this test can easily take 20-30s before it gets auto-skipped.
So, skip the test explicitly up front.
(cherry picked from commit 5b95a1507e)
Co-authored-by: Greg Price <gnprice@gmail.com>
pymalloc_alloc() now returns directly the pointer, return NULL on
memory allocation error.
allocate_from_new_pool() already uses NULL as marker for "allocation
failed".
(cherry picked from commit 18f8dcfa10)
(cherry picked from commit 30e5aff5fb)
The documented definition was much broader than the real one:
there are tons of characters with general category "Other",
and we don't (and shouldn't) treat most of them as whitespace.
Rewrite the definition to agree with the comment on
_PyUnicode_IsWhitespace, and with the logic in makeunicodedata.py,
which is what generates that function and so ultimately governs.
Add suitable breadcrumbs so that a reader who wants to pin down
exactly what this definition means (what's a "bidirectional class"
of "B"?) can do so. The `unicodedata` module documentation is an
appropriate central place for our references to Unicode's own copious
documentation, so point there.
Also add to the isspace() test a thorough check that the
implementation agrees with the intended definition.
(cherry picked from commit 8c1c426a63)
Co-authored-by: Greg Price <gnprice@gmail.com>
Because mod, func, class, etc all share one namespace, :func:time creates a link to the time module doc page rather than the time.time function.
(cherry picked from commit 1b1d0514ad)
Co-authored-by: Éric Araujo <merwok@netwok.org>
This fixes an inconsistency between the Python and C implementations of
the datetime module. The pure python version of the code was not
accepting offsets greater than 23:59 but less than 24:00. This is an
accidental legacy of the original implementation, which was put in place
before tzinfo allowed sub-minute time zone offsets.
GH-14878
(cherry picked from commit 92c7e30adf)
Without indendation, seems like strcpy line is parallel to `if` condition.
(cherry picked from commit 69f37bcb28)
Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
X509_AUX is an odd, note widely used, OpenSSL extension to the X509 file format. This function doesn't actually use any of the extra metadata that it parses, so just use the standard API.
Automerge-Triggered-By: @tiran
(cherry picked from commit 40dad9545a)
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
faulthandler now allocates a dedicated stack of SIGSTKSZ*2 bytes,
instead of just SIGSTKSZ bytes. Calling the previous signal handler
in faulthandler signal handler uses more than SIGSTKSZ bytes of stack
memory on some platforms.
(cherry picked from commit ac827edc49)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
FreeBSD implementation of poll(2) restricts the timeout argument to be
either zero, or positive, or equal to INFTIM (-1).
Unless otherwise overridden, socket timeout defaults to -1. This value
is then converted to milliseconds (-1000) and used as argument to the
poll syscall. poll returns EINVAL (22), and the connection fails.
This bug was discovered during the EINTR handling testing, and the
reproduction code can be found in
https://bugs.python.org/issue23618 (see connect_eintr.py,
attached). On GNU/Linux, the example runs as expected.
This change is trivial:
If the supplied timeout value is negative, truncate it to -1.
(cherry picked from commit 2814620657)
Co-authored-by: Artem Khramov <akhramov@pm.me>
Fix the implementation of curses addch(str, color_pair): pass the
color pair to setcchar(), instead of always passing 0 as the color
pair.
(cherry picked from commit 077af8c2c9)