Commit graph

110958 commits

Author SHA1 Message Date
Erlend Egeberg Aasland
a6779715c4
bpo-45041: Simplify sqlite3.Cursor.executescript() (GH-28020) 2021-09-19 23:52:36 +01:00
Erlend Egeberg Aasland
771a546713
bpo-45040: Simplify sqlite3 transaction control functions (GH-28019) 2021-09-19 23:51:36 +01:00
Nikita Sobolev
1d42408495
bpo-45128: fixes test_multiprocessing_fork mysterious crash (GH-28387) 2021-09-19 23:50:04 +01:00
Pablo Galindo Salgado
e6d05a4092
bpo-30637: Improve the docs of ast.parse regarding differences with compile() (GH-28459) 2021-09-19 23:44:51 +01:00
Serhiy Storchaka
f25f2e2e8c
Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)
The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.
2021-09-19 18:05:30 +03:00
Serhiy Storchaka
a624177386
bpo-45229: Fix setUpModule in test_ssl (GH-28454) 2021-09-19 16:18:16 +03:00
Serhiy Storchaka
40348acc18
bpo-45229: Remove test_main in many tests (GH-28405)
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
2021-09-19 15:27:33 +03:00
Serhiy Storchaka
664448d81f
bpo-30856: Update TestResult early, without buffering in _Outcome (GH-28180)
TestResult methods addFailure(), addError(), addSkip() and
addSubTest() are now called immediately after raising an exception
in test or finishing a subtest.  Previously they were called only
after finishing the test clean up.
2021-09-19 15:24:38 +03:00
Serhiy Storchaka
dea59cf88a
bpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446)
unittest.TestCase.debug() raises now a SkipTest if the class or
the test method are decorated with the skipping decorator.

Previously it only raised a SkipTest if the test method was decorated
with other decorator in addition to the skipping decorator, or
if SkipTest was explicitly raised in the test or setup methods.
2021-09-18 15:34:22 +03:00
Raymond Hettinger
94b462686b
bpo-45198: __set_name__ documentation not clear about its usage with non-descriptor classes (GH-28439) 2021-09-18 01:49:43 -05:00
Adam Schwalm
a6e8db5e8e
bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420) 2021-09-17 23:20:31 -05:00
Konstantin Popov
af08f1ba40
Fix minor typo in Doc/c-api/type.rst (GH-28432)
retreived-> retrieved
2021-09-18 09:45:33 +08:00
Brett Cannon
209b7035f7
bpo-45183: don't raise an exception when calling zipimport.zipimporter.find_spec() when the zip file is missing and the internal cache has been reset (GH-28435)
This can occur when the zip file gets deleted, you call zipimport.zipimporter.invalidate_cache(), and then try to use zipimport.zipimporter.find_spec() (i.e. you left the zip file path on sys.path).
2021-09-17 16:48:17 -07:00
wyz23x2
f4813388b4
bpo-44640: Improve punctuation consistency in isinstance/issubclass error messages (GH-27144)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-18 01:10:17 +02:00
Emmanuel Arias
24dbe30f8d
[doc] Clarify exception in multiprocessing.cpu_count (GH-23660)
Previous wording didn't explain the slightly unintuitive behavior.

Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
2021-09-18 00:58:20 +02:00
Eric Snow
090591636c
bpo-45020: Freeze os, site, and codecs. (gh-28398)
https://bugs.python.org/issue45020
2021-09-17 16:31:31 -06:00
Daniel Hahler
74cc2453ae
Fix missing space with help for -m compileall -o (GH-27591) 2021-09-18 00:28:09 +02:00
andrei kulakov
aca0e08c5d
bpo-42038: fix description of returned list of lines (GH-27529) 2021-09-18 00:24:55 +02:00
Arkaprabha Chakraborty
d22a700091
[doc] Add a missing apostrophe in a code example in venv.rst (GH-28391) 2021-09-17 23:08:25 +02:00
Victor Stinner
e4044e9f89
bpo-45116: Py_DEBUG ignores Py_ALWAYS_INLINE (GH-28419)
If the Py_DEBUG macro is defined, the Py_ALWAYS_INLINE macro does
nothing.
2021-09-17 22:46:38 +02:00
Serhiy Storchaka
51ebb7f4f5
bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422) 2021-09-17 21:56:41 +03:00
Victor Stinner
41551ee7e2
bpo-45020: Fix build out of source tree (GH-28410)
* Makefile.pre.in: Add $(srcdir) when needed, remove it when it was
  used by mistake.
* freeze_modules.py tool uses ./Programs/_freeze_module if the
  executable doesn't exist in the source tree.
2021-09-17 20:20:43 +02:00
Victor Stinner
c5a677da9e
bpo-45231: update_file.py preserves end of line (GH-28411)
The update_file.py tool now preserves the end of line of the updated
file. Fix the "make regen-frozen" command: it no longer changes the
end of line of PCbuild/ files on Unix. Git changes the end of line
depending on the platform.
2021-09-17 20:12:25 +02:00
Omer Katz
778b07565e
Remove compatibility check for Python versions below 2.2. (GH-28314)
`os.path.realpath()` already exists in all our supported Python versions.
There's no longer a need to check if it exists or not.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-17 15:36:41 +02:00
Serhiy Storchaka
54a1760cde
bpo-45212: Add a comment for time.sleep() in tests (GH-28414)
Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-17 16:20:15 +03:00
Victor Stinner
6b41355128
bpo-45116: Add the Py_ALWAYS_INLINE macro (GH-28390)
Add the Py_ALWAYS_INLINE macro to ask the compiler to always inline a
static inline function. The compiler can ignore it and decides to not
inline the function.
2021-09-17 14:09:14 +02:00
Mark Shannon
064464fc38
bpo-45219: Factor dictkey indexing (GH-28389) 2021-09-17 12:20:51 +01:00
Nikita Sobolev
cb07838ab7
bpo-45217: adds note that allow_no_value in configparser is optional (GH-28396)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-17 12:55:51 +02:00
Ken Jin
70bed6f993
bpo-45107: Make LOAD_METHOD_CLASS safer and faster, clean up comments (GH-28177)
* Improve comments

* Check cls is a type, remove dict calculation
2021-09-17 18:47:36 +08:00
Serhiy Storchaka
b0a6ede3d0
bpo-45162: Remove many old deprecated unittest features (GH-28268)
* "fail*" and "assert*" aliases of TestCase methods.
* Broken from start TestCase method assertDictContainsSubset().
* Ignored TestLoader.loadTestsFromModule() parameter use_load_tests.
* Old alias _TextTestResult of TextTestResult.
2021-09-17 13:33:27 +03:00
Serhiy Storchaka
0361335b80
bpo-45187: Collect test_socket tests using unittest (GH-28317)
Previously, test classes ISOTPTest, J1939Test, BasicUDPLITETest and
UDPLITETimeoutTest were not included in the list of tests and
were not run by regrtest.
2021-09-17 12:13:09 +02:00
Ken Jin
4857e53890
bpo-45203: fix compiler warnings (GH-28357)
Co-authored-by: Mark Shannon <mark@hotpy.org>
2021-09-17 17:48:44 +08:00
Serhiy Storchaka
b2b035a949
bpo-5846: Fix deprecations for obsolete unittest functions and add tests. (GH-28382) 2021-09-17 12:09:32 +03:00
Serhiy Storchaka
773319545b
bpo-45228: Fix stack buffer overflow in parsing J1939 address (GH-28404) 2021-09-17 11:46:19 +03:00
Raymond Hettinger
80d9ff1648
Fix typo and add a module prefix (GH-28401) 2021-09-16 23:49:41 -05:00
Eric Snow
fdc6b3d931
bpo-45020: Drop the frozen .h files from the repo. (gh-28392)
The main advantage is that the files will no longer show up in diffs and PRs. That means, for a PR, the number of files / lines changed will more clearly reflect the actual change.  (This is essentially an un-revert of gh-28375.)

https://bugs.python.org/issue45020
2021-09-16 14:20:52 -06:00
speedrun-program
a59ede2447
bpo-45225: use map function instead of genexpr in capwords (GH-28342) 2021-09-16 14:49:38 -05:00
Steve Dower
f4b94b1f57
bpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building (GH-28393) 2021-09-16 19:29:32 +01:00
Serhiy Storchaka
7dacb70485
bpo-45212: Fix dangling threads in skipped tests in test_socket (GH-28361)
tearDown() is not called if setUp() raises an exception
(including SkipTest). addCleanup() should be used for guaranteed
execution of the cleanup code.
2021-09-16 13:30:00 +03:00
David Hewitt
800bd01b6d
docs: correct references to __isub__ etc (GH-28297) 2021-09-16 11:33:41 +03:00
Eric Snow
9fd87a5fe5
bpo-45020: Revert "Drop the frozen .h files from the repo." (gh-28380)
gh-28375 broke one of the buildbots. Until I figure out why, I'm rolling the change back.

https://bugs.python.org/issue45020
2021-09-15 23:27:38 -06:00
Barry Warsaw
07e737d002
bpo-45155 : Default arguments for int.to_bytes(length=1, byteorder=sys.byteorder) (#28265)
Add default arguments for int.to_bytes() and int.from_bytes()

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2021-09-15 19:55:24 -07:00
Eric Snow
a9757bf34d
bpo-45020: Drop the frozen .h files from the repo. (gh-28375)
The main advantage is that the files will no longer show up in diffs and PRs. That means, for a PR, the number of files / lines changed will more clearly reflect the actual change.

https://bugs.python.org/issue45020
2021-09-15 19:15:26 -06:00
Hubert Badocha
a75a257725
bpo-39710: Remove Python 2-specific sentence from calendar documentation (GH-26985) 2021-09-15 22:36:38 +02:00
Eric Snow
3814e2036d
bpo-45019: Clean up the frozen __hello__ module. (gh-28374)
Here's one more small cleanup that should have been in PR gh-28319. We eliminate stdout side-effects from importing the frozen __hello__ module, and update tests accordingly. We also move the module's source file into Lib/ from Toos/freeze/flag.py.

https://bugs.python.org/issue45019
2021-09-15 14:15:32 -06:00
Konstantin Popov
d081eab7df
Fix typo in Lib/sqlite3/test/test_types.py (GH-28226)
preceeding -> preceding

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-15 22:09:08 +02:00
Eric Snow
4b30aaa0c9
bpo-45019: Silence a warning in test_ctypes. (gh-28362)
This was missed in PR gh-28319.

https://bugs.python.org/issue45019
2021-09-15 13:33:05 -06:00
Erlend Egeberg Aasland
51056b40e7
bpo-45089: Improve sqlite3 trace callback docs (GH-28238)
- Add link to str object and sqlite3 transaction control
- Mention that exceptions are not propagated
2021-09-15 20:39:05 +02:00
Erlend Egeberg Aasland
ff6d2cc55a
bpo-5846: Deprecate obsolete methods in unittest (GH-28299)
Deprecate makeSuite, findTestCases, and getTestCaseNames. Scheduled for removal in Python 3.13.
2021-09-15 20:33:31 +02:00
Terry Jan Reedy
9d76d28867
bpo-45193: News for IDLE PR_28343 (GH-28348) 2021-09-15 14:26:43 -04:00