| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Specify that blocks are non-overlapping. Change '!=' to '<'.
|
| |
|
|
|
| |
"threadsafe"
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
isasyncgenfunction work with functools.partial (GH-9903)
inspect.isfunction() processes both inspect.isfunction(func) and
inspect.isfunction(partial(func, arg)) correctly but some other functions in the
inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction)
lack this functionality. This commits adds a new check in the mentioned functions
in the inspect module so they can work correctly with arbitrarily nested partial
functions.
|
| |
|
| |
|
|
|
|
| |
The MagicMock class supports many magic methods, but not __fspath__. To ease
testing with modules such as os.path, this function is now supported by default.
|
|
|
|
|
| |
(GH-10098)
https://bugs.python.org/issue35038
|
| |
|
|
|
| |
The spec gets stored on modules with the __spec__ attribute, not spec.
|
|
|
| |
Replace str.format with f-strings in the code examples of asyncio-task documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix the documentation of copy2, as it does not copy file ownership (user and
group), only mode, mtime, atime and flags.
The original text was confusing to developers as it suggested that this
command is the same as 'cp -p', but according to cp(1), '-p' copies file
ownership as well.
Clarify which metadata is copied by shutil.copystat in its docstring.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
http.server.rst (#10005)
* bpo-34576 - Fix the formatting for security considerations in http.server.rst
* Address review comment.
|
| |
|
|
|
|
| |
The symbol table was not exposing functionality to query the nonlocal symbols
in a function or to check if a particular symbol is nonlocal.
|
|
|
|
|
|
|
|
| |
docs (#5621)
Add restriction on the offset parameter for mmap.flush.
Explain that ALLOCATIONGRANULARITY is the same as PAGESIZE in Unix.
|
|
|
|
|
|
|
|
|
| |
If buffering=1 is specified for open() in binary mode, it is silently
treated as buffering=-1 (i.e., the default buffer size).
Coupled with the fact that line buffering is always supported in Python 2,
such behavior caused several issues (e.g., bpo-10344, bpo-21332).
Warn that line buffering is not supported if open() is called with
binary mode and buffering=1.
|
| |
|
|
|
|
|
| |
The docs in `library/unittest.mock` have been updated to remove
confusing terms about submock and be explicit about the behavior
expected.
|
| |
|
|
|
|
| |
from_splittable methods (#9865)
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
According to the versionchanged note, the `strict` argument was removed in 3.3 and `policy` was added, but the name of the argument in the paragraph wasn't updated.
|
|
|
|
| |
EchoServerClientProtocol to EchoServerProtocol (GH-9859)
|
|
|
|
|
|
| |
* fix dangling mention of key=str.lower in heapq doc
* Fix dangling mention of keyfunc example for sorted()
|
|
|
|
| |
matches in logging.Formatter (GH-9703)
|
|
|
|
|
|
|
| |
the queue is closed. (GH-9010)
Previously, put() and get() would raise AssertionError and OSError,
respectively.
|
|
|
|
|
|
| |
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.
Co-Authored-By: Georg Brandl <georg@python.org>
|
| |
|
|
|
|
| |
It was proposed to add an warning for http.server regarding security
issues. The wording was provided at bpo-26005 by @orsenthil
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-9607)
Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in
3.7.0 in bpo-29708. The change is bad, as it unconditionally overrides
*invalidation_mode*, even if it was passed as an explicit argument to
``py_compile.compile()`` or ``compileall``. An environment variable
should *never* override an explicit argument to a library function.
That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH``
environment variable is set.
This changes ``py_compile.compile()`` to only look at
``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified.
I also made various relevant tests run with explicit control over the
value of ``SOURCE_DATE_EPOCH``.
While looking at this, I noticed that ``zipimport`` does not work
with hash-based .pycs _at all_, though I left the fixes for
subsequent commits.
|
|
|
|
| |
:meth:`mimetypes.MimeTypes.guess_type` now accepts :term:`path-like object` in addition to url strings.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* bpo-33014: Clarify str.isidentifier docstring
* bpo-33014: Add code example in isidentifier documentation
|
|
|
| |
https://bugs.python.org/issue34901
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Documentation of UTC offset update
Since changes in the UTC offset that allows sub-minute offsets, the documentation needs update:
- "%z" format code documentation update
Karthikeyan Singaravelan commented on bugs.python.org:
Added as part of 018d353c1c8c87767d2335cd884017c2ce12e045 and a fix regarding duplicate words for that part was added at bac2d5ba30339298db7d4caa9c8cd31d807cf081.
Relevant format string at https://github.com/python/cpython/pull/2896/files#diff-25e2d173c84057d069b7890450714eddR214.
Relevant test case with 6-digit string for microsecond : https://github.com/python/cpython/pull/2896/files#diff-acc40bec51c7de832de3361db3edae52R309.
Table at https://docs.python.org/3.7/library/datetime.html#strftime-and-strptime-behavior could also be updated with microseconds being optional in the second column
%z | UTC offset in the form ±HHMM[SS] (empty string if the object is naive). | (empty), +0000, -0400, +1030
- isoformat documentation update
According to me, needs confirmation:
Relevant format string at https://github.com/python/cpython/pull/4699/files#diff-25e2d173c84057d069b7890450714eddR176
Relevant test case at https://github.com/python/cpython/pull/4699/files#diff-25e2d173c84057d069b7890450714edd
* From Martin Panter: some style improvment;
From @pganssle: using f for fractional part of seconds in all file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The added functions are as below :
| os module | Pathlib |
| ------------- | ------------- |
| os.chmod | Path.chmod |
| os.mkdir | Path.mkdir |
| os.rename | Path.rename |
| os.replace | Path.replace |
| os.rmdir | Path.rmdir |
| os.remove, os.unlink | Path.unlink |
| os.path.samefile | Path.samefile |
Thanks
https://bugs.python.org/issue34825
|
| |
|
|
|
|
|
| |
assertWarns/assertWarnsRegex/assertRaisesRegex is keyword-only. (GH-9680)
A follow up to be4e5b89204283a62e369439025f00362d0424f6.
|