cpython/Lib
Miss Islington (bot) aba5f2a4d1
[3.13] gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601) (#120334)
gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601)

In order to patch flask.g e.g. as in GH-84982, that
proxies getattr must not be invoked. For that,
mock must not try to read from the original
object. In some cases that is unavoidable, e.g.
when doing autospec. However, patch("flask.g",
new_callable=MagicMock) should be entirely safe.
(cherry picked from commit 422c4fc855)

Co-authored-by: Robert Collins <robert.collins@cognite.com>
2024-06-11 06:04:06 +00:00
..
__phello__
_pyrepl [3.13] gh-119553: Fix console when pressing Ctrl-C within a multiline block (GH-120075) (#120076) 2024-06-04 21:44:33 +00:00
asyncio [3.13] gh-113892: Add a extra check to ProactorEventLoop.sock_connect to ensure that the given socket is in non-blocking mode (GH-119519) (#119912) 2024-06-01 16:27:54 +00:00
collections gh-117215 Make the fromskey() signature match dict.fromkeys(). (gh-117493) 2024-04-03 10:08:18 -05:00
concurrent [3.13] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123) (#120273) 2024-06-08 16:35:10 +00:00
ctypes gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (#25384) 2024-04-18 14:57:37 +00:00
curses
dbm gh-100414: Make dbm.sqlite3 the preferred dbm backend (#115447) 2024-02-14 13:47:19 +00:00
email [3.13] gh-118643: Fix AttributeError in the email module (GH-119099) (GH-119389) 2024-05-22 14:07:38 +03:00
encodings gh-85287: Change codecs to raise precise UnicodeEncodeError and UnicodeDecodeError (#113674) 2024-03-17 04:58:42 +00:00
ensurepip
html
http gh-66543: Add mimetypes.guess_file_type() (GH-117258) 2024-05-06 15:50:52 +03:00
idlelib [3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) (#119289) 2024-05-21 03:53:29 +00:00
importlib [3.13] gh-106531: Apply changes from importlib_resources 6.3.2 (GH-117054) (#120014) 2024-06-04 10:54:59 -04:00
json gh-95382: Improve performance of json encoder with indent (GH-118105) 2024-05-06 11:04:39 +03:00
logging [3.13] gh-119819: Update logging configuration to support joinable multiproc… (GH-120090) (GH-120093) 2024-06-05 07:59:41 +01:00
multiprocessing gh-83856: Honor atexit for all multiprocessing start methods (GH-114279) 2024-05-03 11:45:46 -07:00
pathlib [3.13] GH-119169: Implement pathlib.Path.walk() using os.walk() (GH-119573) (#119750) 2024-05-29 21:24:42 +00:00
pydoc_data Python 3.13.0b2 2024-06-05 16:46:34 +02:00
re
site-packages
sqlite3 gh-118221: Always use the default row factory in sqlite3.iterdump() (#118223) 2024-04-25 10:11:45 +02:00
sysconfig gh-116622: Android sysconfig updates (#118352) 2024-05-01 16:47:54 +00:00
test [3.13] gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601) (#120334) 2024-06-11 06:04:06 +00:00
tkinter [3.13] gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213) (GH-120215) 2024-06-07 15:00:30 +00:00
tomllib
turtledemo [3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) (#119289) 2024-05-21 03:53:29 +00:00
unittest [3.13] gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601) (#120334) 2024-06-11 06:04:06 +00:00
urllib [3.13] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with multiple slashes and no authority (GH-113563) (GH-119023) 2024-05-14 09:47:05 +00:00
venv gh-90329: Add _winapi.GetLongPathName and GetShortPathName and use in venv to reduce warnings (GH-117817) 2024-04-15 15:36:06 +01:00
wsgiref
xml [3.13] gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) (GH-120189) 2024-06-07 03:43:17 +00:00
xmlrpc
zipfile [3.13] gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (GH-119591) (#119985) 2024-06-04 10:56:06 -04:00
zoneinfo gh-106233: Fix stacklevel in zoneinfo.InvalidTZPathWarning (GH-106234) 2024-02-06 15:08:56 +02:00
__future__.py
__hello__.py
_aix_support.py
_android_support.py gh-116622: Redirect stdout and stderr to system log when embedded in an Android app (#118063) 2024-04-30 16:00:31 +02:00
_collections_abc.py
_colorize.py gh-117225: Move colorize functionality to own internal module (#118283) 2024-05-01 12:27:06 -06:00
_compat_pickle.py
_compression.py
_ios_support.py [3.13] gh-119253: use ImportError in _ios_support (GH-119254) (#119265) 2024-05-20 22:21:28 +00:00
_markupbase.py
_opcode_metadata.py GH-118095: Use broader specializations of CALL in tier 1, for better tier 2 support of calls. (GH-118322) 2024-05-04 12:11:11 +01:00
_osx_support.py
_py_abc.py
_pydatetime.py gh-49766: Make date-datetime comparison more symmetric and flexible (GH-114760) 2024-02-11 13:06:43 +02:00
_pydecimal.py gh-118164: str(10**10000) hangs if the C _decimal module is missing (#118503) 2024-05-04 18:22:33 -05:00
_pyio.py gh-95782: Fix io.BufferedReader.tell() etc. being able to return offsets < 0 (GH-99709) 2024-02-17 11:16:06 +00:00
_pylong.py gh-118610: Centralize power caching in _pylong.py (#118611) 2024-05-07 19:09:09 -05:00
_sitebuiltins.py
_strptime.py GH-70647: Deprecate strptime day of month parsing without a year present to avoid leap-year bugs (GH-117107) 2024-04-03 14:19:49 +02:00
_threading_local.py
_weakrefset.py
abc.py
antigravity.py
argparse.py gh-62090: Simplify argparse usage formatting (GH-105039) 2024-05-07 09:28:51 +02:00
ast.py gh-116126: Implement PEP 696 (#116129) 2024-05-03 06:17:32 -07:00
base64.py [3.13] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (GH-119483) 2024-05-28 16:55:37 +02:00
bdb.py [3.13] gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979) (#119007) 2024-05-13 20:18:03 +01:00
bisect.py
bz2.py gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036) 2024-04-21 11:46:39 +03:00
calendar.py
cmd.py
code.py [3.13] gh-118893: Evaluate all statements in the new REPL separately (GH-119318) (#119408) 2024-05-22 16:22:01 +00:00
codecs.py
codeop.py
colorsys.py
compileall.py gh-117205: Increase chunksize when compiling pyc in parallel (#117206) 2024-04-03 15:24:24 -07:00
configparser.py gh-117348: restore import time performance of configparser (#117703) 2024-04-14 11:10:09 +00:00
contextlib.py
contextvars.py
copy.py
copyreg.py
cProfile.py gh-69990: Make Profile.print_stats support sorting by multiple values (GH-104590) 2024-02-16 12:03:46 +00:00
csv.py
dataclasses.py [3.13] gh-118033: Fix __weakref__ not set for generic dataclasses (GH-118099) (#118821) 2024-05-09 09:02:22 +00:00
datetime.py
decimal.py gh-71966: Move the module docstring from _pydecimal to decimal (GH-117919) 2024-04-17 10:18:24 +03:00
difflib.py
dis.py gh-118335: Configure Tier 2 interpreter at build time (#118339) 2024-04-30 18:26:34 -07:00
doctest.py gh-117225: Move colorize functionality to own internal module (#118283) 2024-05-01 12:27:06 -06:00
enum.py gh-118650: Exclude _repr_* methods from Enum's _sunder_ reservation (GH-118651) 2024-05-07 12:35:51 +02:00
filecmp.py gh-57141: Add dircmp shallow option (GH-109499) 2024-03-04 17:27:43 +00:00
fileinput.py
fnmatch.py
fractions.py gh-102840: Fix confused traceback when floordiv or mod operations happens between Fraction and complex objects (GH-102842) 2024-02-10 16:37:19 +02:00
ftplib.py
functools.py GH-100242: bring functools.py partial implementation more in line with C code (GH-100244) 2024-04-17 15:34:46 +02:00
genericpath.py gh-117114: Make os.path.isdevdrive available on all platforms (GH-117115) 2024-03-25 22:55:11 +00:00
getopt.py
getpass.py
gettext.py
glob.py [3.13] GH-119169: Implement pathlib.Path.walk() using os.walk() (GH-119573) (#119750) 2024-05-29 21:24:42 +00:00
graphlib.py
gzip.py gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036) 2024-04-21 11:46:39 +03:00
hashlib.py
heapq.py
hmac.py
imaplib.py
inspect.py [3.13] gh-120200: Fix inspect.iscoroutinefunction(inspect) is True corner case (GH-120214) (#120237) 2024-06-07 19:26:30 +03:00
io.py
ipaddress.py gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567) 2024-04-25 15:17:40 +00:00
keyword.py
linecache.py linecache: Fix docstring location (#117948) 2024-04-16 15:37:18 -07:00
locale.py gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568) 2024-04-01 13:02:07 +00:00
lzma.py gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036) 2024-04-21 11:46:39 +03:00
mailbox.py gh-117467: Add preserving of mailbox owner on flush (GH-117510) 2024-04-04 13:32:53 +03:00
mimetypes.py gh-66543: Add mimetypes.guess_file_type() (GH-117258) 2024-05-06 15:50:52 +03:00
modulefinder.py gh-114099 - Add iOS framework loading machinery. (GH-116454) 2024-03-19 08:36:19 -04:00
netrc.py
ntpath.py gh-118263: Add additional arguments to path_t (Argument Clinic type) in posixmodule (GH-118355) 2024-05-24 18:26:06 +00:00
nturl2path.py
numbers.py
opcode.py gh-116381: Specialize CONTAINS_OP (GH-116385) 2024-03-07 03:30:11 +08:00
operator.py gh-118285: Fix signatures of operator.{attrgetter,itemgetter,methodcaller} instances (GH-118316) 2024-04-29 19:30:48 +03:00
optparse.py
os.py [3.13] GH-89727: Fix FD leak on os.fwalk() generator finalization. (GH-119766) (#119767) 2024-05-30 04:40:21 +00:00
pdb.py [3.13] gh-74929: PEP 667 general docs update (gh-119291) 2024-05-21 21:35:26 +10:00
pickle.py
pickletools.py gh-115146: Fix typo in pickletools.py documentation (GH-115148) 2024-02-08 10:12:58 +02:00
pkgutil.py
platform.py [3.13] gh-119132: Update sys.version to identify free-threaded or not. (gh-119134) (#119153) 2024-05-18 16:49:11 -04:00
plistlib.py
poplib.py
posixpath.py gh-118263: Add additional arguments to path_t (Argument Clinic type) in posixmodule (GH-118355) 2024-05-24 18:26:06 +00:00
pprint.py
profile.py gh-69990: Make Profile.print_stats support sorting by multiple values (GH-104590) 2024-02-16 12:03:46 +00:00
pstats.py
pty.py
py_compile.py
pyclbr.py
pydoc.py [3.13] bpo-37755: Use configured output in pydoc instead of pager (GH-15105) (GH-120261) 2024-06-08 17:48:47 +00:00
queue.py gh-117531: Unblock getters after non-immediate queue shutdown (#117532) 2024-04-10 08:01:42 -07:00
quopri.py
random.py gh-118131: Command-line interface for the random module (#118132) 2024-05-05 06:30:03 +00:00
reprlib.py
rlcompleter.py [3.13] gh-113978: Ignore warnings on text completion inside REPL (GH-113979) (#119429) 2024-05-22 23:13:32 +02:00
runpy.py
sched.py
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py [3.13] GH-89727: Fix shutil.rmtree() recursion error on deep trees (GH-119808) (#119918) 2024-06-01 20:38:55 +01:00
signal.py
site.py [3.13] GH-119496: accept UTF-8 BOM in .pth files (GH-119508) 2024-05-24 14:52:20 +00:00
smtplib.py
socket.py [3.13] gh-110383: Document socket.makefile() accepts combined modes (GH-119150) (#119324) 2024-05-21 18:44:53 +00:00
socketserver.py
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py gh-107361: strengthen default SSL context flags (#112389) 2024-03-06 13:44:58 -08:00
stat.py
statistics.py Fix negative bandwidth test and add online code path test. (gh-118600) 2024-05-05 12:29:23 -05:00
string.py
stringprep.py
struct.py
subprocess.py [3.13] GH-118844: Fix build failures when combining --disable-gil with --enable-experimental-jit (GH-118959) 2024-05-13 04:53:30 +00:00
symtable.py
tabnanny.py
tarfile.py gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036) 2024-04-21 11:46:39 +03:00
tempfile.py
textwrap.py
this.py
threading.py gh-114271: Fix race in Thread.join() (#114839) 2024-03-16 13:56:30 +01:00
timeit.py
token.py
tokenize.py gh-115154: Fix untokenize handling of unicode named literals (#115171) 2024-02-19 14:54:10 +00:00
trace.py [3.13] gh-103956: Fix trace output in case of missing source line (GH-103958) (GH-118834) 2024-05-09 13:05:37 +00:00
traceback.py [3.13] gh-99180: Make StackSummary.should_show_carets private (GH-119554) (#119556) 2024-05-25 17:30:57 +00:00
tracemalloc.py
tty.py
turtle.py
types.py
typing.py [3.13] Rename typing._collect_parameters (GH-118900) (#118917) 2024-05-10 17:40:39 +00:00
uuid.py gh-113308: Remove some internal parts of uuid module (#115934) 2024-03-14 13:01:41 +03:00
warnings.py gh-117535: Change unknown filename of warnings from sys to <sys> (#118018) 2024-04-18 20:50:09 -07:00
wave.py
weakref.py
webbrowser.py gh-68583: webbrowser: replace getopt with argparse, add long options (#117047) 2024-04-13 08:56:56 -06:00
zipapp.py
zipimport.py [3.13] Remove references to private symbols from zipimport module docstring (GH-119071) 2024-05-15 16:52:48 +00:00