From webhook-mailer at python.org Fri Jan 1 09:20:46 2021 From: webhook-mailer at python.org (corona10) Date: Fri, 01 Jan 2021 14:20:46 -0000 Subject: [Python-checkins] bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) Message-ID: https://github.com/python/cpython/commit/ec3165320e81ac87edcb85c86c452528ddbaec1c commit: ec3165320e81ac87edcb85c86c452528ddbaec1c branch: master author: Dong-hee Na committer: corona10 date: 2021-01-01T23:20:33+09:00 summary: bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) files: A Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst M Lib/test/test_nntplib.py diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index b11c19c84d3fb..4dbf941036f09 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -82,7 +82,7 @@ def _check_desc(desc): desc = self.server.description(self.GROUP_NAME) _check_desc(desc) # Another sanity check - self.assertIn("Python", desc) + self.assertIn(self.DESC, desc) # With a pattern desc = self.server.description(self.GROUP_PAT) _check_desc(desc) @@ -309,6 +309,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase): NNTP_HOST = 'news.trigofacile.com' GROUP_NAME = 'fr.comp.lang.python' GROUP_PAT = 'fr.comp.lang.*' + DESC = 'Python' NNTP_CLASS = NNTP @@ -343,8 +344,11 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' - GROUP_NAME = 'comp.lang.python' - GROUP_PAT = 'comp.lang.*' + # bpo-42794: aioe.test is one of the official groups on this server + # used for testing: https://news.aioe.org/manual/aioe-hierarchy/ + GROUP_NAME = 'aioe.test' + GROUP_PAT = 'aioe.*' + DESC = 'test' NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None) diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst new file mode 100644 index 0000000000000..577f2259e1f00 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst @@ -0,0 +1,2 @@ +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. From webhook-mailer at python.org Fri Jan 1 09:40:22 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 01 Jan 2021 14:40:22 -0000 Subject: [Python-checkins] bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) Message-ID: https://github.com/python/cpython/commit/381f3e4bfd4b1c440f7cb3025972fe0acd0406fc commit: 381f3e4bfd4b1c440f7cb3025972fe0acd0406fc branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-01T06:40:18-08:00 summary: bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) (cherry picked from commit ec3165320e81ac87edcb85c86c452528ddbaec1c) Co-authored-by: Dong-hee Na files: A Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst M Lib/test/test_nntplib.py diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index fbd7db03defb1..89a2004dfb139 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -82,7 +82,7 @@ def _check_desc(desc): desc = self.server.description(self.GROUP_NAME) _check_desc(desc) # Another sanity check - self.assertIn("Python", desc) + self.assertIn(self.DESC, desc) # With a pattern desc = self.server.description(self.GROUP_PAT) _check_desc(desc) @@ -299,6 +299,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase): NNTP_HOST = 'news.trigofacile.com' GROUP_NAME = 'fr.comp.lang.python' GROUP_PAT = 'fr.comp.lang.*' + DESC = 'Python' NNTP_CLASS = NNTP @@ -332,8 +333,11 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' - GROUP_NAME = 'comp.lang.python' - GROUP_PAT = 'comp.lang.*' + # bpo-42794: aioe.test is one of the official groups on this server + # used for testing: https://news.aioe.org/manual/aioe-hierarchy/ + GROUP_NAME = 'aioe.test' + GROUP_PAT = 'aioe.*' + DESC = 'test' NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None) diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst new file mode 100644 index 0000000000000..577f2259e1f00 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst @@ -0,0 +1,2 @@ +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. From webhook-mailer at python.org Fri Jan 1 09:42:47 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 01 Jan 2021 14:42:47 -0000 Subject: [Python-checkins] bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) Message-ID: https://github.com/python/cpython/commit/b20d5e5ce95248e0fa77c5d7bf8f6f5b1231fa53 commit: b20d5e5ce95248e0fa77c5d7bf8f6f5b1231fa53 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-01T06:42:43-08:00 summary: bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) (cherry picked from commit ec3165320e81ac87edcb85c86c452528ddbaec1c) Co-authored-by: Dong-hee Na files: A Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst M Lib/test/test_nntplib.py diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 1df64fa7c6b00..99386ddbaedfa 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -82,7 +82,7 @@ def _check_desc(desc): desc = self.server.description(self.GROUP_NAME) _check_desc(desc) # Another sanity check - self.assertIn("Python", desc) + self.assertIn(self.DESC, desc) # With a pattern desc = self.server.description(self.GROUP_PAT) _check_desc(desc) @@ -309,6 +309,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase): NNTP_HOST = 'news.trigofacile.com' GROUP_NAME = 'fr.comp.lang.python' GROUP_PAT = 'fr.comp.lang.*' + DESC = 'Python' NNTP_CLASS = NNTP @@ -343,8 +344,11 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' - GROUP_NAME = 'comp.lang.python' - GROUP_PAT = 'comp.lang.*' + # bpo-42794: aioe.test is one of the official groups on this server + # used for testing: https://news.aioe.org/manual/aioe-hierarchy/ + GROUP_NAME = 'aioe.test' + GROUP_PAT = 'aioe.*' + DESC = 'test' NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None) diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst new file mode 100644 index 0000000000000..577f2259e1f00 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst @@ -0,0 +1,2 @@ +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. From webhook-mailer at python.org Fri Jan 1 10:37:33 2021 From: webhook-mailer at python.org (corona10) Date: Fri, 01 Jan 2021 15:37:33 -0000 Subject: [Python-checkins] Bring Python into the new year. (GH-24036) Message-ID: https://github.com/python/cpython/commit/de6f20a6de48d63066b2cf5b317f50629f01d74a commit: de6f20a6de48d63066b2cf5b317f50629f01d74a branch: master author: Dong-hee Na committer: corona10 date: 2021-01-02T00:37:23+09:00 summary: Bring Python into the new year. (GH-24036) files: M Doc/copyright.rst M Doc/license.rst M LICENSE M Mac/IDLE/IDLE.app/Contents/Info.plist M Mac/PythonLauncher/Info.plist.in M Mac/Resources/app/Info.plist.in M PC/python_ver_rc.h M Python/getcopyright.c M README.rst diff --git a/Doc/copyright.rst b/Doc/copyright.rst index 1b90d9f172c99..4191c0bb63a2c 100644 --- a/Doc/copyright.rst +++ b/Doc/copyright.rst @@ -4,7 +4,7 @@ Copyright Python and this documentation is: -Copyright ? 2001-2020 Python Software Foundation. All rights reserved. +Copyright ? 2001-2021 Python Software Foundation. All rights reserved. Copyright ? 2000 BeOpen.com. All rights reserved. diff --git a/Doc/license.rst b/Doc/license.rst index 4030825bbd28e..f487d98b2b43a 100644 --- a/Doc/license.rst +++ b/Doc/license.rst @@ -100,7 +100,7 @@ PSF LICENSE AGREEMENT FOR PYTHON |release| analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python |release| alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of - copyright, i.e., "Copyright ? 2001-2020 Python Software Foundation; All Rights + copyright, i.e., "Copyright ? 2001-2021 Python Software Foundation; All Rights Reserved" are retained in Python |release| alone or in any derivative version prepared by Licensee. diff --git a/LICENSE b/LICENSE index f42f8adbed845..473861da1be7c 100644 --- a/LICENSE +++ b/LICENSE @@ -84,7 +84,7 @@ analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. diff --git a/Mac/IDLE/IDLE.app/Contents/Info.plist b/Mac/IDLE/IDLE.app/Contents/Info.plist index dcc48abdd2a39..f6b5cfe8d5451 100644 --- a/Mac/IDLE/IDLE.app/Contents/Info.plist +++ b/Mac/IDLE/IDLE.app/Contents/Info.plist @@ -36,7 +36,7 @@ CFBundleExecutable IDLE CFBundleGetInfoString - %version%, ? 2001-2020 Python Software Foundation + %version%, ? 2001-2021 Python Software Foundation CFBundleIconFile IDLE.icns CFBundleIdentifier diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in index 21a051535fb92..3d8bc3e4154ee 100644 --- a/Mac/PythonLauncher/Info.plist.in +++ b/Mac/PythonLauncher/Info.plist.in @@ -40,7 +40,7 @@ CFBundleExecutable Python Launcher CFBundleGetInfoString - %VERSION%, ? 2001-2020 Python Software Foundation + %VERSION%, ? 2001-2021 Python Software Foundation CFBundleIconFile PythonLauncher.icns CFBundleIdentifier diff --git a/Mac/Resources/app/Info.plist.in b/Mac/Resources/app/Info.plist.in index 1d624984a8520..2c801332332b3 100644 --- a/Mac/Resources/app/Info.plist.in +++ b/Mac/Resources/app/Info.plist.in @@ -37,7 +37,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - %version%, (c) 2001-2020 Python Software Foundation. + %version%, (c) 2001-2021 Python Software Foundation. CFBundleName Python CFBundlePackageType diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h index 060aecdc675cb..90fc6ba1a1460 100644 --- a/PC/python_ver_rc.h +++ b/PC/python_ver_rc.h @@ -5,7 +5,7 @@ #include "winver.h" #define PYTHON_COMPANY "Python Software Foundation" -#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2016 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." +#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2021 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." #define MS_WINDOWS #include "modsupport.h" diff --git a/Python/getcopyright.c b/Python/getcopyright.c index 299ccc08c44f8..7fdeb314d5261 100644 --- a/Python/getcopyright.c +++ b/Python/getcopyright.c @@ -4,7 +4,7 @@ static const char cprt[] = "\ -Copyright (c) 2001-2020 Python Software Foundation.\n\ +Copyright (c) 2001-2021 Python Software Foundation.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 2000 BeOpen.com.\n\ diff --git a/README.rst b/README.rst index 51d60d5da6209..c09ed1afbfb4c 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,7 @@ This is Python version 3.10.0 alpha 3 :target: https://python.zulipchat.com -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. See the end of this file for further copyright and license information. @@ -250,7 +250,7 @@ See :pep:`619` for Python 3.10 release details. Copyright and License Information --------------------------------- -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. All rights reserved. From webhook-mailer at python.org Fri Jan 1 12:20:33 2021 From: webhook-mailer at python.org (corona10) Date: Fri, 01 Jan 2021 17:20:33 -0000 Subject: [Python-checkins] bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969) Message-ID: https://github.com/python/cpython/commit/3bf05327c2b25d42b92795d9d280288c22a0963d commit: 3bf05327c2b25d42b92795d9d280288c22a0963d branch: master author: Ross committer: corona10 date: 2021-01-02T02:20:25+09:00 summary: bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969) files: A Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst M Lib/smtplib.py M Lib/test/mock_socket.py M Lib/test/test_smtplib.py diff --git a/Lib/smtplib.py b/Lib/smtplib.py index e2dbbbcf2e6d1..e81a9f05d60c4 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -1082,7 +1082,8 @@ def connect(self, host='localhost', port=0, source_address=None): # Handle Unix-domain sockets. try: self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - self.sock.settimeout(self.timeout) + if self.timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: + self.sock.settimeout(self.timeout) self.file = None self.sock.connect(host) except OSError: diff --git a/Lib/test/mock_socket.py b/Lib/test/mock_socket.py index cda4db25cba59..c7abddcf5fafd 100644 --- a/Lib/test/mock_socket.py +++ b/Lib/test/mock_socket.py @@ -107,6 +107,9 @@ def getpeername(self): def close(self): pass + def connect(self, host): + pass + def socket(family=None, type=None, proto=None): return MockSocket(family) @@ -152,8 +155,12 @@ def getaddrinfo(*args, **kw): # Constants +_GLOBAL_DEFAULT_TIMEOUT = socket_module._GLOBAL_DEFAULT_TIMEOUT AF_INET = socket_module.AF_INET AF_INET6 = socket_module.AF_INET6 SOCK_STREAM = socket_module.SOCK_STREAM SOL_SOCKET = None SO_REUSEADDR = None + +if hasattr(socket_module, 'AF_UNIX'): + AF_UNIX = socket_module.AF_UNIX diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py index 91985384ec7ff..1ad45d8c780d1 100644 --- a/Lib/test/test_smtplib.py +++ b/Lib/test/test_smtplib.py @@ -165,6 +165,17 @@ class LMTPGeneralTests(GeneralTests, unittest.TestCase): client = smtplib.LMTP + @unittest.skipUnless(hasattr(socket, 'AF_UNIX'), "test requires Unix domain socket") + def testUnixDomainSocketTimeoutDefault(self): + local_host = '/some/local/lmtp/delivery/program' + mock_socket.reply_with(b"220 Hello world") + try: + client = self.client(local_host, self.port) + finally: + mock_socket.setdefaulttimeout(None) + self.assertIsNone(client.sock.gettimeout()) + client.close() + def testTimeoutZero(self): super().testTimeoutZero() local_host = '/some/local/lmtp/delivery/program' diff --git a/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst b/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst new file mode 100644 index 0000000000000..93a0bb010df2b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst @@ -0,0 +1,2 @@ +Configure LMTP Unix-domain socket to use socket global default timeout when +a timeout is not explicitly provided. From webhook-mailer at python.org Fri Jan 1 12:27:56 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 01 Jan 2021 17:27:56 -0000 Subject: [Python-checkins] Bring Python into the new year. (GH-24036) Message-ID: https://github.com/python/cpython/commit/fa12749bcd20a9844e99819e361bc15af5eaf7e3 commit: fa12749bcd20a9844e99819e361bc15af5eaf7e3 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-01T09:27:48-08:00 summary: Bring Python into the new year. (GH-24036) (cherry picked from commit de6f20a6de48d63066b2cf5b317f50629f01d74a) Co-authored-by: Dong-hee Na files: M Doc/copyright.rst M Doc/license.rst M LICENSE M Mac/IDLE/IDLE.app/Contents/Info.plist M Mac/PythonLauncher/Info.plist.in M Mac/Resources/app/Info.plist.in M PC/python_ver_rc.h M Python/getcopyright.c M README.rst diff --git a/Doc/copyright.rst b/Doc/copyright.rst index 1b90d9f172c99..4191c0bb63a2c 100644 --- a/Doc/copyright.rst +++ b/Doc/copyright.rst @@ -4,7 +4,7 @@ Copyright Python and this documentation is: -Copyright ? 2001-2020 Python Software Foundation. All rights reserved. +Copyright ? 2001-2021 Python Software Foundation. All rights reserved. Copyright ? 2000 BeOpen.com. All rights reserved. diff --git a/Doc/license.rst b/Doc/license.rst index 4030825bbd28e..f487d98b2b43a 100644 --- a/Doc/license.rst +++ b/Doc/license.rst @@ -100,7 +100,7 @@ PSF LICENSE AGREEMENT FOR PYTHON |release| analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python |release| alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of - copyright, i.e., "Copyright ? 2001-2020 Python Software Foundation; All Rights + copyright, i.e., "Copyright ? 2001-2021 Python Software Foundation; All Rights Reserved" are retained in Python |release| alone or in any derivative version prepared by Licensee. diff --git a/LICENSE b/LICENSE index f42f8adbed845..473861da1be7c 100644 --- a/LICENSE +++ b/LICENSE @@ -84,7 +84,7 @@ analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. diff --git a/Mac/IDLE/IDLE.app/Contents/Info.plist b/Mac/IDLE/IDLE.app/Contents/Info.plist index dcc48abdd2a39..f6b5cfe8d5451 100644 --- a/Mac/IDLE/IDLE.app/Contents/Info.plist +++ b/Mac/IDLE/IDLE.app/Contents/Info.plist @@ -36,7 +36,7 @@ CFBundleExecutable IDLE CFBundleGetInfoString - %version%, ? 2001-2020 Python Software Foundation + %version%, ? 2001-2021 Python Software Foundation CFBundleIconFile IDLE.icns CFBundleIdentifier diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in index 21a051535fb92..3d8bc3e4154ee 100644 --- a/Mac/PythonLauncher/Info.plist.in +++ b/Mac/PythonLauncher/Info.plist.in @@ -40,7 +40,7 @@ CFBundleExecutable Python Launcher CFBundleGetInfoString - %VERSION%, ? 2001-2020 Python Software Foundation + %VERSION%, ? 2001-2021 Python Software Foundation CFBundleIconFile PythonLauncher.icns CFBundleIdentifier diff --git a/Mac/Resources/app/Info.plist.in b/Mac/Resources/app/Info.plist.in index 1d624984a8520..2c801332332b3 100644 --- a/Mac/Resources/app/Info.plist.in +++ b/Mac/Resources/app/Info.plist.in @@ -37,7 +37,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - %version%, (c) 2001-2020 Python Software Foundation. + %version%, (c) 2001-2021 Python Software Foundation. CFBundleName Python CFBundlePackageType diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h index 060aecdc675cb..90fc6ba1a1460 100644 --- a/PC/python_ver_rc.h +++ b/PC/python_ver_rc.h @@ -5,7 +5,7 @@ #include "winver.h" #define PYTHON_COMPANY "Python Software Foundation" -#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2016 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." +#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2021 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." #define MS_WINDOWS #include "modsupport.h" diff --git a/Python/getcopyright.c b/Python/getcopyright.c index 299ccc08c44f8..7fdeb314d5261 100644 --- a/Python/getcopyright.c +++ b/Python/getcopyright.c @@ -4,7 +4,7 @@ static const char cprt[] = "\ -Copyright (c) 2001-2020 Python Software Foundation.\n\ +Copyright (c) 2001-2021 Python Software Foundation.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 2000 BeOpen.com.\n\ diff --git a/README.rst b/README.rst index a9ab26056c588..bb43311ad2f95 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,7 @@ This is Python version 3.9.1 :target: https://python.zulipchat.com -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. See the end of this file for further copyright and license information. @@ -250,7 +250,7 @@ See :pep:`596` for Python 3.9 release details. Copyright and License Information --------------------------------- -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. All rights reserved. From webhook-mailer at python.org Fri Jan 1 12:28:30 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 01 Jan 2021 17:28:30 -0000 Subject: [Python-checkins] Bring Python into the new year. (GH-24036) Message-ID: https://github.com/python/cpython/commit/02639c3bc6a9bae9de635356c289cbae674aa61c commit: 02639c3bc6a9bae9de635356c289cbae674aa61c branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-01T09:28:23-08:00 summary: Bring Python into the new year. (GH-24036) (cherry picked from commit de6f20a6de48d63066b2cf5b317f50629f01d74a) Co-authored-by: Dong-hee Na files: M Doc/copyright.rst M Doc/license.rst M LICENSE M Mac/IDLE/IDLE.app/Contents/Info.plist M Mac/PythonLauncher/Info.plist.in M Mac/Resources/app/Info.plist.in M PC/python_ver_rc.h M Python/getcopyright.c M README.rst diff --git a/Doc/copyright.rst b/Doc/copyright.rst index 1b90d9f172c99..4191c0bb63a2c 100644 --- a/Doc/copyright.rst +++ b/Doc/copyright.rst @@ -4,7 +4,7 @@ Copyright Python and this documentation is: -Copyright ? 2001-2020 Python Software Foundation. All rights reserved. +Copyright ? 2001-2021 Python Software Foundation. All rights reserved. Copyright ? 2000 BeOpen.com. All rights reserved. diff --git a/Doc/license.rst b/Doc/license.rst index f70c34d3fde60..ceb946e8bb11f 100644 --- a/Doc/license.rst +++ b/Doc/license.rst @@ -100,7 +100,7 @@ PSF LICENSE AGREEMENT FOR PYTHON |release| analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python |release| alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of - copyright, i.e., "Copyright ? 2001-2020 Python Software Foundation; All Rights + copyright, i.e., "Copyright ? 2001-2021 Python Software Foundation; All Rights Reserved" are retained in Python |release| alone or in any derivative version prepared by Licensee. diff --git a/LICENSE b/LICENSE index f42f8adbed845..473861da1be7c 100644 --- a/LICENSE +++ b/LICENSE @@ -84,7 +84,7 @@ analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. diff --git a/Mac/IDLE/IDLE.app/Contents/Info.plist b/Mac/IDLE/IDLE.app/Contents/Info.plist index dcc48abdd2a39..f6b5cfe8d5451 100644 --- a/Mac/IDLE/IDLE.app/Contents/Info.plist +++ b/Mac/IDLE/IDLE.app/Contents/Info.plist @@ -36,7 +36,7 @@ CFBundleExecutable IDLE CFBundleGetInfoString - %version%, ? 2001-2020 Python Software Foundation + %version%, ? 2001-2021 Python Software Foundation CFBundleIconFile IDLE.icns CFBundleIdentifier diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in index 21a051535fb92..3d8bc3e4154ee 100644 --- a/Mac/PythonLauncher/Info.plist.in +++ b/Mac/PythonLauncher/Info.plist.in @@ -40,7 +40,7 @@ CFBundleExecutable Python Launcher CFBundleGetInfoString - %VERSION%, ? 2001-2020 Python Software Foundation + %VERSION%, ? 2001-2021 Python Software Foundation CFBundleIconFile PythonLauncher.icns CFBundleIdentifier diff --git a/Mac/Resources/app/Info.plist.in b/Mac/Resources/app/Info.plist.in index 1d624984a8520..2c801332332b3 100644 --- a/Mac/Resources/app/Info.plist.in +++ b/Mac/Resources/app/Info.plist.in @@ -37,7 +37,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - %version%, (c) 2001-2020 Python Software Foundation. + %version%, (c) 2001-2021 Python Software Foundation. CFBundleName Python CFBundlePackageType diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h index d725a9ba06ebd..81b89fe9d7903 100644 --- a/PC/python_ver_rc.h +++ b/PC/python_ver_rc.h @@ -5,7 +5,7 @@ #include "winver.h" #define PYTHON_COMPANY "Python Software Foundation" -#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2016 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." +#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2021 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." #define MS_WINDOWS #include "modsupport.h" diff --git a/Python/getcopyright.c b/Python/getcopyright.c index 299ccc08c44f8..7fdeb314d5261 100644 --- a/Python/getcopyright.c +++ b/Python/getcopyright.c @@ -4,7 +4,7 @@ static const char cprt[] = "\ -Copyright (c) 2001-2020 Python Software Foundation.\n\ +Copyright (c) 2001-2021 Python Software Foundation.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 2000 BeOpen.com.\n\ diff --git a/README.rst b/README.rst index f6fd4824f0a9b..4907629a0f69d 100644 --- a/README.rst +++ b/README.rst @@ -18,7 +18,7 @@ This is Python version 3.8.7 :target: https://python.zulipchat.com -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. See the end of this file for further copyright and license information. @@ -246,7 +246,7 @@ See :pep:`569` for Python 3.8 release details. Copyright and License Information --------------------------------- -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. All rights reserved. From webhook-mailer at python.org Fri Jan 1 12:39:45 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Fri, 01 Jan 2021 17:39:45 -0000 Subject: [Python-checkins] [3.8] bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968) (GH-24026) Message-ID: https://github.com/python/cpython/commit/e3a9adba329681b1b73b7223515e71e94fc35e12 commit: e3a9adba329681b1b73b7223515e71e94fc35e12 branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-01T19:39:36+02:00 summary: [3.8] bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968) (GH-24026) Objects which belong to different Tcl interpreters are now always different, even if they have the same name. (cherry picked from commit 1df56bc0597a051c13d53514e120e9b6764185f8) files: A Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst M Lib/tkinter/__init__.py M Lib/tkinter/font.py M Lib/tkinter/test/test_tkinter/test_font.py M Lib/tkinter/test/test_tkinter/test_variables.py diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index f9ece257841a9..91a6d56480e63 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -491,13 +491,11 @@ def trace_vinfo(self): self._tk.call("trace", "vinfo", self._name))] def __eq__(self, other): - """Comparison for equality (==). - - Note: if the Variable's master matters to behavior - also compare self._master == other._master - """ - return self.__class__.__name__ == other.__class__.__name__ \ - and self._name == other._name + if not isinstance(other, Variable): + return NotImplemented + return (self._name == other._name + and self.__class__.__name__ == other.__class__.__name__ + and self._tk == other._tk) class StringVar(Variable): diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index 31d9afd8f866c..225ec6d34def9 100644 --- a/Lib/tkinter/font.py +++ b/Lib/tkinter/font.py @@ -100,7 +100,9 @@ def __str__(self): return self.name def __eq__(self, other): - return isinstance(other, Font) and self.name == other.name + if not isinstance(other, Font): + return NotImplemented + return self.name == other.name and self._tk == other._tk def __getitem__(self, key): return self.cget(key) diff --git a/Lib/tkinter/test/test_tkinter/test_font.py b/Lib/tkinter/test/test_tkinter/test_font.py index 2ea59f1748342..5c6f048512850 100644 --- a/Lib/tkinter/test/test_tkinter/test_font.py +++ b/Lib/tkinter/test/test_tkinter/test_font.py @@ -63,14 +63,21 @@ def test_name(self): self.assertEqual(self.font.name, fontname) self.assertEqual(str(self.font), fontname) - def test_eq(self): + def test_equality(self): font1 = font.Font(root=self.root, name=fontname, exists=True) font2 = font.Font(root=self.root, name=fontname, exists=True) self.assertIsNot(font1, font2) self.assertEqual(font1, font2) self.assertNotEqual(font1, font1.copy()) + self.assertNotEqual(font1, 0) + root2 = tkinter.Tk() + self.addCleanup(root2.destroy) + font3 = font.Font(root=root2, name=fontname, exists=True) + self.assertEqual(str(font1), str(font3)) + self.assertNotEqual(font1, font3) + def test_measure(self): self.assertIsInstance(self.font.measure('abc'), int) diff --git a/Lib/tkinter/test/test_tkinter/test_variables.py b/Lib/tkinter/test/test_tkinter/test_variables.py index e7b24a818f150..cccec62941353 100644 --- a/Lib/tkinter/test/test_tkinter/test_variables.py +++ b/Lib/tkinter/test/test_tkinter/test_variables.py @@ -1,6 +1,7 @@ import unittest import gc import tkinter +from test.support import ALWAYS_EQ from tkinter import (Variable, StringVar, IntVar, DoubleVar, BooleanVar, Tcl, TclError) from tkinter.test.support import AbstractDefaultRootTest @@ -57,15 +58,30 @@ def test_dont_unset_not_existing(self): del v2 self.assertFalse(self.info_exists("name")) - def test___eq__(self): + def test_equality(self): # values doesn't matter, only class and name are checked v1 = Variable(self.root, name="abc") v2 = Variable(self.root, name="abc") self.assertEqual(v1, v2) - v3 = Variable(self.root, name="abc") + v3 = Variable(self.root, name="cba") + self.assertNotEqual(v1, v3) + v4 = StringVar(self.root, name="abc") - self.assertNotEqual(v3, v4) + self.assertEqual(str(v1), str(v4)) + self.assertNotEqual(v1, v4) + + V = type('Variable', (), {}) + self.assertNotEqual(v1, V()) + + self.assertNotEqual(v1, object()) + self.assertEqual(v1, ALWAYS_EQ) + + root2 = tkinter.Tk() + self.addCleanup(root2.destroy) + v5 = Variable(root2, name="abc") + self.assertEqual(str(v1), str(v5)) + self.assertNotEqual(v1, v5) def test_invalid_name(self): with self.assertRaises(TypeError): diff --git a/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst b/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst new file mode 100644 index 0000000000000..a5ec7d5820336 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst @@ -0,0 +1,3 @@ +Fixed equality comparison of :class:`tkinter.Variable` and +:class:`tkinter.font.Font`. Objects which belong to different Tcl +interpreters are now always different, even if they have the same name. From webhook-mailer at python.org Fri Jan 1 12:40:15 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Fri, 01 Jan 2021 17:40:15 -0000 Subject: [Python-checkins] [3.8] bpo-42425: Fix possible leak in initialization of errmap for OSError (GH-23446). (GH-24025) Message-ID: https://github.com/python/cpython/commit/1a544e1dcf8e0880ee35ce78a7f90fc4e5c98c4f commit: 1a544e1dcf8e0880ee35ce78a7f90fc4e5c98c4f branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-01T19:40:11+02:00 summary: [3.8] bpo-42425: Fix possible leak in initialization of errmap for OSError (GH-23446). (GH-24025) (cherry picked from commit ed1007c0d74e658d1e6c9b51b12ce7501eb8cbf9) files: M Objects/exceptions.c diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 8bcf76ff860a2..d22ed6f039ac2 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -2518,8 +2518,10 @@ _PyExc_Init(void) do { \ PyObject *_code = PyLong_FromLong(CODE); \ assert(_PyObject_RealIsSubclass(PyExc_ ## TYPE, PyExc_OSError)); \ - if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) \ + if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) { \ + Py_XDECREF(_code); \ return _PyStatus_ERR("errmap insertion problem."); \ + } \ Py_DECREF(_code); \ } while (0) From webhook-mailer at python.org Fri Jan 1 12:40:42 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Fri, 01 Jan 2021 17:40:42 -0000 Subject: [Python-checkins] [3.8] bpo-36589: Fix the error handling in curses.update_lines_cols(). (GH-12766) (GH-24023) Message-ID: https://github.com/python/cpython/commit/187785e2fa2050156a6eda93fb2da31db13f07a6 commit: 187785e2fa2050156a6eda93fb2da31db13f07a6 branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-01T19:40:38+02:00 summary: [3.8] bpo-36589: Fix the error handling in curses.update_lines_cols(). (GH-12766) (GH-24023) Return None instead of 1. (cherry picked from commit 2bc343417a4de83fa6998ff91303877734ecd366) Co-authored-by: Zackery Spytz files: A Misc/NEWS.d/next/Library/2019-11-16-22-56-51.bpo-36589.0Io76D.rst M Modules/_cursesmodule.c M Modules/clinic/_cursesmodule.c.h diff --git a/Misc/NEWS.d/next/Library/2019-11-16-22-56-51.bpo-36589.0Io76D.rst b/Misc/NEWS.d/next/Library/2019-11-16-22-56-51.bpo-36589.0Io76D.rst new file mode 100644 index 0000000000000..3c1221b203494 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-11-16-22-56-51.bpo-36589.0Io76D.rst @@ -0,0 +1,2 @@ +The :func:`curses.update_lines_cols` function now returns ``None`` instead +of ``1`` on success. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index b2b1117fb0934..ac23d5d7474a0 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -3757,15 +3757,18 @@ update_lines_cols(void) } /*[clinic input] -_curses.update_lines_cols -> int +_curses.update_lines_cols [clinic start generated code]*/ -static int +static PyObject * _curses_update_lines_cols_impl(PyObject *module) -/*[clinic end generated code: output=0345e7f072ea711a input=3a87760f7d5197f0]*/ +/*[clinic end generated code: output=423f2b1e63ed0f75 input=5f065ab7a28a5d90]*/ { - return update_lines_cols(); + if (!update_lines_cols()) { + return NULL; + } + Py_RETURN_NONE; } #endif @@ -3849,8 +3852,10 @@ _curses_resizeterm_impl(PyObject *module, int nlines, int ncols) result = PyCursesCheckERR(resizeterm(nlines, ncols), "resizeterm"); if (!result) return NULL; - if (!update_lines_cols()) + if (!update_lines_cols()) { + Py_DECREF(result); return NULL; + } return result; } @@ -3886,8 +3891,10 @@ _curses_resize_term_impl(PyObject *module, int nlines, int ncols) result = PyCursesCheckERR(resize_term(nlines, ncols), "resize_term"); if (!result) return NULL; - if (!update_lines_cols()) + if (!update_lines_cols()) { + Py_DECREF(result); return NULL; + } return result; } #endif /* HAVE_CURSES_RESIZE_TERM */ @@ -3958,12 +3965,18 @@ _curses_start_color_impl(PyObject *module) c = PyLong_FromLong((long) COLORS); if (c == NULL) return NULL; - PyDict_SetItemString(ModDict, "COLORS", c); + if (PyDict_SetItemString(ModDict, "COLORS", c) < 0) { + Py_DECREF(c); + return NULL; + } Py_DECREF(c); cp = PyLong_FromLong((long) COLOR_PAIRS); if (cp == NULL) return NULL; - PyDict_SetItemString(ModDict, "COLOR_PAIRS", cp); + if (PyDict_SetItemString(ModDict, "COLOR_PAIRS", cp) < 0) { + Py_DECREF(cp); + return NULL; + } Py_DECREF(cp); Py_RETURN_NONE; } else { diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index ad93e6a0ca022..437604cb92ae6 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -3799,23 +3799,13 @@ PyDoc_STRVAR(_curses_update_lines_cols__doc__, #define _CURSES_UPDATE_LINES_COLS_METHODDEF \ {"update_lines_cols", (PyCFunction)_curses_update_lines_cols, METH_NOARGS, _curses_update_lines_cols__doc__}, -static int +static PyObject * _curses_update_lines_cols_impl(PyObject *module); static PyObject * _curses_update_lines_cols(PyObject *module, PyObject *Py_UNUSED(ignored)) { - PyObject *return_value = NULL; - int _return_value; - - _return_value = _curses_update_lines_cols_impl(module); - if ((_return_value == -1) && PyErr_Occurred()) { - goto exit; - } - return_value = PyLong_FromLong((long)_return_value); - -exit: - return return_value; + return _curses_update_lines_cols_impl(module); } #endif /* (defined(HAVE_CURSES_RESIZETERM) || defined(HAVE_CURSES_RESIZE_TERM)) */ @@ -4569,4 +4559,4 @@ _curses_use_default_colors(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=e5b3502f1d38dff0 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=820af7050893ed16 input=a9049054013a1b77]*/ From webhook-mailer at python.org Fri Jan 1 12:41:53 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Fri, 01 Jan 2021 17:41:53 -0000 Subject: [Python-checkins] [3.8] bpo-39068: Fix race condition in base64 (GH-17627) (GH-24022) Message-ID: https://github.com/python/cpython/commit/b863607d303a87e8680149361ac987328b35ca5f commit: b863607d303a87e8680149361ac987328b35ca5f branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-01T19:41:49+02:00 summary: [3.8] bpo-39068: Fix race condition in base64 (GH-17627) (GH-24022) There was a race condition in base64 in lazy initialization of multiple globals. (cherry picked from commit 9655434cca5dfbea97bf6d355aec028e840b289c) Co-authored-by: Brandon Stansbury files: A Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst M Lib/base64.py M Misc/ACKS diff --git a/Lib/base64.py b/Lib/base64.py index 2e70223dfe782..54297668585d8 100755 --- a/Lib/base64.py +++ b/Lib/base64.py @@ -320,7 +320,7 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False): global _a85chars, _a85chars2 # Delay the initialization of tables to not waste memory # if the function is never called - if _a85chars is None: + if _a85chars2 is None: _a85chars = [bytes((i,)) for i in range(33, 118)] _a85chars2 = [(a + b) for a in _a85chars for b in _a85chars] @@ -428,7 +428,7 @@ def b85encode(b, pad=False): global _b85chars, _b85chars2 # Delay the initialization of tables to not waste memory # if the function is never called - if _b85chars is None: + if _b85chars2 is None: _b85chars = [bytes((i,)) for i in _b85alphabet] _b85chars2 = [(a + b) for a in _b85chars for b in _b85chars] return _85encode(b, _b85chars, _b85chars2, pad) diff --git a/Misc/ACKS b/Misc/ACKS index 6ae882479d436..8ca1f64c9f5f6 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1607,6 +1607,7 @@ Tage Stabell-Kulo Quentin Stafford-Fraser Frank Stajano Joel Stanley +Brandon Stansbury Anthony Starks David Steele Oliver Steele diff --git a/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst b/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst new file mode 100644 index 0000000000000..fe6503fdce6b6 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst @@ -0,0 +1,2 @@ +Fix initialization race condition in :func:`a85encode` and :func:`b85encode` +in :mod:`base64`. Patch by Brandon Stansbury. From webhook-mailer at python.org Fri Jan 1 12:42:28 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Fri, 01 Jan 2021 17:42:28 -0000 Subject: [Python-checkins] [3.8] bpo-26407: Do not mask errors in csv. (GH-20536) (GH-24021) Message-ID: https://github.com/python/cpython/commit/6dffa67b98f78ae41b596f84478f3379f55d4d03 commit: 6dffa67b98f78ae41b596f84478f3379f55d4d03 branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-01T19:42:23+02:00 summary: [3.8] bpo-26407: Do not mask errors in csv. (GH-20536) (GH-24021) Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows(). (cherry picked from commit c88239f864a27f673c0f0a9e62d2488563f9d081) files: A Misc/NEWS.d/next/Library/2020-05-30-14-19-47.bpo-26407.MjWLO1.rst M Lib/test/test_csv.py M Modules/_csv.c diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index a16d14019f341..d421be075ca27 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -14,6 +14,12 @@ from textwrap import dedent from collections import OrderedDict + +class BadIterable: + def __iter__(self): + raise OSError + + class Test_Csv(unittest.TestCase): """ Test the underlying C csv parser in ways that are not appropriate @@ -40,9 +46,15 @@ def _test_arg_valid(self, ctor, arg): def test_reader_arg_valid(self): self._test_arg_valid(csv.reader, []) + self.assertRaises(OSError, csv.reader, BadIterable()) def test_writer_arg_valid(self): self._test_arg_valid(csv.writer, StringIO()) + class BadWriter: + @property + def write(self): + raise OSError + self.assertRaises(OSError, csv.writer, BadWriter()) def _test_default_attrs(self, ctor, *args): obj = ctor(*args) @@ -141,6 +153,7 @@ def test_write_arg_valid(self): self._write_test([None], '""') self._write_error_test(csv.Error, [None], quoting = csv.QUOTE_NONE) # Check that exceptions are passed up the chain + self._write_error_test(OSError, BadIterable()) class BadList: def __len__(self): return 10; @@ -230,6 +243,12 @@ def test_writerows_with_none(self): fileobj.seek(0) self.assertEqual(fileobj.read(), 'a\r\n""\r\n') + def test_writerows_errors(self): + with TemporaryFile("w+", newline='') as fileobj: + writer = csv.writer(fileobj) + self.assertRaises(TypeError, writer.writerows, None) + self.assertRaises(OSError, writer.writerows, BadIterable()) + @support.cpython_only def test_writerows_legacy_strings(self): import _testcapi @@ -334,7 +353,6 @@ def test_read_linenum(self): def test_roundtrip_quoteed_newlines(self): with TemporaryFile("w+", newline='') as fileobj: writer = csv.writer(fileobj) - self.assertRaises(TypeError, writer.writerows, None) rows = [['a\nb','b'],['c','x\r\nd']] writer.writerows(rows) fileobj.seek(0) diff --git a/Misc/NEWS.d/next/Library/2020-05-30-14-19-47.bpo-26407.MjWLO1.rst b/Misc/NEWS.d/next/Library/2020-05-30-14-19-47.bpo-26407.MjWLO1.rst new file mode 100644 index 0000000000000..d0e45cf1b1f2f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-05-30-14-19-47.bpo-26407.MjWLO1.rst @@ -0,0 +1,3 @@ +Unexpected errors in calling the ``__iter__`` method are no longer masked +by ``TypeError`` in :func:`csv.reader`, :func:`csv.writer.writerow` and +:meth:`csv.writer.writerows`. diff --git a/Modules/_csv.c b/Modules/_csv.c index 46d414383cbd2..069ec9602cc9c 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -958,8 +958,6 @@ csv_reader(PyObject *module, PyObject *args, PyObject *keyword_args) } self->input_iter = PyObject_GetIter(iterator); if (self->input_iter == NULL) { - PyErr_SetString(PyExc_TypeError, - "argument 1 must be an iterator"); Py_DECREF(self); return NULL; } @@ -1165,10 +1163,14 @@ csv_writerow(WriterObj *self, PyObject *seq) PyObject *iter, *field, *line, *result; iter = PyObject_GetIter(seq); - if (iter == NULL) - return PyErr_Format(_csvstate_global->error_obj, - "iterable expected, not %.200s", - seq->ob_type->tp_name); + if (iter == NULL) { + if (PyErr_ExceptionMatches(PyExc_TypeError)) { + PyErr_Format(_csvstate_global->error_obj, + "iterable expected, not %.200s", + Py_TYPE(seq)->tp_name); + } + return NULL; + } /* Join all fields in internal buffer. */ @@ -1258,8 +1260,6 @@ csv_writerows(WriterObj *self, PyObject *seqseq) row_iter = PyObject_GetIter(seqseq); if (row_iter == NULL) { - PyErr_SetString(PyExc_TypeError, - "writerows() argument must be iterable"); return NULL; } while ((row_obj = PyIter_Next(row_iter))) { From webhook-mailer at python.org Fri Jan 1 13:37:43 2021 From: webhook-mailer at python.org (ned-deily) Date: Fri, 01 Jan 2021 18:37:43 -0000 Subject: [Python-checkins] bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) (GH-24041) Message-ID: https://github.com/python/cpython/commit/8200ee66697601a8766f234d6eb8e4c8735216fd commit: 8200ee66697601a8766f234d6eb8e4c8735216fd branch: 3.7 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-01T13:37:35-05:00 summary: bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) (GH-24041) (cherry picked from commit ec3165320e81ac87edcb85c86c452528ddbaec1c) Co-authored-by: Dong-hee Na files: A Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst M Lib/test/test_nntplib.py diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index fbd7db03defb1..89a2004dfb139 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -82,7 +82,7 @@ def _check_desc(desc): desc = self.server.description(self.GROUP_NAME) _check_desc(desc) # Another sanity check - self.assertIn("Python", desc) + self.assertIn(self.DESC, desc) # With a pattern desc = self.server.description(self.GROUP_PAT) _check_desc(desc) @@ -299,6 +299,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase): NNTP_HOST = 'news.trigofacile.com' GROUP_NAME = 'fr.comp.lang.python' GROUP_PAT = 'fr.comp.lang.*' + DESC = 'Python' NNTP_CLASS = NNTP @@ -332,8 +333,11 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' - GROUP_NAME = 'comp.lang.python' - GROUP_PAT = 'comp.lang.*' + # bpo-42794: aioe.test is one of the official groups on this server + # used for testing: https://news.aioe.org/manual/aioe-hierarchy/ + GROUP_NAME = 'aioe.test' + GROUP_PAT = 'aioe.*' + DESC = 'test' NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None) diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst new file mode 100644 index 0000000000000..577f2259e1f00 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst @@ -0,0 +1,2 @@ +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. From webhook-mailer at python.org Fri Jan 1 13:41:03 2021 From: webhook-mailer at python.org (ned-deily) Date: Fri, 01 Jan 2021 18:41:03 -0000 Subject: [Python-checkins] Bring Python into the new year. (GH-24036) (GH-24052) Message-ID: https://github.com/python/cpython/commit/117830de332c8dfbd9a437c0968e16e11aa7e6a1 commit: 117830de332c8dfbd9a437c0968e16e11aa7e6a1 branch: 3.7 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-01T13:40:58-05:00 summary: Bring Python into the new year. (GH-24036) (GH-24052) (cherry picked from commit de6f20a6de48d63066b2cf5b317f50629f01d74a) Co-authored-by: Dong-hee Na files: M Doc/copyright.rst M Doc/license.rst M LICENSE M Mac/IDLE/IDLE.app/Contents/Info.plist M Mac/PythonLauncher/Info.plist.in M Mac/Resources/app/Info.plist.in M PC/python_ver_rc.h M Python/getcopyright.c M README.rst diff --git a/Doc/copyright.rst b/Doc/copyright.rst index 1b90d9f172c99..4191c0bb63a2c 100644 --- a/Doc/copyright.rst +++ b/Doc/copyright.rst @@ -4,7 +4,7 @@ Copyright Python and this documentation is: -Copyright ? 2001-2020 Python Software Foundation. All rights reserved. +Copyright ? 2001-2021 Python Software Foundation. All rights reserved. Copyright ? 2000 BeOpen.com. All rights reserved. diff --git a/Doc/license.rst b/Doc/license.rst index 9b98b1b2f68e4..cf80a3caedaa3 100644 --- a/Doc/license.rst +++ b/Doc/license.rst @@ -87,7 +87,7 @@ PSF LICENSE AGREEMENT FOR PYTHON |release| analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python |release| alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of - copyright, i.e., "Copyright ? 2001-2020 Python Software Foundation; All Rights + copyright, i.e., "Copyright ? 2001-2021 Python Software Foundation; All Rights Reserved" are retained in Python |release| alone or in any derivative version prepared by Licensee. diff --git a/LICENSE b/LICENSE index 66a3ac80d729a..877c067513781 100644 --- a/LICENSE +++ b/LICENSE @@ -73,7 +73,7 @@ analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. diff --git a/Mac/IDLE/IDLE.app/Contents/Info.plist b/Mac/IDLE/IDLE.app/Contents/Info.plist index dcc48abdd2a39..f6b5cfe8d5451 100644 --- a/Mac/IDLE/IDLE.app/Contents/Info.plist +++ b/Mac/IDLE/IDLE.app/Contents/Info.plist @@ -36,7 +36,7 @@ CFBundleExecutable IDLE CFBundleGetInfoString - %version%, ? 2001-2020 Python Software Foundation + %version%, ? 2001-2021 Python Software Foundation CFBundleIconFile IDLE.icns CFBundleIdentifier diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in index 21a051535fb92..3d8bc3e4154ee 100644 --- a/Mac/PythonLauncher/Info.plist.in +++ b/Mac/PythonLauncher/Info.plist.in @@ -40,7 +40,7 @@ CFBundleExecutable Python Launcher CFBundleGetInfoString - %VERSION%, ? 2001-2020 Python Software Foundation + %VERSION%, ? 2001-2021 Python Software Foundation CFBundleIconFile PythonLauncher.icns CFBundleIdentifier diff --git a/Mac/Resources/app/Info.plist.in b/Mac/Resources/app/Info.plist.in index 1d624984a8520..2c801332332b3 100644 --- a/Mac/Resources/app/Info.plist.in +++ b/Mac/Resources/app/Info.plist.in @@ -37,7 +37,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - %version%, (c) 2001-2020 Python Software Foundation. + %version%, (c) 2001-2021 Python Software Foundation. CFBundleName Python CFBundlePackageType diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h index f95e755bb8bd7..bc4ab34c71278 100644 --- a/PC/python_ver_rc.h +++ b/PC/python_ver_rc.h @@ -4,7 +4,7 @@ #include "winver.h" #define PYTHON_COMPANY "Python Software Foundation" -#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2016 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." +#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2021 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." #define MS_WINDOWS #include "modsupport.h" diff --git a/Python/getcopyright.c b/Python/getcopyright.c index 299ccc08c44f8..7fdeb314d5261 100644 --- a/Python/getcopyright.c +++ b/Python/getcopyright.c @@ -4,7 +4,7 @@ static const char cprt[] = "\ -Copyright (c) 2001-2020 Python Software Foundation.\n\ +Copyright (c) 2001-2021 Python Software Foundation.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 2000 BeOpen.com.\n\ diff --git a/README.rst b/README.rst index b1a9a32f0a6c2..92ef6675ca50e 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ This is Python version 3.7.9+ :alt: CPython code coverage on Codecov :target: https://codecov.io/gh/python/cpython/branch/3.7 -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. See the end of this file for further copyright and license information. @@ -242,7 +242,7 @@ See :pep:`537` for Python 3.7 release details. Copyright and License Information --------------------------------- -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. All rights reserved. From webhook-mailer at python.org Fri Jan 1 13:42:20 2021 From: webhook-mailer at python.org (ned-deily) Date: Fri, 01 Jan 2021 18:42:20 -0000 Subject: [Python-checkins] bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) (GH-24042) Message-ID: https://github.com/python/cpython/commit/546baba63a446e261d0248338f9034e56eccfc46 commit: 546baba63a446e261d0248338f9034e56eccfc46 branch: 3.6 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-01T13:42:16-05:00 summary: bpo-42794: Update test_nntplib to use offical group name for testing (GH-24037) (GH-24042) (cherry picked from commit ec3165320e81ac87edcb85c86c452528ddbaec1c) Co-authored-by: Dong-hee Na files: A Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst M Lib/test/test_nntplib.py diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 1d1750a5be22e..fdfa64424af20 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -84,7 +84,7 @@ def _check_desc(desc): desc = self.server.description(self.GROUP_NAME) _check_desc(desc) # Another sanity check - self.assertIn("Python", desc) + self.assertIn(self.DESC, desc) # With a pattern desc = self.server.description(self.GROUP_PAT) _check_desc(desc) @@ -296,6 +296,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase): NNTP_HOST = 'news.trigofacile.com' GROUP_NAME = 'fr.comp.lang.python' GROUP_PAT = 'fr.comp.lang.*' + DESC = 'Python' NNTP_CLASS = NNTP @@ -329,8 +330,11 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' - GROUP_NAME = 'comp.lang.python' - GROUP_PAT = 'comp.lang.*' + # bpo-42794: aioe.test is one of the official groups on this server + # used for testing: https://news.aioe.org/manual/aioe-hierarchy/ + GROUP_NAME = 'aioe.test' + GROUP_PAT = 'aioe.*' + DESC = 'test' NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None) diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst new file mode 100644 index 0000000000000..577f2259e1f00 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst @@ -0,0 +1,2 @@ +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. From webhook-mailer at python.org Fri Jan 1 15:42:53 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 01 Jan 2021 20:42:53 -0000 Subject: [Python-checkins] bpo-39068: Fix race condition in base64 (GH-17627) Message-ID: https://github.com/python/cpython/commit/0d6e40744ae40ff397883ff90ca235efd3b63f18 commit: 0d6e40744ae40ff397883ff90ca235efd3b63f18 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-01T12:42:44-08:00 summary: bpo-39068: Fix race condition in base64 (GH-17627) There was a race condition in base64 in lazy initialization of multiple globals. (cherry picked from commit 9655434cca5dfbea97bf6d355aec028e840b289c) Co-authored-by: Brandon Stansbury files: A Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst M Lib/base64.py M Misc/ACKS diff --git a/Lib/base64.py b/Lib/base64.py index a28109f8a7f9c..ec3823b724a37 100755 --- a/Lib/base64.py +++ b/Lib/base64.py @@ -320,7 +320,7 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False): global _a85chars, _a85chars2 # Delay the initialization of tables to not waste memory # if the function is never called - if _a85chars is None: + if _a85chars2 is None: _a85chars = [bytes((i,)) for i in range(33, 118)] _a85chars2 = [(a + b) for a in _a85chars for b in _a85chars] @@ -428,7 +428,7 @@ def b85encode(b, pad=False): global _b85chars, _b85chars2 # Delay the initialization of tables to not waste memory # if the function is never called - if _b85chars is None: + if _b85chars2 is None: _b85chars = [bytes((i,)) for i in _b85alphabet] _b85chars2 = [(a + b) for a in _b85chars for b in _b85chars] return _85encode(b, _b85chars, _b85chars2, pad) diff --git a/Misc/ACKS b/Misc/ACKS index a20c41f1cb189..58a4accd13451 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1641,6 +1641,7 @@ Quentin Stafford-Fraser Frank Stajano Joel Stanley Kyle Stanley +Brandon Stansbury Anthony Starks David Steele Oliver Steele diff --git a/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst b/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst new file mode 100644 index 0000000000000..fe6503fdce6b6 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst @@ -0,0 +1,2 @@ +Fix initialization race condition in :func:`a85encode` and :func:`b85encode` +in :mod:`base64`. Patch by Brandon Stansbury. From webhook-mailer at python.org Fri Jan 1 19:45:59 2021 From: webhook-mailer at python.org (gvanrossum) Date: Sat, 02 Jan 2021 00:45:59 -0000 Subject: [Python-checkins] bpo-41559: Documentation for PEP 612 (GH-24000) Message-ID: https://github.com/python/cpython/commit/11276cd9c49faea66ce7760f26a238d1edbf6421 commit: 11276cd9c49faea66ce7760f26a238d1edbf6421 branch: master author: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com> committer: gvanrossum date: 2021-01-01T16:45:50-08:00 summary: bpo-41559: Documentation for PEP 612 (GH-24000) files: M Doc/library/stdtypes.rst M Doc/library/typing.rst M Doc/whatsnew/3.10.rst M Lib/typing.py diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 2869378bbdaf0..2331849c02e98 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4959,6 +4959,11 @@ All parameterized generics implement special read-only attributes. (~T,) + .. note:: + A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not + have correct ``__parameters__`` after substitution because + :class:`typing.ParamSpec` is intended primarily for static type checking. + .. seealso:: * :pep:`585` -- "Type Hinting Generics In Standard Collections" diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index b07bb8943d16f..d74f8bcc27a20 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -18,7 +18,8 @@ -------------- This module provides runtime support for type hints as specified by -:pep:`484`, :pep:`526`, :pep:`544`, :pep:`586`, :pep:`589`, :pep:`591`, and :pep:`613`. +:pep:`484`, :pep:`526`, :pep:`544`, :pep:`586`, :pep:`589`, :pep:`591`, +:pep:`612` and :pep:`613`. The most fundamental support consists of the types :data:`Any`, :data:`Union`, :data:`Tuple`, :data:`Callable`, :class:`TypeVar`, and :class:`Generic`. For full specification please see :pep:`484`. For @@ -171,6 +172,22 @@ It is possible to declare the return type of a callable without specifying the call signature by substituting a literal ellipsis for the list of arguments in the type hint: ``Callable[..., ReturnType]``. +Callables which take other callables as arguments may indicate that their +parameter types are dependent on each other using :class:`ParamSpec`. +Additionally, if that callable adds or removes arguments from other +callables, the :data:`Concatenate` operator may be used. They +take the form ``Callable[ParamSpecVariable, ReturnType]`` and +``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], ReturnType]`` +respectively. + +.. versionchanged:: 3.10 + ``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. + See :pep:`612` for more information. + +.. seealso:: + The documentation for :class:`ParamSpec` and :class:`Concatenate` provide + examples of usage in ``Callable``. + .. _generics: Generics @@ -316,6 +333,43 @@ User defined generic type aliases are also supported. Examples:: .. versionchanged:: 3.7 :class:`Generic` no longer has a custom metaclass. +User-defined generics for parameter expressions are also supported via parameter +specification variables in the form ``Generic[P]``. The behavior is consistent +with type variables' described above as parameter specification variables are +treated by the typing module as a specialized type variable. The one exception +to this is that a list of types can be used to substitute a :class:`ParamSpec`:: + + >>> from typing import Generic, ParamSpec, TypeVar + + >>> T = TypeVar('T') + >>> P = ParamSpec('P') + + >>> class Z(Generic[T, P]): ... + ... + >>> Z[int, [dict, float]] + __main__.Z[int, (, )] + + +Furthermore, a generic with only one parameter specification variable will accept +parameter lists in the forms ``X[[Type1, Type2, ...]]`` and also +``X[Type1, Type2, ...]`` for aesthetic reasons. Internally, the latter is converted +to the former and are thus equivalent:: + + >>> class X(Generic[P]): ... + ... + >>> X[int, str] + __main__.X[(, )] + >>> X[[int, str]] + __main__.X[(, )] + +Do note that generics with :class:`ParamSpec` may not have correct +``__parameters__`` after substitution in some cases because they +are intended primarily for static type checking. + +.. versionchanged:: 3.10 + :class:`Generic` can now be parameterized over parameter expressions. + See :class:`ParamSpec` and :pep:`612` for more details. + A user-defined generic class can have ABCs as base classes without a metaclass conflict. Generic metaclasses are not supported. The outcome of parameterizing generics is cached, and most types in the typing module are hashable and @@ -602,10 +656,80 @@ These can be used as types in annotations using ``[]``, each having a unique syn ``Callable[..., Any]``, and in turn to :class:`collections.abc.Callable`. + Callables which take other callables as arguments may indicate that their + parameter types are dependent on each other using :class:`ParamSpec`. + Additionally, if that callable adds or removes arguments from other + callables, the :data:`Concatenate` operator may be used. They + take the form ``Callable[ParamSpecVariable, ReturnType]`` and + ``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], ReturnType]`` + respectively. + .. deprecated:: 3.9 :class:`collections.abc.Callable` now supports ``[]``. See :pep:`585` and :ref:`types-genericalias`. + .. versionchanged:: 3.10 + ``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. + See :pep:`612` for more information. + + .. seealso:: + The documentation for :class:`ParamSpec` and :class:`Concatenate` provide + examples of usage with ``Callable``. + +.. data:: Concatenate + + Used with :data:`Callable` and :class:`ParamSpec` to type annotate a higher + order callable which adds, removes, or transforms parameters of another + callable. Usage is in the form + ``Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable]``. ``Concatenate`` + is currently only valid when used as the first argument to a :data:`Callable`. + The last parameter to ``Concatenate`` must be a :class:`ParamSpec`. + + For example, to annotate a decorator ``with_lock`` which provides a + :class:`threading.Lock` to the decorated function, ``Concatenate`` can be + used to indicate that ``with_lock`` expects a callable which takes in a + ``Lock`` as the first argument, and returns a callable with a different type + signature. In this case, the :class:`ParamSpec` indicates that the returned + callable's parameter types are dependent on the parameter types of the + callable being passed in:: + + from collections.abc import Callable + from threading import Lock + from typing import Any, Concatenate, ParamSpec + + P = ParamSpec('P') + R = ParamSpec('R') + + # Use this lock to ensure that only one thread is executing a function + # at any time. + my_lock = Lock() + + def with_lock(f: Callable[Concatenate[Lock, P], R]) -> Callable[P, R]: + '''A type-safe decorator which provides a lock.''' + global my_lock + def inner(*args: P.args, **kwargs: P.kwargs) -> T: + # Provide the lock as the first argument. + return f(my_lock, *args, **kwargs) + return inner + + @with_lock + def sum_threadsafe(lock: Lock, numbers: list[float]) -> float: + '''Add a list of numbers together in a thread-safe manner.''' + with lock: + return sum(numbers) + + # We don't need to pass in the lock ourselves thanks to the decorator. + sum_threadsafe([1.1, 2.2, 3.3]) + +.. versionadded:: 3.10 + +.. seealso:: + + * :pep:`612` -- Parameter Specification Variables (the PEP which introduced + ``ParamSpec`` and ``Concatenate``). + * :class:`ParamSpec` and :class:`Callable`. + + .. class:: Type(Generic[CT_co]) A variable annotated with ``C`` may accept a value of type ``C``. In @@ -876,6 +1000,84 @@ These are not used in annotations. They are building blocks for creating generic for the type variable must be a subclass of the boundary type, see :pep:`484`. +.. class:: ParamSpec(name, *, bound=None, covariant=False, contravariant=False) + + Parameter specification variable. A specialized version of + :class:`type variables `. + + Usage:: + + P = ParamSpec('P') + + Parameter specification variables exist primarily for the benefit of static + type checkers. They are used to forward the parameter types of one + callable to another callable -- a pattern commonly found in higher order + functions and decorators. They are only valid when used in ``Concatenate``, + or as the first argument to ``Callable``, or as parameters for user-defined + Generics. See :class:`Generic` for more information on generic types. + + For example, to add basic logging to a function, one can create a decorator + ``add_logging`` to log function calls. The parameter specification variable + tells the type checker that the callable passed into the decorator and the + new callable returned by it have inter-dependent type parameters:: + + from collections.abc import Callable + from typing import TypeVar, ParamSpec + import logging + + T = TypeVar('T') + P = ParamSpec('P') + + def add_logging(f: Callable[P, T]) -> Callable[P, T]: + '''A type-safe decorator to add logging to a function.''' + def inner(*args: P.args, **kwargs: P.kwargs) -> T: + logging.info(f'{f.__name__} was called') + return f(*args, **kwargs) + return inner + + @add_logging + def add_two(x: float, y: float) -> float: + '''Add two numbers together.''' + return x + y + + Without ``ParamSpec``, the simplest way to annotate this previously was to + use a :class:`TypeVar` with bound ``Callable[..., Any]``. However this + causes two problems: + + 1. The type checker can't type check the ``inner`` function because + ``*args`` and ``**kwargs`` have to be typed :data:`Any`. + 2. :func:`~cast` may be required in the body of the ``add_logging`` + decorator when returning the ``inner`` function, or the static type + checker must be told to ignore the ``return inner``. + + .. attribute:: args + .. attribute:: kwargs + + Since ``ParamSpec`` captures both positional and keyword parameters, + ``P.args`` and ``P.kwargs`` can be used to split a ``ParamSpec`` into its + components. ``P.args`` represents the tuple of positional parameters in a + given call and should only be used to annotate ``*args``. ``P.kwargs`` + represents the mapping of keyword parameters to their values in a given call, + and should be only be used to annotate ``**kwargs`` or ``**kwds``. Both + attributes require the annotated parameter to be in scope. + + Parameter specification variables created with ``covariant=True`` or + ``contravariant=True`` can be used to declare covariant or contravariant + generic types. The ``bound`` argument is also accepted, similar to + :class:`TypeVar`. However the actual semantics of these keywords are yet to + be decided. + + .. versionadded:: 3.10 + + .. note:: + Only parameter specification variables defined in global scope can + be pickled. + + .. seealso:: + * :pep:`612` -- Parameter Specification Variables (the PEP which introduced + ``ParamSpec`` and ``Concatenate``). + * :class:`Callable` and :class:`Concatenate`. + .. data:: AnyStr ``AnyStr`` is a type variable defined as diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index aa547ff46481b..be529d75e13c0 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -144,6 +144,28 @@ See :pep:`604` for more details. (Contributed by Maggie Moss and Philippe Prados in :issue:`41428`.) +PEP 612: Parameter Specification Variables +------------------------------------------ + +Two new options to improve the information provided to static type checkers for +:pep:`484`\ 's ``Callable`` have been added to the :mod:`typing` module. + +The first is the parameter specification variable. They are used to forward the +parameter types of one callable to another callable -- a pattern commonly +found in higher order functions and decorators. Examples of usage can be found +in :class:`typing.ParamSpec`. Previously, there was no easy way to type annotate +dependency of parameter types in such a precise manner. + +The second option is the new ``Concatenate`` operator. It's used in conjunction +with parameter specification variables to type annotate a higher order callable +which adds or removes parameters of another callable. Examples of usage can +be found in :class:`typing.Concatenate`. + +See :class:`typing.Callable`, :class:`typing.ParamSpec`, +:class:`typing.Concatenate` and :pep:`612` for more details. + +(Contributed by Ken Jin in :issue:`41559`.) + Other Language Changes ====================== diff --git a/Lib/typing.py b/Lib/typing.py index b140b0e669626..88d0d623a421f 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -544,8 +544,9 @@ def TypeAlias(self, parameters): @_SpecialForm def Concatenate(self, parameters): - """Used in conjunction with ParamSpec and Callable to represent a higher - order function which adds, removes or transforms parameters of a Callable. + """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a + higher order function which adds, removes or transforms parameters of a + callable. For example:: @@ -735,11 +736,11 @@ class ParamSpec(_Final, _Immutable, _TypeVarLike, _root=True): Parameter specification variables exist primarily for the benefit of static type checkers. They are used to forward the parameter types of one - Callable to another Callable, a pattern commonly found in higher order - functions and decorators. They are only valid when used in Concatenate, or - as the first argument to Callable, or as parameters for user-defined Generics. - See class Generic for more information on generic types. An example for - annotating a decorator:: + callable to another callable, a pattern commonly found in higher order + functions and decorators. They are only valid when used in ``Concatenate``, + or s the first argument to ``Callable``, or as parameters for user-defined + Generics. See class Generic for more information on generic types. An + example for annotating a decorator:: T = TypeVar('T') P = ParamSpec('P') From webhook-mailer at python.org Fri Jan 1 22:44:13 2021 From: webhook-mailer at python.org (corona10) Date: Sat, 02 Jan 2021 03:44:13 -0000 Subject: [Python-checkins] [3.9] bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969) (GH-24050) Message-ID: https://github.com/python/cpython/commit/69120613c071e9327a9dc6e4b1ff21b2e94d885e commit: 69120613c071e9327a9dc6e4b1ff21b2e94d885e branch: 3.9 author: Ross committer: corona10 date: 2021-01-02T12:44:04+09:00 summary: [3.9] bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided (GH-23969) (GH-24050) files: A Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst M Lib/smtplib.py M Lib/test/mock_socket.py M Lib/test/test_smtplib.py diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 7808ba01cba88..f0472317de919 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -1082,7 +1082,8 @@ def connect(self, host='localhost', port=0, source_address=None): # Handle Unix-domain sockets. try: self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - self.sock.settimeout(self.timeout) + if self.timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: + self.sock.settimeout(self.timeout) self.file = None self.sock.connect(host) except OSError: diff --git a/Lib/test/mock_socket.py b/Lib/test/mock_socket.py index cda4db25cba59..c7abddcf5fafd 100644 --- a/Lib/test/mock_socket.py +++ b/Lib/test/mock_socket.py @@ -107,6 +107,9 @@ def getpeername(self): def close(self): pass + def connect(self, host): + pass + def socket(family=None, type=None, proto=None): return MockSocket(family) @@ -152,8 +155,12 @@ def getaddrinfo(*args, **kw): # Constants +_GLOBAL_DEFAULT_TIMEOUT = socket_module._GLOBAL_DEFAULT_TIMEOUT AF_INET = socket_module.AF_INET AF_INET6 = socket_module.AF_INET6 SOCK_STREAM = socket_module.SOCK_STREAM SOL_SOCKET = None SO_REUSEADDR = None + +if hasattr(socket_module, 'AF_UNIX'): + AF_UNIX = socket_module.AF_UNIX diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py index 576299900318d..3451f3a411e9a 100644 --- a/Lib/test/test_smtplib.py +++ b/Lib/test/test_smtplib.py @@ -165,6 +165,17 @@ class LMTPGeneralTests(GeneralTests, unittest.TestCase): client = smtplib.LMTP + @unittest.skipUnless(hasattr(socket, 'AF_UNIX'), "test requires Unix domain socket") + def testUnixDomainSocketTimeoutDefault(self): + local_host = '/some/local/lmtp/delivery/program' + mock_socket.reply_with(b"220 Hello world") + try: + client = self.client(local_host, self.port) + finally: + mock_socket.setdefaulttimeout(None) + self.assertIsNone(client.sock.gettimeout()) + client.close() + def testTimeoutZero(self): super().testTimeoutZero() local_host = '/some/local/lmtp/delivery/program' diff --git a/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst b/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst new file mode 100644 index 0000000000000..93a0bb010df2b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst @@ -0,0 +1,2 @@ +Configure LMTP Unix-domain socket to use socket global default timeout when +a timeout is not explicitly provided. From webhook-mailer at python.org Sat Jan 2 00:27:28 2021 From: webhook-mailer at python.org (ned-deily) Date: Sat, 02 Jan 2021 05:27:28 -0000 Subject: [Python-checkins] [3.6] Bring Python into the new year. (GH-24036). (GH-24054) Message-ID: https://github.com/python/cpython/commit/415c4a127027d0c505a8ce91999df1e39d3cf372 commit: 415c4a127027d0c505a8ce91999df1e39d3cf372 branch: 3.6 author: Dong-hee Na committer: ned-deily date: 2021-01-02T00:27:18-05:00 summary: [3.6] Bring Python into the new year. (GH-24036). (GH-24054) (cherry picked from commit de6f20a6de48d63066b2cf5b317f50629f01d74a) Co-authored-by: Dong-hee Na files: M Doc/copyright.rst M Doc/license.rst M LICENSE M Mac/IDLE/IDLE.app/Contents/Info.plist M Mac/PythonLauncher/Info.plist.in M Mac/Resources/app/Info.plist.in M PC/python_ver_rc.h M Python/getcopyright.c M README.rst diff --git a/Doc/copyright.rst b/Doc/copyright.rst index 1b90d9f172c99..4191c0bb63a2c 100644 --- a/Doc/copyright.rst +++ b/Doc/copyright.rst @@ -4,7 +4,7 @@ Copyright Python and this documentation is: -Copyright ? 2001-2020 Python Software Foundation. All rights reserved. +Copyright ? 2001-2021 Python Software Foundation. All rights reserved. Copyright ? 2000 BeOpen.com. All rights reserved. diff --git a/Doc/license.rst b/Doc/license.rst index c046cd2a35936..2b5ac8ff5f0b0 100644 --- a/Doc/license.rst +++ b/Doc/license.rst @@ -87,7 +87,7 @@ PSF LICENSE AGREEMENT FOR PYTHON |release| analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python |release| alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of - copyright, i.e., "Copyright ? 2001-2020 Python Software Foundation; All Rights + copyright, i.e., "Copyright ? 2001-2021 Python Software Foundation; All Rights Reserved" are retained in Python |release| alone or in any derivative version prepared by Licensee. diff --git a/LICENSE b/LICENSE index 66a3ac80d729a..877c067513781 100644 --- a/LICENSE +++ b/LICENSE @@ -73,7 +73,7 @@ analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. diff --git a/Mac/IDLE/IDLE.app/Contents/Info.plist b/Mac/IDLE/IDLE.app/Contents/Info.plist index dcc48abdd2a39..f6b5cfe8d5451 100644 --- a/Mac/IDLE/IDLE.app/Contents/Info.plist +++ b/Mac/IDLE/IDLE.app/Contents/Info.plist @@ -36,7 +36,7 @@ CFBundleExecutable IDLE CFBundleGetInfoString - %version%, ? 2001-2020 Python Software Foundation + %version%, ? 2001-2021 Python Software Foundation CFBundleIconFile IDLE.icns CFBundleIdentifier diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in index 21a051535fb92..3d8bc3e4154ee 100644 --- a/Mac/PythonLauncher/Info.plist.in +++ b/Mac/PythonLauncher/Info.plist.in @@ -40,7 +40,7 @@ CFBundleExecutable Python Launcher CFBundleGetInfoString - %VERSION%, ? 2001-2020 Python Software Foundation + %VERSION%, ? 2001-2021 Python Software Foundation CFBundleIconFile PythonLauncher.icns CFBundleIdentifier diff --git a/Mac/Resources/app/Info.plist.in b/Mac/Resources/app/Info.plist.in index 1d624984a8520..2c801332332b3 100644 --- a/Mac/Resources/app/Info.plist.in +++ b/Mac/Resources/app/Info.plist.in @@ -37,7 +37,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - %version%, (c) 2001-2020 Python Software Foundation. + %version%, (c) 2001-2021 Python Software Foundation. CFBundleName Python CFBundlePackageType diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h index f95e755bb8bd7..bc4ab34c71278 100644 --- a/PC/python_ver_rc.h +++ b/PC/python_ver_rc.h @@ -4,7 +4,7 @@ #include "winver.h" #define PYTHON_COMPANY "Python Software Foundation" -#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2016 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." +#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2021 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC." #define MS_WINDOWS #include "modsupport.h" diff --git a/Python/getcopyright.c b/Python/getcopyright.c index 299ccc08c44f8..7fdeb314d5261 100644 --- a/Python/getcopyright.c +++ b/Python/getcopyright.c @@ -4,7 +4,7 @@ static const char cprt[] = "\ -Copyright (c) 2001-2020 Python Software Foundation.\n\ +Copyright (c) 2001-2021 Python Software Foundation.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 2000 BeOpen.com.\n\ diff --git a/README.rst b/README.rst index b6b587702a9d3..4bed1d47ce427 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ This is Python version 3.6.12+ :alt: CPython code coverage on Codecov :target: https://codecov.io/gh/python/cpython -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. See the end of this file for further copyright and license information. @@ -65,8 +65,8 @@ elsewhere it's just ``python``. If you are running on macOS with the latest updates installed, make sure to install openSSL or some other SSL software along with Homebrew or another package manager. -If issues persist, see https://devguide.python.org/setup/#macos-and-os-x for more -information. +If issues persist, see https://devguide.python.org/setup/#macos-and-os-x for more +information. On macOS, if you have configured Python with ``--enable-framework``, you should use ``make frameworkinstall`` to do the installation. Note that this @@ -242,7 +242,7 @@ See :pep:`494` for Python 3.6 release details. Copyright and License Information --------------------------------- -Copyright (c) 2001-2020 Python Software Foundation. All rights reserved. +Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. Copyright (c) 2000 BeOpen.com. All rights reserved. From webhook-mailer at python.org Sat Jan 2 05:24:31 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sat, 02 Jan 2021 10:24:31 -0000 Subject: [Python-checkins] [3.9] bpo-42425: Fix possible leak in initialization of errmap for OSError (GH-23446). (GH-24057) Message-ID: https://github.com/python/cpython/commit/7695d832565914efcedcc885feb129f5102aec90 commit: 7695d832565914efcedcc885feb129f5102aec90 branch: 3.9 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-02T12:24:27+02:00 summary: [3.9] bpo-42425: Fix possible leak in initialization of errmap for OSError (GH-23446). (GH-24057) (cherry picked from commit ed1007c0d74e658d1e6c9b51b12ce7501eb8cbf9) files: M Objects/exceptions.c diff --git a/Objects/exceptions.c b/Objects/exceptions.c index e44ce727aff1e..eb72de53e98c1 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -2531,8 +2531,10 @@ _PyExc_Init(void) do { \ PyObject *_code = PyLong_FromLong(CODE); \ assert(_PyObject_RealIsSubclass(PyExc_ ## TYPE, PyExc_OSError)); \ - if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) \ + if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) { \ + Py_XDECREF(_code); \ return _PyStatus_ERR("errmap insertion problem."); \ + } \ Py_DECREF(_code); \ } while (0) From webhook-mailer at python.org Sat Jan 2 11:04:00 2021 From: webhook-mailer at python.org (malemburg) Date: Sat, 02 Jan 2021 16:04:00 -0000 Subject: [Python-checkins] handle empty string in variable executable in platform.libc_ver() (#23140) Message-ID: https://github.com/python/cpython/commit/d9142831ba6780eef47bb68e878cf2f8910c4ab2 commit: d9142831ba6780eef47bb68e878cf2f8910c4ab2 branch: master author: Kurochan committer: malemburg date: 2021-01-02T17:03:53+01:00 summary: handle empty string in variable executable in platform.libc_ver() (#23140) files: A Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst M Lib/platform.py diff --git a/Lib/platform.py b/Lib/platform.py index 985e12d9684ea..d567dd1a6e1ad 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -174,7 +174,7 @@ def libc_ver(executable=None, lib='', version='', chunksize=16384): The file is read and scanned in chunks of chunksize bytes. """ - if executable is None: + if not executable: try: ver = os.confstr('CS_GNU_LIBC_VERSION') # parse 'glibc 2.28' as ('glibc', '2.28') diff --git a/Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst b/Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst new file mode 100644 index 0000000000000..9a026d5cdda27 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst @@ -0,0 +1 @@ +Handle empty string in variable executable in platform.libc_ver() From webhook-mailer at python.org Sat Jan 2 11:19:19 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 02 Jan 2021 16:19:19 -0000 Subject: [Python-checkins] bpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases in Union (GH-24059) Message-ID: https://github.com/python/cpython/commit/49cd68fb1ed4cbaf109308c0a7c8c1efcf6f3775 commit: 49cd68fb1ed4cbaf109308c0a7c8c1efcf6f3775 branch: master author: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-02T08:19:15-08:00 summary: bpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases in Union (GH-24059) Previously this didn't raise an error. Now it will: ```python from collections.abc import Callable isinstance(int, list | Callable[..., str]) ``` Also added tests in Union since there were previously none for stuff like ``isinstance(list, list | list[int])`` either. Backport to 3.9 not required. Automerge-Triggered-By: GH:gvanrossum files: M Lib/test/test_types.py M Objects/unionobject.c diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py index 83196ad3c1743..d8a48ce36f618 100644 --- a/Lib/test/test_types.py +++ b/Lib/test/test_types.py @@ -737,6 +737,16 @@ def __eq__(self, other): with self.assertRaises(ZeroDivisionError): list[int] | list[bt] + union_ga = (int | list[str], int | collections.abc.Callable[..., str], + int | d) + # Raise error when isinstance(type, type | genericalias) + for type_ in union_ga: + with self.subTest(f"check isinstance/issubclass is invalid for {type_}"): + with self.assertRaises(TypeError): + isinstance(list, type_) + with self.assertRaises(TypeError): + issubclass(list, type_) + def test_ellipsis_type(self): self.assertIsInstance(Ellipsis, types.EllipsisType) diff --git a/Objects/unionobject.c b/Objects/unionobject.c index 32aa5078afcef..05350363eed63 100644 --- a/Objects/unionobject.c +++ b/Objects/unionobject.c @@ -34,7 +34,7 @@ is_generic_alias_in_args(PyObject *args) { Py_ssize_t nargs = PyTuple_GET_SIZE(args); for (Py_ssize_t iarg = 0; iarg < nargs; iarg++) { PyObject *arg = PyTuple_GET_ITEM(args, iarg); - if (Py_TYPE(arg) == &Py_GenericAliasType) { + if (PyObject_TypeCheck(arg, &Py_GenericAliasType)) { return 0; } } From webhook-mailer at python.org Sat Jan 2 11:39:00 2021 From: webhook-mailer at python.org (encukou) Date: Sat, 02 Jan 2021 16:39:00 -0000 Subject: [Python-checkins] bpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124) Message-ID: https://github.com/python/cpython/commit/75bf107c62fbdc00af51ee4f6ab69df4bd201104 commit: 75bf107c62fbdc00af51ee4f6ab69df4bd201104 branch: master author: Erlend Egeberg Aasland committer: encukou date: 2021-01-02T17:38:47+01:00 summary: bpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124) files: A Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst M Modules/arraymodule.c M Modules/clinic/arraymodule.c.h diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst new file mode 100644 index 0000000000000..40c5511e32133 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst @@ -0,0 +1 @@ +Convert :mod:`array` to use heap types, and establish module state for these. diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 6583e66611959..12bd51705579b 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -5,6 +5,7 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" +#include "structmember.h" // PyMemberDef #include // offsetof() #ifdef STDC_HEADERS @@ -21,6 +22,7 @@ module array /*[clinic end generated code: output=da39a3ee5e6b4b0d input=7d1b8d7f5958fd83]*/ struct arrayobject; /* Forward */ +static struct PyModuleDef arraymodule; /* All possible arraydescr values are defined in the vector "descriptors" * below. That's defined later because the appropriate get and set @@ -46,8 +48,6 @@ typedef struct arrayobject { Py_ssize_t ob_exports; /* Number of exported buffers */ } arrayobject; -static PyTypeObject Arraytype; - typedef struct { PyObject_HEAD Py_ssize_t index; @@ -55,9 +55,21 @@ typedef struct { PyObject* (*getitem)(struct arrayobject *, Py_ssize_t); } arrayiterobject; -static PyTypeObject PyArrayIter_Type; +typedef struct { + PyTypeObject *ArrayType; + PyTypeObject *ArrayIterType; +} array_state; -#define PyArrayIter_Check(op) PyObject_TypeCheck(op, &PyArrayIter_Type) +static array_state * +get_array_state(PyObject *module) +{ + return (array_state *)PyModule_GetState(module); +} + +#define find_array_state_by_type(tp) \ + (get_array_state(_PyType_GetModuleByDef(tp, &arraymodule))) +#define get_array_state_by_class(cls) \ + (get_array_state(PyType_GetModule(cls))) enum machine_format_code { UNKNOWN_FORMAT = -1, @@ -105,8 +117,7 @@ enum machine_format_code { */ #include "clinic/arraymodule.c.h" -#define array_Check(op) PyObject_TypeCheck(op, &Arraytype) -#define array_CheckExact(op) Py_IS_TYPE(op, &Arraytype) +#define array_Check(op, state) PyObject_TypeCheck(op, state->ArrayType) static int array_resize(arrayobject *self, Py_ssize_t newsize) @@ -562,9 +573,9 @@ static const struct arraydescr descriptors[] = { Implementations of array object methods. ****************************************************************************/ /*[clinic input] -class array.array "arrayobject *" "&Arraytype" +class array.array "arrayobject *" "ArrayType" [clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ad43d37e942a8854]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=a5c29edf59f176a3]*/ static PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, const struct arraydescr *descr) @@ -607,8 +618,11 @@ newarrayobject(PyTypeObject *type, Py_ssize_t size, const struct arraydescr *des static PyObject * getarrayitem(PyObject *op, Py_ssize_t i) { +#ifndef NDEBUG + array_state *state = find_array_state_by_type(Py_TYPE(op)); + assert(array_Check(op, state)); +#endif arrayobject *ap; - assert(array_Check(op)); ap = (arrayobject *)op; assert(i>=0 && iob_descr->getitem)(ap, i); @@ -649,23 +663,27 @@ ins1(arrayobject *self, Py_ssize_t where, PyObject *v) static void array_dealloc(arrayobject *op) { + PyTypeObject *tp = Py_TYPE(op); + if (op->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) op); if (op->ob_item != NULL) PyMem_Free(op->ob_item); - Py_TYPE(op)->tp_free((PyObject *)op); + tp->tp_free(op); + Py_DECREF(tp); } static PyObject * array_richcompare(PyObject *v, PyObject *w, int op) { + array_state *state = find_array_state_by_type(Py_TYPE(v)); arrayobject *va, *wa; PyObject *vi = NULL; PyObject *wi = NULL; Py_ssize_t i, k; PyObject *res; - if (!array_Check(v) || !array_Check(w)) + if (!array_Check(v, state) || !array_Check(w, state)) Py_RETURN_NOTIMPLEMENTED; va = (arrayobject *)v; @@ -787,7 +805,9 @@ array_item(arrayobject *a, Py_ssize_t i) static PyObject * array_slice(arrayobject *a, Py_ssize_t ilow, Py_ssize_t ihigh) { + array_state *state = find_array_state_by_type(Py_TYPE(a)); arrayobject *np; + if (ilow < 0) ilow = 0; else if (ilow > Py_SIZE(a)) @@ -798,7 +818,7 @@ array_slice(arrayobject *a, Py_ssize_t ilow, Py_ssize_t ihigh) ihigh = ilow; else if (ihigh > Py_SIZE(a)) ihigh = Py_SIZE(a); - np = (arrayobject *) newarrayobject(&Arraytype, ihigh - ilow, a->ob_descr); + np = (arrayobject *) newarrayobject(state->ArrayType, ihigh - ilow, a->ob_descr); if (np == NULL) return NULL; if (ihigh > ilow) { @@ -841,9 +861,10 @@ array_array___deepcopy__(arrayobject *self, PyObject *unused) static PyObject * array_concat(arrayobject *a, PyObject *bb) { + array_state *state = find_array_state_by_type(Py_TYPE(a)); Py_ssize_t size; arrayobject *np; - if (!array_Check(bb)) { + if (!array_Check(bb, state)) { PyErr_Format(PyExc_TypeError, "can only append array (not \"%.200s\") to array", Py_TYPE(bb)->tp_name); @@ -858,7 +879,7 @@ array_concat(arrayobject *a, PyObject *bb) return PyErr_NoMemory(); } size = Py_SIZE(a) + Py_SIZE(b); - np = (arrayobject *) newarrayobject(&Arraytype, size, a->ob_descr); + np = (arrayobject *) newarrayobject(state->ArrayType, size, a->ob_descr); if (np == NULL) { return NULL; } @@ -876,6 +897,7 @@ array_concat(arrayobject *a, PyObject *bb) static PyObject * array_repeat(arrayobject *a, Py_ssize_t n) { + array_state *state = find_array_state_by_type(Py_TYPE(a)); Py_ssize_t size; arrayobject *np; Py_ssize_t oldbytes, newbytes; @@ -885,7 +907,7 @@ array_repeat(arrayobject *a, Py_ssize_t n) return PyErr_NoMemory(); } size = Py_SIZE(a) * n; - np = (arrayobject *) newarrayobject(&Arraytype, size, a->ob_descr); + np = (arrayobject *) newarrayobject(state->ArrayType, size, a->ob_descr); if (np == NULL) return NULL; if (size == 0) @@ -958,7 +980,10 @@ array_ass_item(arrayobject *a, Py_ssize_t i, PyObject *v) static int setarrayitem(PyObject *a, Py_ssize_t i, PyObject *v) { - assert(array_Check(a)); +#ifndef NDEBUG + array_state *state = find_array_state_by_type(Py_TYPE(a)); + assert(array_Check(a, state)); +#endif return array_ass_item((arrayobject *)a, i, v); } @@ -986,11 +1011,11 @@ array_iter_extend(arrayobject *self, PyObject *bb) } static int -array_do_extend(arrayobject *self, PyObject *bb) +array_do_extend(array_state *state, arrayobject *self, PyObject *bb) { Py_ssize_t size, oldsize, bbsize; - if (!array_Check(bb)) + if (!array_Check(bb, state)) return array_iter_extend(self, bb); #define b ((arrayobject *)bb) if (self->ob_descr != b->ob_descr) { @@ -1021,13 +1046,15 @@ array_do_extend(arrayobject *self, PyObject *bb) static PyObject * array_inplace_concat(arrayobject *self, PyObject *bb) { - if (!array_Check(bb)) { + array_state *state = find_array_state_by_type(Py_TYPE(self)); + + if (!array_Check(bb, state)) { PyErr_Format(PyExc_TypeError, "can only extend array with array (not \"%.200s\")", Py_TYPE(bb)->tp_name); return NULL; } - if (array_do_extend(self, bb) == -1) + if (array_do_extend(state, self, bb) == -1) return NULL; Py_INCREF(self); return (PyObject *)self; @@ -1232,6 +1259,7 @@ array_array_pop_impl(arrayobject *self, Py_ssize_t i) /*[clinic input] array.array.extend + cls: defining_class bb: object / @@ -1239,10 +1267,12 @@ Append items to the end of the array. [clinic start generated code]*/ static PyObject * -array_array_extend(arrayobject *self, PyObject *bb) -/*[clinic end generated code: output=bbddbc8e8bef871d input=43be86aba5c31e44]*/ +array_array_extend_impl(arrayobject *self, PyTypeObject *cls, PyObject *bb) +/*[clinic end generated code: output=e65eb7588f0bc266 input=8eb6817ec4d2cb62]*/ { - if (array_do_extend(self, bb) == -1) + array_state *state = get_array_state_by_class(cls); + + if (array_do_extend(state, self, bb) == -1) return NULL; Py_RETURN_NONE; } @@ -1928,6 +1958,7 @@ array__array_reconstructor_impl(PyObject *module, PyTypeObject *arraytype, PyObject *items) /*[clinic end generated code: output=e05263141ba28365 input=2464dc8f4c7736b5]*/ { + array_state *state = get_array_state(module); PyObject *converted_items; PyObject *result; const struct arraydescr *descr; @@ -1938,10 +1969,10 @@ array__array_reconstructor_impl(PyObject *module, PyTypeObject *arraytype, Py_TYPE(arraytype)->tp_name); return NULL; } - if (!PyType_IsSubtype(arraytype, &Arraytype)) { + if (!PyType_IsSubtype(arraytype, state->ArrayType)) { PyErr_Format(PyExc_TypeError, "%.200s is not a subtype of %.200s", - arraytype->tp_name, Arraytype.tp_name); + arraytype->tp_name, state->ArrayType->tp_name); return NULL; } for (descr = descriptors; descr->typecode != '\0'; descr++) { @@ -2287,6 +2318,8 @@ array_repr(arrayobject *a) static PyObject* array_subscr(arrayobject* self, PyObject* item) { + array_state *state = find_array_state_by_type(Py_TYPE(self)); + if (PyIndex_Check(item)) { Py_ssize_t i = PyNumber_AsSsize_t(item, PyExc_IndexError); if (i==-1 && PyErr_Occurred()) { @@ -2310,10 +2343,10 @@ array_subscr(arrayobject* self, PyObject* item) step); if (slicelength <= 0) { - return newarrayobject(&Arraytype, 0, self->ob_descr); + return newarrayobject(state->ArrayType, 0, self->ob_descr); } else if (step == 1) { - PyObject *result = newarrayobject(&Arraytype, + PyObject *result = newarrayobject(state->ArrayType, slicelength, self->ob_descr); if (result == NULL) return NULL; @@ -2323,7 +2356,7 @@ array_subscr(arrayobject* self, PyObject* item) return result; } else { - result = newarrayobject(&Arraytype, slicelength, self->ob_descr); + result = newarrayobject(state->ArrayType, slicelength, self->ob_descr); if (!result) return NULL; ar = (arrayobject*)result; @@ -2349,6 +2382,7 @@ static int array_ass_subscr(arrayobject* self, PyObject* item, PyObject* value) { Py_ssize_t start, stop, step, slicelength, needed; + array_state* state = find_array_state_by_type(Py_TYPE(self)); arrayobject* other; int itemsize; @@ -2390,7 +2424,7 @@ array_ass_subscr(arrayobject* self, PyObject* item, PyObject* value) other = NULL; needed = 0; } - else if (array_Check(value)) { + else if (array_Check(value, state)) { other = (arrayobject *)value; needed = Py_SIZE(other); if (self == other) { @@ -2502,12 +2536,6 @@ array_ass_subscr(arrayobject* self, PyObject* item, PyObject* value) } } -static PyMappingMethods array_as_mapping = { - (lenfunc)array_length, - (binaryfunc)array_subscr, - (objobjargproc)array_ass_subscr -}; - static const void *emptybuf = ""; @@ -2558,32 +2586,15 @@ array_buffer_relbuf(arrayobject *self, Py_buffer *view) self->ob_exports--; } -static PySequenceMethods array_as_sequence = { - (lenfunc)array_length, /*sq_length*/ - (binaryfunc)array_concat, /*sq_concat*/ - (ssizeargfunc)array_repeat, /*sq_repeat*/ - (ssizeargfunc)array_item, /*sq_item*/ - 0, /*sq_slice*/ - (ssizeobjargproc)array_ass_item, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - (objobjproc)array_contains, /*sq_contains*/ - (binaryfunc)array_inplace_concat, /*sq_inplace_concat*/ - (ssizeargfunc)array_inplace_repeat /*sq_inplace_repeat*/ -}; - -static PyBufferProcs array_as_buffer = { - (getbufferproc)array_buffer_getbuf, - (releasebufferproc)array_buffer_relbuf -}; - static PyObject * array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { + array_state *state = find_array_state_by_type(type); int c; PyObject *initial = NULL, *it = NULL; const struct arraydescr *descr; - if (type == &Arraytype && !_PyArg_NoKeywords("array.array", kwds)) + if (type == state->ArrayType && !_PyArg_NoKeywords("array.array", kwds)) return NULL; if (!PyArg_ParseTuple(args, "C|O:array", &c, &initial)) @@ -2600,7 +2611,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) "an array with typecode '%c'", c); return NULL; } - else if (array_Check(initial) && + else if (array_Check(initial, state) && ((arrayobject*)initial)->ob_descr->typecode == 'u') { PyErr_Format(PyExc_TypeError, "cannot use a unicode array to " "initialize an array with typecode '%c'", c); @@ -2613,7 +2624,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) || PyBytes_Check(initial) || PyTuple_Check(initial) || ((c=='u') && PyUnicode_Check(initial)) - || (array_Check(initial) + || (array_Check(initial, state) && c == ((arrayobject*)initial)->ob_descr->typecode))) { it = PyObject_GetIter(initial); if (it == NULL) @@ -2634,7 +2645,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) len = 0; else if (PyList_Check(initial)) len = PyList_GET_SIZE(initial); - else if (PyTuple_Check(initial) || array_Check(initial)) + else if (PyTuple_Check(initial) || array_Check(initial, state)) len = Py_SIZE(initial); else len = 0; @@ -2643,7 +2654,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (a == NULL) return NULL; - if (len > 0 && !array_Check(initial)) { + if (len > 0 && !array_Check(initial, state)) { Py_ssize_t i; for (i = 0; i < len; i++) { PyObject *v = @@ -2688,7 +2699,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self->allocated = n; } } - else if (initial != NULL && array_Check(initial) && len > 0) { + else if (initial != NULL && array_Check(initial, state) && len > 0) { arrayobject *self = (arrayobject *)a; arrayobject *other = (arrayobject *)initial; memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize); @@ -2777,67 +2788,73 @@ itemsize -- the length in bytes of one array item\n\ static PyObject *array_iter(arrayobject *ao); -static PyTypeObject Arraytype = { - PyVarObject_HEAD_INIT(NULL, 0) - "array.array", - sizeof(arrayobject), - 0, - (destructor)array_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - (reprfunc)array_repr, /* tp_repr */ - 0, /* tp_as_number*/ - &array_as_sequence, /* tp_as_sequence*/ - &array_as_mapping, /* tp_as_mapping*/ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - &array_as_buffer, /* tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - arraytype_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - array_richcompare, /* tp_richcompare */ - offsetof(arrayobject, weakreflist), /* tp_weaklistoffset */ - (getiterfunc)array_iter, /* tp_iter */ - 0, /* tp_iternext */ - array_methods, /* tp_methods */ - 0, /* tp_members */ - array_getsets, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - PyType_GenericAlloc, /* tp_alloc */ - array_new, /* tp_new */ - PyObject_Del, /* tp_free */ +static struct PyMemberDef array_members[] = { + {"__weaklistoffset__", T_PYSSIZET, offsetof(arrayobject, weakreflist), READONLY}, + {NULL}, }; +static PyType_Slot array_slots[] = { + {Py_tp_dealloc, array_dealloc}, + {Py_tp_repr, array_repr}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_doc, (void *)arraytype_doc}, + {Py_tp_richcompare, array_richcompare}, + {Py_tp_iter, array_iter}, + {Py_tp_methods, array_methods}, + {Py_tp_members, array_members}, + {Py_tp_getset, array_getsets}, + {Py_tp_alloc, PyType_GenericAlloc}, + {Py_tp_new, array_new}, + {Py_tp_free, PyObject_Del}, + + /* as sequence */ + {Py_sq_length, array_length}, + {Py_sq_concat, array_concat}, + {Py_sq_repeat, array_repeat}, + {Py_sq_item, array_item}, + {Py_sq_ass_item, array_ass_item}, + {Py_sq_contains, array_contains}, + {Py_sq_inplace_concat, array_inplace_concat}, + {Py_sq_inplace_repeat, array_inplace_repeat}, + + /* as mapping */ + {Py_mp_length, array_length}, + {Py_mp_subscript, array_subscr}, + {Py_mp_ass_subscript, array_ass_subscr}, + + /* as buffer */ + {Py_bf_getbuffer, array_buffer_getbuf}, + {Py_bf_releasebuffer, array_buffer_relbuf}, + + {0, NULL}, +}; + +static PyType_Spec array_spec = { + .name = "array.array", + .basicsize = sizeof(arrayobject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .slots = array_slots, +}; /*********************** Array Iterator **************************/ /*[clinic input] -class array.arrayiterator "arrayiterobject *" "&PyArrayIter_Type" +class array.arrayiterator "arrayiterobject *" "find_array_state_by_type(type)->ArrayIterType" [clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=5aefd2d74d8c8e30]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=fb46d5ef98dd95ff]*/ static PyObject * array_iter(arrayobject *ao) { + array_state *state = find_array_state_by_type(Py_TYPE(ao)); arrayiterobject *it; - if (!array_Check(ao)) { + if (!array_Check(ao, state)) { PyErr_BadInternalCall(); return NULL; } - it = PyObject_GC_New(arrayiterobject, &PyArrayIter_Type); + it = PyObject_GC_New(arrayiterobject, state->ArrayIterType); if (it == NULL) return NULL; @@ -2855,12 +2872,17 @@ arrayiter_next(arrayiterobject *it) arrayobject *ao; assert(it != NULL); - assert(PyArrayIter_Check(it)); +#ifndef NDEBUG + array_state *state = find_array_state_by_type(Py_TYPE(it)); + assert(PyObject_TypeCheck(it, state->ArrayIterType)); +#endif ao = it->ao; if (ao == NULL) { return NULL; } - assert(array_Check(ao)); +#ifndef NDEBUG + assert(array_Check(ao, state)); +#endif if (it->index < Py_SIZE(ao)) { return (*it->getitem)(ao, it->index++); } @@ -2872,9 +2894,12 @@ arrayiter_next(arrayiterobject *it) static void arrayiter_dealloc(arrayiterobject *it) { + PyTypeObject *tp = Py_TYPE(it); + PyObject_GC_UnTrack(it); Py_XDECREF(it->ao); PyObject_GC_Del(it); + Py_DECREF(tp); } static int @@ -2932,36 +2957,21 @@ static PyMethodDef arrayiter_methods[] = { {NULL, NULL} /* sentinel */ }; -static PyTypeObject PyArrayIter_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "arrayiterator", /* tp_name */ - sizeof(arrayiterobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)arrayiter_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */ - 0, /* tp_doc */ - (traverseproc)arrayiter_traverse, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - PyObject_SelfIter, /* tp_iter */ - (iternextfunc)arrayiter_next, /* tp_iternext */ - arrayiter_methods, /* tp_methods */ +static PyType_Slot arrayiter_slots[] = { + {Py_tp_dealloc, arrayiter_dealloc}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_traverse, arrayiter_traverse}, + {Py_tp_iter, PyObject_SelfIter}, + {Py_tp_iternext, arrayiter_next}, + {Py_tp_methods, arrayiter_methods}, + {0, NULL}, +}; + +static PyType_Spec arrayiter_spec = { + .name = "array.arrayiterator", + .basicsize = sizeof(arrayiterobject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .slots = arrayiter_slots, }; @@ -2973,45 +2983,53 @@ static PyMethodDef a_methods[] = { {NULL, NULL, 0, NULL} /* Sentinel */ }; +#define CREATE_TYPE(module, type, spec) \ +do { \ + type = (PyTypeObject *)PyType_FromModuleAndSpec(m, spec, NULL); \ + if (type == NULL) { \ + return -1; \ + } \ +} while (0) + static int array_modexec(PyObject *m) { + array_state *state = get_array_state(m); char buffer[Py_ARRAY_LENGTH(descriptors)], *p; PyObject *typecodes; const struct arraydescr *descr; - if (PyType_Ready(&Arraytype) < 0) - return -1; - Py_SET_TYPE(&PyArrayIter_Type, &PyType_Type); + CREATE_TYPE(m, state->ArrayType, &array_spec); + CREATE_TYPE(m, state->ArrayIterType, &arrayiter_spec); + Py_SET_TYPE(state->ArrayIterType, &PyType_Type); - Py_INCREF((PyObject *)&Arraytype); - if (PyModule_AddObject(m, "ArrayType", (PyObject *)&Arraytype) < 0) { - Py_DECREF((PyObject *)&Arraytype); + Py_INCREF((PyObject *)state->ArrayType); + if (PyModule_AddObject(m, "ArrayType", (PyObject *)state->ArrayType) < 0) { + Py_DECREF((PyObject *)state->ArrayType); return -1; } PyObject *abc_mod = PyImport_ImportModule("collections.abc"); if (!abc_mod) { - Py_DECREF((PyObject *)&Arraytype); + Py_DECREF((PyObject *)state->ArrayType); return -1; } PyObject *mutablesequence = PyObject_GetAttrString(abc_mod, "MutableSequence"); Py_DECREF(abc_mod); if (!mutablesequence) { - Py_DECREF((PyObject *)&Arraytype); + Py_DECREF((PyObject *)state->ArrayType); return -1; } - PyObject *res = PyObject_CallMethod(mutablesequence, "register", "O", (PyObject *)&Arraytype); + PyObject *res = PyObject_CallMethod(mutablesequence, "register", "O", + (PyObject *)state->ArrayType); Py_DECREF(mutablesequence); if (!res) { - Py_DECREF((PyObject *)&Arraytype); + Py_DECREF((PyObject *)state->ArrayType); return -1; } Py_DECREF(res); - Py_INCREF((PyObject *)&Arraytype); - if (PyModule_AddObject(m, "array", (PyObject *)&Arraytype) < 0) { - Py_DECREF((PyObject *)&Arraytype); + if (PyModule_AddType(m, state->ArrayType) < 0) { return -1; } @@ -3035,15 +3053,12 @@ static PyModuleDef_Slot arrayslots[] = { static struct PyModuleDef arraymodule = { - PyModuleDef_HEAD_INIT, - "array", - module_doc, - 0, - a_methods, - arrayslots, - NULL, - NULL, - NULL + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "array", + .m_size = sizeof(array_state), + .m_doc = module_doc, + .m_methods = a_methods, + .m_slots = arrayslots, }; diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index 300cd1397101e..d0b70c46ff570 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -108,7 +108,28 @@ PyDoc_STRVAR(array_array_extend__doc__, "Append items to the end of the array."); #define ARRAY_ARRAY_EXTEND_METHODDEF \ - {"extend", (PyCFunction)array_array_extend, METH_O, array_array_extend__doc__}, + {"extend", (PyCFunction)(void(*)(void))array_array_extend, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_extend__doc__}, + +static PyObject * +array_array_extend_impl(arrayobject *self, PyTypeObject *cls, PyObject *bb); + +static PyObject * +array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"", NULL}; + static _PyArg_Parser _parser = {"O:extend", _keywords, 0}; + PyObject *bb; + + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, + &bb)) { + goto exit; + } + return_value = array_array_extend_impl(self, cls, bb); + +exit: + return return_value; +} PyDoc_STRVAR(array_array_insert__doc__, "insert($self, i, v, /)\n" @@ -514,4 +535,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__, #define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \ {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__}, -/*[clinic end generated code: output=91c1cded65a1285f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a7f71a18b994c88f input=a9049054013a1b77]*/ From webhook-mailer at python.org Sat Jan 2 12:32:57 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sat, 02 Jan 2021 17:32:57 -0000 Subject: [Python-checkins] bpo-42809: Improve pickle tests for recursive data. (GH-24060) Message-ID: https://github.com/python/cpython/commit/a25011be8c6f62cb3333903befe6295d57f0bd30 commit: a25011be8c6f62cb3333903befe6295d57f0bd30 branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-02T19:32:47+02:00 summary: bpo-42809: Improve pickle tests for recursive data. (GH-24060) files: M Lib/test/pickletester.py diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index ae288f5d01250..fd05e7af94a1a 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -69,6 +69,10 @@ def count_opcode(code, pickle): return n +def identity(x): + return x + + class UnseekableIO(io.BytesIO): def peek(self, *args): raise NotImplementedError @@ -138,11 +142,12 @@ class E(C): def __getinitargs__(self): return () -class H(object): +# Simple mutable object. +class Object: pass -# Hashable mutable key -class K(object): +# Hashable immutable key object containing unheshable mutable data. +class K: def __init__(self, value): self.value = value @@ -157,10 +162,6 @@ def __reduce__(self): D.__module__ = "__main__" __main__.E = E E.__module__ = "__main__" -__main__.H = H -H.__module__ = "__main__" -__main__.K = K -K.__module__ = "__main__" class myint(int): def __init__(self, x): @@ -1496,54 +1497,182 @@ def dont_test_disassembly(self): got = filelike.getvalue() self.assertEqual(expected, got) - def test_recursive_list(self): - l = [] + def _test_recursive_list(self, cls, aslist=identity, minprotocol=0): + # List containing itself. + l = cls() l.append(l) - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(l, proto) x = self.loads(s) - self.assertIsInstance(x, list) - self.assertEqual(len(x), 1) - self.assertIs(x[0], x) + self.assertIsInstance(x, cls) + y = aslist(x) + self.assertEqual(len(y), 1) + self.assertIs(y[0], x) - def test_recursive_tuple_and_list(self): - t = ([],) + def test_recursive_list(self): + self._test_recursive_list(list) + + def test_recursive_list_subclass(self): + self._test_recursive_list(MyList, minprotocol=2) + + def test_recursive_list_like(self): + self._test_recursive_list(REX_six, aslist=lambda x: x.items) + + def _test_recursive_tuple_and_list(self, cls, aslist=identity, minprotocol=0): + # Tuple containing a list containing the original tuple. + t = (cls(),) t[0].append(t) - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(t, proto) x = self.loads(s) self.assertIsInstance(x, tuple) self.assertEqual(len(x), 1) - self.assertIsInstance(x[0], list) - self.assertEqual(len(x[0]), 1) - self.assertIs(x[0][0], x) + self.assertIsInstance(x[0], cls) + y = aslist(x[0]) + self.assertEqual(len(y), 1) + self.assertIs(y[0], x) + + # List containing a tuple containing the original list. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = aslist(x) + self.assertEqual(len(y), 1) + self.assertIsInstance(y[0], tuple) + self.assertEqual(len(y[0]), 1) + self.assertIs(y[0][0], x) - def test_recursive_dict(self): - d = {} + def test_recursive_tuple_and_list(self): + self._test_recursive_tuple_and_list(list) + + def test_recursive_tuple_and_list_subclass(self): + self._test_recursive_tuple_and_list(MyList, minprotocol=2) + + def test_recursive_tuple_and_list_like(self): + self._test_recursive_tuple_and_list(REX_six, aslist=lambda x: x.items) + + def _test_recursive_dict(self, cls, asdict=identity, minprotocol=0): + # Dict containing itself. + d = cls() d[1] = d - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(d, proto) x = self.loads(s) - self.assertIsInstance(x, dict) - self.assertEqual(list(x.keys()), [1]) - self.assertIs(x[1], x) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(list(y.keys()), [1]) + self.assertIs(y[1], x) - def test_recursive_dict_key(self): - d = {} - k = K(d) - d[k] = 1 - for proto in protocols: + def test_recursive_dict(self): + self._test_recursive_dict(dict) + + def test_recursive_dict_subclass(self): + self._test_recursive_dict(MyDict, minprotocol=2) + + def test_recursive_dict_like(self): + self._test_recursive_dict(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_tuple_and_dict(self, cls, asdict=identity, minprotocol=0): + # Tuple containing a dict containing the original tuple. + t = (cls(),) + t[0][1] = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], cls) + y = asdict(x[0]) + self.assertEqual(list(y), [1]) + self.assertIs(y[1], x) + + # Dict containing a tuple containing the original dict. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(list(y), [1]) + self.assertIsInstance(y[1], tuple) + self.assertEqual(len(y[1]), 1) + self.assertIs(y[1][0], x) + + def test_recursive_tuple_and_dict(self): + self._test_recursive_tuple_and_dict(dict) + + def test_recursive_tuple_and_dict_subclass(self): + self._test_recursive_tuple_and_dict(MyDict, minprotocol=2) + + def test_recursive_tuple_and_dict_like(self): + self._test_recursive_tuple_and_dict(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_dict_key(self, cls, asdict=identity, minprotocol=0): + # Dict containing an immutable object (as key) containing the original + # dict. + d = cls() + d[K(d)] = 1 + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(d, proto) x = self.loads(s) - self.assertIsInstance(x, dict) - self.assertEqual(len(x.keys()), 1) - self.assertIsInstance(list(x.keys())[0], K) - self.assertIs(list(x.keys())[0].value, x) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(len(y.keys()), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value, x) + + def test_recursive_dict_key(self): + self._test_recursive_dict_key(dict) + + def test_recursive_dict_subclass_key(self): + self._test_recursive_dict_key(MyDict, minprotocol=2) + + def test_recursive_dict_like_key(self): + self._test_recursive_dict_key(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_tuple_and_dict_key(self, cls, asdict=identity, minprotocol=0): + # Tuple containing a dict containing an immutable object (as key) + # containing the original tuple. + t = (cls(),) + t[0][K(t)] = 1 + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], cls) + y = asdict(x[0]) + self.assertEqual(len(y), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value, x) + + # Dict containing an immutable object (as key) containing a tuple + # containing the original dict. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(len(y), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value[0], x) + + def test_recursive_tuple_and_dict_key(self): + self._test_recursive_tuple_and_dict_key(dict) + + def test_recursive_tuple_and_dict_subclass_key(self): + self._test_recursive_tuple_and_dict_key(MyDict, minprotocol=2) + + def test_recursive_tuple_and_dict_like_key(self): + self._test_recursive_tuple_and_dict_key(REX_seven, asdict=lambda x: x.table) def test_recursive_set(self): + # Set containing an immutable object containing the original set. y = set() - k = K(y) - y.add(k) + y.add(K(y)) for proto in range(4, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(y, proto) x = self.loads(s) @@ -1552,52 +1681,31 @@ def test_recursive_set(self): self.assertIsInstance(list(x)[0], K) self.assertIs(list(x)[0].value, x) - def test_recursive_list_subclass(self): - y = MyList() - y.append(y) - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): + # Immutable object containing a set containing the original object. + y, = y + for proto in range(4, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(y, proto) x = self.loads(s) - self.assertIsInstance(x, MyList) - self.assertEqual(len(x), 1) - self.assertIs(x[0], x) - - def test_recursive_dict_subclass(self): - d = MyDict() - d[1] = d - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): - s = self.dumps(d, proto) - x = self.loads(s) - self.assertIsInstance(x, MyDict) - self.assertEqual(list(x.keys()), [1]) - self.assertIs(x[1], x) - - def test_recursive_dict_subclass_key(self): - d = MyDict() - k = K(d) - d[k] = 1 - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): - s = self.dumps(d, proto) - x = self.loads(s) - self.assertIsInstance(x, MyDict) - self.assertEqual(len(list(x.keys())), 1) - self.assertIsInstance(list(x.keys())[0], K) - self.assertIs(list(x.keys())[0].value, x) + self.assertIsInstance(x, K) + self.assertIsInstance(x.value, set) + self.assertEqual(len(x.value), 1) + self.assertIs(list(x.value)[0], x) def test_recursive_inst(self): - i = C() + # Mutable object containing itself. + i = Object() i.attr = i for proto in protocols: s = self.dumps(i, proto) x = self.loads(s) - self.assertIsInstance(x, C) + self.assertIsInstance(x, Object) self.assertEqual(dir(x), dir(i)) self.assertIs(x.attr, x) def test_recursive_multi(self): l = [] d = {1:l} - i = C() + i = Object() i.attr = d l.append(i) for proto in protocols: @@ -1607,49 +1715,94 @@ def test_recursive_multi(self): self.assertEqual(len(x), 1) self.assertEqual(dir(x[0]), dir(i)) self.assertEqual(list(x[0].attr.keys()), [1]) - self.assertTrue(x[0].attr[1] is x) - - def check_recursive_collection_and_inst(self, factory): - h = H() - y = factory([h]) - h.attr = y + self.assertIs(x[0].attr[1], x) + + def _test_recursive_collection_and_inst(self, factory): + # Mutable object containing a collection containing the original + # object. + o = Object() + o.attr = factory([o]) + t = type(o.attr) for proto in protocols: - s = self.dumps(y, proto) + s = self.dumps(o, proto) x = self.loads(s) - self.assertIsInstance(x, type(y)) + self.assertIsInstance(x.attr, t) + self.assertEqual(len(x.attr), 1) + self.assertIsInstance(list(x.attr)[0], Object) + self.assertIs(list(x.attr)[0], x) + + # Collection containing a mutable object containing the original + # collection. + o = o.attr + for proto in protocols: + s = self.dumps(o, proto) + x = self.loads(s) + self.assertIsInstance(x, t) self.assertEqual(len(x), 1) - self.assertIsInstance(list(x)[0], H) + self.assertIsInstance(list(x)[0], Object) self.assertIs(list(x)[0].attr, x) def test_recursive_list_and_inst(self): - self.check_recursive_collection_and_inst(list) + self._test_recursive_collection_and_inst(list) def test_recursive_tuple_and_inst(self): - self.check_recursive_collection_and_inst(tuple) + self._test_recursive_collection_and_inst(tuple) def test_recursive_dict_and_inst(self): - self.check_recursive_collection_and_inst(dict.fromkeys) + self._test_recursive_collection_and_inst(dict.fromkeys) def test_recursive_set_and_inst(self): - self.check_recursive_collection_and_inst(set) + self._test_recursive_collection_and_inst(set) def test_recursive_frozenset_and_inst(self): - self.check_recursive_collection_and_inst(frozenset) + self._test_recursive_collection_and_inst(frozenset) def test_recursive_list_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyList) + self._test_recursive_collection_and_inst(MyList) def test_recursive_tuple_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyTuple) + self._test_recursive_collection_and_inst(MyTuple) def test_recursive_dict_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyDict.fromkeys) + self._test_recursive_collection_and_inst(MyDict.fromkeys) def test_recursive_set_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MySet) + self._test_recursive_collection_and_inst(MySet) def test_recursive_frozenset_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyFrozenSet) + self._test_recursive_collection_and_inst(MyFrozenSet) + + def test_recursive_inst_state(self): + # Mutable object containing itself. + y = REX_state() + y.state = y + for proto in protocols: + s = self.dumps(y, proto) + x = self.loads(s) + self.assertIsInstance(x, REX_state) + self.assertIs(x.state, x) + + def test_recursive_tuple_and_inst_state(self): + # Tuple containing a mutable object containing the original tuple. + t = (REX_state(),) + t[0].state = t + for proto in protocols: + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], REX_state) + self.assertIs(x[0].state, x) + + # Mutable object containing a tuple containing the object. + t, = t + for proto in protocols: + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, REX_state) + self.assertIsInstance(x.state, tuple) + self.assertEqual(len(x.state), 1) + self.assertIs(x.state[0], x) def test_unicode(self): endcases = ['', '<\\u>', '<\\\u1234>', '<\n>', @@ -3062,6 +3215,19 @@ def __setitem__(self, key, value): def __reduce__(self): return type(self), (), None, None, iter(self.table.items()) +class REX_state(object): + """This class is used to check the 3th argument (state) of + the reduce protocol. + """ + def __init__(self, state=None): + self.state = state + def __eq__(self, other): + return type(self) is type(other) and self.state == other.state + def __setstate__(self, state): + self.state = state + def __reduce__(self): + return type(self), (), self.state + # Test classes for newobj From webhook-mailer at python.org Sat Jan 2 12:35:19 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sat, 02 Jan 2021 17:35:19 -0000 Subject: [Python-checkins] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) Message-ID: https://github.com/python/cpython/commit/607501abb488fb37e33cf9d35260ab7baefa192f commit: 607501abb488fb37e33cf9d35260ab7baefa192f branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-02T19:35:15+02:00 summary: bpo-42789: Don't skip curses tests on non-tty. (GH-24009) If __stdout__ is not attached to terminal, try to use __stderr__ if it is attached to terminal, or open the terminal device, or use regular file as terminal, but some functions will be untested in the latter case. files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index cabc10da8365c..6811ff936633e 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -48,37 +48,57 @@ class TestCurses(unittest.TestCase): @classmethod def setUpClass(cls): - if not sys.__stdout__.isatty(): - # Temporary skip tests on non-tty - raise unittest.SkipTest('sys.__stdout__ is not a tty') - cls.tmp = tempfile.TemporaryFile() - fd = cls.tmp.fileno() - else: - cls.tmp = None - fd = sys.__stdout__.fileno() # testing setupterm() inside initscr/endwin # causes terminal breakage - curses.setupterm(fd=fd) - - @classmethod - def tearDownClass(cls): - if cls.tmp: - cls.tmp.close() - del cls.tmp + stdout_fd = sys.__stdout__.fileno() + curses.setupterm(fd=stdout_fd) def setUp(self): + self.isatty = True + self.output = sys.__stdout__ + stdout_fd = sys.__stdout__.fileno() + if not sys.__stdout__.isatty(): + # initstr() unconditionally uses C stdout. + # If it is redirected to file or pipe, try to attach it + # to terminal. + # First, save a copy of the file descriptor of stdout, so it + # can be restored after finishing the test. + dup_fd = os.dup(stdout_fd) + self.addCleanup(os.close, dup_fd) + self.addCleanup(os.dup2, dup_fd, stdout_fd) + + if sys.__stderr__.isatty(): + # If stderr is connected to terminal, use it. + tmp = sys.__stderr__ + self.output = sys.__stderr__ + else: + try: + # Try to open the terminal device. + tmp = open('/xdev/tty', 'wb', buffering=0) + except OSError: + # As a fallback, use regular file to write control codes. + # Some functions (like savetty) will not work, but at + # least the garbage control sequences will not be mixed + # with the testing report. + tmp = tempfile.TemporaryFile(mode='wb', buffering=0) + self.isatty = False + self.addCleanup(tmp.close) + self.output = None + os.dup2(tmp.fileno(), stdout_fd) + self.save_signals = SaveSignals() self.save_signals.save() - if verbose: + self.addCleanup(self.save_signals.restore) + if verbose and self.output is not None: # just to make the test output a little more readable - print() + sys.stderr.flush() + sys.stdout.flush() + print(file=self.output, flush=True) self.stdscr = curses.initscr() - curses.savetty() - - def tearDown(self): - curses.resetty() - curses.endwin() - self.save_signals.restore() + if self.isatty: + curses.savetty() + self.addCleanup(curses.endwin) + self.addCleanup(curses.resetty) def test_window_funcs(self): "Test the methods of windows" @@ -96,7 +116,7 @@ def test_window_funcs(self): for meth in [stdscr.clear, stdscr.clrtobot, stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, stdscr.deleteln, stdscr.erase, stdscr.getbegyx, - stdscr.getbkgd, stdscr.getkey, stdscr.getmaxyx, + stdscr.getbkgd, stdscr.getmaxyx, stdscr.getparyx, stdscr.getyx, stdscr.inch, stdscr.insertln, stdscr.instr, stdscr.is_wintouched, win.noutrefresh, stdscr.redrawwin, stdscr.refresh, @@ -207,6 +227,11 @@ def test_window_funcs(self): if hasattr(stdscr, 'enclose'): stdscr.enclose(10, 10) + with tempfile.TemporaryFile() as f: + self.stdscr.putwin(f) + f.seek(0) + curses.getwin(f) + self.assertRaises(ValueError, stdscr.getstr, -400) self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400) self.assertRaises(ValueError, stdscr.instr, -2) @@ -225,17 +250,20 @@ def test_embedded_null_chars(self): def test_module_funcs(self): "Test module-level functions" for func in [curses.baudrate, curses.beep, curses.can_change_color, - curses.cbreak, curses.def_prog_mode, curses.doupdate, - curses.flash, curses.flushinp, + curses.doupdate, curses.flash, curses.flushinp, curses.has_colors, curses.has_ic, curses.has_il, curses.isendwin, curses.killchar, curses.longname, - curses.nocbreak, curses.noecho, curses.nonl, - curses.noqiflush, curses.noraw, - curses.reset_prog_mode, curses.termattrs, - curses.termname, curses.erasechar, + curses.noecho, curses.nonl, curses.noqiflush, + curses.termattrs, curses.termname, curses.erasechar, curses.has_extended_color_support]: with self.subTest(func=func.__qualname__): func() + if self.isatty: + for func in [curses.cbreak, curses.def_prog_mode, + curses.nocbreak, curses.noraw, + curses.reset_prog_mode]: + with self.subTest(func=func.__qualname__): + func() if hasattr(curses, 'filter'): curses.filter() if hasattr(curses, 'getsyx'): @@ -247,13 +275,9 @@ def test_module_funcs(self): curses.delay_output(1) curses.echo() ; curses.echo(1) - with tempfile.TemporaryFile() as f: - self.stdscr.putwin(f) - f.seek(0) - curses.getwin(f) - curses.halfdelay(1) - curses.intrflush(1) + if self.isatty: + curses.intrflush(1) curses.meta(1) curses.napms(100) curses.newpad(50,50) @@ -262,7 +286,8 @@ def test_module_funcs(self): curses.nl() ; curses.nl(1) curses.putp(b'abc') curses.qiflush() - curses.raw() ; curses.raw(1) + if self.isatty: + curses.raw() ; curses.raw(1) curses.set_escdelay(25) self.assertEqual(curses.get_escdelay(), 25) curses.set_tabsize(4) @@ -373,7 +398,6 @@ def test_resize_term(self): @requires_curses_func('resizeterm') def test_resizeterm(self): - stdscr = self.stdscr lines, cols = curses.LINES, curses.COLS new_lines = lines - 1 new_cols = cols + 1 From webhook-mailer at python.org Sat Jan 2 12:50:46 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 02 Jan 2021 17:50:46 -0000 Subject: [Python-checkins] bpo-42809: Improve pickle tests for recursive data. (GH-24060) Message-ID: https://github.com/python/cpython/commit/2e8b1c9e9b2d2e011bf35f77cd611843bac7f3dd commit: 2e8b1c9e9b2d2e011bf35f77cd611843bac7f3dd branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-02T09:50:28-08:00 summary: bpo-42809: Improve pickle tests for recursive data. (GH-24060) (cherry picked from commit a25011be8c6f62cb3333903befe6295d57f0bd30) Co-authored-by: Serhiy Storchaka files: M Lib/test/pickletester.py diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index ff7bbb0c8a9bf..dd41f6ecacd27 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -65,6 +65,10 @@ def count_opcode(code, pickle): return n +def identity(x): + return x + + class UnseekableIO(io.BytesIO): def peek(self, *args): raise NotImplementedError @@ -134,11 +138,12 @@ class E(C): def __getinitargs__(self): return () -class H(object): +# Simple mutable object. +class Object: pass -# Hashable mutable key -class K(object): +# Hashable immutable key object containing unheshable mutable data. +class K: def __init__(self, value): self.value = value @@ -153,10 +158,6 @@ def __reduce__(self): D.__module__ = "__main__" __main__.E = E E.__module__ = "__main__" -__main__.H = H -H.__module__ = "__main__" -__main__.K = K -K.__module__ = "__main__" class myint(int): def __init__(self, x): @@ -1490,54 +1491,182 @@ def dont_test_disassembly(self): got = filelike.getvalue() self.assertEqual(expected, got) - def test_recursive_list(self): - l = [] + def _test_recursive_list(self, cls, aslist=identity, minprotocol=0): + # List containing itself. + l = cls() l.append(l) - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(l, proto) x = self.loads(s) - self.assertIsInstance(x, list) - self.assertEqual(len(x), 1) - self.assertIs(x[0], x) + self.assertIsInstance(x, cls) + y = aslist(x) + self.assertEqual(len(y), 1) + self.assertIs(y[0], x) - def test_recursive_tuple_and_list(self): - t = ([],) + def test_recursive_list(self): + self._test_recursive_list(list) + + def test_recursive_list_subclass(self): + self._test_recursive_list(MyList, minprotocol=2) + + def test_recursive_list_like(self): + self._test_recursive_list(REX_six, aslist=lambda x: x.items) + + def _test_recursive_tuple_and_list(self, cls, aslist=identity, minprotocol=0): + # Tuple containing a list containing the original tuple. + t = (cls(),) t[0].append(t) - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(t, proto) x = self.loads(s) self.assertIsInstance(x, tuple) self.assertEqual(len(x), 1) - self.assertIsInstance(x[0], list) - self.assertEqual(len(x[0]), 1) - self.assertIs(x[0][0], x) + self.assertIsInstance(x[0], cls) + y = aslist(x[0]) + self.assertEqual(len(y), 1) + self.assertIs(y[0], x) + + # List containing a tuple containing the original list. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = aslist(x) + self.assertEqual(len(y), 1) + self.assertIsInstance(y[0], tuple) + self.assertEqual(len(y[0]), 1) + self.assertIs(y[0][0], x) - def test_recursive_dict(self): - d = {} + def test_recursive_tuple_and_list(self): + self._test_recursive_tuple_and_list(list) + + def test_recursive_tuple_and_list_subclass(self): + self._test_recursive_tuple_and_list(MyList, minprotocol=2) + + def test_recursive_tuple_and_list_like(self): + self._test_recursive_tuple_and_list(REX_six, aslist=lambda x: x.items) + + def _test_recursive_dict(self, cls, asdict=identity, minprotocol=0): + # Dict containing itself. + d = cls() d[1] = d - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(d, proto) x = self.loads(s) - self.assertIsInstance(x, dict) - self.assertEqual(list(x.keys()), [1]) - self.assertIs(x[1], x) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(list(y.keys()), [1]) + self.assertIs(y[1], x) - def test_recursive_dict_key(self): - d = {} - k = K(d) - d[k] = 1 - for proto in protocols: + def test_recursive_dict(self): + self._test_recursive_dict(dict) + + def test_recursive_dict_subclass(self): + self._test_recursive_dict(MyDict, minprotocol=2) + + def test_recursive_dict_like(self): + self._test_recursive_dict(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_tuple_and_dict(self, cls, asdict=identity, minprotocol=0): + # Tuple containing a dict containing the original tuple. + t = (cls(),) + t[0][1] = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], cls) + y = asdict(x[0]) + self.assertEqual(list(y), [1]) + self.assertIs(y[1], x) + + # Dict containing a tuple containing the original dict. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(list(y), [1]) + self.assertIsInstance(y[1], tuple) + self.assertEqual(len(y[1]), 1) + self.assertIs(y[1][0], x) + + def test_recursive_tuple_and_dict(self): + self._test_recursive_tuple_and_dict(dict) + + def test_recursive_tuple_and_dict_subclass(self): + self._test_recursive_tuple_and_dict(MyDict, minprotocol=2) + + def test_recursive_tuple_and_dict_like(self): + self._test_recursive_tuple_and_dict(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_dict_key(self, cls, asdict=identity, minprotocol=0): + # Dict containing an immutable object (as key) containing the original + # dict. + d = cls() + d[K(d)] = 1 + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(d, proto) x = self.loads(s) - self.assertIsInstance(x, dict) - self.assertEqual(len(x.keys()), 1) - self.assertIsInstance(list(x.keys())[0], K) - self.assertIs(list(x.keys())[0].value, x) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(len(y.keys()), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value, x) + + def test_recursive_dict_key(self): + self._test_recursive_dict_key(dict) + + def test_recursive_dict_subclass_key(self): + self._test_recursive_dict_key(MyDict, minprotocol=2) + + def test_recursive_dict_like_key(self): + self._test_recursive_dict_key(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_tuple_and_dict_key(self, cls, asdict=identity, minprotocol=0): + # Tuple containing a dict containing an immutable object (as key) + # containing the original tuple. + t = (cls(),) + t[0][K(t)] = 1 + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], cls) + y = asdict(x[0]) + self.assertEqual(len(y), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value, x) + + # Dict containing an immutable object (as key) containing a tuple + # containing the original dict. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(len(y), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value[0], x) + + def test_recursive_tuple_and_dict_key(self): + self._test_recursive_tuple_and_dict_key(dict) + + def test_recursive_tuple_and_dict_subclass_key(self): + self._test_recursive_tuple_and_dict_key(MyDict, minprotocol=2) + + def test_recursive_tuple_and_dict_like_key(self): + self._test_recursive_tuple_and_dict_key(REX_seven, asdict=lambda x: x.table) def test_recursive_set(self): + # Set containing an immutable object containing the original set. y = set() - k = K(y) - y.add(k) + y.add(K(y)) for proto in range(4, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(y, proto) x = self.loads(s) @@ -1546,52 +1675,31 @@ def test_recursive_set(self): self.assertIsInstance(list(x)[0], K) self.assertIs(list(x)[0].value, x) - def test_recursive_list_subclass(self): - y = MyList() - y.append(y) - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): + # Immutable object containing a set containing the original object. + y, = y + for proto in range(4, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(y, proto) x = self.loads(s) - self.assertIsInstance(x, MyList) - self.assertEqual(len(x), 1) - self.assertIs(x[0], x) - - def test_recursive_dict_subclass(self): - d = MyDict() - d[1] = d - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): - s = self.dumps(d, proto) - x = self.loads(s) - self.assertIsInstance(x, MyDict) - self.assertEqual(list(x.keys()), [1]) - self.assertIs(x[1], x) - - def test_recursive_dict_subclass_key(self): - d = MyDict() - k = K(d) - d[k] = 1 - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): - s = self.dumps(d, proto) - x = self.loads(s) - self.assertIsInstance(x, MyDict) - self.assertEqual(len(list(x.keys())), 1) - self.assertIsInstance(list(x.keys())[0], K) - self.assertIs(list(x.keys())[0].value, x) + self.assertIsInstance(x, K) + self.assertIsInstance(x.value, set) + self.assertEqual(len(x.value), 1) + self.assertIs(list(x.value)[0], x) def test_recursive_inst(self): - i = C() + # Mutable object containing itself. + i = Object() i.attr = i for proto in protocols: s = self.dumps(i, proto) x = self.loads(s) - self.assertIsInstance(x, C) + self.assertIsInstance(x, Object) self.assertEqual(dir(x), dir(i)) self.assertIs(x.attr, x) def test_recursive_multi(self): l = [] d = {1:l} - i = C() + i = Object() i.attr = d l.append(i) for proto in protocols: @@ -1601,49 +1709,94 @@ def test_recursive_multi(self): self.assertEqual(len(x), 1) self.assertEqual(dir(x[0]), dir(i)) self.assertEqual(list(x[0].attr.keys()), [1]) - self.assertTrue(x[0].attr[1] is x) - - def check_recursive_collection_and_inst(self, factory): - h = H() - y = factory([h]) - h.attr = y + self.assertIs(x[0].attr[1], x) + + def _test_recursive_collection_and_inst(self, factory): + # Mutable object containing a collection containing the original + # object. + o = Object() + o.attr = factory([o]) + t = type(o.attr) for proto in protocols: - s = self.dumps(y, proto) + s = self.dumps(o, proto) x = self.loads(s) - self.assertIsInstance(x, type(y)) + self.assertIsInstance(x.attr, t) + self.assertEqual(len(x.attr), 1) + self.assertIsInstance(list(x.attr)[0], Object) + self.assertIs(list(x.attr)[0], x) + + # Collection containing a mutable object containing the original + # collection. + o = o.attr + for proto in protocols: + s = self.dumps(o, proto) + x = self.loads(s) + self.assertIsInstance(x, t) self.assertEqual(len(x), 1) - self.assertIsInstance(list(x)[0], H) + self.assertIsInstance(list(x)[0], Object) self.assertIs(list(x)[0].attr, x) def test_recursive_list_and_inst(self): - self.check_recursive_collection_and_inst(list) + self._test_recursive_collection_and_inst(list) def test_recursive_tuple_and_inst(self): - self.check_recursive_collection_and_inst(tuple) + self._test_recursive_collection_and_inst(tuple) def test_recursive_dict_and_inst(self): - self.check_recursive_collection_and_inst(dict.fromkeys) + self._test_recursive_collection_and_inst(dict.fromkeys) def test_recursive_set_and_inst(self): - self.check_recursive_collection_and_inst(set) + self._test_recursive_collection_and_inst(set) def test_recursive_frozenset_and_inst(self): - self.check_recursive_collection_and_inst(frozenset) + self._test_recursive_collection_and_inst(frozenset) def test_recursive_list_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyList) + self._test_recursive_collection_and_inst(MyList) def test_recursive_tuple_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyTuple) + self._test_recursive_collection_and_inst(MyTuple) def test_recursive_dict_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyDict.fromkeys) + self._test_recursive_collection_and_inst(MyDict.fromkeys) def test_recursive_set_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MySet) + self._test_recursive_collection_and_inst(MySet) def test_recursive_frozenset_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyFrozenSet) + self._test_recursive_collection_and_inst(MyFrozenSet) + + def test_recursive_inst_state(self): + # Mutable object containing itself. + y = REX_state() + y.state = y + for proto in protocols: + s = self.dumps(y, proto) + x = self.loads(s) + self.assertIsInstance(x, REX_state) + self.assertIs(x.state, x) + + def test_recursive_tuple_and_inst_state(self): + # Tuple containing a mutable object containing the original tuple. + t = (REX_state(),) + t[0].state = t + for proto in protocols: + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], REX_state) + self.assertIs(x[0].state, x) + + # Mutable object containing a tuple containing the object. + t, = t + for proto in protocols: + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, REX_state) + self.assertIsInstance(x.state, tuple) + self.assertEqual(len(x.state), 1) + self.assertIs(x.state[0], x) def test_unicode(self): endcases = ['', '<\\u>', '<\\\u1234>', '<\n>', @@ -3045,6 +3198,19 @@ def __setitem__(self, key, value): def __reduce__(self): return type(self), (), None, None, iter(self.table.items()) +class REX_state(object): + """This class is used to check the 3th argument (state) of + the reduce protocol. + """ + def __init__(self, state=None): + self.state = state + def __eq__(self, other): + return type(self) is type(other) and self.state == other.state + def __setstate__(self, state): + self.state = state + def __reduce__(self): + return type(self), (), self.state + # Test classes for newobj From webhook-mailer at python.org Sat Jan 2 12:53:56 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 02 Jan 2021 17:53:56 -0000 Subject: [Python-checkins] bpo-42809: Improve pickle tests for recursive data. (GH-24060) Message-ID: https://github.com/python/cpython/commit/39a7578186d2f5eaa112a5854c46f84eae401522 commit: 39a7578186d2f5eaa112a5854c46f84eae401522 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-02T09:53:46-08:00 summary: bpo-42809: Improve pickle tests for recursive data. (GH-24060) (cherry picked from commit a25011be8c6f62cb3333903befe6295d57f0bd30) Co-authored-by: Serhiy Storchaka files: M Lib/test/pickletester.py diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 3d54617f68ba4..7e279cc736a23 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -65,6 +65,10 @@ def count_opcode(code, pickle): return n +def identity(x): + return x + + class UnseekableIO(io.BytesIO): def peek(self, *args): raise NotImplementedError @@ -134,11 +138,12 @@ class E(C): def __getinitargs__(self): return () -class H(object): +# Simple mutable object. +class Object: pass -# Hashable mutable key -class K(object): +# Hashable immutable key object containing unheshable mutable data. +class K: def __init__(self, value): self.value = value @@ -153,10 +158,6 @@ def __reduce__(self): D.__module__ = "__main__" __main__.E = E E.__module__ = "__main__" -__main__.H = H -H.__module__ = "__main__" -__main__.K = K -K.__module__ = "__main__" class myint(int): def __init__(self, x): @@ -1492,54 +1493,182 @@ def dont_test_disassembly(self): got = filelike.getvalue() self.assertEqual(expected, got) - def test_recursive_list(self): - l = [] + def _test_recursive_list(self, cls, aslist=identity, minprotocol=0): + # List containing itself. + l = cls() l.append(l) - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(l, proto) x = self.loads(s) - self.assertIsInstance(x, list) - self.assertEqual(len(x), 1) - self.assertIs(x[0], x) + self.assertIsInstance(x, cls) + y = aslist(x) + self.assertEqual(len(y), 1) + self.assertIs(y[0], x) - def test_recursive_tuple_and_list(self): - t = ([],) + def test_recursive_list(self): + self._test_recursive_list(list) + + def test_recursive_list_subclass(self): + self._test_recursive_list(MyList, minprotocol=2) + + def test_recursive_list_like(self): + self._test_recursive_list(REX_six, aslist=lambda x: x.items) + + def _test_recursive_tuple_and_list(self, cls, aslist=identity, minprotocol=0): + # Tuple containing a list containing the original tuple. + t = (cls(),) t[0].append(t) - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(t, proto) x = self.loads(s) self.assertIsInstance(x, tuple) self.assertEqual(len(x), 1) - self.assertIsInstance(x[0], list) - self.assertEqual(len(x[0]), 1) - self.assertIs(x[0][0], x) + self.assertIsInstance(x[0], cls) + y = aslist(x[0]) + self.assertEqual(len(y), 1) + self.assertIs(y[0], x) + + # List containing a tuple containing the original list. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = aslist(x) + self.assertEqual(len(y), 1) + self.assertIsInstance(y[0], tuple) + self.assertEqual(len(y[0]), 1) + self.assertIs(y[0][0], x) - def test_recursive_dict(self): - d = {} + def test_recursive_tuple_and_list(self): + self._test_recursive_tuple_and_list(list) + + def test_recursive_tuple_and_list_subclass(self): + self._test_recursive_tuple_and_list(MyList, minprotocol=2) + + def test_recursive_tuple_and_list_like(self): + self._test_recursive_tuple_and_list(REX_six, aslist=lambda x: x.items) + + def _test_recursive_dict(self, cls, asdict=identity, minprotocol=0): + # Dict containing itself. + d = cls() d[1] = d - for proto in protocols: + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(d, proto) x = self.loads(s) - self.assertIsInstance(x, dict) - self.assertEqual(list(x.keys()), [1]) - self.assertIs(x[1], x) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(list(y.keys()), [1]) + self.assertIs(y[1], x) - def test_recursive_dict_key(self): - d = {} - k = K(d) - d[k] = 1 - for proto in protocols: + def test_recursive_dict(self): + self._test_recursive_dict(dict) + + def test_recursive_dict_subclass(self): + self._test_recursive_dict(MyDict, minprotocol=2) + + def test_recursive_dict_like(self): + self._test_recursive_dict(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_tuple_and_dict(self, cls, asdict=identity, minprotocol=0): + # Tuple containing a dict containing the original tuple. + t = (cls(),) + t[0][1] = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], cls) + y = asdict(x[0]) + self.assertEqual(list(y), [1]) + self.assertIs(y[1], x) + + # Dict containing a tuple containing the original dict. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(list(y), [1]) + self.assertIsInstance(y[1], tuple) + self.assertEqual(len(y[1]), 1) + self.assertIs(y[1][0], x) + + def test_recursive_tuple_and_dict(self): + self._test_recursive_tuple_and_dict(dict) + + def test_recursive_tuple_and_dict_subclass(self): + self._test_recursive_tuple_and_dict(MyDict, minprotocol=2) + + def test_recursive_tuple_and_dict_like(self): + self._test_recursive_tuple_and_dict(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_dict_key(self, cls, asdict=identity, minprotocol=0): + # Dict containing an immutable object (as key) containing the original + # dict. + d = cls() + d[K(d)] = 1 + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(d, proto) x = self.loads(s) - self.assertIsInstance(x, dict) - self.assertEqual(len(x.keys()), 1) - self.assertIsInstance(list(x.keys())[0], K) - self.assertIs(list(x.keys())[0].value, x) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(len(y.keys()), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value, x) + + def test_recursive_dict_key(self): + self._test_recursive_dict_key(dict) + + def test_recursive_dict_subclass_key(self): + self._test_recursive_dict_key(MyDict, minprotocol=2) + + def test_recursive_dict_like_key(self): + self._test_recursive_dict_key(REX_seven, asdict=lambda x: x.table) + + def _test_recursive_tuple_and_dict_key(self, cls, asdict=identity, minprotocol=0): + # Tuple containing a dict containing an immutable object (as key) + # containing the original tuple. + t = (cls(),) + t[0][K(t)] = 1 + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], cls) + y = asdict(x[0]) + self.assertEqual(len(y), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value, x) + + # Dict containing an immutable object (as key) containing a tuple + # containing the original dict. + t, = t + for proto in range(minprotocol, pickle.HIGHEST_PROTOCOL + 1): + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, cls) + y = asdict(x) + self.assertEqual(len(y), 1) + self.assertIsInstance(list(y.keys())[0], K) + self.assertIs(list(y.keys())[0].value[0], x) + + def test_recursive_tuple_and_dict_key(self): + self._test_recursive_tuple_and_dict_key(dict) + + def test_recursive_tuple_and_dict_subclass_key(self): + self._test_recursive_tuple_and_dict_key(MyDict, minprotocol=2) + + def test_recursive_tuple_and_dict_like_key(self): + self._test_recursive_tuple_and_dict_key(REX_seven, asdict=lambda x: x.table) def test_recursive_set(self): + # Set containing an immutable object containing the original set. y = set() - k = K(y) - y.add(k) + y.add(K(y)) for proto in range(4, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(y, proto) x = self.loads(s) @@ -1548,52 +1677,31 @@ def test_recursive_set(self): self.assertIsInstance(list(x)[0], K) self.assertIs(list(x)[0].value, x) - def test_recursive_list_subclass(self): - y = MyList() - y.append(y) - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): + # Immutable object containing a set containing the original object. + y, = y + for proto in range(4, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(y, proto) x = self.loads(s) - self.assertIsInstance(x, MyList) - self.assertEqual(len(x), 1) - self.assertIs(x[0], x) - - def test_recursive_dict_subclass(self): - d = MyDict() - d[1] = d - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): - s = self.dumps(d, proto) - x = self.loads(s) - self.assertIsInstance(x, MyDict) - self.assertEqual(list(x.keys()), [1]) - self.assertIs(x[1], x) - - def test_recursive_dict_subclass_key(self): - d = MyDict() - k = K(d) - d[k] = 1 - for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): - s = self.dumps(d, proto) - x = self.loads(s) - self.assertIsInstance(x, MyDict) - self.assertEqual(len(list(x.keys())), 1) - self.assertIsInstance(list(x.keys())[0], K) - self.assertIs(list(x.keys())[0].value, x) + self.assertIsInstance(x, K) + self.assertIsInstance(x.value, set) + self.assertEqual(len(x.value), 1) + self.assertIs(list(x.value)[0], x) def test_recursive_inst(self): - i = C() + # Mutable object containing itself. + i = Object() i.attr = i for proto in protocols: s = self.dumps(i, proto) x = self.loads(s) - self.assertIsInstance(x, C) + self.assertIsInstance(x, Object) self.assertEqual(dir(x), dir(i)) self.assertIs(x.attr, x) def test_recursive_multi(self): l = [] d = {1:l} - i = C() + i = Object() i.attr = d l.append(i) for proto in protocols: @@ -1603,49 +1711,94 @@ def test_recursive_multi(self): self.assertEqual(len(x), 1) self.assertEqual(dir(x[0]), dir(i)) self.assertEqual(list(x[0].attr.keys()), [1]) - self.assertTrue(x[0].attr[1] is x) - - def check_recursive_collection_and_inst(self, factory): - h = H() - y = factory([h]) - h.attr = y + self.assertIs(x[0].attr[1], x) + + def _test_recursive_collection_and_inst(self, factory): + # Mutable object containing a collection containing the original + # object. + o = Object() + o.attr = factory([o]) + t = type(o.attr) for proto in protocols: - s = self.dumps(y, proto) + s = self.dumps(o, proto) x = self.loads(s) - self.assertIsInstance(x, type(y)) + self.assertIsInstance(x.attr, t) + self.assertEqual(len(x.attr), 1) + self.assertIsInstance(list(x.attr)[0], Object) + self.assertIs(list(x.attr)[0], x) + + # Collection containing a mutable object containing the original + # collection. + o = o.attr + for proto in protocols: + s = self.dumps(o, proto) + x = self.loads(s) + self.assertIsInstance(x, t) self.assertEqual(len(x), 1) - self.assertIsInstance(list(x)[0], H) + self.assertIsInstance(list(x)[0], Object) self.assertIs(list(x)[0].attr, x) def test_recursive_list_and_inst(self): - self.check_recursive_collection_and_inst(list) + self._test_recursive_collection_and_inst(list) def test_recursive_tuple_and_inst(self): - self.check_recursive_collection_and_inst(tuple) + self._test_recursive_collection_and_inst(tuple) def test_recursive_dict_and_inst(self): - self.check_recursive_collection_and_inst(dict.fromkeys) + self._test_recursive_collection_and_inst(dict.fromkeys) def test_recursive_set_and_inst(self): - self.check_recursive_collection_and_inst(set) + self._test_recursive_collection_and_inst(set) def test_recursive_frozenset_and_inst(self): - self.check_recursive_collection_and_inst(frozenset) + self._test_recursive_collection_and_inst(frozenset) def test_recursive_list_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyList) + self._test_recursive_collection_and_inst(MyList) def test_recursive_tuple_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyTuple) + self._test_recursive_collection_and_inst(MyTuple) def test_recursive_dict_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyDict.fromkeys) + self._test_recursive_collection_and_inst(MyDict.fromkeys) def test_recursive_set_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MySet) + self._test_recursive_collection_and_inst(MySet) def test_recursive_frozenset_subclass_and_inst(self): - self.check_recursive_collection_and_inst(MyFrozenSet) + self._test_recursive_collection_and_inst(MyFrozenSet) + + def test_recursive_inst_state(self): + # Mutable object containing itself. + y = REX_state() + y.state = y + for proto in protocols: + s = self.dumps(y, proto) + x = self.loads(s) + self.assertIsInstance(x, REX_state) + self.assertIs(x.state, x) + + def test_recursive_tuple_and_inst_state(self): + # Tuple containing a mutable object containing the original tuple. + t = (REX_state(),) + t[0].state = t + for proto in protocols: + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, tuple) + self.assertEqual(len(x), 1) + self.assertIsInstance(x[0], REX_state) + self.assertIs(x[0].state, x) + + # Mutable object containing a tuple containing the object. + t, = t + for proto in protocols: + s = self.dumps(t, proto) + x = self.loads(s) + self.assertIsInstance(x, REX_state) + self.assertIsInstance(x.state, tuple) + self.assertEqual(len(x.state), 1) + self.assertIs(x.state[0], x) def test_unicode(self): endcases = ['', '<\\u>', '<\\\u1234>', '<\n>', @@ -3058,6 +3211,19 @@ def __setitem__(self, key, value): def __reduce__(self): return type(self), (), None, None, iter(self.table.items()) +class REX_state(object): + """This class is used to check the 3th argument (state) of + the reduce protocol. + """ + def __init__(self, state=None): + self.state = state + def __eq__(self, other): + return type(self) is type(other) and self.state == other.state + def __setstate__(self, state): + self.state = state + def __reduce__(self): + return type(self), (), self.state + # Test classes for newobj From webhook-mailer at python.org Sat Jan 2 13:24:59 2021 From: webhook-mailer at python.org (rhettinger) Date: Sat, 02 Jan 2021 18:24:59 -0000 Subject: [Python-checkins] bpo-42772: Step argument ignored when stop is None. (GH-24018) Message-ID: https://github.com/python/cpython/commit/768fa145cfec2a0599802b74fc31d2bc2812ed96 commit: 768fa145cfec2a0599802b74fc31d2bc2812ed96 branch: master author: Raymond Hettinger committer: rhettinger date: 2021-01-02T10:24:51-08:00 summary: bpo-42772: Step argument ignored when stop is None. (GH-24018) files: A Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst M Lib/random.py M Lib/test/test_random.py diff --git a/Lib/random.py b/Lib/random.py index a4128c28fb2c6..97495f0985e7d 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -96,6 +96,7 @@ SG_MAGICCONST = 1.0 + _log(4.5) BPF = 53 # Number of bits in a float RECIP_BPF = 2 ** -BPF +_ONE = 1 class Random(_random.Random): @@ -288,7 +289,7 @@ def randbytes(self, n): ## -------------------- integer methods ------------------- - def randrange(self, start, stop=None, step=1): + def randrange(self, start, stop=None, step=_ONE): """Choose a random item from range(start, stop[, step]). This fixes the problem with randint() which includes the @@ -311,7 +312,12 @@ def randrange(self, start, stop=None, step=1): _warn('randrange() will raise TypeError in the future', DeprecationWarning, 2) raise ValueError("non-integer arg 1 for randrange()") + if stop is None: + # We don't check for "step != 1" because it hasn't been + # type checked and converted to an integer yet. + if step is not _ONE: + raise TypeError('Missing a non-None stop argument') if istart > 0: return self._randbelow(istart) raise ValueError("empty range for randrange()") diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index 436f3c98e6394..41a26e376d3a5 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -562,6 +562,14 @@ def test_randrange_argument_handling(self): with self.assertRaises(ValueError): randrange(10, 20, 1.5) + def test_randrange_step(self): + # bpo-42772: When stop is None, the step argument was being ignored. + randrange = self.gen.randrange + with self.assertRaises(TypeError): + randrange(1000, step=100) + with self.assertRaises(TypeError): + randrange(1000, None, step=100) + def test_randbelow_logic(self, _log=log, int=int): # check bitcount transition points: 2**i and 2**(i+1)-1 # show that: k = int(1.001 + _log(n, 2)) diff --git a/Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst b/Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst new file mode 100644 index 0000000000000..7f4ae7af0b9eb --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst @@ -0,0 +1,2 @@ +randrange() now raises a TypeError when step is specified without a stop +argument. Formerly, it silently ignored the step argument. From webhook-mailer at python.org Sat Jan 2 15:10:00 2021 From: webhook-mailer at python.org (rhettinger) Date: Sat, 02 Jan 2021 20:10:00 -0000 Subject: [Python-checkins] No need to test "istep==1" twice. (GH-24064) Message-ID: https://github.com/python/cpython/commit/8f8de7380cd7fee4972a10240ad2b0fdc332b14d commit: 8f8de7380cd7fee4972a10240ad2b0fdc332b14d branch: master author: Raymond Hettinger committer: rhettinger date: 2021-01-02T12:09:56-08:00 summary: No need to test "istep==1" twice. (GH-24064) files: M Lib/random.py diff --git a/Lib/random.py b/Lib/random.py index 97495f0985e7d..4142e2e860c8c 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -351,9 +351,9 @@ def randrange(self, start, stop=None, step=_ONE): DeprecationWarning, 2) raise ValueError("non-integer step for randrange()") width = istop - istart - if istep == 1 and width > 0: - return istart + self._randbelow(width) if istep == 1: + if width > 0: + return istart + self._randbelow(width) raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width)) # Non-unit step argument supplied. @@ -363,10 +363,8 @@ def randrange(self, start, stop=None, step=_ONE): n = (width + istep + 1) // istep else: raise ValueError("zero step for randrange()") - if n <= 0: raise ValueError("empty range for randrange()") - return istart + istep * self._randbelow(n) def randint(self, a, b): From webhook-mailer at python.org Sat Jan 2 18:14:29 2021 From: webhook-mailer at python.org (lysnikolaou) Date: Sat, 02 Jan 2021 23:14:29 -0000 Subject: [Python-checkins] bpo-40631: Disallow single parenthesized star target (GH-24027) Message-ID: https://github.com/python/cpython/commit/2ea320dddd553298038bb7d6789e50e199332f66 commit: 2ea320dddd553298038bb7d6789e50e199332f66 branch: master author: Lysandros Nikolaou committer: lysnikolaou date: 2021-01-03T01:14:21+02:00 summary: bpo-40631: Disallow single parenthesized star target (GH-24027) files: A Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst M Grammar/python.gram M Lib/test/test_unpack_ex.py M Parser/parser.c diff --git a/Grammar/python.gram b/Grammar/python.gram index 4915cc43e84ad..8517bf2f9ba8d 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -580,18 +580,23 @@ star_targets[expr_ty]: | a=star_target !',' { a } | a=star_target b=(',' c=star_target { c })* [','] { _Py_Tuple(CHECK(asdl_expr_seq*, _PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) } -star_targets_seq[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_target+ [','] { a } +star_targets_list_seq[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_target+ [','] { a } +star_targets_tuple_seq[asdl_expr_seq*]: + | a=star_target b=(',' c=star_target { c })+ [','] { (asdl_expr_seq*) _PyPegen_seq_insert_in_front(p, a, b) } + | a=star_target ',' { (asdl_expr_seq*) _PyPegen_singleton_seq(p, a) } star_target[expr_ty] (memo): | '*' a=(!'*' star_target) { _Py_Starred(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) } + | target_with_star_atom +target_with_star_atom[expr_ty] (memo): | a=t_primary '.' b=NAME !t_lookahead { _Py_Attribute(a, b->v.Name.id, Store, EXTRA) } | a=t_primary '[' b=slices ']' !t_lookahead { _Py_Subscript(a, b, Store, EXTRA) } | star_atom star_atom[expr_ty]: | a=NAME { _PyPegen_set_expr_context(p, a, Store) } - | '(' a=star_target ')' { _PyPegen_set_expr_context(p, a, Store) } - | '(' a=[star_targets_seq] ')' { _Py_Tuple(a, Store, EXTRA) } - | '[' a=[star_targets_seq] ']' { _Py_List(a, Store, EXTRA) } + | '(' a=target_with_star_atom ')' { _PyPegen_set_expr_context(p, a, Store) } + | '(' a=[star_targets_tuple_seq] ')' { _Py_Tuple(a, Store, EXTRA) } + | '[' a=[star_targets_list_seq] ']' { _Py_List(a, Store, EXTRA) } single_target[expr_ty]: | single_subscript_attribute_target diff --git a/Lib/test/test_unpack_ex.py b/Lib/test/test_unpack_ex.py index fcc93829cc3b8..049e48b13fa1f 100644 --- a/Lib/test/test_unpack_ex.py +++ b/Lib/test/test_unpack_ex.py @@ -346,6 +346,31 @@ ... SyntaxError: can't use starred expression here + >>> (*x),y = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> (((*x))),y = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> z,(*x),y = 1, 2, 4 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> z,(*x) = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> ((*x),y) = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + Some size constraints (all fail.) >>> s = ", ".join("a%d" % i for i in range(1<<8)) + ", *rest = range(1<<8 + 1)" diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst new file mode 100644 index 0000000000000..ac2db2938237f --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst @@ -0,0 +1,2 @@ +Fix regression where a single parenthesized starred expression was a valid +assignment target. diff --git a/Parser/parser.c b/Parser/parser.c index 2559969f86e51..66c6c45b35898 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -195,192 +195,196 @@ static KeywordToken *reserved_keywords[] = { #define kwarg_or_starred_type 1126 #define kwarg_or_double_starred_type 1127 #define star_targets_type 1128 -#define star_targets_seq_type 1129 -#define star_target_type 1130 -#define star_atom_type 1131 -#define single_target_type 1132 -#define single_subscript_attribute_target_type 1133 -#define del_targets_type 1134 -#define del_target_type 1135 -#define del_t_atom_type 1136 -#define targets_type 1137 -#define target_type 1138 -#define t_primary_type 1139 // Left-recursive -#define t_lookahead_type 1140 -#define t_atom_type 1141 -#define invalid_arguments_type 1142 -#define invalid_kwarg_type 1143 -#define invalid_named_expression_type 1144 -#define invalid_assignment_type 1145 -#define invalid_ann_assign_target_type 1146 -#define invalid_del_stmt_type 1147 -#define invalid_block_type 1148 -#define invalid_primary_type 1149 // Left-recursive -#define invalid_comprehension_type 1150 -#define invalid_dict_comprehension_type 1151 -#define invalid_parameters_type 1152 -#define invalid_lambda_parameters_type 1153 -#define invalid_star_etc_type 1154 -#define invalid_lambda_star_etc_type 1155 -#define invalid_double_type_comments_type 1156 -#define invalid_with_item_type 1157 -#define invalid_for_target_type 1158 -#define invalid_group_type 1159 -#define invalid_import_from_targets_type 1160 -#define _loop0_1_type 1161 -#define _loop0_2_type 1162 -#define _loop0_4_type 1163 -#define _gather_3_type 1164 -#define _loop0_6_type 1165 -#define _gather_5_type 1166 -#define _loop0_8_type 1167 -#define _gather_7_type 1168 -#define _loop0_10_type 1169 -#define _gather_9_type 1170 -#define _loop1_11_type 1171 -#define _loop0_13_type 1172 -#define _gather_12_type 1173 -#define _tmp_14_type 1174 -#define _tmp_15_type 1175 -#define _tmp_16_type 1176 -#define _tmp_17_type 1177 -#define _tmp_18_type 1178 -#define _tmp_19_type 1179 -#define _tmp_20_type 1180 -#define _tmp_21_type 1181 -#define _loop1_22_type 1182 -#define _tmp_23_type 1183 -#define _tmp_24_type 1184 -#define _loop0_26_type 1185 -#define _gather_25_type 1186 -#define _loop0_28_type 1187 -#define _gather_27_type 1188 -#define _tmp_29_type 1189 -#define _tmp_30_type 1190 -#define _loop0_31_type 1191 -#define _loop1_32_type 1192 -#define _loop0_34_type 1193 -#define _gather_33_type 1194 -#define _tmp_35_type 1195 -#define _loop0_37_type 1196 -#define _gather_36_type 1197 -#define _tmp_38_type 1198 -#define _loop0_40_type 1199 -#define _gather_39_type 1200 -#define _loop0_42_type 1201 -#define _gather_41_type 1202 -#define _loop0_44_type 1203 -#define _gather_43_type 1204 -#define _loop0_46_type 1205 -#define _gather_45_type 1206 -#define _tmp_47_type 1207 -#define _loop1_48_type 1208 -#define _tmp_49_type 1209 -#define _tmp_50_type 1210 -#define _tmp_51_type 1211 -#define _tmp_52_type 1212 -#define _tmp_53_type 1213 -#define _loop0_54_type 1214 -#define _loop0_55_type 1215 -#define _loop0_56_type 1216 -#define _loop1_57_type 1217 -#define _loop0_58_type 1218 -#define _loop1_59_type 1219 -#define _loop1_60_type 1220 -#define _loop1_61_type 1221 -#define _loop0_62_type 1222 -#define _loop1_63_type 1223 -#define _loop0_64_type 1224 -#define _loop1_65_type 1225 -#define _loop0_66_type 1226 -#define _loop1_67_type 1227 -#define _loop1_68_type 1228 -#define _tmp_69_type 1229 -#define _loop1_70_type 1230 -#define _loop0_72_type 1231 -#define _gather_71_type 1232 -#define _loop1_73_type 1233 -#define _loop0_74_type 1234 -#define _loop0_75_type 1235 -#define _loop0_76_type 1236 -#define _loop1_77_type 1237 -#define _loop0_78_type 1238 -#define _loop1_79_type 1239 -#define _loop1_80_type 1240 -#define _loop1_81_type 1241 -#define _loop0_82_type 1242 -#define _loop1_83_type 1243 -#define _loop0_84_type 1244 -#define _loop1_85_type 1245 -#define _loop0_86_type 1246 -#define _loop1_87_type 1247 -#define _loop1_88_type 1248 -#define _loop1_89_type 1249 -#define _loop1_90_type 1250 -#define _tmp_91_type 1251 -#define _loop0_93_type 1252 -#define _gather_92_type 1253 -#define _tmp_94_type 1254 -#define _tmp_95_type 1255 -#define _tmp_96_type 1256 -#define _tmp_97_type 1257 -#define _loop1_98_type 1258 -#define _tmp_99_type 1259 -#define _tmp_100_type 1260 -#define _loop0_102_type 1261 -#define _gather_101_type 1262 -#define _loop1_103_type 1263 -#define _loop0_104_type 1264 -#define _loop0_105_type 1265 -#define _loop0_107_type 1266 -#define _gather_106_type 1267 -#define _tmp_108_type 1268 -#define _loop0_110_type 1269 -#define _gather_109_type 1270 -#define _loop0_112_type 1271 -#define _gather_111_type 1272 -#define _loop0_114_type 1273 -#define _gather_113_type 1274 -#define _loop0_116_type 1275 -#define _gather_115_type 1276 -#define _loop0_117_type 1277 -#define _loop0_119_type 1278 -#define _gather_118_type 1279 -#define _tmp_120_type 1280 -#define _loop0_122_type 1281 -#define _gather_121_type 1282 -#define _loop0_124_type 1283 -#define _gather_123_type 1284 -#define _tmp_125_type 1285 -#define _loop0_126_type 1286 -#define _loop0_127_type 1287 -#define _loop0_128_type 1288 -#define _tmp_129_type 1289 -#define _tmp_130_type 1290 -#define _loop0_131_type 1291 -#define _tmp_132_type 1292 -#define _loop0_133_type 1293 -#define _tmp_134_type 1294 -#define _tmp_135_type 1295 -#define _tmp_136_type 1296 -#define _tmp_137_type 1297 -#define _tmp_138_type 1298 -#define _tmp_139_type 1299 -#define _tmp_140_type 1300 -#define _tmp_141_type 1301 -#define _tmp_142_type 1302 -#define _tmp_143_type 1303 -#define _tmp_144_type 1304 -#define _tmp_145_type 1305 -#define _tmp_146_type 1306 -#define _tmp_147_type 1307 -#define _tmp_148_type 1308 -#define _tmp_149_type 1309 -#define _tmp_150_type 1310 -#define _loop1_151_type 1311 -#define _loop1_152_type 1312 -#define _tmp_153_type 1313 -#define _tmp_154_type 1314 +#define star_targets_list_seq_type 1129 +#define star_targets_tuple_seq_type 1130 +#define star_target_type 1131 +#define target_with_star_atom_type 1132 +#define star_atom_type 1133 +#define single_target_type 1134 +#define single_subscript_attribute_target_type 1135 +#define del_targets_type 1136 +#define del_target_type 1137 +#define del_t_atom_type 1138 +#define targets_type 1139 +#define target_type 1140 +#define t_primary_type 1141 // Left-recursive +#define t_lookahead_type 1142 +#define t_atom_type 1143 +#define invalid_arguments_type 1144 +#define invalid_kwarg_type 1145 +#define invalid_named_expression_type 1146 +#define invalid_assignment_type 1147 +#define invalid_ann_assign_target_type 1148 +#define invalid_del_stmt_type 1149 +#define invalid_block_type 1150 +#define invalid_primary_type 1151 // Left-recursive +#define invalid_comprehension_type 1152 +#define invalid_dict_comprehension_type 1153 +#define invalid_parameters_type 1154 +#define invalid_lambda_parameters_type 1155 +#define invalid_star_etc_type 1156 +#define invalid_lambda_star_etc_type 1157 +#define invalid_double_type_comments_type 1158 +#define invalid_with_item_type 1159 +#define invalid_for_target_type 1160 +#define invalid_group_type 1161 +#define invalid_import_from_targets_type 1162 +#define _loop0_1_type 1163 +#define _loop0_2_type 1164 +#define _loop0_4_type 1165 +#define _gather_3_type 1166 +#define _loop0_6_type 1167 +#define _gather_5_type 1168 +#define _loop0_8_type 1169 +#define _gather_7_type 1170 +#define _loop0_10_type 1171 +#define _gather_9_type 1172 +#define _loop1_11_type 1173 +#define _loop0_13_type 1174 +#define _gather_12_type 1175 +#define _tmp_14_type 1176 +#define _tmp_15_type 1177 +#define _tmp_16_type 1178 +#define _tmp_17_type 1179 +#define _tmp_18_type 1180 +#define _tmp_19_type 1181 +#define _tmp_20_type 1182 +#define _tmp_21_type 1183 +#define _loop1_22_type 1184 +#define _tmp_23_type 1185 +#define _tmp_24_type 1186 +#define _loop0_26_type 1187 +#define _gather_25_type 1188 +#define _loop0_28_type 1189 +#define _gather_27_type 1190 +#define _tmp_29_type 1191 +#define _tmp_30_type 1192 +#define _loop0_31_type 1193 +#define _loop1_32_type 1194 +#define _loop0_34_type 1195 +#define _gather_33_type 1196 +#define _tmp_35_type 1197 +#define _loop0_37_type 1198 +#define _gather_36_type 1199 +#define _tmp_38_type 1200 +#define _loop0_40_type 1201 +#define _gather_39_type 1202 +#define _loop0_42_type 1203 +#define _gather_41_type 1204 +#define _loop0_44_type 1205 +#define _gather_43_type 1206 +#define _loop0_46_type 1207 +#define _gather_45_type 1208 +#define _tmp_47_type 1209 +#define _loop1_48_type 1210 +#define _tmp_49_type 1211 +#define _tmp_50_type 1212 +#define _tmp_51_type 1213 +#define _tmp_52_type 1214 +#define _tmp_53_type 1215 +#define _loop0_54_type 1216 +#define _loop0_55_type 1217 +#define _loop0_56_type 1218 +#define _loop1_57_type 1219 +#define _loop0_58_type 1220 +#define _loop1_59_type 1221 +#define _loop1_60_type 1222 +#define _loop1_61_type 1223 +#define _loop0_62_type 1224 +#define _loop1_63_type 1225 +#define _loop0_64_type 1226 +#define _loop1_65_type 1227 +#define _loop0_66_type 1228 +#define _loop1_67_type 1229 +#define _loop1_68_type 1230 +#define _tmp_69_type 1231 +#define _loop1_70_type 1232 +#define _loop0_72_type 1233 +#define _gather_71_type 1234 +#define _loop1_73_type 1235 +#define _loop0_74_type 1236 +#define _loop0_75_type 1237 +#define _loop0_76_type 1238 +#define _loop1_77_type 1239 +#define _loop0_78_type 1240 +#define _loop1_79_type 1241 +#define _loop1_80_type 1242 +#define _loop1_81_type 1243 +#define _loop0_82_type 1244 +#define _loop1_83_type 1245 +#define _loop0_84_type 1246 +#define _loop1_85_type 1247 +#define _loop0_86_type 1248 +#define _loop1_87_type 1249 +#define _loop1_88_type 1250 +#define _loop1_89_type 1251 +#define _loop1_90_type 1252 +#define _tmp_91_type 1253 +#define _loop0_93_type 1254 +#define _gather_92_type 1255 +#define _tmp_94_type 1256 +#define _tmp_95_type 1257 +#define _tmp_96_type 1258 +#define _tmp_97_type 1259 +#define _loop1_98_type 1260 +#define _tmp_99_type 1261 +#define _tmp_100_type 1262 +#define _loop0_102_type 1263 +#define _gather_101_type 1264 +#define _loop1_103_type 1265 +#define _loop0_104_type 1266 +#define _loop0_105_type 1267 +#define _loop0_107_type 1268 +#define _gather_106_type 1269 +#define _tmp_108_type 1270 +#define _loop0_110_type 1271 +#define _gather_109_type 1272 +#define _loop0_112_type 1273 +#define _gather_111_type 1274 +#define _loop0_114_type 1275 +#define _gather_113_type 1276 +#define _loop0_116_type 1277 +#define _gather_115_type 1278 +#define _loop0_117_type 1279 +#define _loop0_119_type 1280 +#define _gather_118_type 1281 +#define _loop1_120_type 1282 +#define _tmp_121_type 1283 +#define _loop0_123_type 1284 +#define _gather_122_type 1285 +#define _loop0_125_type 1286 +#define _gather_124_type 1287 +#define _tmp_126_type 1288 +#define _loop0_127_type 1289 +#define _loop0_128_type 1290 +#define _loop0_129_type 1291 +#define _tmp_130_type 1292 +#define _tmp_131_type 1293 +#define _loop0_132_type 1294 +#define _tmp_133_type 1295 +#define _loop0_134_type 1296 +#define _tmp_135_type 1297 +#define _tmp_136_type 1298 +#define _tmp_137_type 1299 +#define _tmp_138_type 1300 +#define _tmp_139_type 1301 +#define _tmp_140_type 1302 +#define _tmp_141_type 1303 +#define _tmp_142_type 1304 +#define _tmp_143_type 1305 +#define _tmp_144_type 1306 +#define _tmp_145_type 1307 +#define _tmp_146_type 1308 +#define _tmp_147_type 1309 +#define _tmp_148_type 1310 +#define _tmp_149_type 1311 +#define _tmp_150_type 1312 +#define _tmp_151_type 1313 +#define _tmp_152_type 1314 +#define _loop1_153_type 1315 +#define _loop1_154_type 1316 +#define _tmp_155_type 1317 +#define _tmp_156_type 1318 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -511,8 +515,10 @@ static expr_ty starred_expression_rule(Parser *p); static KeywordOrStarred* kwarg_or_starred_rule(Parser *p); static KeywordOrStarred* kwarg_or_double_starred_rule(Parser *p); static expr_ty star_targets_rule(Parser *p); -static asdl_expr_seq* star_targets_seq_rule(Parser *p); +static asdl_expr_seq* star_targets_list_seq_rule(Parser *p); +static asdl_expr_seq* star_targets_tuple_seq_rule(Parser *p); static expr_ty star_target_rule(Parser *p); +static expr_ty target_with_star_atom_rule(Parser *p); static expr_ty star_atom_rule(Parser *p); static expr_ty single_target_rule(Parser *p); static expr_ty single_subscript_attribute_target_rule(Parser *p); @@ -662,21 +668,21 @@ static asdl_seq *_gather_115_rule(Parser *p); static asdl_seq *_loop0_117_rule(Parser *p); static asdl_seq *_loop0_119_rule(Parser *p); static asdl_seq *_gather_118_rule(Parser *p); -static void *_tmp_120_rule(Parser *p); -static asdl_seq *_loop0_122_rule(Parser *p); -static asdl_seq *_gather_121_rule(Parser *p); -static asdl_seq *_loop0_124_rule(Parser *p); -static asdl_seq *_gather_123_rule(Parser *p); -static void *_tmp_125_rule(Parser *p); -static asdl_seq *_loop0_126_rule(Parser *p); +static asdl_seq *_loop1_120_rule(Parser *p); +static void *_tmp_121_rule(Parser *p); +static asdl_seq *_loop0_123_rule(Parser *p); +static asdl_seq *_gather_122_rule(Parser *p); +static asdl_seq *_loop0_125_rule(Parser *p); +static asdl_seq *_gather_124_rule(Parser *p); +static void *_tmp_126_rule(Parser *p); static asdl_seq *_loop0_127_rule(Parser *p); static asdl_seq *_loop0_128_rule(Parser *p); -static void *_tmp_129_rule(Parser *p); +static asdl_seq *_loop0_129_rule(Parser *p); static void *_tmp_130_rule(Parser *p); -static asdl_seq *_loop0_131_rule(Parser *p); -static void *_tmp_132_rule(Parser *p); -static asdl_seq *_loop0_133_rule(Parser *p); -static void *_tmp_134_rule(Parser *p); +static void *_tmp_131_rule(Parser *p); +static asdl_seq *_loop0_132_rule(Parser *p); +static void *_tmp_133_rule(Parser *p); +static asdl_seq *_loop0_134_rule(Parser *p); static void *_tmp_135_rule(Parser *p); static void *_tmp_136_rule(Parser *p); static void *_tmp_137_rule(Parser *p); @@ -693,10 +699,12 @@ static void *_tmp_147_rule(Parser *p); static void *_tmp_148_rule(Parser *p); static void *_tmp_149_rule(Parser *p); static void *_tmp_150_rule(Parser *p); -static asdl_seq *_loop1_151_rule(Parser *p); -static asdl_seq *_loop1_152_rule(Parser *p); -static void *_tmp_153_rule(Parser *p); -static void *_tmp_154_rule(Parser *p); +static void *_tmp_151_rule(Parser *p); +static void *_tmp_152_rule(Parser *p); +static asdl_seq *_loop1_153_rule(Parser *p); +static asdl_seq *_loop1_154_rule(Parser *p); +static void *_tmp_155_rule(Parser *p); +static void *_tmp_156_rule(Parser *p); // file: statements? $ @@ -12772,9 +12780,9 @@ star_targets_rule(Parser *p) return _res; } -// star_targets_seq: ','.star_target+ ','? +// star_targets_list_seq: ','.star_target+ ','? static asdl_expr_seq* -star_targets_seq_rule(Parser *p) +star_targets_list_seq_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -12788,7 +12796,7 @@ star_targets_seq_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_targets_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); + D(fprintf(stderr, "%*c> star_targets_list_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings asdl_expr_seq* a; @@ -12798,7 +12806,7 @@ star_targets_seq_rule(Parser *p) (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? ) { - D(fprintf(stderr, "%*c+ star_targets_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); + D(fprintf(stderr, "%*c+ star_targets_list_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); _res = a; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -12808,7 +12816,7 @@ star_targets_seq_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_targets_seq[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s star_targets_list_seq[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','.star_target+ ','?")); } _res = NULL; @@ -12817,11 +12825,82 @@ star_targets_seq_rule(Parser *p) return _res; } -// star_target: -// | '*' (!'*' star_target) -// | t_primary '.' NAME !t_lookahead -// | t_primary '[' slices ']' !t_lookahead -// | star_atom +// star_targets_tuple_seq: star_target ((',' star_target))+ ','? | star_target ',' +static asdl_expr_seq* +star_targets_tuple_seq_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + asdl_expr_seq* _res = NULL; + int _mark = p->mark; + { // star_target ((',' star_target))+ ','? + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> star_targets_tuple_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_target ((',' star_target))+ ','?")); + void *_opt_var; + UNUSED(_opt_var); // Silence compiler warnings + expr_ty a; + asdl_seq * b; + if ( + (a = star_target_rule(p)) // star_target + && + (b = _loop1_120_rule(p)) // ((',' star_target))+ + && + (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? + ) + { + D(fprintf(stderr, "%*c+ star_targets_tuple_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_target ((',' star_target))+ ','?")); + _res = ( asdl_expr_seq * ) _PyPegen_seq_insert_in_front ( p , a , b ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s star_targets_tuple_seq[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_target ((',' star_target))+ ','?")); + } + { // star_target ',' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> star_targets_tuple_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_target ','")); + Token * _literal; + expr_ty a; + if ( + (a = star_target_rule(p)) // star_target + && + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + ) + { + D(fprintf(stderr, "%*c+ star_targets_tuple_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_target ','")); + _res = ( asdl_expr_seq * ) _PyPegen_singleton_seq ( p , a ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s star_targets_tuple_seq[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_target ','")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// star_target: '*' (!'*' star_target) | target_with_star_atom static expr_ty star_target_rule(Parser *p) { @@ -12856,7 +12935,7 @@ star_target_rule(Parser *p) if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (a = _tmp_120_rule(p)) // !'*' star_target + (a = _tmp_121_rule(p)) // !'*' star_target ) { D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (!'*' star_target)")); @@ -12881,12 +12960,65 @@ star_target_rule(Parser *p) D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'*' (!'*' star_target)")); } + { // target_with_star_atom + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target_with_star_atom")); + expr_ty target_with_star_atom_var; + if ( + (target_with_star_atom_var = target_with_star_atom_rule(p)) // target_with_star_atom + ) + { + D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target_with_star_atom")); + _res = target_with_star_atom_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target_with_star_atom")); + } + _res = NULL; + done: + _PyPegen_insert_memo(p, _mark, star_target_type, _res); + D(p->level--); + return _res; +} + +// target_with_star_atom: +// | t_primary '.' NAME !t_lookahead +// | t_primary '[' slices ']' !t_lookahead +// | star_atom +static expr_ty +target_with_star_atom_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + expr_ty _res = NULL; + if (_PyPegen_is_memoized(p, target_with_star_atom_type, &_res)) { + D(p->level--); + return _res; + } + int _mark = p->mark; + if (p->mark == p->fill && _PyPegen_fill_token(p) < 0) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + int _start_lineno = p->tokens[_mark]->lineno; + UNUSED(_start_lineno); // Only used by EXTRA macro + int _start_col_offset = p->tokens[_mark]->col_offset; + UNUSED(_start_col_offset); // Only used by EXTRA macro { // t_primary '.' NAME !t_lookahead if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); + D(fprintf(stderr, "%*c> target_with_star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); Token * _literal; expr_ty a; expr_ty b; @@ -12900,7 +13032,7 @@ star_target_rule(Parser *p) _PyPegen_lookahead(0, t_lookahead_rule, p) ) { - D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); + D(fprintf(stderr, "%*c+ target_with_star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -12919,7 +13051,7 @@ star_target_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s target_with_star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "t_primary '.' NAME !t_lookahead")); } { // t_primary '[' slices ']' !t_lookahead @@ -12927,7 +13059,7 @@ star_target_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); + D(fprintf(stderr, "%*c> target_with_star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); Token * _literal; Token * _literal_1; expr_ty a; @@ -12944,7 +13076,7 @@ star_target_rule(Parser *p) _PyPegen_lookahead(0, t_lookahead_rule, p) ) { - D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); + D(fprintf(stderr, "%*c+ target_with_star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -12963,7 +13095,7 @@ star_target_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s target_with_star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); } { // star_atom @@ -12971,32 +13103,32 @@ star_target_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_atom")); + D(fprintf(stderr, "%*c> target_with_star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_atom")); expr_ty star_atom_var; if ( (star_atom_var = star_atom_rule(p)) // star_atom ) { - D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_atom")); + D(fprintf(stderr, "%*c+ target_with_star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_atom")); _res = star_atom_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s target_with_star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_atom")); } _res = NULL; done: - _PyPegen_insert_memo(p, _mark, star_target_type, _res); + _PyPegen_insert_memo(p, _mark, target_with_star_atom_type, _res); D(p->level--); return _res; } // star_atom: // | NAME -// | '(' star_target ')' -// | '(' star_targets_seq? ')' -// | '[' star_targets_seq? ']' +// | '(' target_with_star_atom ')' +// | '(' star_targets_tuple_seq? ')' +// | '[' star_targets_list_seq? ']' static expr_ty star_atom_rule(Parser *p) { @@ -13040,24 +13172,24 @@ star_atom_rule(Parser *p) D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "NAME")); } - { // '(' star_target ')' + { // '(' target_with_star_atom ')' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' star_target ')'")); + D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' target_with_star_atom ')'")); Token * _literal; Token * _literal_1; expr_ty a; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' && - (a = star_target_rule(p)) // star_target + (a = target_with_star_atom_rule(p)) // target_with_star_atom && (_literal_1 = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' star_target ')'")); + D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' target_with_star_atom ')'")); _res = _PyPegen_set_expr_context ( p , a , Store ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -13068,26 +13200,26 @@ star_atom_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' star_target ')'")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' target_with_star_atom ')'")); } - { // '(' star_targets_seq? ')' + { // '(' star_targets_tuple_seq? ')' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' star_targets_seq? ')'")); + D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' star_targets_tuple_seq? ')'")); Token * _literal; Token * _literal_1; void *a; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' && - (a = star_targets_seq_rule(p), 1) // star_targets_seq? + (a = star_targets_tuple_seq_rule(p), 1) // star_targets_tuple_seq? && (_literal_1 = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' star_targets_seq? ')'")); + D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' star_targets_tuple_seq? ')'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -13107,26 +13239,26 @@ star_atom_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' star_targets_seq? ')'")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' star_targets_tuple_seq? ')'")); } - { // '[' star_targets_seq? ']' + { // '[' star_targets_list_seq? ']' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'[' star_targets_seq? ']'")); + D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'[' star_targets_list_seq? ']'")); Token * _literal; Token * _literal_1; void *a; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' && - (a = star_targets_seq_rule(p), 1) // star_targets_seq? + (a = star_targets_list_seq_rule(p), 1) // star_targets_list_seq? && (_literal_1 = _PyPegen_expect_token(p, 10)) // token=']' ) { - D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'[' star_targets_seq? ']'")); + D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'[' star_targets_list_seq? ']'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -13146,7 +13278,7 @@ star_atom_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'[' star_targets_seq? ']'")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'[' star_targets_list_seq? ']'")); } _res = NULL; done: @@ -13378,7 +13510,7 @@ del_targets_rule(Parser *p) UNUSED(_opt_var); // Silence compiler warnings asdl_expr_seq* a; if ( - (a = (asdl_expr_seq*)_gather_121_rule(p)) // ','.del_target+ + (a = (asdl_expr_seq*)_gather_122_rule(p)) // ','.del_target+ && (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? ) @@ -13719,7 +13851,7 @@ targets_rule(Parser *p) UNUSED(_opt_var); // Silence compiler warnings asdl_expr_seq* a; if ( - (a = (asdl_expr_seq*)_gather_123_rule(p)) // ','.target+ + (a = (asdl_expr_seq*)_gather_124_rule(p)) // ','.target+ && (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? ) @@ -14433,7 +14565,7 @@ invalid_arguments_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_opt_var = _tmp_125_rule(p), 1) // [args | expression for_if_clauses] + (_opt_var = _tmp_126_rule(p), 1) // [args | expression for_if_clauses] ) { D(fprintf(stderr, "%*c+ invalid_arguments[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses ',' [args | expression for_if_clauses]")); @@ -14691,7 +14823,7 @@ invalid_assignment_rule(Parser *p) D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expression ',' star_named_expressions* ':' expression")); Token * _literal; Token * _literal_1; - asdl_seq * _loop0_126_var; + asdl_seq * _loop0_127_var; expr_ty a; expr_ty expression_var; if ( @@ -14699,7 +14831,7 @@ invalid_assignment_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_loop0_126_var = _loop0_126_rule(p)) // star_named_expressions* + (_loop0_127_var = _loop0_127_rule(p)) // star_named_expressions* && (_literal_1 = _PyPegen_expect_token(p, 11)) // token=':' && @@ -14756,10 +14888,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* star_expressions '='")); Token * _literal; - asdl_seq * _loop0_127_var; + asdl_seq * _loop0_128_var; expr_ty a; if ( - (_loop0_127_var = _loop0_127_rule(p)) // ((star_targets '='))* + (_loop0_128_var = _loop0_128_rule(p)) // ((star_targets '='))* && (a = star_expressions_rule(p)) // star_expressions && @@ -14786,10 +14918,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* yield_expr '='")); Token * _literal; - asdl_seq * _loop0_128_var; + asdl_seq * _loop0_129_var; expr_ty a; if ( - (_loop0_128_var = _loop0_128_rule(p)) // ((star_targets '='))* + (_loop0_129_var = _loop0_129_rule(p)) // ((star_targets '='))* && (a = yield_expr_rule(p)) // yield_expr && @@ -14815,7 +14947,7 @@ invalid_assignment_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); - void *_tmp_129_var; + void *_tmp_130_var; expr_ty a; AugOperator* augassign_var; if ( @@ -14823,7 +14955,7 @@ invalid_assignment_rule(Parser *p) && (augassign_var = augassign_rule(p)) // augassign && - (_tmp_129_var = _tmp_129_rule(p)) // yield_expr | star_expressions + (_tmp_130_var = _tmp_130_rule(p)) // yield_expr | star_expressions ) { D(fprintf(stderr, "%*c+ invalid_assignment[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); @@ -15079,11 +15211,11 @@ invalid_comprehension_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_comprehension[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('[' | '(' | '{') starred_expression for_if_clauses")); - void *_tmp_130_var; + void *_tmp_131_var; expr_ty a; asdl_comprehension_seq* for_if_clauses_var; if ( - (_tmp_130_var = _tmp_130_rule(p)) // '[' | '(' | '{' + (_tmp_131_var = _tmp_131_rule(p)) // '[' | '(' | '{' && (a = starred_expression_rule(p)) // starred_expression && @@ -15180,13 +15312,13 @@ invalid_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default* (slash_with_default | param_with_default+) param_no_default")); - asdl_seq * _loop0_131_var; - void *_tmp_132_var; + asdl_seq * _loop0_132_var; + void *_tmp_133_var; arg_ty param_no_default_var; if ( - (_loop0_131_var = _loop0_131_rule(p)) // param_no_default* + (_loop0_132_var = _loop0_132_rule(p)) // param_no_default* && - (_tmp_132_var = _tmp_132_rule(p)) // slash_with_default | param_with_default+ + (_tmp_133_var = _tmp_133_rule(p)) // slash_with_default | param_with_default+ && (param_no_default_var = param_no_default_rule(p)) // param_no_default ) @@ -15228,13 +15360,13 @@ invalid_lambda_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_lambda_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default")); - asdl_seq * _loop0_133_var; - void *_tmp_134_var; + asdl_seq * _loop0_134_var; + void *_tmp_135_var; arg_ty lambda_param_no_default_var; if ( - (_loop0_133_var = _loop0_133_rule(p)) // lambda_param_no_default* + (_loop0_134_var = _loop0_134_rule(p)) // lambda_param_no_default* && - (_tmp_134_var = _tmp_134_rule(p)) // lambda_slash_with_default | lambda_param_with_default+ + (_tmp_135_var = _tmp_135_rule(p)) // lambda_slash_with_default | lambda_param_with_default+ && (lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default ) @@ -15276,11 +15408,11 @@ invalid_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); Token * _literal; - void *_tmp_135_var; + void *_tmp_136_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_135_var = _tmp_135_rule(p)) // ')' | ',' (')' | '**') + (_tmp_136_var = _tmp_136_rule(p)) // ')' | ',' (')' | '**') ) { D(fprintf(stderr, "%*c+ invalid_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); @@ -15350,11 +15482,11 @@ invalid_lambda_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_lambda_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); Token * _literal; - void *_tmp_136_var; + void *_tmp_137_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_136_var = _tmp_136_rule(p)) // ':' | ',' (':' | '**') + (_tmp_137_var = _tmp_137_rule(p)) // ':' | ',' (':' | '**') ) { D(fprintf(stderr, "%*c+ invalid_lambda_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); @@ -16863,12 +16995,12 @@ _loop1_22_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_22[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_137_var; + void *_tmp_138_var; while ( - (_tmp_137_var = _tmp_137_rule(p)) // star_targets '=' + (_tmp_138_var = _tmp_138_rule(p)) // star_targets '=' ) { - _res = _tmp_137_var; + _res = _tmp_138_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -17371,12 +17503,12 @@ _loop0_31_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_31[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_138_var; + void *_tmp_139_var; while ( - (_tmp_138_var = _tmp_138_rule(p)) // '.' | '...' + (_tmp_139_var = _tmp_139_rule(p)) // '.' | '...' ) { - _res = _tmp_138_var; + _res = _tmp_139_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -17437,12 +17569,12 @@ _loop1_32_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_32[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_139_var; + void *_tmp_140_var; while ( - (_tmp_139_var = _tmp_139_rule(p)) // '.' | '...' + (_tmp_140_var = _tmp_140_rule(p)) // '.' | '...' ) { - _res = _tmp_139_var; + _res = _tmp_140_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -19599,12 +19731,12 @@ _loop1_68_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_68[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('@' named_expression NEWLINE)")); - void *_tmp_140_var; + void *_tmp_141_var; while ( - (_tmp_140_var = _tmp_140_rule(p)) // '@' named_expression NEWLINE + (_tmp_141_var = _tmp_141_rule(p)) // '@' named_expression NEWLINE ) { - _res = _tmp_140_var; + _res = _tmp_141_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -19717,12 +19849,12 @@ _loop1_70_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_70[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_expression)")); - void *_tmp_141_var; + void *_tmp_142_var; while ( - (_tmp_141_var = _tmp_141_rule(p)) // ',' star_expression + (_tmp_142_var = _tmp_142_rule(p)) // ',' star_expression ) { - _res = _tmp_141_var; + _res = _tmp_142_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -19902,12 +20034,12 @@ _loop1_73_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_73[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' expression)")); - void *_tmp_142_var; + void *_tmp_143_var; while ( - (_tmp_142_var = _tmp_142_rule(p)) // ',' expression + (_tmp_143_var = _tmp_143_rule(p)) // ',' expression ) { - _res = _tmp_142_var; + _res = _tmp_143_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -20932,12 +21064,12 @@ _loop1_88_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_88[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('or' conjunction)")); - void *_tmp_143_var; + void *_tmp_144_var; while ( - (_tmp_143_var = _tmp_143_rule(p)) // 'or' conjunction + (_tmp_144_var = _tmp_144_rule(p)) // 'or' conjunction ) { - _res = _tmp_143_var; + _res = _tmp_144_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -21003,12 +21135,12 @@ _loop1_89_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_89[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('and' inversion)")); - void *_tmp_144_var; + void *_tmp_145_var; while ( - (_tmp_144_var = _tmp_144_rule(p)) // 'and' inversion + (_tmp_145_var = _tmp_145_rule(p)) // 'and' inversion ) { - _res = _tmp_144_var; + _res = _tmp_145_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -21924,12 +22056,12 @@ _loop0_104_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_104[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_145_var; + void *_tmp_146_var; while ( - (_tmp_145_var = _tmp_145_rule(p)) // 'if' disjunction + (_tmp_146_var = _tmp_146_rule(p)) // 'if' disjunction ) { - _res = _tmp_145_var; + _res = _tmp_146_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -21990,12 +22122,12 @@ _loop0_105_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_105[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_146_var; + void *_tmp_147_var; while ( - (_tmp_146_var = _tmp_146_rule(p)) // 'if' disjunction + (_tmp_147_var = _tmp_147_rule(p)) // 'if' disjunction ) { - _res = _tmp_146_var; + _res = _tmp_147_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -22061,7 +22193,7 @@ _loop0_107_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_147_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_148_rule(p)) // starred_expression | named_expression !'=' ) { _res = elem; @@ -22124,7 +22256,7 @@ _gather_106_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_147_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_148_rule(p)) // starred_expression | named_expression !'=' && (seq = _loop0_107_rule(p)) // _loop0_107 ) @@ -22670,12 +22802,12 @@ _loop0_117_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_117[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_148_var; + void *_tmp_149_var; while ( - (_tmp_148_var = _tmp_148_rule(p)) // ',' star_target + (_tmp_149_var = _tmp_149_rule(p)) // ',' star_target ) { - _res = _tmp_148_var; + _res = _tmp_149_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -22823,9 +22955,80 @@ _gather_118_rule(Parser *p) return _res; } -// _tmp_120: !'*' star_target +// _loop1_120: (',' star_target) +static asdl_seq * +_loop1_120_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void *_res = NULL; + int _mark = p->mark; + int _start_mark = p->mark; + void **_children = PyMem_Malloc(sizeof(void *)); + if (!_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + ssize_t _children_capacity = 1; + ssize_t _n = 0; + { // (',' star_target) + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _loop1_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); + void *_tmp_150_var; + while ( + (_tmp_150_var = _tmp_150_rule(p)) // ',' star_target + ) + { + _res = _tmp_150_var; + if (_n == _children_capacity) { + _children_capacity *= 2; + void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); + if (!_new_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + _children = _new_children; + } + _children[_n++] = _res; + _mark = p->mark; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _loop1_120[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(',' star_target)")); + } + if (_n == 0 || p->error_indicator) { + PyMem_Free(_children); + D(p->level--); + return NULL; + } + asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); + if (!_seq) { + PyMem_Free(_children); + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); + PyMem_Free(_children); + _PyPegen_insert_memo(p, _start_mark, _loop1_120_type, _seq); + D(p->level--); + return _seq; +} + +// _tmp_121: !'*' star_target static void * -_tmp_120_rule(Parser *p) +_tmp_121_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -22839,7 +23042,7 @@ _tmp_120_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); + D(fprintf(stderr, "%*c> _tmp_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); expr_ty star_target_var; if ( _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 16) // token='*' @@ -22847,12 +23050,12 @@ _tmp_120_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_120[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); + D(fprintf(stderr, "%*c+ _tmp_121[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); _res = star_target_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_120[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_121[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "!'*' star_target")); } _res = NULL; @@ -22861,9 +23064,9 @@ _tmp_120_rule(Parser *p) return _res; } -// _loop0_122: ',' del_target +// _loop0_123: ',' del_target static asdl_seq * -_loop0_122_rule(Parser *p) +_loop0_123_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -22887,7 +23090,7 @@ _loop0_122_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' del_target")); + D(fprintf(stderr, "%*c> _loop0_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' del_target")); Token * _literal; expr_ty elem; while ( @@ -22918,7 +23121,7 @@ _loop0_122_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_122[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_123[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' del_target")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -22931,14 +23134,14 @@ _loop0_122_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_122_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_123_type, _seq); D(p->level--); return _seq; } -// _gather_121: del_target _loop0_122 +// _gather_122: del_target _loop0_123 static asdl_seq * -_gather_121_rule(Parser *p) +_gather_122_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -22947,27 +23150,27 @@ _gather_121_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // del_target _loop0_122 + { // del_target _loop0_123 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "del_target _loop0_122")); + D(fprintf(stderr, "%*c> _gather_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "del_target _loop0_123")); expr_ty elem; asdl_seq * seq; if ( (elem = del_target_rule(p)) // del_target && - (seq = _loop0_122_rule(p)) // _loop0_122 + (seq = _loop0_123_rule(p)) // _loop0_123 ) { - D(fprintf(stderr, "%*c+ _gather_121[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "del_target _loop0_122")); + D(fprintf(stderr, "%*c+ _gather_122[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "del_target _loop0_123")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_121[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "del_target _loop0_122")); + D(fprintf(stderr, "%*c%s _gather_122[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "del_target _loop0_123")); } _res = NULL; done: @@ -22975,9 +23178,9 @@ _gather_121_rule(Parser *p) return _res; } -// _loop0_124: ',' target +// _loop0_125: ',' target static asdl_seq * -_loop0_124_rule(Parser *p) +_loop0_125_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23001,7 +23204,7 @@ _loop0_124_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_124[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' target")); + D(fprintf(stderr, "%*c> _loop0_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' target")); Token * _literal; expr_ty elem; while ( @@ -23032,7 +23235,7 @@ _loop0_124_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_124[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_125[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' target")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -23045,14 +23248,14 @@ _loop0_124_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_124_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_125_type, _seq); D(p->level--); return _seq; } -// _gather_123: target _loop0_124 +// _gather_124: target _loop0_125 static asdl_seq * -_gather_123_rule(Parser *p) +_gather_124_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23061,27 +23264,27 @@ _gather_123_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // target _loop0_124 + { // target _loop0_125 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target _loop0_124")); + D(fprintf(stderr, "%*c> _gather_124[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target _loop0_125")); expr_ty elem; asdl_seq * seq; if ( (elem = target_rule(p)) // target && - (seq = _loop0_124_rule(p)) // _loop0_124 + (seq = _loop0_125_rule(p)) // _loop0_125 ) { - D(fprintf(stderr, "%*c+ _gather_123[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target _loop0_124")); + D(fprintf(stderr, "%*c+ _gather_124[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target _loop0_125")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_123[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target _loop0_124")); + D(fprintf(stderr, "%*c%s _gather_124[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target _loop0_125")); } _res = NULL; done: @@ -23089,9 +23292,9 @@ _gather_123_rule(Parser *p) return _res; } -// _tmp_125: args | expression for_if_clauses +// _tmp_126: args | expression for_if_clauses static void * -_tmp_125_rule(Parser *p) +_tmp_126_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23105,18 +23308,18 @@ _tmp_125_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "args")); + D(fprintf(stderr, "%*c> _tmp_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "args")); expr_ty args_var; if ( (args_var = args_rule(p)) // args ) { - D(fprintf(stderr, "%*c+ _tmp_125[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "args")); + D(fprintf(stderr, "%*c+ _tmp_126[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "args")); _res = args_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_125[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_126[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "args")); } { // expression for_if_clauses @@ -23124,7 +23327,7 @@ _tmp_125_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); + D(fprintf(stderr, "%*c> _tmp_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); expr_ty expression_var; asdl_comprehension_seq* for_if_clauses_var; if ( @@ -23133,12 +23336,12 @@ _tmp_125_rule(Parser *p) (for_if_clauses_var = for_if_clauses_rule(p)) // for_if_clauses ) { - D(fprintf(stderr, "%*c+ _tmp_125[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); + D(fprintf(stderr, "%*c+ _tmp_126[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); _res = _PyPegen_dummy_name(p, expression_var, for_if_clauses_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_125[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_126[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression for_if_clauses")); } _res = NULL; @@ -23147,9 +23350,9 @@ _tmp_125_rule(Parser *p) return _res; } -// _loop0_126: star_named_expressions +// _loop0_127: star_named_expressions static asdl_seq * -_loop0_126_rule(Parser *p) +_loop0_127_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23173,7 +23376,7 @@ _loop0_126_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); + D(fprintf(stderr, "%*c> _loop0_127[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); asdl_expr_seq* star_named_expressions_var; while ( (star_named_expressions_var = star_named_expressions_rule(p)) // star_named_expressions @@ -23195,7 +23398,7 @@ _loop0_126_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_126[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_127[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_named_expressions")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -23208,14 +23411,14 @@ _loop0_126_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_126_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_127_type, _seq); D(p->level--); return _seq; } -// _loop0_127: (star_targets '=') +// _loop0_128: (star_targets '=') static asdl_seq * -_loop0_127_rule(Parser *p) +_loop0_128_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23239,13 +23442,13 @@ _loop0_127_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_127[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_149_var; + D(fprintf(stderr, "%*c> _loop0_128[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_151_var; while ( - (_tmp_149_var = _tmp_149_rule(p)) // star_targets '=' + (_tmp_151_var = _tmp_151_rule(p)) // star_targets '=' ) { - _res = _tmp_149_var; + _res = _tmp_151_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23261,7 +23464,7 @@ _loop0_127_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_127[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_128[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -23274,14 +23477,14 @@ _loop0_127_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_127_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_128_type, _seq); D(p->level--); return _seq; } -// _loop0_128: (star_targets '=') +// _loop0_129: (star_targets '=') static asdl_seq * -_loop0_128_rule(Parser *p) +_loop0_129_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23305,13 +23508,13 @@ _loop0_128_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_128[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_150_var; + D(fprintf(stderr, "%*c> _loop0_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_152_var; while ( - (_tmp_150_var = _tmp_150_rule(p)) // star_targets '=' + (_tmp_152_var = _tmp_152_rule(p)) // star_targets '=' ) { - _res = _tmp_150_var; + _res = _tmp_152_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23327,7 +23530,7 @@ _loop0_128_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_128[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_129[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -23340,14 +23543,14 @@ _loop0_128_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_128_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_129_type, _seq); D(p->level--); return _seq; } -// _tmp_129: yield_expr | star_expressions +// _tmp_130: yield_expr | star_expressions static void * -_tmp_129_rule(Parser *p) +_tmp_130_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23361,18 +23564,18 @@ _tmp_129_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); expr_ty yield_expr_var; if ( (yield_expr_var = yield_expr_rule(p)) // yield_expr ) { - D(fprintf(stderr, "%*c+ _tmp_129[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); _res = yield_expr_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_129[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "yield_expr")); } { // star_expressions @@ -23380,18 +23583,18 @@ _tmp_129_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); expr_ty star_expressions_var; if ( (star_expressions_var = star_expressions_rule(p)) // star_expressions ) { - D(fprintf(stderr, "%*c+ _tmp_129[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); _res = star_expressions_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_129[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_expressions")); } _res = NULL; @@ -23400,9 +23603,9 @@ _tmp_129_rule(Parser *p) return _res; } -// _tmp_130: '[' | '(' | '{' +// _tmp_131: '[' | '(' | '{' static void * -_tmp_130_rule(Parser *p) +_tmp_131_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23416,18 +23619,18 @@ _tmp_130_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' ) { - D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['")); } { // '(' @@ -23435,18 +23638,18 @@ _tmp_130_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' ) { - D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'('")); } { // '{' @@ -23454,18 +23657,18 @@ _tmp_130_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 25)) // token='{' ) { - D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'")); } _res = NULL; @@ -23474,9 +23677,9 @@ _tmp_130_rule(Parser *p) return _res; } -// _loop0_131: param_no_default +// _loop0_132: param_no_default static asdl_seq * -_loop0_131_rule(Parser *p) +_loop0_132_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23500,7 +23703,7 @@ _loop0_131_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); + D(fprintf(stderr, "%*c> _loop0_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); arg_ty param_no_default_var; while ( (param_no_default_var = param_no_default_rule(p)) // param_no_default @@ -23522,7 +23725,7 @@ _loop0_131_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_131[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_132[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_no_default")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -23535,14 +23738,14 @@ _loop0_131_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_131_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_132_type, _seq); D(p->level--); return _seq; } -// _tmp_132: slash_with_default | param_with_default+ +// _tmp_133: slash_with_default | param_with_default+ static void * -_tmp_132_rule(Parser *p) +_tmp_133_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23556,18 +23759,18 @@ _tmp_132_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "slash_with_default")); + D(fprintf(stderr, "%*c> _tmp_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "slash_with_default")); SlashWithDefault* slash_with_default_var; if ( (slash_with_default_var = slash_with_default_rule(p)) // slash_with_default ) { - D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "slash_with_default")); + D(fprintf(stderr, "%*c+ _tmp_133[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "slash_with_default")); _res = slash_with_default_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_133[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "slash_with_default")); } { // param_with_default+ @@ -23575,18 +23778,18 @@ _tmp_132_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - asdl_seq * _loop1_151_var; + D(fprintf(stderr, "%*c> _tmp_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); + asdl_seq * _loop1_153_var; if ( - (_loop1_151_var = _loop1_151_rule(p)) // param_with_default+ + (_loop1_153_var = _loop1_153_rule(p)) // param_with_default+ ) { - D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - _res = _loop1_151_var; + D(fprintf(stderr, "%*c+ _tmp_133[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); + _res = _loop1_153_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_133[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default+")); } _res = NULL; @@ -23595,9 +23798,9 @@ _tmp_132_rule(Parser *p) return _res; } -// _loop0_133: lambda_param_no_default +// _loop0_134: lambda_param_no_default static asdl_seq * -_loop0_133_rule(Parser *p) +_loop0_134_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23621,7 +23824,7 @@ _loop0_133_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); + D(fprintf(stderr, "%*c> _loop0_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); arg_ty lambda_param_no_default_var; while ( (lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default @@ -23643,7 +23846,7 @@ _loop0_133_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_133[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_134[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_no_default")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -23656,14 +23859,14 @@ _loop0_133_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_133_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_134_type, _seq); D(p->level--); return _seq; } -// _tmp_134: lambda_slash_with_default | lambda_param_with_default+ +// _tmp_135: lambda_slash_with_default | lambda_param_with_default+ static void * -_tmp_134_rule(Parser *p) +_tmp_135_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23677,18 +23880,18 @@ _tmp_134_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); + D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); SlashWithDefault* lambda_slash_with_default_var; if ( (lambda_slash_with_default_var = lambda_slash_with_default_rule(p)) // lambda_slash_with_default ) { - D(fprintf(stderr, "%*c+ _tmp_134[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); + D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); _res = lambda_slash_with_default_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_134[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_slash_with_default")); } { // lambda_param_with_default+ @@ -23696,18 +23899,18 @@ _tmp_134_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - asdl_seq * _loop1_152_var; + D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); + asdl_seq * _loop1_154_var; if ( - (_loop1_152_var = _loop1_152_rule(p)) // lambda_param_with_default+ + (_loop1_154_var = _loop1_154_rule(p)) // lambda_param_with_default+ ) { - D(fprintf(stderr, "%*c+ _tmp_134[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - _res = _loop1_152_var; + D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); + _res = _loop1_154_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_134[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default+")); } _res = NULL; @@ -23716,9 +23919,9 @@ _tmp_134_rule(Parser *p) return _res; } -// _tmp_135: ')' | ',' (')' | '**') +// _tmp_136: ')' | ',' (')' | '**') static void * -_tmp_135_rule(Parser *p) +_tmp_136_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23732,18 +23935,18 @@ _tmp_135_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // ',' (')' | '**') @@ -23751,21 +23954,21 @@ _tmp_135_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); Token * _literal; - void *_tmp_153_var; + void *_tmp_155_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_153_var = _tmp_153_rule(p)) // ')' | '**' + (_tmp_155_var = _tmp_155_rule(p)) // ')' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_153_var); + D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_155_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (')' | '**')")); } _res = NULL; @@ -23774,9 +23977,9 @@ _tmp_135_rule(Parser *p) return _res; } -// _tmp_136: ':' | ',' (':' | '**') +// _tmp_137: ':' | ',' (':' | '**') static void * -_tmp_136_rule(Parser *p) +_tmp_137_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23790,18 +23993,18 @@ _tmp_136_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // ',' (':' | '**') @@ -23809,21 +24012,21 @@ _tmp_136_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); Token * _literal; - void *_tmp_154_var; + void *_tmp_156_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_154_var = _tmp_154_rule(p)) // ':' | '**' + (_tmp_156_var = _tmp_156_rule(p)) // ':' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_154_var); + D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_156_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (':' | '**')")); } _res = NULL; @@ -23832,9 +24035,9 @@ _tmp_136_rule(Parser *p) return _res; } -// _tmp_137: star_targets '=' +// _tmp_138: star_targets '=' static void * -_tmp_137_rule(Parser *p) +_tmp_138_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23848,7 +24051,7 @@ _tmp_137_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty z; if ( @@ -23857,7 +24060,7 @@ _tmp_137_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -23867,7 +24070,7 @@ _tmp_137_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -23876,9 +24079,9 @@ _tmp_137_rule(Parser *p) return _res; } -// _tmp_138: '.' | '...' +// _tmp_139: '.' | '...' static void * -_tmp_138_rule(Parser *p) +_tmp_139_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23892,18 +24095,18 @@ _tmp_138_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -23911,18 +24114,18 @@ _tmp_138_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -23931,9 +24134,9 @@ _tmp_138_rule(Parser *p) return _res; } -// _tmp_139: '.' | '...' +// _tmp_140: '.' | '...' static void * -_tmp_139_rule(Parser *p) +_tmp_140_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23947,18 +24150,18 @@ _tmp_139_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -23966,18 +24169,18 @@ _tmp_139_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -23986,9 +24189,9 @@ _tmp_139_rule(Parser *p) return _res; } -// _tmp_140: '@' named_expression NEWLINE +// _tmp_141: '@' named_expression NEWLINE static void * -_tmp_140_rule(Parser *p) +_tmp_141_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24002,7 +24205,7 @@ _tmp_140_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); Token * _literal; expr_ty f; Token * newline_var; @@ -24014,7 +24217,7 @@ _tmp_140_rule(Parser *p) (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); _res = f; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24024,7 +24227,7 @@ _tmp_140_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_141[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@' named_expression NEWLINE")); } _res = NULL; @@ -24033,9 +24236,9 @@ _tmp_140_rule(Parser *p) return _res; } -// _tmp_141: ',' star_expression +// _tmp_142: ',' star_expression static void * -_tmp_141_rule(Parser *p) +_tmp_142_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24049,7 +24252,7 @@ _tmp_141_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c> _tmp_142[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); Token * _literal; expr_ty c; if ( @@ -24058,7 +24261,7 @@ _tmp_141_rule(Parser *p) (c = star_expression_rule(p)) // star_expression ) { - D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24068,7 +24271,7 @@ _tmp_141_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_141[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_142[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_expression")); } _res = NULL; @@ -24077,9 +24280,9 @@ _tmp_141_rule(Parser *p) return _res; } -// _tmp_142: ',' expression +// _tmp_143: ',' expression static void * -_tmp_142_rule(Parser *p) +_tmp_143_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24093,7 +24296,7 @@ _tmp_142_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_142[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); Token * _literal; expr_ty c; if ( @@ -24102,7 +24305,7 @@ _tmp_142_rule(Parser *p) (c = expression_rule(p)) // expression ) { - D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24112,7 +24315,7 @@ _tmp_142_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_142[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' expression")); } _res = NULL; @@ -24121,9 +24324,9 @@ _tmp_142_rule(Parser *p) return _res; } -// _tmp_143: 'or' conjunction +// _tmp_144: 'or' conjunction static void * -_tmp_143_rule(Parser *p) +_tmp_144_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24137,7 +24340,7 @@ _tmp_143_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); Token * _keyword; expr_ty c; if ( @@ -24146,7 +24349,7 @@ _tmp_143_rule(Parser *p) (c = conjunction_rule(p)) // conjunction ) { - D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24156,7 +24359,7 @@ _tmp_143_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'or' conjunction")); } _res = NULL; @@ -24165,9 +24368,9 @@ _tmp_143_rule(Parser *p) return _res; } -// _tmp_144: 'and' inversion +// _tmp_145: 'and' inversion static void * -_tmp_144_rule(Parser *p) +_tmp_145_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24181,7 +24384,7 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); Token * _keyword; expr_ty c; if ( @@ -24190,7 +24393,7 @@ _tmp_144_rule(Parser *p) (c = inversion_rule(p)) // inversion ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24200,7 +24403,7 @@ _tmp_144_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'and' inversion")); } _res = NULL; @@ -24209,9 +24412,9 @@ _tmp_144_rule(Parser *p) return _res; } -// _tmp_145: 'if' disjunction +// _tmp_146: 'if' disjunction static void * -_tmp_145_rule(Parser *p) +_tmp_146_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24225,7 +24428,7 @@ _tmp_145_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -24234,7 +24437,7 @@ _tmp_145_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24244,7 +24447,7 @@ _tmp_145_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -24253,9 +24456,9 @@ _tmp_145_rule(Parser *p) return _res; } -// _tmp_146: 'if' disjunction +// _tmp_147: 'if' disjunction static void * -_tmp_146_rule(Parser *p) +_tmp_147_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24269,7 +24472,7 @@ _tmp_146_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -24278,7 +24481,7 @@ _tmp_146_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24288,7 +24491,7 @@ _tmp_146_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -24297,9 +24500,9 @@ _tmp_146_rule(Parser *p) return _res; } -// _tmp_147: starred_expression | named_expression !'=' +// _tmp_148: starred_expression | named_expression !'=' static void * -_tmp_147_rule(Parser *p) +_tmp_148_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24313,18 +24516,18 @@ _tmp_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); expr_ty starred_expression_var; if ( (starred_expression_var = starred_expression_rule(p)) // starred_expression ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); _res = starred_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression")); } { // named_expression !'=' @@ -24332,7 +24535,7 @@ _tmp_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); + D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); expr_ty named_expression_var; if ( (named_expression_var = named_expression_rule(p)) // named_expression @@ -24340,12 +24543,12 @@ _tmp_147_rule(Parser *p) _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); + D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); _res = named_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "named_expression !'='")); } _res = NULL; @@ -24354,9 +24557,9 @@ _tmp_147_rule(Parser *p) return _res; } -// _tmp_148: ',' star_target +// _tmp_149: ',' star_target static void * -_tmp_148_rule(Parser *p) +_tmp_149_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24370,7 +24573,7 @@ _tmp_148_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -24379,7 +24582,7 @@ _tmp_148_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24389,7 +24592,7 @@ _tmp_148_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -24398,9 +24601,53 @@ _tmp_148_rule(Parser *p) return _res; } -// _tmp_149: star_targets '=' +// _tmp_150: ',' star_target static void * -_tmp_149_rule(Parser *p) +_tmp_150_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // ',' star_target + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + Token * _literal; + expr_ty c; + if ( + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + && + (c = star_target_rule(p)) // star_target + ) + { + D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + _res = c; + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _tmp_151: star_targets '=' +static void * +_tmp_151_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24414,7 +24661,7 @@ _tmp_149_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -24423,12 +24670,12 @@ _tmp_149_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -24437,9 +24684,9 @@ _tmp_149_rule(Parser *p) return _res; } -// _tmp_150: star_targets '=' +// _tmp_152: star_targets '=' static void * -_tmp_150_rule(Parser *p) +_tmp_152_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24453,7 +24700,7 @@ _tmp_150_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -24462,12 +24709,12 @@ _tmp_150_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_152[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_152[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -24476,9 +24723,9 @@ _tmp_150_rule(Parser *p) return _res; } -// _loop1_151: param_with_default +// _loop1_153: param_with_default static asdl_seq * -_loop1_151_rule(Parser *p) +_loop1_153_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24502,7 +24749,7 @@ _loop1_151_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); + D(fprintf(stderr, "%*c> _loop1_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); NameDefaultPair* param_with_default_var; while ( (param_with_default_var = param_with_default_rule(p)) // param_with_default @@ -24524,7 +24771,7 @@ _loop1_151_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_151[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_153[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -24542,14 +24789,14 @@ _loop1_151_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_151_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_153_type, _seq); D(p->level--); return _seq; } -// _loop1_152: lambda_param_with_default +// _loop1_154: lambda_param_with_default static asdl_seq * -_loop1_152_rule(Parser *p) +_loop1_154_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24573,7 +24820,7 @@ _loop1_152_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); + D(fprintf(stderr, "%*c> _loop1_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); NameDefaultPair* lambda_param_with_default_var; while ( (lambda_param_with_default_var = lambda_param_with_default_rule(p)) // lambda_param_with_default @@ -24595,7 +24842,7 @@ _loop1_152_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_152[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -24613,14 +24860,14 @@ _loop1_152_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_152_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_154_type, _seq); D(p->level--); return _seq; } -// _tmp_153: ')' | '**' +// _tmp_155: ')' | '**' static void * -_tmp_153_rule(Parser *p) +_tmp_155_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24634,18 +24881,18 @@ _tmp_153_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // '**' @@ -24653,18 +24900,18 @@ _tmp_153_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -24673,9 +24920,9 @@ _tmp_153_rule(Parser *p) return _res; } -// _tmp_154: ':' | '**' +// _tmp_156: ':' | '**' static void * -_tmp_154_rule(Parser *p) +_tmp_156_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24689,18 +24936,18 @@ _tmp_154_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // '**' @@ -24708,18 +24955,18 @@ _tmp_154_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; From webhook-mailer at python.org Sat Jan 2 19:59:57 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 03 Jan 2021 00:59:57 -0000 Subject: [Python-checkins] [3.9] bpo-40631: Disallow single parenthesized star target (GH-24027) (GH-24068) Message-ID: https://github.com/python/cpython/commit/9a608ac17c284008d3c2986a4a8b194f84488e56 commit: 9a608ac17c284008d3c2986a4a8b194f84488e56 branch: 3.9 author: Lysandros Nikolaou committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-02T16:59:39-08:00 summary: [3.9] bpo-40631: Disallow single parenthesized star target (GH-24027) (GH-24068) (cherry picked from commit 2ea320dddd553298038bb7d6789e50e199332f66) Automerge-Triggered-By: GH:pablogsal files: A Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst M Grammar/python.gram M Lib/test/test_unpack_ex.py M Parser/pegen/parse.c diff --git a/Grammar/python.gram b/Grammar/python.gram index ce783971968dc..64e205e7fd815 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -563,18 +563,23 @@ star_targets[expr_ty]: | a=star_target !',' { a } | a=star_target b=(',' c=star_target { c })* [','] { _Py_Tuple(CHECK(_PyPegen_seq_insert_in_front(p, a, b)), Store, EXTRA) } -star_targets_seq[asdl_seq*]: a=','.star_target+ [','] { a } +star_targets_list_seq[asdl_seq*]: a=','.star_target+ [','] { a } +star_targets_tuple_seq[asdl_seq*]: + | a=star_target b=(',' c=star_target { c })+ [','] { _PyPegen_seq_insert_in_front(p, a, b) } + | a=star_target ',' { _PyPegen_singleton_seq(p, a) } star_target[expr_ty] (memo): | '*' a=(!'*' star_target) { _Py_Starred(CHECK(_PyPegen_set_expr_context(p, a, Store)), Store, EXTRA) } + | target_with_star_atom +target_with_star_atom[expr_ty] (memo): | a=t_primary '.' b=NAME !t_lookahead { _Py_Attribute(a, b->v.Name.id, Store, EXTRA) } | a=t_primary '[' b=slices ']' !t_lookahead { _Py_Subscript(a, b, Store, EXTRA) } | star_atom star_atom[expr_ty]: | a=NAME { _PyPegen_set_expr_context(p, a, Store) } - | '(' a=star_target ')' { _PyPegen_set_expr_context(p, a, Store) } - | '(' a=[star_targets_seq] ')' { _Py_Tuple(a, Store, EXTRA) } - | '[' a=[star_targets_seq] ']' { _Py_List(a, Store, EXTRA) } + | '(' a=target_with_star_atom ')' { _PyPegen_set_expr_context(p, a, Store) } + | '(' a=[star_targets_tuple_seq] ')' { _Py_Tuple(a, Store, EXTRA) } + | '[' a=[star_targets_list_seq] ']' { _Py_List(a, Store, EXTRA) } single_target[expr_ty]: | single_subscript_attribute_target diff --git a/Lib/test/test_unpack_ex.py b/Lib/test/test_unpack_ex.py index fcc93829cc3b8..049e48b13fa1f 100644 --- a/Lib/test/test_unpack_ex.py +++ b/Lib/test/test_unpack_ex.py @@ -346,6 +346,31 @@ ... SyntaxError: can't use starred expression here + >>> (*x),y = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> (((*x))),y = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> z,(*x),y = 1, 2, 4 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> z,(*x) = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + + >>> ((*x),y) = 1, 2 # doctest:+ELLIPSIS + Traceback (most recent call last): + ... + SyntaxError: can't use starred expression here + Some size constraints (all fail.) >>> s = ", ".join("a%d" % i for i in range(1<<8)) + ", *rest = range(1<<8 + 1)" diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst new file mode 100644 index 0000000000000..ac2db2938237f --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst @@ -0,0 +1,2 @@ +Fix regression where a single parenthesized starred expression was a valid +assignment target. diff --git a/Parser/pegen/parse.c b/Parser/pegen/parse.c index 0eb61db39a40a..98008a5fc1462 100644 --- a/Parser/pegen/parse.c +++ b/Parser/pegen/parse.c @@ -204,192 +204,196 @@ static KeywordToken *reserved_keywords[] = { #define kwarg_or_starred_type 1126 #define kwarg_or_double_starred_type 1127 #define star_targets_type 1128 -#define star_targets_seq_type 1129 -#define star_target_type 1130 -#define star_atom_type 1131 -#define single_target_type 1132 -#define single_subscript_attribute_target_type 1133 -#define del_targets_type 1134 -#define del_target_type 1135 -#define del_t_atom_type 1136 -#define targets_type 1137 -#define target_type 1138 -#define t_primary_type 1139 // Left-recursive -#define t_lookahead_type 1140 -#define t_atom_type 1141 -#define invalid_arguments_type 1142 -#define invalid_kwarg_type 1143 -#define invalid_named_expression_type 1144 -#define invalid_assignment_type 1145 -#define invalid_ann_assign_target_type 1146 -#define invalid_del_stmt_type 1147 -#define invalid_block_type 1148 -#define invalid_primary_type 1149 // Left-recursive -#define invalid_comprehension_type 1150 -#define invalid_dict_comprehension_type 1151 -#define invalid_parameters_type 1152 -#define invalid_lambda_parameters_type 1153 -#define invalid_star_etc_type 1154 -#define invalid_lambda_star_etc_type 1155 -#define invalid_double_type_comments_type 1156 -#define invalid_with_item_type 1157 -#define invalid_for_target_type 1158 -#define invalid_group_type 1159 -#define invalid_import_from_targets_type 1160 -#define _loop0_1_type 1161 -#define _loop0_2_type 1162 -#define _loop0_4_type 1163 -#define _gather_3_type 1164 -#define _loop0_6_type 1165 -#define _gather_5_type 1166 -#define _loop0_8_type 1167 -#define _gather_7_type 1168 -#define _loop0_10_type 1169 -#define _gather_9_type 1170 -#define _loop1_11_type 1171 -#define _loop0_13_type 1172 -#define _gather_12_type 1173 -#define _tmp_14_type 1174 -#define _tmp_15_type 1175 -#define _tmp_16_type 1176 -#define _tmp_17_type 1177 -#define _tmp_18_type 1178 -#define _tmp_19_type 1179 -#define _tmp_20_type 1180 -#define _tmp_21_type 1181 -#define _loop1_22_type 1182 -#define _tmp_23_type 1183 -#define _tmp_24_type 1184 -#define _loop0_26_type 1185 -#define _gather_25_type 1186 -#define _loop0_28_type 1187 -#define _gather_27_type 1188 -#define _tmp_29_type 1189 -#define _tmp_30_type 1190 -#define _loop0_31_type 1191 -#define _loop1_32_type 1192 -#define _loop0_34_type 1193 -#define _gather_33_type 1194 -#define _tmp_35_type 1195 -#define _loop0_37_type 1196 -#define _gather_36_type 1197 -#define _tmp_38_type 1198 -#define _loop0_40_type 1199 -#define _gather_39_type 1200 -#define _loop0_42_type 1201 -#define _gather_41_type 1202 -#define _loop0_44_type 1203 -#define _gather_43_type 1204 -#define _loop0_46_type 1205 -#define _gather_45_type 1206 -#define _tmp_47_type 1207 -#define _loop1_48_type 1208 -#define _tmp_49_type 1209 -#define _tmp_50_type 1210 -#define _tmp_51_type 1211 -#define _tmp_52_type 1212 -#define _tmp_53_type 1213 -#define _loop0_54_type 1214 -#define _loop0_55_type 1215 -#define _loop0_56_type 1216 -#define _loop1_57_type 1217 -#define _loop0_58_type 1218 -#define _loop1_59_type 1219 -#define _loop1_60_type 1220 -#define _loop1_61_type 1221 -#define _loop0_62_type 1222 -#define _loop1_63_type 1223 -#define _loop0_64_type 1224 -#define _loop1_65_type 1225 -#define _loop0_66_type 1226 -#define _loop1_67_type 1227 -#define _loop1_68_type 1228 -#define _tmp_69_type 1229 -#define _loop1_70_type 1230 -#define _loop0_72_type 1231 -#define _gather_71_type 1232 -#define _loop1_73_type 1233 -#define _loop0_74_type 1234 -#define _loop0_75_type 1235 -#define _loop0_76_type 1236 -#define _loop1_77_type 1237 -#define _loop0_78_type 1238 -#define _loop1_79_type 1239 -#define _loop1_80_type 1240 -#define _loop1_81_type 1241 -#define _loop0_82_type 1242 -#define _loop1_83_type 1243 -#define _loop0_84_type 1244 -#define _loop1_85_type 1245 -#define _loop0_86_type 1246 -#define _loop1_87_type 1247 -#define _loop1_88_type 1248 -#define _loop1_89_type 1249 -#define _loop1_90_type 1250 -#define _tmp_91_type 1251 -#define _loop0_93_type 1252 -#define _gather_92_type 1253 -#define _tmp_94_type 1254 -#define _tmp_95_type 1255 -#define _tmp_96_type 1256 -#define _tmp_97_type 1257 -#define _loop1_98_type 1258 -#define _tmp_99_type 1259 -#define _tmp_100_type 1260 -#define _loop0_102_type 1261 -#define _gather_101_type 1262 -#define _loop1_103_type 1263 -#define _loop0_104_type 1264 -#define _loop0_105_type 1265 -#define _loop0_107_type 1266 -#define _gather_106_type 1267 -#define _tmp_108_type 1268 -#define _loop0_110_type 1269 -#define _gather_109_type 1270 -#define _loop0_112_type 1271 -#define _gather_111_type 1272 -#define _loop0_114_type 1273 -#define _gather_113_type 1274 -#define _loop0_116_type 1275 -#define _gather_115_type 1276 -#define _loop0_117_type 1277 -#define _loop0_119_type 1278 -#define _gather_118_type 1279 -#define _tmp_120_type 1280 -#define _loop0_122_type 1281 -#define _gather_121_type 1282 -#define _loop0_124_type 1283 -#define _gather_123_type 1284 -#define _tmp_125_type 1285 -#define _loop0_126_type 1286 -#define _loop0_127_type 1287 -#define _loop0_128_type 1288 -#define _tmp_129_type 1289 -#define _tmp_130_type 1290 -#define _loop0_131_type 1291 -#define _tmp_132_type 1292 -#define _loop0_133_type 1293 -#define _tmp_134_type 1294 -#define _tmp_135_type 1295 -#define _tmp_136_type 1296 -#define _tmp_137_type 1297 -#define _tmp_138_type 1298 -#define _tmp_139_type 1299 -#define _tmp_140_type 1300 -#define _tmp_141_type 1301 -#define _tmp_142_type 1302 -#define _tmp_143_type 1303 -#define _tmp_144_type 1304 -#define _tmp_145_type 1305 -#define _tmp_146_type 1306 -#define _tmp_147_type 1307 -#define _tmp_148_type 1308 -#define _tmp_149_type 1309 -#define _tmp_150_type 1310 -#define _loop1_151_type 1311 -#define _loop1_152_type 1312 -#define _tmp_153_type 1313 -#define _tmp_154_type 1314 +#define star_targets_list_seq_type 1129 +#define star_targets_tuple_seq_type 1130 +#define star_target_type 1131 +#define target_with_star_atom_type 1132 +#define star_atom_type 1133 +#define single_target_type 1134 +#define single_subscript_attribute_target_type 1135 +#define del_targets_type 1136 +#define del_target_type 1137 +#define del_t_atom_type 1138 +#define targets_type 1139 +#define target_type 1140 +#define t_primary_type 1141 // Left-recursive +#define t_lookahead_type 1142 +#define t_atom_type 1143 +#define invalid_arguments_type 1144 +#define invalid_kwarg_type 1145 +#define invalid_named_expression_type 1146 +#define invalid_assignment_type 1147 +#define invalid_ann_assign_target_type 1148 +#define invalid_del_stmt_type 1149 +#define invalid_block_type 1150 +#define invalid_primary_type 1151 // Left-recursive +#define invalid_comprehension_type 1152 +#define invalid_dict_comprehension_type 1153 +#define invalid_parameters_type 1154 +#define invalid_lambda_parameters_type 1155 +#define invalid_star_etc_type 1156 +#define invalid_lambda_star_etc_type 1157 +#define invalid_double_type_comments_type 1158 +#define invalid_with_item_type 1159 +#define invalid_for_target_type 1160 +#define invalid_group_type 1161 +#define invalid_import_from_targets_type 1162 +#define _loop0_1_type 1163 +#define _loop0_2_type 1164 +#define _loop0_4_type 1165 +#define _gather_3_type 1166 +#define _loop0_6_type 1167 +#define _gather_5_type 1168 +#define _loop0_8_type 1169 +#define _gather_7_type 1170 +#define _loop0_10_type 1171 +#define _gather_9_type 1172 +#define _loop1_11_type 1173 +#define _loop0_13_type 1174 +#define _gather_12_type 1175 +#define _tmp_14_type 1176 +#define _tmp_15_type 1177 +#define _tmp_16_type 1178 +#define _tmp_17_type 1179 +#define _tmp_18_type 1180 +#define _tmp_19_type 1181 +#define _tmp_20_type 1182 +#define _tmp_21_type 1183 +#define _loop1_22_type 1184 +#define _tmp_23_type 1185 +#define _tmp_24_type 1186 +#define _loop0_26_type 1187 +#define _gather_25_type 1188 +#define _loop0_28_type 1189 +#define _gather_27_type 1190 +#define _tmp_29_type 1191 +#define _tmp_30_type 1192 +#define _loop0_31_type 1193 +#define _loop1_32_type 1194 +#define _loop0_34_type 1195 +#define _gather_33_type 1196 +#define _tmp_35_type 1197 +#define _loop0_37_type 1198 +#define _gather_36_type 1199 +#define _tmp_38_type 1200 +#define _loop0_40_type 1201 +#define _gather_39_type 1202 +#define _loop0_42_type 1203 +#define _gather_41_type 1204 +#define _loop0_44_type 1205 +#define _gather_43_type 1206 +#define _loop0_46_type 1207 +#define _gather_45_type 1208 +#define _tmp_47_type 1209 +#define _loop1_48_type 1210 +#define _tmp_49_type 1211 +#define _tmp_50_type 1212 +#define _tmp_51_type 1213 +#define _tmp_52_type 1214 +#define _tmp_53_type 1215 +#define _loop0_54_type 1216 +#define _loop0_55_type 1217 +#define _loop0_56_type 1218 +#define _loop1_57_type 1219 +#define _loop0_58_type 1220 +#define _loop1_59_type 1221 +#define _loop1_60_type 1222 +#define _loop1_61_type 1223 +#define _loop0_62_type 1224 +#define _loop1_63_type 1225 +#define _loop0_64_type 1226 +#define _loop1_65_type 1227 +#define _loop0_66_type 1228 +#define _loop1_67_type 1229 +#define _loop1_68_type 1230 +#define _tmp_69_type 1231 +#define _loop1_70_type 1232 +#define _loop0_72_type 1233 +#define _gather_71_type 1234 +#define _loop1_73_type 1235 +#define _loop0_74_type 1236 +#define _loop0_75_type 1237 +#define _loop0_76_type 1238 +#define _loop1_77_type 1239 +#define _loop0_78_type 1240 +#define _loop1_79_type 1241 +#define _loop1_80_type 1242 +#define _loop1_81_type 1243 +#define _loop0_82_type 1244 +#define _loop1_83_type 1245 +#define _loop0_84_type 1246 +#define _loop1_85_type 1247 +#define _loop0_86_type 1248 +#define _loop1_87_type 1249 +#define _loop1_88_type 1250 +#define _loop1_89_type 1251 +#define _loop1_90_type 1252 +#define _tmp_91_type 1253 +#define _loop0_93_type 1254 +#define _gather_92_type 1255 +#define _tmp_94_type 1256 +#define _tmp_95_type 1257 +#define _tmp_96_type 1258 +#define _tmp_97_type 1259 +#define _loop1_98_type 1260 +#define _tmp_99_type 1261 +#define _tmp_100_type 1262 +#define _loop0_102_type 1263 +#define _gather_101_type 1264 +#define _loop1_103_type 1265 +#define _loop0_104_type 1266 +#define _loop0_105_type 1267 +#define _loop0_107_type 1268 +#define _gather_106_type 1269 +#define _tmp_108_type 1270 +#define _loop0_110_type 1271 +#define _gather_109_type 1272 +#define _loop0_112_type 1273 +#define _gather_111_type 1274 +#define _loop0_114_type 1275 +#define _gather_113_type 1276 +#define _loop0_116_type 1277 +#define _gather_115_type 1278 +#define _loop0_117_type 1279 +#define _loop0_119_type 1280 +#define _gather_118_type 1281 +#define _loop1_120_type 1282 +#define _tmp_121_type 1283 +#define _loop0_123_type 1284 +#define _gather_122_type 1285 +#define _loop0_125_type 1286 +#define _gather_124_type 1287 +#define _tmp_126_type 1288 +#define _loop0_127_type 1289 +#define _loop0_128_type 1290 +#define _loop0_129_type 1291 +#define _tmp_130_type 1292 +#define _tmp_131_type 1293 +#define _loop0_132_type 1294 +#define _tmp_133_type 1295 +#define _loop0_134_type 1296 +#define _tmp_135_type 1297 +#define _tmp_136_type 1298 +#define _tmp_137_type 1299 +#define _tmp_138_type 1300 +#define _tmp_139_type 1301 +#define _tmp_140_type 1302 +#define _tmp_141_type 1303 +#define _tmp_142_type 1304 +#define _tmp_143_type 1305 +#define _tmp_144_type 1306 +#define _tmp_145_type 1307 +#define _tmp_146_type 1308 +#define _tmp_147_type 1309 +#define _tmp_148_type 1310 +#define _tmp_149_type 1311 +#define _tmp_150_type 1312 +#define _tmp_151_type 1313 +#define _tmp_152_type 1314 +#define _loop1_153_type 1315 +#define _loop1_154_type 1316 +#define _tmp_155_type 1317 +#define _tmp_156_type 1318 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -520,8 +524,10 @@ static expr_ty starred_expression_rule(Parser *p); static KeywordOrStarred* kwarg_or_starred_rule(Parser *p); static KeywordOrStarred* kwarg_or_double_starred_rule(Parser *p); static expr_ty star_targets_rule(Parser *p); -static asdl_seq* star_targets_seq_rule(Parser *p); +static asdl_seq* star_targets_list_seq_rule(Parser *p); +static asdl_seq* star_targets_tuple_seq_rule(Parser *p); static expr_ty star_target_rule(Parser *p); +static expr_ty target_with_star_atom_rule(Parser *p); static expr_ty star_atom_rule(Parser *p); static expr_ty single_target_rule(Parser *p); static expr_ty single_subscript_attribute_target_rule(Parser *p); @@ -671,21 +677,21 @@ static asdl_seq *_gather_115_rule(Parser *p); static asdl_seq *_loop0_117_rule(Parser *p); static asdl_seq *_loop0_119_rule(Parser *p); static asdl_seq *_gather_118_rule(Parser *p); -static void *_tmp_120_rule(Parser *p); -static asdl_seq *_loop0_122_rule(Parser *p); -static asdl_seq *_gather_121_rule(Parser *p); -static asdl_seq *_loop0_124_rule(Parser *p); -static asdl_seq *_gather_123_rule(Parser *p); -static void *_tmp_125_rule(Parser *p); -static asdl_seq *_loop0_126_rule(Parser *p); +static asdl_seq *_loop1_120_rule(Parser *p); +static void *_tmp_121_rule(Parser *p); +static asdl_seq *_loop0_123_rule(Parser *p); +static asdl_seq *_gather_122_rule(Parser *p); +static asdl_seq *_loop0_125_rule(Parser *p); +static asdl_seq *_gather_124_rule(Parser *p); +static void *_tmp_126_rule(Parser *p); static asdl_seq *_loop0_127_rule(Parser *p); static asdl_seq *_loop0_128_rule(Parser *p); -static void *_tmp_129_rule(Parser *p); +static asdl_seq *_loop0_129_rule(Parser *p); static void *_tmp_130_rule(Parser *p); -static asdl_seq *_loop0_131_rule(Parser *p); -static void *_tmp_132_rule(Parser *p); -static asdl_seq *_loop0_133_rule(Parser *p); -static void *_tmp_134_rule(Parser *p); +static void *_tmp_131_rule(Parser *p); +static asdl_seq *_loop0_132_rule(Parser *p); +static void *_tmp_133_rule(Parser *p); +static asdl_seq *_loop0_134_rule(Parser *p); static void *_tmp_135_rule(Parser *p); static void *_tmp_136_rule(Parser *p); static void *_tmp_137_rule(Parser *p); @@ -702,10 +708,12 @@ static void *_tmp_147_rule(Parser *p); static void *_tmp_148_rule(Parser *p); static void *_tmp_149_rule(Parser *p); static void *_tmp_150_rule(Parser *p); -static asdl_seq *_loop1_151_rule(Parser *p); -static asdl_seq *_loop1_152_rule(Parser *p); -static void *_tmp_153_rule(Parser *p); -static void *_tmp_154_rule(Parser *p); +static void *_tmp_151_rule(Parser *p); +static void *_tmp_152_rule(Parser *p); +static asdl_seq *_loop1_153_rule(Parser *p); +static asdl_seq *_loop1_154_rule(Parser *p); +static void *_tmp_155_rule(Parser *p); +static void *_tmp_156_rule(Parser *p); // file: statements? $ @@ -12791,9 +12799,9 @@ star_targets_rule(Parser *p) return _res; } -// star_targets_seq: ','.star_target+ ','? +// star_targets_list_seq: ','.star_target+ ','? static asdl_seq* -star_targets_seq_rule(Parser *p) +star_targets_list_seq_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -12807,7 +12815,7 @@ star_targets_seq_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_targets_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); + D(fprintf(stderr, "%*c> star_targets_list_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings asdl_seq * a; @@ -12817,7 +12825,7 @@ star_targets_seq_rule(Parser *p) (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? ) { - D(fprintf(stderr, "%*c+ star_targets_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); + D(fprintf(stderr, "%*c+ star_targets_list_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.star_target+ ','?")); _res = a; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -12827,7 +12835,7 @@ star_targets_seq_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_targets_seq[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s star_targets_list_seq[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','.star_target+ ','?")); } _res = NULL; @@ -12836,11 +12844,82 @@ star_targets_seq_rule(Parser *p) return _res; } -// star_target: -// | '*' (!'*' star_target) -// | t_primary '.' NAME !t_lookahead -// | t_primary '[' slices ']' !t_lookahead -// | star_atom +// star_targets_tuple_seq: star_target ((',' star_target))+ ','? | star_target ',' +static asdl_seq* +star_targets_tuple_seq_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + asdl_seq* _res = NULL; + int _mark = p->mark; + { // star_target ((',' star_target))+ ','? + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> star_targets_tuple_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_target ((',' star_target))+ ','?")); + void *_opt_var; + UNUSED(_opt_var); // Silence compiler warnings + expr_ty a; + asdl_seq * b; + if ( + (a = star_target_rule(p)) // star_target + && + (b = _loop1_120_rule(p)) // ((',' star_target))+ + && + (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? + ) + { + D(fprintf(stderr, "%*c+ star_targets_tuple_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_target ((',' star_target))+ ','?")); + _res = _PyPegen_seq_insert_in_front ( p , a , b ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s star_targets_tuple_seq[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_target ((',' star_target))+ ','?")); + } + { // star_target ',' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> star_targets_tuple_seq[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_target ','")); + Token * _literal; + expr_ty a; + if ( + (a = star_target_rule(p)) // star_target + && + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + ) + { + D(fprintf(stderr, "%*c+ star_targets_tuple_seq[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_target ','")); + _res = _PyPegen_singleton_seq ( p , a ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s star_targets_tuple_seq[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_target ','")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// star_target: '*' (!'*' star_target) | target_with_star_atom static expr_ty star_target_rule(Parser *p) { @@ -12875,7 +12954,7 @@ star_target_rule(Parser *p) if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (a = _tmp_120_rule(p)) // !'*' star_target + (a = _tmp_121_rule(p)) // !'*' star_target ) { D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (!'*' star_target)")); @@ -12900,12 +12979,65 @@ star_target_rule(Parser *p) D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'*' (!'*' star_target)")); } + { // target_with_star_atom + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target_with_star_atom")); + expr_ty target_with_star_atom_var; + if ( + (target_with_star_atom_var = target_with_star_atom_rule(p)) // target_with_star_atom + ) + { + D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target_with_star_atom")); + _res = target_with_star_atom_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target_with_star_atom")); + } + _res = NULL; + done: + _PyPegen_insert_memo(p, _mark, star_target_type, _res); + D(p->level--); + return _res; +} + +// target_with_star_atom: +// | t_primary '.' NAME !t_lookahead +// | t_primary '[' slices ']' !t_lookahead +// | star_atom +static expr_ty +target_with_star_atom_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + expr_ty _res = NULL; + if (_PyPegen_is_memoized(p, target_with_star_atom_type, &_res)) { + D(p->level--); + return _res; + } + int _mark = p->mark; + if (p->mark == p->fill && _PyPegen_fill_token(p) < 0) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + int _start_lineno = p->tokens[_mark]->lineno; + UNUSED(_start_lineno); // Only used by EXTRA macro + int _start_col_offset = p->tokens[_mark]->col_offset; + UNUSED(_start_col_offset); // Only used by EXTRA macro { // t_primary '.' NAME !t_lookahead if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); + D(fprintf(stderr, "%*c> target_with_star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); Token * _literal; expr_ty a; expr_ty b; @@ -12919,7 +13051,7 @@ star_target_rule(Parser *p) _PyPegen_lookahead(0, t_lookahead_rule, p) ) { - D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); + D(fprintf(stderr, "%*c+ target_with_star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '.' NAME !t_lookahead")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -12938,7 +13070,7 @@ star_target_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s target_with_star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "t_primary '.' NAME !t_lookahead")); } { // t_primary '[' slices ']' !t_lookahead @@ -12946,7 +13078,7 @@ star_target_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); + D(fprintf(stderr, "%*c> target_with_star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); Token * _literal; Token * _literal_1; expr_ty a; @@ -12963,7 +13095,7 @@ star_target_rule(Parser *p) _PyPegen_lookahead(0, t_lookahead_rule, p) ) { - D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); + D(fprintf(stderr, "%*c+ target_with_star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -12982,7 +13114,7 @@ star_target_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s target_with_star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "t_primary '[' slices ']' !t_lookahead")); } { // star_atom @@ -12990,32 +13122,32 @@ star_target_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_atom")); + D(fprintf(stderr, "%*c> target_with_star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_atom")); expr_ty star_atom_var; if ( (star_atom_var = star_atom_rule(p)) // star_atom ) { - D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_atom")); + D(fprintf(stderr, "%*c+ target_with_star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_atom")); _res = star_atom_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s star_target[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s target_with_star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_atom")); } _res = NULL; done: - _PyPegen_insert_memo(p, _mark, star_target_type, _res); + _PyPegen_insert_memo(p, _mark, target_with_star_atom_type, _res); D(p->level--); return _res; } // star_atom: // | NAME -// | '(' star_target ')' -// | '(' star_targets_seq? ')' -// | '[' star_targets_seq? ']' +// | '(' target_with_star_atom ')' +// | '(' star_targets_tuple_seq? ')' +// | '[' star_targets_list_seq? ']' static expr_ty star_atom_rule(Parser *p) { @@ -13059,24 +13191,24 @@ star_atom_rule(Parser *p) D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "NAME")); } - { // '(' star_target ')' + { // '(' target_with_star_atom ')' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' star_target ')'")); + D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' target_with_star_atom ')'")); Token * _literal; Token * _literal_1; expr_ty a; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' && - (a = star_target_rule(p)) // star_target + (a = target_with_star_atom_rule(p)) // target_with_star_atom && (_literal_1 = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' star_target ')'")); + D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' target_with_star_atom ')'")); _res = _PyPegen_set_expr_context ( p , a , Store ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -13087,26 +13219,26 @@ star_atom_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' star_target ')'")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' target_with_star_atom ')'")); } - { // '(' star_targets_seq? ')' + { // '(' star_targets_tuple_seq? ')' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' star_targets_seq? ')'")); + D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' star_targets_tuple_seq? ')'")); Token * _literal; Token * _literal_1; void *a; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' && - (a = star_targets_seq_rule(p), 1) // star_targets_seq? + (a = star_targets_tuple_seq_rule(p), 1) // star_targets_tuple_seq? && (_literal_1 = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' star_targets_seq? ')'")); + D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' star_targets_tuple_seq? ')'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -13126,26 +13258,26 @@ star_atom_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' star_targets_seq? ')'")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' star_targets_tuple_seq? ')'")); } - { // '[' star_targets_seq? ']' + { // '[' star_targets_list_seq? ']' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'[' star_targets_seq? ']'")); + D(fprintf(stderr, "%*c> star_atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'[' star_targets_list_seq? ']'")); Token * _literal; Token * _literal_1; void *a; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' && - (a = star_targets_seq_rule(p), 1) // star_targets_seq? + (a = star_targets_list_seq_rule(p), 1) // star_targets_list_seq? && (_literal_1 = _PyPegen_expect_token(p, 10)) // token=']' ) { - D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'[' star_targets_seq? ']'")); + D(fprintf(stderr, "%*c+ star_atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'[' star_targets_list_seq? ']'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -13165,7 +13297,7 @@ star_atom_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s star_atom[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'[' star_targets_seq? ']'")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'[' star_targets_list_seq? ']'")); } _res = NULL; done: @@ -13397,7 +13529,7 @@ del_targets_rule(Parser *p) UNUSED(_opt_var); // Silence compiler warnings asdl_seq * a; if ( - (a = _gather_121_rule(p)) // ','.del_target+ + (a = _gather_122_rule(p)) // ','.del_target+ && (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? ) @@ -13738,7 +13870,7 @@ targets_rule(Parser *p) UNUSED(_opt_var); // Silence compiler warnings asdl_seq * a; if ( - (a = _gather_123_rule(p)) // ','.target+ + (a = _gather_124_rule(p)) // ','.target+ && (_opt_var = _PyPegen_expect_token(p, 12), 1) // ','? ) @@ -14452,7 +14584,7 @@ invalid_arguments_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_opt_var = _tmp_125_rule(p), 1) // [args | expression for_if_clauses] + (_opt_var = _tmp_126_rule(p), 1) // [args | expression for_if_clauses] ) { D(fprintf(stderr, "%*c+ invalid_arguments[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses ',' [args | expression for_if_clauses]")); @@ -14710,7 +14842,7 @@ invalid_assignment_rule(Parser *p) D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expression ',' star_named_expressions* ':' expression")); Token * _literal; Token * _literal_1; - asdl_seq * _loop0_126_var; + asdl_seq * _loop0_127_var; expr_ty a; expr_ty expression_var; if ( @@ -14718,7 +14850,7 @@ invalid_assignment_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_loop0_126_var = _loop0_126_rule(p)) // star_named_expressions* + (_loop0_127_var = _loop0_127_rule(p)) // star_named_expressions* && (_literal_1 = _PyPegen_expect_token(p, 11)) // token=':' && @@ -14775,10 +14907,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* star_expressions '='")); Token * _literal; - asdl_seq * _loop0_127_var; + asdl_seq * _loop0_128_var; expr_ty a; if ( - (_loop0_127_var = _loop0_127_rule(p)) // ((star_targets '='))* + (_loop0_128_var = _loop0_128_rule(p)) // ((star_targets '='))* && (a = star_expressions_rule(p)) // star_expressions && @@ -14805,10 +14937,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* yield_expr '='")); Token * _literal; - asdl_seq * _loop0_128_var; + asdl_seq * _loop0_129_var; expr_ty a; if ( - (_loop0_128_var = _loop0_128_rule(p)) // ((star_targets '='))* + (_loop0_129_var = _loop0_129_rule(p)) // ((star_targets '='))* && (a = yield_expr_rule(p)) // yield_expr && @@ -14834,7 +14966,7 @@ invalid_assignment_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); - void *_tmp_129_var; + void *_tmp_130_var; expr_ty a; AugOperator* augassign_var; if ( @@ -14842,7 +14974,7 @@ invalid_assignment_rule(Parser *p) && (augassign_var = augassign_rule(p)) // augassign && - (_tmp_129_var = _tmp_129_rule(p)) // yield_expr | star_expressions + (_tmp_130_var = _tmp_130_rule(p)) // yield_expr | star_expressions ) { D(fprintf(stderr, "%*c+ invalid_assignment[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); @@ -15098,11 +15230,11 @@ invalid_comprehension_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_comprehension[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('[' | '(' | '{') starred_expression for_if_clauses")); - void *_tmp_130_var; + void *_tmp_131_var; expr_ty a; asdl_seq* for_if_clauses_var; if ( - (_tmp_130_var = _tmp_130_rule(p)) // '[' | '(' | '{' + (_tmp_131_var = _tmp_131_rule(p)) // '[' | '(' | '{' && (a = starred_expression_rule(p)) // starred_expression && @@ -15199,13 +15331,13 @@ invalid_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default* (slash_with_default | param_with_default+) param_no_default")); - asdl_seq * _loop0_131_var; - void *_tmp_132_var; + asdl_seq * _loop0_132_var; + void *_tmp_133_var; arg_ty param_no_default_var; if ( - (_loop0_131_var = _loop0_131_rule(p)) // param_no_default* + (_loop0_132_var = _loop0_132_rule(p)) // param_no_default* && - (_tmp_132_var = _tmp_132_rule(p)) // slash_with_default | param_with_default+ + (_tmp_133_var = _tmp_133_rule(p)) // slash_with_default | param_with_default+ && (param_no_default_var = param_no_default_rule(p)) // param_no_default ) @@ -15247,13 +15379,13 @@ invalid_lambda_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_lambda_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default")); - asdl_seq * _loop0_133_var; - void *_tmp_134_var; + asdl_seq * _loop0_134_var; + void *_tmp_135_var; arg_ty lambda_param_no_default_var; if ( - (_loop0_133_var = _loop0_133_rule(p)) // lambda_param_no_default* + (_loop0_134_var = _loop0_134_rule(p)) // lambda_param_no_default* && - (_tmp_134_var = _tmp_134_rule(p)) // lambda_slash_with_default | lambda_param_with_default+ + (_tmp_135_var = _tmp_135_rule(p)) // lambda_slash_with_default | lambda_param_with_default+ && (lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default ) @@ -15295,11 +15427,11 @@ invalid_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); Token * _literal; - void *_tmp_135_var; + void *_tmp_136_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_135_var = _tmp_135_rule(p)) // ')' | ',' (')' | '**') + (_tmp_136_var = _tmp_136_rule(p)) // ')' | ',' (')' | '**') ) { D(fprintf(stderr, "%*c+ invalid_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); @@ -15369,11 +15501,11 @@ invalid_lambda_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_lambda_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); Token * _literal; - void *_tmp_136_var; + void *_tmp_137_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_136_var = _tmp_136_rule(p)) // ':' | ',' (':' | '**') + (_tmp_137_var = _tmp_137_rule(p)) // ':' | ',' (':' | '**') ) { D(fprintf(stderr, "%*c+ invalid_lambda_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); @@ -16882,12 +17014,12 @@ _loop1_22_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_22[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_137_var; + void *_tmp_138_var; while ( - (_tmp_137_var = _tmp_137_rule(p)) // star_targets '=' + (_tmp_138_var = _tmp_138_rule(p)) // star_targets '=' ) { - _res = _tmp_137_var; + _res = _tmp_138_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -17390,12 +17522,12 @@ _loop0_31_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_31[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_138_var; + void *_tmp_139_var; while ( - (_tmp_138_var = _tmp_138_rule(p)) // '.' | '...' + (_tmp_139_var = _tmp_139_rule(p)) // '.' | '...' ) { - _res = _tmp_138_var; + _res = _tmp_139_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -17456,12 +17588,12 @@ _loop1_32_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_32[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_139_var; + void *_tmp_140_var; while ( - (_tmp_139_var = _tmp_139_rule(p)) // '.' | '...' + (_tmp_140_var = _tmp_140_rule(p)) // '.' | '...' ) { - _res = _tmp_139_var; + _res = _tmp_140_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -19618,12 +19750,12 @@ _loop1_68_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_68[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('@' named_expression NEWLINE)")); - void *_tmp_140_var; + void *_tmp_141_var; while ( - (_tmp_140_var = _tmp_140_rule(p)) // '@' named_expression NEWLINE + (_tmp_141_var = _tmp_141_rule(p)) // '@' named_expression NEWLINE ) { - _res = _tmp_140_var; + _res = _tmp_141_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -19736,12 +19868,12 @@ _loop1_70_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_70[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_expression)")); - void *_tmp_141_var; + void *_tmp_142_var; while ( - (_tmp_141_var = _tmp_141_rule(p)) // ',' star_expression + (_tmp_142_var = _tmp_142_rule(p)) // ',' star_expression ) { - _res = _tmp_141_var; + _res = _tmp_142_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -19921,12 +20053,12 @@ _loop1_73_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_73[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' expression)")); - void *_tmp_142_var; + void *_tmp_143_var; while ( - (_tmp_142_var = _tmp_142_rule(p)) // ',' expression + (_tmp_143_var = _tmp_143_rule(p)) // ',' expression ) { - _res = _tmp_142_var; + _res = _tmp_143_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -20951,12 +21083,12 @@ _loop1_88_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_88[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('or' conjunction)")); - void *_tmp_143_var; + void *_tmp_144_var; while ( - (_tmp_143_var = _tmp_143_rule(p)) // 'or' conjunction + (_tmp_144_var = _tmp_144_rule(p)) // 'or' conjunction ) { - _res = _tmp_143_var; + _res = _tmp_144_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -21022,12 +21154,12 @@ _loop1_89_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_89[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('and' inversion)")); - void *_tmp_144_var; + void *_tmp_145_var; while ( - (_tmp_144_var = _tmp_144_rule(p)) // 'and' inversion + (_tmp_145_var = _tmp_145_rule(p)) // 'and' inversion ) { - _res = _tmp_144_var; + _res = _tmp_145_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -21943,12 +22075,12 @@ _loop0_104_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_104[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_145_var; + void *_tmp_146_var; while ( - (_tmp_145_var = _tmp_145_rule(p)) // 'if' disjunction + (_tmp_146_var = _tmp_146_rule(p)) // 'if' disjunction ) { - _res = _tmp_145_var; + _res = _tmp_146_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -22009,12 +22141,12 @@ _loop0_105_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_105[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_146_var; + void *_tmp_147_var; while ( - (_tmp_146_var = _tmp_146_rule(p)) // 'if' disjunction + (_tmp_147_var = _tmp_147_rule(p)) // 'if' disjunction ) { - _res = _tmp_146_var; + _res = _tmp_147_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -22080,7 +22212,7 @@ _loop0_107_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_147_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_148_rule(p)) // starred_expression | named_expression !'=' ) { _res = elem; @@ -22143,7 +22275,7 @@ _gather_106_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_147_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_148_rule(p)) // starred_expression | named_expression !'=' && (seq = _loop0_107_rule(p)) // _loop0_107 ) @@ -22689,12 +22821,12 @@ _loop0_117_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_117[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_148_var; + void *_tmp_149_var; while ( - (_tmp_148_var = _tmp_148_rule(p)) // ',' star_target + (_tmp_149_var = _tmp_149_rule(p)) // ',' star_target ) { - _res = _tmp_148_var; + _res = _tmp_149_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -22842,9 +22974,80 @@ _gather_118_rule(Parser *p) return _res; } -// _tmp_120: !'*' star_target +// _loop1_120: (',' star_target) +static asdl_seq * +_loop1_120_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void *_res = NULL; + int _mark = p->mark; + int _start_mark = p->mark; + void **_children = PyMem_Malloc(sizeof(void *)); + if (!_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + ssize_t _children_capacity = 1; + ssize_t _n = 0; + { // (',' star_target) + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _loop1_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); + void *_tmp_150_var; + while ( + (_tmp_150_var = _tmp_150_rule(p)) // ',' star_target + ) + { + _res = _tmp_150_var; + if (_n == _children_capacity) { + _children_capacity *= 2; + void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); + if (!_new_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + _children = _new_children; + } + _children[_n++] = _res; + _mark = p->mark; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _loop1_120[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(',' star_target)")); + } + if (_n == 0 || p->error_indicator) { + PyMem_Free(_children); + D(p->level--); + return NULL; + } + asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); + if (!_seq) { + PyMem_Free(_children); + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); + PyMem_Free(_children); + _PyPegen_insert_memo(p, _start_mark, _loop1_120_type, _seq); + D(p->level--); + return _seq; +} + +// _tmp_121: !'*' star_target static void * -_tmp_120_rule(Parser *p) +_tmp_121_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -22858,7 +23061,7 @@ _tmp_120_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); + D(fprintf(stderr, "%*c> _tmp_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); expr_ty star_target_var; if ( _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 16) // token='*' @@ -22866,12 +23069,12 @@ _tmp_120_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_120[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); + D(fprintf(stderr, "%*c+ _tmp_121[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!'*' star_target")); _res = star_target_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_120[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_121[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "!'*' star_target")); } _res = NULL; @@ -22880,9 +23083,9 @@ _tmp_120_rule(Parser *p) return _res; } -// _loop0_122: ',' del_target +// _loop0_123: ',' del_target static asdl_seq * -_loop0_122_rule(Parser *p) +_loop0_123_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -22906,7 +23109,7 @@ _loop0_122_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' del_target")); + D(fprintf(stderr, "%*c> _loop0_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' del_target")); Token * _literal; expr_ty elem; while ( @@ -22937,7 +23140,7 @@ _loop0_122_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_122[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_123[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' del_target")); } asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); @@ -22950,14 +23153,14 @@ _loop0_122_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_122_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_123_type, _seq); D(p->level--); return _seq; } -// _gather_121: del_target _loop0_122 +// _gather_122: del_target _loop0_123 static asdl_seq * -_gather_121_rule(Parser *p) +_gather_122_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -22966,27 +23169,27 @@ _gather_121_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // del_target _loop0_122 + { // del_target _loop0_123 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "del_target _loop0_122")); + D(fprintf(stderr, "%*c> _gather_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "del_target _loop0_123")); expr_ty elem; asdl_seq * seq; if ( (elem = del_target_rule(p)) // del_target && - (seq = _loop0_122_rule(p)) // _loop0_122 + (seq = _loop0_123_rule(p)) // _loop0_123 ) { - D(fprintf(stderr, "%*c+ _gather_121[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "del_target _loop0_122")); + D(fprintf(stderr, "%*c+ _gather_122[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "del_target _loop0_123")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_121[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "del_target _loop0_122")); + D(fprintf(stderr, "%*c%s _gather_122[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "del_target _loop0_123")); } _res = NULL; done: @@ -22994,9 +23197,9 @@ _gather_121_rule(Parser *p) return _res; } -// _loop0_124: ',' target +// _loop0_125: ',' target static asdl_seq * -_loop0_124_rule(Parser *p) +_loop0_125_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23020,7 +23223,7 @@ _loop0_124_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_124[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' target")); + D(fprintf(stderr, "%*c> _loop0_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' target")); Token * _literal; expr_ty elem; while ( @@ -23051,7 +23254,7 @@ _loop0_124_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_124[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_125[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' target")); } asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); @@ -23064,14 +23267,14 @@ _loop0_124_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_124_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_125_type, _seq); D(p->level--); return _seq; } -// _gather_123: target _loop0_124 +// _gather_124: target _loop0_125 static asdl_seq * -_gather_123_rule(Parser *p) +_gather_124_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23080,27 +23283,27 @@ _gather_123_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // target _loop0_124 + { // target _loop0_125 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target _loop0_124")); + D(fprintf(stderr, "%*c> _gather_124[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target _loop0_125")); expr_ty elem; asdl_seq * seq; if ( (elem = target_rule(p)) // target && - (seq = _loop0_124_rule(p)) // _loop0_124 + (seq = _loop0_125_rule(p)) // _loop0_125 ) { - D(fprintf(stderr, "%*c+ _gather_123[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target _loop0_124")); + D(fprintf(stderr, "%*c+ _gather_124[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target _loop0_125")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_123[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target _loop0_124")); + D(fprintf(stderr, "%*c%s _gather_124[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target _loop0_125")); } _res = NULL; done: @@ -23108,9 +23311,9 @@ _gather_123_rule(Parser *p) return _res; } -// _tmp_125: args | expression for_if_clauses +// _tmp_126: args | expression for_if_clauses static void * -_tmp_125_rule(Parser *p) +_tmp_126_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23124,18 +23327,18 @@ _tmp_125_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "args")); + D(fprintf(stderr, "%*c> _tmp_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "args")); expr_ty args_var; if ( (args_var = args_rule(p)) // args ) { - D(fprintf(stderr, "%*c+ _tmp_125[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "args")); + D(fprintf(stderr, "%*c+ _tmp_126[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "args")); _res = args_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_125[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_126[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "args")); } { // expression for_if_clauses @@ -23143,7 +23346,7 @@ _tmp_125_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); + D(fprintf(stderr, "%*c> _tmp_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); expr_ty expression_var; asdl_seq* for_if_clauses_var; if ( @@ -23152,12 +23355,12 @@ _tmp_125_rule(Parser *p) (for_if_clauses_var = for_if_clauses_rule(p)) // for_if_clauses ) { - D(fprintf(stderr, "%*c+ _tmp_125[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); + D(fprintf(stderr, "%*c+ _tmp_126[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses")); _res = _PyPegen_dummy_name(p, expression_var, for_if_clauses_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_125[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_126[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression for_if_clauses")); } _res = NULL; @@ -23166,9 +23369,9 @@ _tmp_125_rule(Parser *p) return _res; } -// _loop0_126: star_named_expressions +// _loop0_127: star_named_expressions static asdl_seq * -_loop0_126_rule(Parser *p) +_loop0_127_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23192,7 +23395,7 @@ _loop0_126_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); + D(fprintf(stderr, "%*c> _loop0_127[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); asdl_seq* star_named_expressions_var; while ( (star_named_expressions_var = star_named_expressions_rule(p)) // star_named_expressions @@ -23214,7 +23417,7 @@ _loop0_126_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_126[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_127[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_named_expressions")); } asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); @@ -23227,14 +23430,14 @@ _loop0_126_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_126_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_127_type, _seq); D(p->level--); return _seq; } -// _loop0_127: (star_targets '=') +// _loop0_128: (star_targets '=') static asdl_seq * -_loop0_127_rule(Parser *p) +_loop0_128_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23258,13 +23461,13 @@ _loop0_127_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_127[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_149_var; + D(fprintf(stderr, "%*c> _loop0_128[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_151_var; while ( - (_tmp_149_var = _tmp_149_rule(p)) // star_targets '=' + (_tmp_151_var = _tmp_151_rule(p)) // star_targets '=' ) { - _res = _tmp_149_var; + _res = _tmp_151_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23280,7 +23483,7 @@ _loop0_127_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_127[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_128[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); @@ -23293,14 +23496,14 @@ _loop0_127_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_127_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_128_type, _seq); D(p->level--); return _seq; } -// _loop0_128: (star_targets '=') +// _loop0_129: (star_targets '=') static asdl_seq * -_loop0_128_rule(Parser *p) +_loop0_129_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23324,13 +23527,13 @@ _loop0_128_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_128[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_150_var; + D(fprintf(stderr, "%*c> _loop0_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_152_var; while ( - (_tmp_150_var = _tmp_150_rule(p)) // star_targets '=' + (_tmp_152_var = _tmp_152_rule(p)) // star_targets '=' ) { - _res = _tmp_150_var; + _res = _tmp_152_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23346,7 +23549,7 @@ _loop0_128_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_128[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_129[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); @@ -23359,14 +23562,14 @@ _loop0_128_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_128_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_129_type, _seq); D(p->level--); return _seq; } -// _tmp_129: yield_expr | star_expressions +// _tmp_130: yield_expr | star_expressions static void * -_tmp_129_rule(Parser *p) +_tmp_130_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23380,18 +23583,18 @@ _tmp_129_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); expr_ty yield_expr_var; if ( (yield_expr_var = yield_expr_rule(p)) // yield_expr ) { - D(fprintf(stderr, "%*c+ _tmp_129[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); _res = yield_expr_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_129[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "yield_expr")); } { // star_expressions @@ -23399,18 +23602,18 @@ _tmp_129_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); expr_ty star_expressions_var; if ( (star_expressions_var = star_expressions_rule(p)) // star_expressions ) { - D(fprintf(stderr, "%*c+ _tmp_129[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); _res = star_expressions_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_129[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_expressions")); } _res = NULL; @@ -23419,9 +23622,9 @@ _tmp_129_rule(Parser *p) return _res; } -// _tmp_130: '[' | '(' | '{' +// _tmp_131: '[' | '(' | '{' static void * -_tmp_130_rule(Parser *p) +_tmp_131_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23435,18 +23638,18 @@ _tmp_130_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' ) { - D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['")); } { // '(' @@ -23454,18 +23657,18 @@ _tmp_130_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' ) { - D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'('")); } { // '{' @@ -23473,18 +23676,18 @@ _tmp_130_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 25)) // token='{' ) { - D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'")); } _res = NULL; @@ -23493,9 +23696,9 @@ _tmp_130_rule(Parser *p) return _res; } -// _loop0_131: param_no_default +// _loop0_132: param_no_default static asdl_seq * -_loop0_131_rule(Parser *p) +_loop0_132_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23519,7 +23722,7 @@ _loop0_131_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); + D(fprintf(stderr, "%*c> _loop0_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); arg_ty param_no_default_var; while ( (param_no_default_var = param_no_default_rule(p)) // param_no_default @@ -23541,7 +23744,7 @@ _loop0_131_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_131[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_132[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_no_default")); } asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); @@ -23554,14 +23757,14 @@ _loop0_131_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_131_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_132_type, _seq); D(p->level--); return _seq; } -// _tmp_132: slash_with_default | param_with_default+ +// _tmp_133: slash_with_default | param_with_default+ static void * -_tmp_132_rule(Parser *p) +_tmp_133_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23575,18 +23778,18 @@ _tmp_132_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "slash_with_default")); + D(fprintf(stderr, "%*c> _tmp_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "slash_with_default")); SlashWithDefault* slash_with_default_var; if ( (slash_with_default_var = slash_with_default_rule(p)) // slash_with_default ) { - D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "slash_with_default")); + D(fprintf(stderr, "%*c+ _tmp_133[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "slash_with_default")); _res = slash_with_default_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_133[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "slash_with_default")); } { // param_with_default+ @@ -23594,18 +23797,18 @@ _tmp_132_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - asdl_seq * _loop1_151_var; + D(fprintf(stderr, "%*c> _tmp_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); + asdl_seq * _loop1_153_var; if ( - (_loop1_151_var = _loop1_151_rule(p)) // param_with_default+ + (_loop1_153_var = _loop1_153_rule(p)) // param_with_default+ ) { - D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - _res = _loop1_151_var; + D(fprintf(stderr, "%*c+ _tmp_133[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); + _res = _loop1_153_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_133[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default+")); } _res = NULL; @@ -23614,9 +23817,9 @@ _tmp_132_rule(Parser *p) return _res; } -// _loop0_133: lambda_param_no_default +// _loop0_134: lambda_param_no_default static asdl_seq * -_loop0_133_rule(Parser *p) +_loop0_134_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23640,7 +23843,7 @@ _loop0_133_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); + D(fprintf(stderr, "%*c> _loop0_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); arg_ty lambda_param_no_default_var; while ( (lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default @@ -23662,7 +23865,7 @@ _loop0_133_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_133[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_134[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_no_default")); } asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena); @@ -23675,14 +23878,14 @@ _loop0_133_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_133_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_134_type, _seq); D(p->level--); return _seq; } -// _tmp_134: lambda_slash_with_default | lambda_param_with_default+ +// _tmp_135: lambda_slash_with_default | lambda_param_with_default+ static void * -_tmp_134_rule(Parser *p) +_tmp_135_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23696,18 +23899,18 @@ _tmp_134_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); + D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); SlashWithDefault* lambda_slash_with_default_var; if ( (lambda_slash_with_default_var = lambda_slash_with_default_rule(p)) // lambda_slash_with_default ) { - D(fprintf(stderr, "%*c+ _tmp_134[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); + D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); _res = lambda_slash_with_default_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_134[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_slash_with_default")); } { // lambda_param_with_default+ @@ -23715,18 +23918,18 @@ _tmp_134_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - asdl_seq * _loop1_152_var; + D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); + asdl_seq * _loop1_154_var; if ( - (_loop1_152_var = _loop1_152_rule(p)) // lambda_param_with_default+ + (_loop1_154_var = _loop1_154_rule(p)) // lambda_param_with_default+ ) { - D(fprintf(stderr, "%*c+ _tmp_134[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - _res = _loop1_152_var; + D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); + _res = _loop1_154_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_134[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default+")); } _res = NULL; @@ -23735,9 +23938,9 @@ _tmp_134_rule(Parser *p) return _res; } -// _tmp_135: ')' | ',' (')' | '**') +// _tmp_136: ')' | ',' (')' | '**') static void * -_tmp_135_rule(Parser *p) +_tmp_136_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23751,18 +23954,18 @@ _tmp_135_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // ',' (')' | '**') @@ -23770,21 +23973,21 @@ _tmp_135_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); Token * _literal; - void *_tmp_153_var; + void *_tmp_155_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_153_var = _tmp_153_rule(p)) // ')' | '**' + (_tmp_155_var = _tmp_155_rule(p)) // ')' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_153_var); + D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_155_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (')' | '**')")); } _res = NULL; @@ -23793,9 +23996,9 @@ _tmp_135_rule(Parser *p) return _res; } -// _tmp_136: ':' | ',' (':' | '**') +// _tmp_137: ':' | ',' (':' | '**') static void * -_tmp_136_rule(Parser *p) +_tmp_137_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23809,18 +24012,18 @@ _tmp_136_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // ',' (':' | '**') @@ -23828,21 +24031,21 @@ _tmp_136_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); Token * _literal; - void *_tmp_154_var; + void *_tmp_156_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_154_var = _tmp_154_rule(p)) // ':' | '**' + (_tmp_156_var = _tmp_156_rule(p)) // ':' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_154_var); + D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_156_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (':' | '**')")); } _res = NULL; @@ -23851,9 +24054,9 @@ _tmp_136_rule(Parser *p) return _res; } -// _tmp_137: star_targets '=' +// _tmp_138: star_targets '=' static void * -_tmp_137_rule(Parser *p) +_tmp_138_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23867,7 +24070,7 @@ _tmp_137_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty z; if ( @@ -23876,7 +24079,7 @@ _tmp_137_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -23886,7 +24089,7 @@ _tmp_137_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -23895,9 +24098,9 @@ _tmp_137_rule(Parser *p) return _res; } -// _tmp_138: '.' | '...' +// _tmp_139: '.' | '...' static void * -_tmp_138_rule(Parser *p) +_tmp_139_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23911,18 +24114,18 @@ _tmp_138_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -23930,18 +24133,18 @@ _tmp_138_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -23950,9 +24153,9 @@ _tmp_138_rule(Parser *p) return _res; } -// _tmp_139: '.' | '...' +// _tmp_140: '.' | '...' static void * -_tmp_139_rule(Parser *p) +_tmp_140_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23966,18 +24169,18 @@ _tmp_139_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -23985,18 +24188,18 @@ _tmp_139_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -24005,9 +24208,9 @@ _tmp_139_rule(Parser *p) return _res; } -// _tmp_140: '@' named_expression NEWLINE +// _tmp_141: '@' named_expression NEWLINE static void * -_tmp_140_rule(Parser *p) +_tmp_141_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24021,7 +24224,7 @@ _tmp_140_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); Token * _literal; expr_ty f; Token * newline_var; @@ -24033,7 +24236,7 @@ _tmp_140_rule(Parser *p) (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); _res = f; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24043,7 +24246,7 @@ _tmp_140_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_141[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@' named_expression NEWLINE")); } _res = NULL; @@ -24052,9 +24255,9 @@ _tmp_140_rule(Parser *p) return _res; } -// _tmp_141: ',' star_expression +// _tmp_142: ',' star_expression static void * -_tmp_141_rule(Parser *p) +_tmp_142_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24068,7 +24271,7 @@ _tmp_141_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c> _tmp_142[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); Token * _literal; expr_ty c; if ( @@ -24077,7 +24280,7 @@ _tmp_141_rule(Parser *p) (c = star_expression_rule(p)) // star_expression ) { - D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24087,7 +24290,7 @@ _tmp_141_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_141[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_142[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_expression")); } _res = NULL; @@ -24096,9 +24299,9 @@ _tmp_141_rule(Parser *p) return _res; } -// _tmp_142: ',' expression +// _tmp_143: ',' expression static void * -_tmp_142_rule(Parser *p) +_tmp_143_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24112,7 +24315,7 @@ _tmp_142_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_142[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); Token * _literal; expr_ty c; if ( @@ -24121,7 +24324,7 @@ _tmp_142_rule(Parser *p) (c = expression_rule(p)) // expression ) { - D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24131,7 +24334,7 @@ _tmp_142_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_142[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' expression")); } _res = NULL; @@ -24140,9 +24343,9 @@ _tmp_142_rule(Parser *p) return _res; } -// _tmp_143: 'or' conjunction +// _tmp_144: 'or' conjunction static void * -_tmp_143_rule(Parser *p) +_tmp_144_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24156,7 +24359,7 @@ _tmp_143_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); Token * _keyword; expr_ty c; if ( @@ -24165,7 +24368,7 @@ _tmp_143_rule(Parser *p) (c = conjunction_rule(p)) // conjunction ) { - D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24175,7 +24378,7 @@ _tmp_143_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'or' conjunction")); } _res = NULL; @@ -24184,9 +24387,9 @@ _tmp_143_rule(Parser *p) return _res; } -// _tmp_144: 'and' inversion +// _tmp_145: 'and' inversion static void * -_tmp_144_rule(Parser *p) +_tmp_145_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24200,7 +24403,7 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); Token * _keyword; expr_ty c; if ( @@ -24209,7 +24412,7 @@ _tmp_144_rule(Parser *p) (c = inversion_rule(p)) // inversion ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24219,7 +24422,7 @@ _tmp_144_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'and' inversion")); } _res = NULL; @@ -24228,9 +24431,9 @@ _tmp_144_rule(Parser *p) return _res; } -// _tmp_145: 'if' disjunction +// _tmp_146: 'if' disjunction static void * -_tmp_145_rule(Parser *p) +_tmp_146_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24244,7 +24447,7 @@ _tmp_145_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -24253,7 +24456,7 @@ _tmp_145_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24263,7 +24466,7 @@ _tmp_145_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -24272,9 +24475,9 @@ _tmp_145_rule(Parser *p) return _res; } -// _tmp_146: 'if' disjunction +// _tmp_147: 'if' disjunction static void * -_tmp_146_rule(Parser *p) +_tmp_147_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24288,7 +24491,7 @@ _tmp_146_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -24297,7 +24500,7 @@ _tmp_146_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24307,7 +24510,7 @@ _tmp_146_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -24316,9 +24519,9 @@ _tmp_146_rule(Parser *p) return _res; } -// _tmp_147: starred_expression | named_expression !'=' +// _tmp_148: starred_expression | named_expression !'=' static void * -_tmp_147_rule(Parser *p) +_tmp_148_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24332,18 +24535,18 @@ _tmp_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); expr_ty starred_expression_var; if ( (starred_expression_var = starred_expression_rule(p)) // starred_expression ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); _res = starred_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression")); } { // named_expression !'=' @@ -24351,7 +24554,7 @@ _tmp_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); + D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); expr_ty named_expression_var; if ( (named_expression_var = named_expression_rule(p)) // named_expression @@ -24359,12 +24562,12 @@ _tmp_147_rule(Parser *p) _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); + D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); _res = named_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "named_expression !'='")); } _res = NULL; @@ -24373,9 +24576,9 @@ _tmp_147_rule(Parser *p) return _res; } -// _tmp_148: ',' star_target +// _tmp_149: ',' star_target static void * -_tmp_148_rule(Parser *p) +_tmp_149_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24389,7 +24592,7 @@ _tmp_148_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -24398,7 +24601,7 @@ _tmp_148_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24408,7 +24611,7 @@ _tmp_148_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -24417,9 +24620,53 @@ _tmp_148_rule(Parser *p) return _res; } -// _tmp_149: star_targets '=' +// _tmp_150: ',' star_target static void * -_tmp_149_rule(Parser *p) +_tmp_150_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // ',' star_target + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + Token * _literal; + expr_ty c; + if ( + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + && + (c = star_target_rule(p)) // star_target + ) + { + D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + _res = c; + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _tmp_151: star_targets '=' +static void * +_tmp_151_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24433,7 +24680,7 @@ _tmp_149_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -24442,12 +24689,12 @@ _tmp_149_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -24456,9 +24703,9 @@ _tmp_149_rule(Parser *p) return _res; } -// _tmp_150: star_targets '=' +// _tmp_152: star_targets '=' static void * -_tmp_150_rule(Parser *p) +_tmp_152_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24472,7 +24719,7 @@ _tmp_150_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -24481,12 +24728,12 @@ _tmp_150_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_152[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_152[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -24495,9 +24742,9 @@ _tmp_150_rule(Parser *p) return _res; } -// _loop1_151: param_with_default +// _loop1_153: param_with_default static asdl_seq * -_loop1_151_rule(Parser *p) +_loop1_153_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24521,7 +24768,7 @@ _loop1_151_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); + D(fprintf(stderr, "%*c> _loop1_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); NameDefaultPair* param_with_default_var; while ( (param_with_default_var = param_with_default_rule(p)) // param_with_default @@ -24543,7 +24790,7 @@ _loop1_151_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_151[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_153[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -24561,14 +24808,14 @@ _loop1_151_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_151_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_153_type, _seq); D(p->level--); return _seq; } -// _loop1_152: lambda_param_with_default +// _loop1_154: lambda_param_with_default static asdl_seq * -_loop1_152_rule(Parser *p) +_loop1_154_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24592,7 +24839,7 @@ _loop1_152_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); + D(fprintf(stderr, "%*c> _loop1_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); NameDefaultPair* lambda_param_with_default_var; while ( (lambda_param_with_default_var = lambda_param_with_default_rule(p)) // lambda_param_with_default @@ -24614,7 +24861,7 @@ _loop1_152_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_152[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -24632,14 +24879,14 @@ _loop1_152_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_152_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_154_type, _seq); D(p->level--); return _seq; } -// _tmp_153: ')' | '**' +// _tmp_155: ')' | '**' static void * -_tmp_153_rule(Parser *p) +_tmp_155_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24653,18 +24900,18 @@ _tmp_153_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // '**' @@ -24672,18 +24919,18 @@ _tmp_153_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -24692,9 +24939,9 @@ _tmp_153_rule(Parser *p) return _res; } -// _tmp_154: ':' | '**' +// _tmp_156: ':' | '**' static void * -_tmp_154_rule(Parser *p) +_tmp_156_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24708,18 +24955,18 @@ _tmp_154_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // '**' @@ -24727,18 +24974,18 @@ _tmp_154_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; From webhook-mailer at python.org Sat Jan 2 20:12:12 2021 From: webhook-mailer at python.org (pablogsal) Date: Sun, 03 Jan 2021 01:12:12 -0000 Subject: [Python-checkins] bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) Message-ID: https://github.com/python/cpython/commit/bd2728b1e8a99ba8f8c2d481f88aeb99b8b8360f commit: bd2728b1e8a99ba8f8c2d481f88aeb99b8b8360f branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-03T01:11:41Z summary: bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) files: A Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst M Lib/test/test_fstring.py M Parser/string_parser.c diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index b53661aa0a46f..2345832abce62 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -332,6 +332,59 @@ def test_ast_line_numbers_multiline_fstring(self): self.assertEqual(binop.left.col_offset, 4) self.assertEqual(binop.right.col_offset, 7) + def test_ast_line_numbers_with_parentheses(self): + expr = """ +x = ( + f" {test(t)}" +)""" + t = ast.parse(expr) + self.assertEqual(type(t), ast.Module) + self.assertEqual(len(t.body), 1) + # check the test(t) location + call = t.body[0].value.values[1].value + self.assertEqual(type(call), ast.Call) + self.assertEqual(call.lineno, 3) + self.assertEqual(call.end_lineno, 3) + self.assertEqual(call.col_offset, 8) + self.assertEqual(call.end_col_offset, 15) + + expr = """ +x = ( + 'PERL_MM_OPT', ( + f'wat' + f'some_string={f(x)} ' + f'wat' + ), +) +""" + t = ast.parse(expr) + self.assertEqual(type(t), ast.Module) + self.assertEqual(len(t.body), 1) + # check the fstring + fstring = t.body[0].value.elts[1] + self.assertEqual(type(fstring), ast.JoinedStr) + self.assertEqual(len(fstring.values), 3) + wat1, middle, wat2 = fstring.values + # check the first wat + self.assertEqual(type(wat1), ast.Constant) + self.assertEqual(wat1.lineno, 4) + self.assertEqual(wat1.end_lineno, 6) + self.assertEqual(wat1.col_offset, 12) + self.assertEqual(wat1.end_col_offset, 18) + # check the call + call = middle.value + self.assertEqual(type(call), ast.Call) + self.assertEqual(call.lineno, 5) + self.assertEqual(call.end_lineno, 5) + self.assertEqual(call.col_offset, 27) + self.assertEqual(call.end_col_offset, 31) + # check the second wat + self.assertEqual(type(wat2), ast.Constant) + self.assertEqual(wat2.lineno, 4) + self.assertEqual(wat2.end_lineno, 6) + self.assertEqual(wat2.col_offset, 12) + self.assertEqual(wat2.end_col_offset, 18) + def test_docstring(self): def f(): f'''Not a docstring''' diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst new file mode 100644 index 0000000000000..10314fd650fa6 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst @@ -0,0 +1,2 @@ +Fix the column offsets for f-strings :mod:`ast` nodes surrounded by +parentheses and for nodes that spawn multiple lines. Patch by Pablo Galindo. diff --git a/Parser/string_parser.c b/Parser/string_parser.c index 09b8c35106e76..a41f41ce2784d 100644 --- a/Parser/string_parser.c +++ b/Parser/string_parser.c @@ -405,7 +405,7 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end, Parser *p2 = _PyPegen_Parser_New(tok, Py_fstring_input, p->flags, p->feature_version, NULL, p->arena); p2->starting_lineno = t->lineno + lines - 1; - p2->starting_col_offset = p->tok->first_lineno == p->tok->lineno ? t->col_offset + cols : cols; + p2->starting_col_offset = t->col_offset + cols; expr = _PyPegen_run_parser(p2); From webhook-mailer at python.org Sat Jan 2 20:33:10 2021 From: webhook-mailer at python.org (pablogsal) Date: Sun, 03 Jan 2021 01:33:10 -0000 Subject: [Python-checkins] [3.9] bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) (GH-24069) Message-ID: https://github.com/python/cpython/commit/bfc413ce4fa37ccb889757388102c7755e057bf5 commit: bfc413ce4fa37ccb889757388102c7755e057bf5 branch: 3.9 author: Pablo Galindo committer: pablogsal date: 2021-01-03T01:32:43Z summary: [3.9] bpo-42806: Fix ast locations of f-strings inside parentheses (GH-24067) (GH-24069) (cherry picked from commit bd2728b1e8a99ba8f8c2d481f88aeb99b8b8360f) Co-authored-by: Pablo Galindo files: A Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst M Lib/test/test_fstring.py M Parser/pegen/parse_string.c diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 2ae815aab18f6..2f08d35f26dc3 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -332,6 +332,59 @@ def test_ast_line_numbers_multiline_fstring(self): self.assertEqual(binop.left.col_offset, 4) self.assertEqual(binop.right.col_offset, 7) + def test_ast_line_numbers_with_parentheses(self): + expr = """ +x = ( + f" {test(t)}" +)""" + t = ast.parse(expr) + self.assertEqual(type(t), ast.Module) + self.assertEqual(len(t.body), 1) + # check the test(t) location + call = t.body[0].value.values[1].value + self.assertEqual(type(call), ast.Call) + self.assertEqual(call.lineno, 3) + self.assertEqual(call.end_lineno, 3) + self.assertEqual(call.col_offset, 8) + self.assertEqual(call.end_col_offset, 15) + + expr = """ +x = ( + 'PERL_MM_OPT', ( + f'wat' + f'some_string={f(x)} ' + f'wat' + ), +) +""" + t = ast.parse(expr) + self.assertEqual(type(t), ast.Module) + self.assertEqual(len(t.body), 1) + # check the fstring + fstring = t.body[0].value.elts[1] + self.assertEqual(type(fstring), ast.JoinedStr) + self.assertEqual(len(fstring.values), 3) + wat1, middle, wat2 = fstring.values + # check the first wat + self.assertEqual(type(wat1), ast.Constant) + self.assertEqual(wat1.lineno, 4) + self.assertEqual(wat1.end_lineno, 6) + self.assertEqual(wat1.col_offset, 12) + self.assertEqual(wat1.end_col_offset, 18) + # check the call + call = middle.value + self.assertEqual(type(call), ast.Call) + self.assertEqual(call.lineno, 5) + self.assertEqual(call.end_lineno, 5) + self.assertEqual(call.col_offset, 27) + self.assertEqual(call.end_col_offset, 31) + # check the second wat + self.assertEqual(type(wat2), ast.Constant) + self.assertEqual(wat2.lineno, 4) + self.assertEqual(wat2.end_lineno, 6) + self.assertEqual(wat2.col_offset, 12) + self.assertEqual(wat2.end_col_offset, 18) + def test_docstring(self): def f(): f'''Not a docstring''' diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst new file mode 100644 index 0000000000000..10314fd650fa6 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst @@ -0,0 +1,2 @@ +Fix the column offsets for f-strings :mod:`ast` nodes surrounded by +parentheses and for nodes that spawn multiple lines. Patch by Pablo Galindo. diff --git a/Parser/pegen/parse_string.c b/Parser/pegen/parse_string.c index fb0c4aff9d3d0..c852e5b827c0c 100644 --- a/Parser/pegen/parse_string.c +++ b/Parser/pegen/parse_string.c @@ -410,7 +410,7 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end, Parser *p2 = _PyPegen_Parser_New(tok, Py_fstring_input, p->flags, p->feature_version, NULL, p->arena); p2->starting_lineno = t->lineno + lines - 1; - p2->starting_col_offset = p->tok->first_lineno == p->tok->lineno ? t->col_offset + cols : cols; + p2->starting_col_offset = t->col_offset + cols; expr = _PyPegen_run_parser(p2); From webhook-mailer at python.org Sat Jan 2 23:38:12 2021 From: webhook-mailer at python.org (pablogsal) Date: Sun, 03 Jan 2021 04:38:12 -0000 Subject: [Python-checkins] bpo-42093: Tweak the what's new message about the new LOAD_ATTR opcode cache (GH-24070) Message-ID: https://github.com/python/cpython/commit/9e8fe1986cb4205fb9f883c89b9d5d76a9847e0b commit: 9e8fe1986cb4205fb9f883c89b9d5d76a9847e0b branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-03T04:37:46Z summary: bpo-42093: Tweak the what's new message about the new LOAD_ATTR opcode cache (GH-24070) files: M Doc/whatsnew/3.10.rst diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index be529d75e13c0..4181eba81cf13 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -426,9 +426,11 @@ Optimizations average. (Contributed by Victor Stinner in :issue:`41006`.) -* The ``LOAD_ATTR`` instruction now uses new "per opcode cache" mechanism. - It is about 36% faster now. (Contributed by Pablo Galindo and Yury Selivanov - in :issue:`42093`, based on ideas implemented originally in PyPy and MicroPython.) +* The ``LOAD_ATTR`` instruction now uses new "per opcode cache" mechanism. It + is about 36% faster now. This makes optimized ``LOAD_ATTR`` instructions the + current most performance attribute access method (faster than slots). + (Contributed by Pablo Galindo and Yury Selivanov in :issue:`42093`, based on + ideas implemented originally in PyPy and MicroPython.) * When building Python with ``--enable-optimizations`` now ``-fno-semantic-interposition`` is added to both the compile and link line. From webhook-mailer at python.org Sun Jan 3 07:18:31 2021 From: webhook-mailer at python.org (vstinner) Date: Sun, 03 Jan 2021 12:18:31 -0000 Subject: [Python-checkins] bpo-42814: Fix undefined behavior in Objects/genericaliasobject.c (GH-24073) Message-ID: https://github.com/python/cpython/commit/5d3553b0a8959e7505bbec4de03077dbf135ee4b commit: 5d3553b0a8959e7505bbec4de03077dbf135ee4b branch: master author: Zackery Spytz committer: vstinner date: 2021-01-03T13:18:25+01:00 summary: bpo-42814: Fix undefined behavior in Objects/genericaliasobject.c (GH-24073) In is_typing_name(), va_end() is not always called before the function returns. It is undefined behavior to call va_start() without also calling va_end(). files: A Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst M Objects/genericaliasobject.c diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst new file mode 100644 index 0000000000000..6978c36f98c96 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst @@ -0,0 +1 @@ +Fix undefined behavior in ``Objects/genericaliasobject.c``. diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c index 4cc82ffcdf39a..8fae83b27297d 100644 --- a/Objects/genericaliasobject.c +++ b/Objects/genericaliasobject.c @@ -173,6 +173,7 @@ is_typing_name(PyObject *obj, int num, ...) break; } } + va_end(names); if (!hit) { return 0; } @@ -184,7 +185,6 @@ is_typing_name(PyObject *obj, int num, ...) && _PyUnicode_EqualToASCIIString(module, "typing"); Py_DECREF(module); - va_end(names); return res; } From webhook-mailer at python.org Sun Jan 3 07:35:30 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 03 Jan 2021 12:35:30 -0000 Subject: [Python-checkins] bpo-38308: Fix the "versionchanged" for the *weights* of harmonic_mean() (GH-23919) Message-ID: https://github.com/python/cpython/commit/66136768615472a8d1a18b5018095b9737dbab8c commit: 66136768615472a8d1a18b5018095b9737dbab8c branch: master author: Zackery Spytz committer: serhiy-storchaka date: 2021-01-03T14:35:26+02:00 summary: bpo-38308: Fix the "versionchanged" for the *weights* of harmonic_mean() (GH-23919) files: M Doc/library/statistics.rst diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst index 6467704006d90..51b5e9c404c9c 100644 --- a/Doc/library/statistics.rst +++ b/Doc/library/statistics.rst @@ -198,7 +198,7 @@ However, for reading convenience, most of the examples show sorted sequences. .. versionadded:: 3.6 - .. versionchanged:: 3.8 + .. versionchanged:: 3.10 Added support for *weights*. .. function:: median(data) From webhook-mailer at python.org Sun Jan 3 08:11:34 2021 From: webhook-mailer at python.org (encukou) Date: Sun, 03 Jan 2021 13:11:34 -0000 Subject: [Python-checkins] bpo-40077: Add traverse/clear/free to arraymodule (GH-24066) Message-ID: https://github.com/python/cpython/commit/b8eb3765908c0063f0739595ba4b296cc8863d19 commit: b8eb3765908c0063f0739595ba4b296cc8863d19 branch: master author: Erlend Egeberg Aasland committer: encukou date: 2021-01-03T14:11:15+01:00 summary: bpo-40077: Add traverse/clear/free to arraymodule (GH-24066) files: M Modules/arraymodule.c diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 12bd51705579b..e7d5ab77a6d5c 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2977,18 +2977,42 @@ static PyType_Spec arrayiter_spec = { /*********************** Install Module **************************/ +static int +array_traverse(PyObject *module, visitproc visit, void *arg) +{ + array_state *state = get_array_state(module); + Py_VISIT(state->ArrayType); + Py_VISIT(state->ArrayIterType); + return 0; +} + +static int +array_clear(PyObject *module) +{ + array_state *state = get_array_state(module); + Py_CLEAR(state->ArrayType); + Py_CLEAR(state->ArrayIterType); + return 0; +} + +static void +array_free(void *module) +{ + array_clear((PyObject *)module); +} + /* No functions in array module. */ static PyMethodDef a_methods[] = { ARRAY__ARRAY_RECONSTRUCTOR_METHODDEF {NULL, NULL, 0, NULL} /* Sentinel */ }; -#define CREATE_TYPE(module, type, spec) \ -do { \ - type = (PyTypeObject *)PyType_FromModuleAndSpec(m, spec, NULL); \ - if (type == NULL) { \ - return -1; \ - } \ +#define CREATE_TYPE(module, type, spec) \ +do { \ + type = (PyTypeObject *)PyType_FromModuleAndSpec(module, spec, NULL); \ + if (type == NULL) { \ + return -1; \ + } \ } while (0) static int @@ -3059,6 +3083,9 @@ static struct PyModuleDef arraymodule = { .m_doc = module_doc, .m_methods = a_methods, .m_slots = arrayslots, + .m_traverse = array_traverse, + .m_clear = array_clear, + .m_free = array_free, }; From webhook-mailer at python.org Sun Jan 3 10:48:07 2021 From: webhook-mailer at python.org (vstinner) Date: Sun, 03 Jan 2021 15:48:07 -0000 Subject: [Python-checkins] bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061) Message-ID: https://github.com/python/cpython/commit/7c83eaa536d2f436ae46211ca48692f576c732f0 commit: 7c83eaa536d2f436ae46211ca48692f576c732f0 branch: master author: Hai Shi committer: vstinner date: 2021-01-03T16:47:44+01:00 summary: bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061) files: M Modules/pyexpat.c diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 7d7da568972a2..0ea438ae2ae5d 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1836,6 +1836,13 @@ add_features(PyObject *mod) } #endif +static void +pyexpat_destructor(PyObject *op) +{ + void *p = PyCapsule_GetPointer(op, PyExpat_CAPSULE_NAME); + PyMem_Free(p); +} + static int pyexpat_exec(PyObject *mod) { @@ -1921,40 +1928,46 @@ pyexpat_exec(PyObject *mod) MYCONST(XML_PARAM_ENTITY_PARSING_ALWAYS); #undef MYCONST - static struct PyExpat_CAPI capi; + struct PyExpat_CAPI *capi = PyMem_Calloc(1, sizeof(struct PyExpat_CAPI)); + if (capi == NULL) { + PyErr_NoMemory(); + return -1; + } /* initialize pyexpat dispatch table */ - capi.size = sizeof(capi); - capi.magic = PyExpat_CAPI_MAGIC; - capi.MAJOR_VERSION = XML_MAJOR_VERSION; - capi.MINOR_VERSION = XML_MINOR_VERSION; - capi.MICRO_VERSION = XML_MICRO_VERSION; - capi.ErrorString = XML_ErrorString; - capi.GetErrorCode = XML_GetErrorCode; - capi.GetErrorColumnNumber = XML_GetErrorColumnNumber; - capi.GetErrorLineNumber = XML_GetErrorLineNumber; - capi.Parse = XML_Parse; - capi.ParserCreate_MM = XML_ParserCreate_MM; - capi.ParserFree = XML_ParserFree; - capi.SetCharacterDataHandler = XML_SetCharacterDataHandler; - capi.SetCommentHandler = XML_SetCommentHandler; - capi.SetDefaultHandlerExpand = XML_SetDefaultHandlerExpand; - capi.SetElementHandler = XML_SetElementHandler; - capi.SetNamespaceDeclHandler = XML_SetNamespaceDeclHandler; - capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler; - capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler; - capi.SetUserData = XML_SetUserData; - capi.SetStartDoctypeDeclHandler = XML_SetStartDoctypeDeclHandler; - capi.SetEncoding = XML_SetEncoding; - capi.DefaultUnknownEncodingHandler = PyUnknownEncodingHandler; + capi->size = sizeof(*capi); + capi->magic = PyExpat_CAPI_MAGIC; + capi->MAJOR_VERSION = XML_MAJOR_VERSION; + capi->MINOR_VERSION = XML_MINOR_VERSION; + capi->MICRO_VERSION = XML_MICRO_VERSION; + capi->ErrorString = XML_ErrorString; + capi->GetErrorCode = XML_GetErrorCode; + capi->GetErrorColumnNumber = XML_GetErrorColumnNumber; + capi->GetErrorLineNumber = XML_GetErrorLineNumber; + capi->Parse = XML_Parse; + capi->ParserCreate_MM = XML_ParserCreate_MM; + capi->ParserFree = XML_ParserFree; + capi->SetCharacterDataHandler = XML_SetCharacterDataHandler; + capi->SetCommentHandler = XML_SetCommentHandler; + capi->SetDefaultHandlerExpand = XML_SetDefaultHandlerExpand; + capi->SetElementHandler = XML_SetElementHandler; + capi->SetNamespaceDeclHandler = XML_SetNamespaceDeclHandler; + capi->SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler; + capi->SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler; + capi->SetUserData = XML_SetUserData; + capi->SetStartDoctypeDeclHandler = XML_SetStartDoctypeDeclHandler; + capi->SetEncoding = XML_SetEncoding; + capi->DefaultUnknownEncodingHandler = PyUnknownEncodingHandler; #if XML_COMBINED_VERSION >= 20100 - capi.SetHashSalt = XML_SetHashSalt; + capi->SetHashSalt = XML_SetHashSalt; #else - capi.SetHashSalt = NULL; + capi->SetHashSalt = NULL; #endif /* export using capsule */ - PyObject *capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL); + PyObject *capi_object = PyCapsule_New(capi, PyExpat_CAPSULE_NAME, + pyexpat_destructor); if (capi_object == NULL) { + PyMem_Free(capi); return -1; } From webhook-mailer at python.org Sun Jan 3 15:51:19 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 03 Jan 2021 20:51:19 -0000 Subject: [Python-checkins] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874) Message-ID: https://github.com/python/cpython/commit/1470edd6131c29b8a09ce012cdfee3afa269d553 commit: 1470edd6131c29b8a09ce012cdfee3afa269d553 branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-03T22:51:11+02:00 summary: bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874) files: A Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst M Doc/library/curses.rst M Lib/test/test_curses.py M Modules/_cursesmodule.c M Modules/clinic/_cursesmodule.c.h diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 3684d54d4ecad..26121acaacb7a 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -112,14 +112,15 @@ The module :mod:`curses` defines the following functions: .. function:: color_content(color_number) Return the intensity of the red, green, and blue (RGB) components in the color - *color_number*, which must be between ``0`` and :const:`COLORS`. Return a 3-tuple, + *color_number*, which must be between ``0`` and ``COLORS - 1``. Return a 3-tuple, containing the R,G,B values for the given color, which will be between ``0`` (no component) and ``1000`` (maximum amount of component). -.. function:: color_pair(color_number) +.. function:: color_pair(pair_number) - Return the attribute value for displaying text in the specified color. This + Return the attribute value for displaying text in the specified color pair. + Only the first 256 color pairs are supported. This attribute value can be combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the other :const:`A_\*` attributes. :func:`pair_number` is the counterpart to this function. @@ -287,7 +288,7 @@ The module :mod:`curses` defines the following functions: Change the definition of a color, taking the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). The value of *color_number* must be between ``0`` and - :const:`COLORS`. Each of *r*, *g*, *b*, must be a value between ``0`` and + `COLORS - 1`. Each of *r*, *g*, *b*, must be a value between ``0`` and ``1000``. When :func:`init_color` is used, all occurrences of that color on the screen immediately change to the new definition. This function is a no-op on most terminals; it is active only if :func:`can_change_color` returns ``True``. @@ -300,7 +301,8 @@ The module :mod:`curses` defines the following functions: color number. The value of *pair_number* must be between ``1`` and ``COLOR_PAIRS - 1`` (the ``0`` color pair is wired to white on black and cannot be changed). The value of *fg* and *bg* arguments must be between ``0`` and - :const:`COLORS`. If the color-pair was previously initialized, the screen is + ``COLORS - 1``, or, after calling :func:`use_default_colors`, ``-1``. + If the color-pair was previously initialized, the screen is refreshed and all occurrences of that color-pair are changed to the new definition. @@ -450,7 +452,7 @@ The module :mod:`curses` defines the following functions: .. function:: pair_content(pair_number) Return a tuple ``(fg, bg)`` containing the colors for the requested color pair. - The value of *pair_number* must be between ``1`` and ``COLOR_PAIRS - 1``. + The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - 1``. .. function:: pair_number(attr) diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 6811ff936633e..31fb882b72434 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -4,8 +4,7 @@ # This script doesn't actually display anything very coherent. but it # does call (nearly) every method and function. # -# Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr(), -# init_color() +# Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr() # Only called, not tested: getmouse(), ungetmouse() # @@ -13,6 +12,7 @@ import string import sys import tempfile +import functools import unittest from test.support import requires, verbose, SaveSignals @@ -37,6 +37,15 @@ def requires_curses_func(name): return unittest.skipUnless(hasattr(curses, name), 'requires curses.%s' % name) +def requires_colors(test): + @functools.wraps(test) + def wrapped(self, *args, **kwargs): + if not curses.has_colors(): + self.skipTest('requires colors support') + curses.start_color() + test(self, *args, **kwargs) + return wrapped + term = os.environ.get('TERM') # If newterm was supported we could use it instead of initscr and not exit @@ -48,6 +57,8 @@ class TestCurses(unittest.TestCase): @classmethod def setUpClass(cls): + if verbose: + print(f'TERM={term}', file=sys.stderr, flush=True) # testing setupterm() inside initscr/endwin # causes terminal breakage stdout_fd = sys.__stdout__.fileno() @@ -306,31 +317,101 @@ def test_module_funcs(self): curses.use_env(1) # Functions only available on a few platforms - def test_colors_funcs(self): - if not curses.has_colors(): - self.skipTest('requires colors support') - curses.start_color() - curses.init_pair(2, 1,1) - curses.color_content(1) - curses.color_pair(2) + + def bad_colors(self): + return (-1, curses.COLORS, -2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + + def bad_colors2(self): + return (curses.COLORS, 2**31, 2**63, 2**64) + + def bad_pairs(self): + return (-1, -2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + + @requires_colors + def test_color_content(self): + self.assertEqual(curses.color_content(curses.COLOR_BLACK), (0, 0, 0)) + curses.color_content(0) + curses.color_content(curses.COLORS - 1) + + for color in self.bad_colors(): + self.assertRaises(ValueError, curses.color_content, color) + + @requires_colors + def test_init_color(self): + if not curses.can_change_color: + self.skipTest('cannot change color') + + old = curses.color_content(0) + try: + curses.init_color(0, *old) + except curses.error: + self.skipTest('cannot change color (init_color() failed)') + self.addCleanup(curses.init_color, 0, *old) + curses.init_color(0, 0, 0, 0) + self.assertEqual(curses.color_content(0), (0, 0, 0)) + curses.init_color(0, 1000, 1000, 1000) + self.assertEqual(curses.color_content(0), (1000, 1000, 1000)) + + old = curses.color_content(curses.COLORS - 1) + curses.init_color(curses.COLORS - 1, *old) + self.addCleanup(curses.init_color, curses.COLORS - 1, *old) + curses.init_color(curses.COLORS - 1, 0, 500, 1000) + self.assertEqual(curses.color_content(curses.COLORS - 1), (0, 500, 1000)) + + for color in self.bad_colors(): + self.assertRaises(ValueError, curses.init_color, color, 0, 0, 0) + for comp in (-1, 1001): + self.assertRaises(ValueError, curses.init_color, 0, comp, 0, 0) + self.assertRaises(ValueError, curses.init_color, 0, 0, comp, 0) + self.assertRaises(ValueError, curses.init_color, 0, 0, 0, comp) + + @requires_colors + def test_pair_content(self): + if not hasattr(curses, 'use_default_colors'): + self.assertEqual(curses.pair_content(0), + (curses.COLOR_WHITE, curses.COLOR_BLACK)) + curses.pair_content(0) curses.pair_content(curses.COLOR_PAIRS - 1) - curses.pair_number(0) - - if hasattr(curses, 'use_default_colors'): - curses.use_default_colors() - - self.assertRaises(ValueError, curses.color_content, -1) - self.assertRaises(ValueError, curses.color_content, curses.COLORS + 1) - self.assertRaises(ValueError, curses.color_content, -2**31 - 1) - self.assertRaises(ValueError, curses.color_content, 2**31) - self.assertRaises(ValueError, curses.color_content, -2**63 - 1) - self.assertRaises(ValueError, curses.color_content, 2**63 - 1) - self.assertRaises(ValueError, curses.pair_content, -1) - self.assertRaises(ValueError, curses.pair_content, curses.COLOR_PAIRS) - self.assertRaises(ValueError, curses.pair_content, -2**31 - 1) - self.assertRaises(ValueError, curses.pair_content, 2**31) - self.assertRaises(ValueError, curses.pair_content, -2**63 - 1) - self.assertRaises(ValueError, curses.pair_content, 2**63 - 1) + + for pair in self.bad_pairs(): + self.assertRaises(ValueError, curses.pair_content, pair) + + @requires_colors + def test_init_pair(self): + old = curses.pair_content(1) + curses.init_pair(1, *old) + self.addCleanup(curses.init_pair, 1, *old) + + curses.init_pair(1, 0, 0) + self.assertEqual(curses.pair_content(1), (0, 0)) + curses.init_pair(1, curses.COLORS - 1, curses.COLORS - 1) + self.assertEqual(curses.pair_content(1), + (curses.COLORS - 1, curses.COLORS - 1)) + curses.init_pair(curses.COLOR_PAIRS - 1, 2, 3) + self.assertEqual(curses.pair_content(curses.COLOR_PAIRS - 1), (2, 3)) + + for pair in self.bad_pairs(): + self.assertRaises(ValueError, curses.init_pair, pair, 0, 0) + for color in self.bad_colors2(): + self.assertRaises(ValueError, curses.init_pair, 1, color, 0) + self.assertRaises(ValueError, curses.init_pair, 1, 0, color) + + @requires_colors + def test_color_attrs(self): + for pair in 0, 1, 255: + attr = curses.color_pair(pair) + self.assertEqual(curses.pair_number(attr), pair, attr) + self.assertEqual(curses.pair_number(attr | curses.A_BOLD), pair) + self.assertEqual(curses.color_pair(0), 0) + self.assertEqual(curses.pair_number(0), 0) + + @requires_curses_func('use_default_colors') + @requires_colors + def test_use_default_colors(self): + self.assertIn(curses.pair_content(0), + ((curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1))) + curses.use_default_colors() + self.assertEqual(curses.pair_content(0), (-1, -1)) @requires_curses_func('keyname') def test_keyname(self): diff --git a/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst b/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst new file mode 100644 index 0000000000000..34ea74a5a323d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst @@ -0,0 +1 @@ +Fixed range checks for color and pair numbers in :mod:`curses`. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 1f4789baf7a68..23f6d96f5144e 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -155,10 +155,8 @@ typedef chtype attr_t; /* No attr_t type is available */ #define _CURSES_PAIR_NUMBER_FUNC pair_content #endif /* _NCURSES_EXTENDED_COLOR_FUNCS */ -#define _CURSES_FUNC_NAME_STR(s) #s - -#define _CURSES_INIT_COLOR_FUNC_NAME _CURSES_FUNC_NAME_STR(_CURSES_INIT_COLOR_FUNC) -#define _CURSES_INIT_PAIR_FUNC_NAME _CURSES_FUNC_NAME_STR(_CURSES_INIT_PAIR_FUNC) +#define _CURSES_INIT_COLOR_FUNC_NAME Py_STRINGIFY(_CURSES_INIT_COLOR_FUNC) +#define _CURSES_INIT_PAIR_FUNC_NAME Py_STRINGIFY(_CURSES_INIT_PAIR_FUNC) /*[clinic input] module _curses @@ -202,18 +200,6 @@ static char *screen_encoding = NULL; /* Utility Functions */ -static inline int -color_pair_to_attr(short color_number) -{ - return ((int)color_number << 8); -} - -static inline short -attr_to_color_pair(int attr) -{ - return (short)((attr & A_COLOR) >> 8); -} - /* * Check the return code from a curses function and return None * or raise an exception as appropriate. These are exported using the @@ -414,7 +400,7 @@ PyCurses_ConvertToString(PyCursesWindowObject *win, PyObject *obj, } static int -color_converter(PyObject *arg, void *ptr) +color_allow_default_converter(PyObject *arg, void *ptr) { long color_number; int overflow; @@ -423,19 +409,31 @@ color_converter(PyObject *arg, void *ptr) if (color_number == -1 && PyErr_Occurred()) return 0; - if (overflow > 0 || color_number > COLORS) { + if (overflow > 0 || color_number >= COLORS) { PyErr_Format(PyExc_ValueError, - "Color number is greater than COLORS (%d).", - COLORS); + "Color number is greater than COLORS-1 (%d).", + COLORS - 1); return 0; } else if (overflow < 0 || color_number < 0) { + color_number = -1; + } + + *(int *)ptr = (int)color_number; + return 1; +} + +static int +color_converter(PyObject *arg, void *ptr) +{ + if (!color_allow_default_converter(arg, ptr)) { + return 0; + } + if (*(int *)ptr < 0) { PyErr_SetString(PyExc_ValueError, "Color number is less than 0."); return 0; } - - *(int *)ptr = (int)color_number; return 1; } @@ -446,6 +444,13 @@ class color_converter(CConverter): [python start generated code]*/ /*[python end generated code: output=da39a3ee5e6b4b0d input=4260d2b6e66b3709]*/ +/*[python input] +class color_allow_default_converter(CConverter): + type = 'int' + converter = 'color_allow_default_converter' +[python start generated code]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=975602bc058a872d]*/ + static int pair_converter(PyObject *arg, void *ptr) { @@ -456,15 +461,24 @@ pair_converter(PyObject *arg, void *ptr) if (pair_number == -1 && PyErr_Occurred()) return 0; - if (overflow > 0 || pair_number > COLOR_PAIRS - 1) { +#if _NCURSES_EXTENDED_COLOR_FUNCS + if (overflow > 0 || pair_number > INT_MAX) { + PyErr_Format(PyExc_ValueError, + "Color pair is greater than maximum (%d).", + INT_MAX); + return 0; + } +#else + if (overflow > 0 || pair_number >= COLOR_PAIRS) { PyErr_Format(PyExc_ValueError, "Color pair is greater than COLOR_PAIRS-1 (%d).", COLOR_PAIRS - 1); return 0; } - else if (overflow < 0 || pair_number < 1) { +#endif + else if (overflow < 0 || pair_number < 0) { PyErr_SetString(PyExc_ValueError, - "Color pair is less than 1."); + "Color pair is less than 0."); return 0; } @@ -742,7 +756,7 @@ _curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, if (type == 2) { funcname = "add_wch"; wstr[1] = L'\0'; - setcchar(&wcval, wstr, attr, attr_to_color_pair(attr), NULL); + setcchar(&wcval, wstr, attr, PAIR_NUMBER(attr), NULL); if (coordinates_group) rtn = mvwadd_wch(self->win,y,x, &wcval); else { @@ -2710,7 +2724,7 @@ NoArgOrFlagNoReturnFunctionBody(cbreak, flag) _curses.color_content color_number: color - The number of the color (0 - COLORS). + The number of the color (0 - (COLORS-1)). / Return the red, green, and blue (RGB) components of the specified color. @@ -2721,7 +2735,7 @@ which will be between 0 (no component) and 1000 (maximum amount of component). static PyObject * _curses_color_content_impl(PyObject *module, int color_number) -/*[clinic end generated code: output=17b466df7054e0de input=c10ef58f694b13ee]*/ +/*[clinic end generated code: output=17b466df7054e0de input=03b5ed0472662aea]*/ { _NCURSES_COLOR_VAL_TYPE r,g,b; @@ -2740,8 +2754,8 @@ _curses_color_content_impl(PyObject *module, int color_number) /*[clinic input] _curses.color_pair - color_number: color - The number of the color (0 - COLORS). + pair_number: int + The number of the color pair. / Return the attribute value for displaying text in the specified color. @@ -2751,13 +2765,13 @@ other A_* attributes. pair_number() is the counterpart to this function. [clinic start generated code]*/ static PyObject * -_curses_color_pair_impl(PyObject *module, int color_number) -/*[clinic end generated code: output=3fd752e8e24c93fb input=b049033819ab4ef5]*/ +_curses_color_pair_impl(PyObject *module, int pair_number) +/*[clinic end generated code: output=60718abb10ce9feb input=6034e9146f343802]*/ { PyCursesInitialised; PyCursesInitialisedColor; - return PyLong_FromLong(color_pair_to_attr(color_number)); + return PyLong_FromLong(COLOR_PAIR(pair_number)); } /*[clinic input] @@ -3152,7 +3166,7 @@ _curses_has_key_impl(PyObject *module, int key) _curses.init_color color_number: color - The number of the color to be changed (0 - COLORS). + The number of the color to be changed (0 - (COLORS-1)). r: component Red component (0 - 1000). g: component @@ -3165,13 +3179,13 @@ Change the definition of a color. When init_color() is used, all occurrences of that color on the screen immediately change to the new definition. This function is a no-op on -most terminals; it is active only if can_change_color() returns 1. +most terminals; it is active only if can_change_color() returns true. [clinic start generated code]*/ static PyObject * _curses_init_color_impl(PyObject *module, int color_number, short r, short g, short b) -/*[clinic end generated code: output=d7ed71b2d818cdf2 input=8a2fe94ca9204aa5]*/ +/*[clinic end generated code: output=d7ed71b2d818cdf2 input=ae2b8bea0f152c80]*/ { PyCursesInitialised; PyCursesInitialisedColor; @@ -3184,10 +3198,10 @@ _curses.init_pair pair_number: pair The number of the color-pair to be changed (1 - (COLOR_PAIRS-1)). - fg: color - Foreground color number (0 - COLORS). - bg: color - Background color number (0 - COLORS). + fg: color_allow_default + Foreground color number (-1 - (COLORS-1)). + bg: color_allow_default + Background color number (-1 - (COLORS-1)). / Change the definition of a color-pair. @@ -3198,7 +3212,7 @@ all occurrences of that color-pair are changed to the new definition. static PyObject * _curses_init_pair_impl(PyObject *module, int pair_number, int fg, int bg) -/*[clinic end generated code: output=a0bba03d2bbc3ee6 input=b865583a18061c1f]*/ +/*[clinic end generated code: output=a0bba03d2bbc3ee6 input=54b421b44c12c389]*/ { PyCursesInitialised; PyCursesInitialisedColor; @@ -3821,7 +3835,7 @@ NoArgNoReturnFunctionBody(noraw) _curses.pair_content pair_number: pair - The number of the color pair (1 - (COLOR_PAIRS-1)). + The number of the color pair (0 - (COLOR_PAIRS-1)). / Return a tuple (fg, bg) containing the colors for the requested color pair. @@ -3829,7 +3843,7 @@ Return a tuple (fg, bg) containing the colors for the requested color pair. static PyObject * _curses_pair_content_impl(PyObject *module, int pair_number) -/*[clinic end generated code: output=4a726dd0e6885f3f input=b42eacf8a4103852]*/ +/*[clinic end generated code: output=4a726dd0e6885f3f input=03970f840fc7b739]*/ { _NCURSES_COLOR_VAL_TYPE f, b; @@ -3838,7 +3852,7 @@ _curses_pair_content_impl(PyObject *module, int pair_number) if (_CURSES_PAIR_NUMBER_FUNC(pair_number, &f, &b)==ERR) { PyErr_SetString(PyCursesError, - "Argument 1 was out of range. (1..COLOR_PAIRS-1)"); + "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); return NULL; } @@ -3863,7 +3877,7 @@ _curses_pair_number_impl(PyObject *module, int attr) PyCursesInitialised; PyCursesInitialisedColor; - return PyLong_FromLong(attr_to_color_pair(attr)); + return PyLong_FromLong(PAIR_NUMBER(attr)); } /*[clinic input] diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index 34e09e443afff..e46a8e3d0b23e 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -1958,7 +1958,7 @@ PyDoc_STRVAR(_curses_color_content__doc__, "Return the red, green, and blue (RGB) components of the specified color.\n" "\n" " color_number\n" -" The number of the color (0 - COLORS).\n" +" The number of the color (0 - (COLORS-1)).\n" "\n" "A 3-tuple is returned, containing the R, G, B values for the given color,\n" "which will be between 0 (no component) and 1000 (maximum amount of component)."); @@ -1985,13 +1985,13 @@ _curses_color_content(PyObject *module, PyObject *arg) } PyDoc_STRVAR(_curses_color_pair__doc__, -"color_pair($module, color_number, /)\n" +"color_pair($module, pair_number, /)\n" "--\n" "\n" "Return the attribute value for displaying text in the specified color.\n" "\n" -" color_number\n" -" The number of the color (0 - COLORS).\n" +" pair_number\n" +" The number of the color pair.\n" "\n" "This attribute value can be combined with A_STANDOUT, A_REVERSE, and the\n" "other A_* attributes. pair_number() is the counterpart to this function."); @@ -2000,18 +2000,19 @@ PyDoc_STRVAR(_curses_color_pair__doc__, {"color_pair", (PyCFunction)_curses_color_pair, METH_O, _curses_color_pair__doc__}, static PyObject * -_curses_color_pair_impl(PyObject *module, int color_number); +_curses_color_pair_impl(PyObject *module, int pair_number); static PyObject * _curses_color_pair(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; - int color_number; + int pair_number; - if (!color_converter(arg, &color_number)) { + pair_number = _PyLong_AsInt(arg); + if (pair_number == -1 && PyErr_Occurred()) { goto exit; } - return_value = _curses_color_pair_impl(module, color_number); + return_value = _curses_color_pair_impl(module, pair_number); exit: return return_value; @@ -2542,7 +2543,7 @@ PyDoc_STRVAR(_curses_init_color__doc__, "Change the definition of a color.\n" "\n" " color_number\n" -" The number of the color to be changed (0 - COLORS).\n" +" The number of the color to be changed (0 - (COLORS-1)).\n" " r\n" " Red component (0 - 1000).\n" " g\n" @@ -2552,7 +2553,7 @@ PyDoc_STRVAR(_curses_init_color__doc__, "\n" "When init_color() is used, all occurrences of that color on the screen\n" "immediately change to the new definition. This function is a no-op on\n" -"most terminals; it is active only if can_change_color() returns 1."); +"most terminals; it is active only if can_change_color() returns true."); #define _CURSES_INIT_COLOR_METHODDEF \ {"init_color", (PyCFunction)(void(*)(void))_curses_init_color, METH_FASTCALL, _curses_init_color__doc__}, @@ -2600,9 +2601,9 @@ PyDoc_STRVAR(_curses_init_pair__doc__, " pair_number\n" " The number of the color-pair to be changed (1 - (COLOR_PAIRS-1)).\n" " fg\n" -" Foreground color number (0 - COLORS).\n" +" Foreground color number (-1 - (COLORS-1)).\n" " bg\n" -" Background color number (0 - COLORS).\n" +" Background color number (-1 - (COLORS-1)).\n" "\n" "If the color-pair was previously initialized, the screen is refreshed and\n" "all occurrences of that color-pair are changed to the new definition."); @@ -2627,10 +2628,10 @@ _curses_init_pair(PyObject *module, PyObject *const *args, Py_ssize_t nargs) if (!pair_converter(args[0], &pair_number)) { goto exit; } - if (!color_converter(args[1], &fg)) { + if (!color_allow_default_converter(args[1], &fg)) { goto exit; } - if (!color_converter(args[2], &bg)) { + if (!color_allow_default_converter(args[2], &bg)) { goto exit; } return_value = _curses_init_pair_impl(module, pair_number, fg, bg); @@ -3403,7 +3404,7 @@ PyDoc_STRVAR(_curses_pair_content__doc__, "Return a tuple (fg, bg) containing the colors for the requested color pair.\n" "\n" " pair_number\n" -" The number of the color pair (1 - (COLOR_PAIRS-1))."); +" The number of the color pair (0 - (COLOR_PAIRS-1))."); #define _CURSES_PAIR_CONTENT_METHODDEF \ {"pair_content", (PyCFunction)_curses_pair_content, METH_O, _curses_pair_content__doc__}, @@ -4288,4 +4289,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=92bad2172fef9747 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ae6559aa61200289 input=a9049054013a1b77]*/ From webhook-mailer at python.org Sun Jan 3 15:54:50 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 03 Jan 2021 20:54:50 -0000 Subject: [Python-checkins] [3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076) Message-ID: https://github.com/python/cpython/commit/0303008ebceb6ac6035cd9722d1393267304171d commit: 0303008ebceb6ac6035cd9722d1393267304171d branch: 3.9 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-03T22:54:44+02:00 summary: [3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076) If __stdout__ is not attached to terminal, try to use __stderr__ if it is attached to terminal, or open the terminal device, or use regular file as terminal, but some functions will be untested in the latter case. (cherry picked from commit 607501abb488fb37e33cf9d35260ab7baefa192f) files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 5e619d13836d2..cbab331d707b0 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -47,37 +47,57 @@ class TestCurses(unittest.TestCase): @classmethod def setUpClass(cls): - if not sys.__stdout__.isatty(): - # Temporary skip tests on non-tty - raise unittest.SkipTest('sys.__stdout__ is not a tty') - cls.tmp = tempfile.TemporaryFile() - fd = cls.tmp.fileno() - else: - cls.tmp = None - fd = sys.__stdout__.fileno() # testing setupterm() inside initscr/endwin # causes terminal breakage - curses.setupterm(fd=fd) - - @classmethod - def tearDownClass(cls): - if cls.tmp: - cls.tmp.close() - del cls.tmp + stdout_fd = sys.__stdout__.fileno() + curses.setupterm(fd=stdout_fd) def setUp(self): + self.isatty = True + self.output = sys.__stdout__ + stdout_fd = sys.__stdout__.fileno() + if not sys.__stdout__.isatty(): + # initstr() unconditionally uses C stdout. + # If it is redirected to file or pipe, try to attach it + # to terminal. + # First, save a copy of the file descriptor of stdout, so it + # can be restored after finishing the test. + dup_fd = os.dup(stdout_fd) + self.addCleanup(os.close, dup_fd) + self.addCleanup(os.dup2, dup_fd, stdout_fd) + + if sys.__stderr__.isatty(): + # If stderr is connected to terminal, use it. + tmp = sys.__stderr__ + self.output = sys.__stderr__ + else: + try: + # Try to open the terminal device. + tmp = open('/dev/tty', 'wb', buffering=0) + except OSError: + # As a fallback, use regular file to write control codes. + # Some functions (like savetty) will not work, but at + # least the garbage control sequences will not be mixed + # with the testing report. + tmp = tempfile.TemporaryFile(mode='wb', buffering=0) + self.isatty = False + self.addCleanup(tmp.close) + self.output = None + os.dup2(tmp.fileno(), stdout_fd) + self.save_signals = SaveSignals() self.save_signals.save() - if verbose: + self.addCleanup(self.save_signals.restore) + if verbose and self.output is not None: # just to make the test output a little more readable - print() + sys.stderr.flush() + sys.stdout.flush() + print(file=self.output, flush=True) self.stdscr = curses.initscr() - curses.savetty() - - def tearDown(self): - curses.resetty() - curses.endwin() - self.save_signals.restore() + if self.isatty: + curses.savetty() + self.addCleanup(curses.endwin) + self.addCleanup(curses.resetty) def test_window_funcs(self): "Test the methods of windows" @@ -95,7 +115,7 @@ def test_window_funcs(self): for meth in [stdscr.clear, stdscr.clrtobot, stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, stdscr.deleteln, stdscr.erase, stdscr.getbegyx, - stdscr.getbkgd, stdscr.getkey, stdscr.getmaxyx, + stdscr.getbkgd, stdscr.getmaxyx, stdscr.getparyx, stdscr.getyx, stdscr.inch, stdscr.insertln, stdscr.instr, stdscr.is_wintouched, win.noutrefresh, stdscr.redrawwin, stdscr.refresh, @@ -206,6 +226,11 @@ def test_window_funcs(self): if hasattr(stdscr, 'enclose'): stdscr.enclose(10, 10) + with tempfile.TemporaryFile() as f: + self.stdscr.putwin(f) + f.seek(0) + curses.getwin(f) + self.assertRaises(ValueError, stdscr.getstr, -400) self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400) self.assertRaises(ValueError, stdscr.instr, -2) @@ -224,16 +249,19 @@ def test_embedded_null_chars(self): def test_module_funcs(self): "Test module-level functions" for func in [curses.baudrate, curses.beep, curses.can_change_color, - curses.cbreak, curses.def_prog_mode, curses.doupdate, - curses.flash, curses.flushinp, + curses.doupdate, curses.flash, curses.flushinp, curses.has_colors, curses.has_ic, curses.has_il, curses.isendwin, curses.killchar, curses.longname, - curses.nocbreak, curses.noecho, curses.nonl, - curses.noqiflush, curses.noraw, - curses.reset_prog_mode, curses.termattrs, - curses.termname, curses.erasechar]: + curses.noecho, curses.nonl, curses.noqiflush, + curses.termattrs, curses.termname, curses.erasechar]: with self.subTest(func=func.__qualname__): func() + if self.isatty: + for func in [curses.cbreak, curses.def_prog_mode, + curses.nocbreak, curses.noraw, + curses.reset_prog_mode]: + with self.subTest(func=func.__qualname__): + func() if hasattr(curses, 'filter'): curses.filter() if hasattr(curses, 'getsyx'): @@ -245,13 +273,9 @@ def test_module_funcs(self): curses.delay_output(1) curses.echo() ; curses.echo(1) - with tempfile.TemporaryFile() as f: - self.stdscr.putwin(f) - f.seek(0) - curses.getwin(f) - curses.halfdelay(1) - curses.intrflush(1) + if self.isatty: + curses.intrflush(1) curses.meta(1) curses.napms(100) curses.newpad(50,50) @@ -260,7 +284,8 @@ def test_module_funcs(self): curses.nl() ; curses.nl(1) curses.putp(b'abc') curses.qiflush() - curses.raw() ; curses.raw(1) + if self.isatty: + curses.raw() ; curses.raw(1) curses.set_escdelay(25) self.assertEqual(curses.get_escdelay(), 25) curses.set_tabsize(4) @@ -286,7 +311,7 @@ def test_colors_funcs(self): curses.init_pair(2, 1,1) curses.color_content(1) curses.color_pair(2) - curses.pair_content(curses.COLOR_PAIRS - 1) + curses.pair_content(min(curses.COLOR_PAIRS - 1, 0x7fff)) curses.pair_number(0) if hasattr(curses, 'use_default_colors'): @@ -358,7 +383,6 @@ def test_resize_term(self): @requires_curses_func('resizeterm') def test_resizeterm(self): - stdscr = self.stdscr lines, cols = curses.LINES, curses.COLS new_lines = lines - 1 new_cols = cols + 1 From webhook-mailer at python.org Sun Jan 3 17:54:27 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 03 Jan 2021 22:54:27 -0000 Subject: [Python-checkins] [3.8] [3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076) (GH-24078) Message-ID: https://github.com/python/cpython/commit/645174abe0d13cce2cb339cc80b095ad484428ea commit: 645174abe0d13cce2cb339cc80b095ad484428ea branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-04T00:54:13+02:00 summary: [3.8] [3.9] bpo-42789: Don't skip curses tests on non-tty. (GH-24009) (GH-24076) (GH-24078) If __stdout__ is not attached to terminal, try to use __stderr__ if it is attached to terminal, or open the terminal device, or use regular file as terminal, but some functions will be untested in the latter case. (cherry picked from commit 607501abb488fb37e33cf9d35260ab7baefa192f) (cherry picked from commit 0303008ebceb6ac6035cd9722d1393267304171d) files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 09738c8a41c94..b7349d9e42a5d 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -47,37 +47,57 @@ class TestCurses(unittest.TestCase): @classmethod def setUpClass(cls): - if not sys.__stdout__.isatty(): - # Temporary skip tests on non-tty - raise unittest.SkipTest('sys.__stdout__ is not a tty') - cls.tmp = tempfile.TemporaryFile() - fd = cls.tmp.fileno() - else: - cls.tmp = None - fd = sys.__stdout__.fileno() # testing setupterm() inside initscr/endwin # causes terminal breakage - curses.setupterm(fd=fd) - - @classmethod - def tearDownClass(cls): - if cls.tmp: - cls.tmp.close() - del cls.tmp + stdout_fd = sys.__stdout__.fileno() + curses.setupterm(fd=stdout_fd) def setUp(self): + self.isatty = True + self.output = sys.__stdout__ + stdout_fd = sys.__stdout__.fileno() + if not sys.__stdout__.isatty(): + # initstr() unconditionally uses C stdout. + # If it is redirected to file or pipe, try to attach it + # to terminal. + # First, save a copy of the file descriptor of stdout, so it + # can be restored after finishing the test. + dup_fd = os.dup(stdout_fd) + self.addCleanup(os.close, dup_fd) + self.addCleanup(os.dup2, dup_fd, stdout_fd) + + if sys.__stderr__.isatty(): + # If stderr is connected to terminal, use it. + tmp = sys.__stderr__ + self.output = sys.__stderr__ + else: + try: + # Try to open the terminal device. + tmp = open('/dev/tty', 'wb', buffering=0) + except OSError: + # As a fallback, use regular file to write control codes. + # Some functions (like savetty) will not work, but at + # least the garbage control sequences will not be mixed + # with the testing report. + tmp = tempfile.TemporaryFile(mode='wb', buffering=0) + self.isatty = False + self.addCleanup(tmp.close) + self.output = None + os.dup2(tmp.fileno(), stdout_fd) + self.save_signals = SaveSignals() self.save_signals.save() - if verbose: + self.addCleanup(self.save_signals.restore) + if verbose and self.output is not None: # just to make the test output a little more readable - print() + sys.stderr.flush() + sys.stdout.flush() + print(file=self.output, flush=True) self.stdscr = curses.initscr() - curses.savetty() - - def tearDown(self): - curses.resetty() - curses.endwin() - self.save_signals.restore() + if self.isatty: + curses.savetty() + self.addCleanup(curses.endwin) + self.addCleanup(curses.resetty) def test_window_funcs(self): "Test the methods of windows" @@ -95,7 +115,7 @@ def test_window_funcs(self): for meth in [stdscr.clear, stdscr.clrtobot, stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, stdscr.deleteln, stdscr.erase, stdscr.getbegyx, - stdscr.getbkgd, stdscr.getkey, stdscr.getmaxyx, + stdscr.getbkgd, stdscr.getmaxyx, stdscr.getparyx, stdscr.getyx, stdscr.inch, stdscr.insertln, stdscr.instr, stdscr.is_wintouched, win.noutrefresh, stdscr.redrawwin, stdscr.refresh, @@ -206,6 +226,11 @@ def test_window_funcs(self): if hasattr(stdscr, 'enclose'): stdscr.enclose(10, 10) + with tempfile.TemporaryFile() as f: + self.stdscr.putwin(f) + f.seek(0) + curses.getwin(f) + self.assertRaises(ValueError, stdscr.getstr, -400) self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400) self.assertRaises(ValueError, stdscr.instr, -2) @@ -224,16 +249,19 @@ def test_embedded_null_chars(self): def test_module_funcs(self): "Test module-level functions" for func in [curses.baudrate, curses.beep, curses.can_change_color, - curses.cbreak, curses.def_prog_mode, curses.doupdate, - curses.flash, curses.flushinp, + curses.doupdate, curses.flash, curses.flushinp, curses.has_colors, curses.has_ic, curses.has_il, curses.isendwin, curses.killchar, curses.longname, - curses.nocbreak, curses.noecho, curses.nonl, - curses.noqiflush, curses.noraw, - curses.reset_prog_mode, curses.termattrs, - curses.termname, curses.erasechar]: + curses.noecho, curses.nonl, curses.noqiflush, + curses.termattrs, curses.termname, curses.erasechar]: with self.subTest(func=func.__qualname__): func() + if self.isatty: + for func in [curses.cbreak, curses.def_prog_mode, + curses.nocbreak, curses.noraw, + curses.reset_prog_mode]: + with self.subTest(func=func.__qualname__): + func() if hasattr(curses, 'filter'): curses.filter() if hasattr(curses, 'getsyx'): @@ -245,13 +273,9 @@ def test_module_funcs(self): curses.delay_output(1) curses.echo() ; curses.echo(1) - with tempfile.TemporaryFile() as f: - self.stdscr.putwin(f) - f.seek(0) - curses.getwin(f) - curses.halfdelay(1) - curses.intrflush(1) + if self.isatty: + curses.intrflush(1) curses.meta(1) curses.napms(100) curses.newpad(50,50) @@ -260,7 +284,8 @@ def test_module_funcs(self): curses.nl() ; curses.nl(1) curses.putp(b'abc') curses.qiflush() - curses.raw() ; curses.raw(1) + if self.isatty: + curses.raw() ; curses.raw(1) if hasattr(curses, 'setsyx'): curses.setsyx(5,5) curses.tigetflag('hc') @@ -282,7 +307,7 @@ def test_colors_funcs(self): curses.init_pair(2, 1,1) curses.color_content(1) curses.color_pair(2) - curses.pair_content(curses.COLOR_PAIRS - 1) + curses.pair_content(min(curses.COLOR_PAIRS - 1, 0x7fff)) curses.pair_number(0) if hasattr(curses, 'use_default_colors'): @@ -354,7 +379,6 @@ def test_resize_term(self): @requires_curses_func('resizeterm') def test_resizeterm(self): - stdscr = self.stdscr lines, cols = curses.LINES, curses.COLS new_lines = lines - 1 new_cols = cols + 1 From webhook-mailer at python.org Sun Jan 3 17:55:27 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 03 Jan 2021 22:55:27 -0000 Subject: [Python-checkins] [3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077) Message-ID: https://github.com/python/cpython/commit/b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e commit: b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e branch: 3.9 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-04T00:55:23+02:00 summary: [3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077) (cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553) files: A Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst M Doc/library/curses.rst M Lib/test/test_curses.py M Modules/_cursesmodule.c M Modules/clinic/_cursesmodule.c.h diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 7a13295f482ee..c72840a07c192 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -112,14 +112,15 @@ The module :mod:`curses` defines the following functions: .. function:: color_content(color_number) Return the intensity of the red, green, and blue (RGB) components in the color - *color_number*, which must be between ``0`` and :const:`COLORS`. Return a 3-tuple, + *color_number*, which must be between ``0`` and ``COLORS - 1``. Return a 3-tuple, containing the R,G,B values for the given color, which will be between ``0`` (no component) and ``1000`` (maximum amount of component). -.. function:: color_pair(color_number) +.. function:: color_pair(pair_number) - Return the attribute value for displaying text in the specified color. This + Return the attribute value for displaying text in the specified color pair. + Only the first 256 color pairs are supported. This attribute value can be combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the other :const:`A_\*` attributes. :func:`pair_number` is the counterpart to this function. @@ -278,7 +279,7 @@ The module :mod:`curses` defines the following functions: Change the definition of a color, taking the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). The value of *color_number* must be between ``0`` and - :const:`COLORS`. Each of *r*, *g*, *b*, must be a value between ``0`` and + `COLORS - 1`. Each of *r*, *g*, *b*, must be a value between ``0`` and ``1000``. When :func:`init_color` is used, all occurrences of that color on the screen immediately change to the new definition. This function is a no-op on most terminals; it is active only if :func:`can_change_color` returns ``True``. @@ -291,7 +292,8 @@ The module :mod:`curses` defines the following functions: color number. The value of *pair_number* must be between ``1`` and ``COLOR_PAIRS - 1`` (the ``0`` color pair is wired to white on black and cannot be changed). The value of *fg* and *bg* arguments must be between ``0`` and - :const:`COLORS`. If the color-pair was previously initialized, the screen is + ``COLORS - 1``, or, after calling :func:`use_default_colors`, ``-1``. + If the color-pair was previously initialized, the screen is refreshed and all occurrences of that color-pair are changed to the new definition. @@ -441,7 +443,7 @@ The module :mod:`curses` defines the following functions: .. function:: pair_content(pair_number) Return a tuple ``(fg, bg)`` containing the colors for the requested color pair. - The value of *pair_number* must be between ``1`` and ``COLOR_PAIRS - 1``. + The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - 1``. .. function:: pair_number(attr) diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index cbab331d707b0..e310d191f97e9 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -4,8 +4,7 @@ # This script doesn't actually display anything very coherent. but it # does call (nearly) every method and function. # -# Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr(), -# init_color() +# Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr() # Only called, not tested: getmouse(), ungetmouse() # @@ -13,6 +12,7 @@ import string import sys import tempfile +import functools import unittest from test.support import requires, import_module, verbose, SaveSignals @@ -36,7 +36,17 @@ def requires_curses_func(name): return unittest.skipUnless(hasattr(curses, name), 'requires curses.%s' % name) +def requires_colors(test): + @functools.wraps(test) + def wrapped(self, *args, **kwargs): + if not curses.has_colors(): + self.skipTest('requires colors support') + curses.start_color() + test(self, *args, **kwargs) + return wrapped + term = os.environ.get('TERM') +SHORT_MAX = 0x7fff # If newterm was supported we could use it instead of initscr and not exit @unittest.skipIf(not term or term == 'unknown', @@ -47,6 +57,8 @@ class TestCurses(unittest.TestCase): @classmethod def setUpClass(cls): + if verbose: + print(f'TERM={term}', file=sys.stderr, flush=True) # testing setupterm() inside initscr/endwin # causes terminal breakage stdout_fd = sys.__stdout__.fileno() @@ -304,18 +316,111 @@ def test_module_funcs(self): curses.use_env(1) # Functions only available on a few platforms - def test_colors_funcs(self): - if not curses.has_colors(): - self.skipTest('requires colors support') - curses.start_color() - curses.init_pair(2, 1,1) - curses.color_content(1) - curses.color_pair(2) - curses.pair_content(min(curses.COLOR_PAIRS - 1, 0x7fff)) - curses.pair_number(0) - - if hasattr(curses, 'use_default_colors'): - curses.use_default_colors() + + def bad_colors(self): + return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + + def bad_pairs(self): + return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + + @requires_colors + def test_color_content(self): + self.assertEqual(curses.color_content(curses.COLOR_BLACK), (0, 0, 0)) + curses.color_content(0) + curses.color_content(min(curses.COLORS - 1, SHORT_MAX)) + + for color in self.bad_colors(): + self.assertRaises(OverflowError, curses.color_content, color) + if curses.COLORS <= SHORT_MAX: + self.assertRaises(curses.error, curses.color_content, curses.COLORS) + self.assertRaises(curses.error, curses.color_content, -1) + + @requires_colors + def test_init_color(self): + if not curses.can_change_color: + self.skipTest('cannot change color') + + old = curses.color_content(0) + try: + curses.init_color(0, *old) + except curses.error: + self.skipTest('cannot change color (init_color() failed)') + self.addCleanup(curses.init_color, 0, *old) + curses.init_color(0, 0, 0, 0) + self.assertEqual(curses.color_content(0), (0, 0, 0)) + curses.init_color(0, 1000, 1000, 1000) + self.assertEqual(curses.color_content(0), (1000, 1000, 1000)) + + maxcolor = min(curses.COLORS - 1, SHORT_MAX) + old = curses.color_content(maxcolor) + curses.init_color(maxcolor, *old) + self.addCleanup(curses.init_color, maxcolor, *old) + curses.init_color(maxcolor, 0, 500, 1000) + self.assertEqual(curses.color_content(maxcolor), (0, 500, 1000)) + + for color in self.bad_colors(): + self.assertRaises(OverflowError, curses.init_color, color, 0, 0, 0) + if curses.COLORS <= SHORT_MAX: + self.assertRaises(curses.error, curses.init_color, curses.COLORS, 0, 0, 0) + self.assertRaises(curses.error, curses.init_color, -1, 0, 0, 0) + for comp in (-1, 1001): + self.assertRaises(curses.error, curses.init_color, 0, comp, 0, 0) + self.assertRaises(curses.error, curses.init_color, 0, 0, comp, 0) + self.assertRaises(curses.error, curses.init_color, 0, 0, 0, comp) + + @requires_colors + def test_pair_content(self): + if not hasattr(curses, 'use_default_colors'): + self.assertEqual(curses.pair_content(0), + (curses.COLOR_WHITE, curses.COLOR_BLACK)) + curses.pair_content(0) + curses.pair_content(min(curses.COLOR_PAIRS - 1, SHORT_MAX)) + + for pair in self.bad_pairs(): + self.assertRaises(OverflowError, curses.pair_content, pair) + self.assertRaises(curses.error, curses.pair_content, -1) + + @requires_colors + def test_init_pair(self): + old = curses.pair_content(1) + curses.init_pair(1, *old) + self.addCleanup(curses.init_pair, 1, *old) + + curses.init_pair(1, 0, 0) + self.assertEqual(curses.pair_content(1), (0, 0)) + maxcolor = min(curses.COLORS - 1, SHORT_MAX) + curses.init_pair(1, maxcolor, maxcolor) + self.assertEqual(curses.pair_content(1), (maxcolor, maxcolor)) + maxpair = min(curses.COLOR_PAIRS - 1, SHORT_MAX) + curses.init_pair(maxpair, 2, 3) + self.assertEqual(curses.pair_content(maxpair), (2, 3)) + + for pair in self.bad_pairs(): + self.assertRaises(OverflowError, curses.init_pair, pair, 0, 0) + self.assertRaises(curses.error, curses.init_pair, -1, 0, 0) + for color in self.bad_colors(): + self.assertRaises(OverflowError, curses.init_pair, 1, color, 0) + self.assertRaises(OverflowError, curses.init_pair, 1, 0, color) + if curses.COLORS <= SHORT_MAX: + self.assertRaises(curses.error, curses.init_pair, 1, curses.COLORS, 0) + self.assertRaises(curses.error, curses.init_pair, 1, 0, curses.COLORS) + + @requires_colors + def test_color_attrs(self): + for pair in 0, 1, 255: + attr = curses.color_pair(pair) + self.assertEqual(curses.pair_number(attr), pair, attr) + self.assertEqual(curses.pair_number(attr | curses.A_BOLD), pair) + self.assertEqual(curses.color_pair(0), 0) + self.assertEqual(curses.pair_number(0), 0) + + @requires_curses_func('use_default_colors') + @requires_colors + def test_use_default_colors(self): + self.assertIn(curses.pair_content(0), + ((curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1))) + curses.use_default_colors() + self.assertEqual(curses.pair_content(0), (-1, -1)) @requires_curses_func('keyname') def test_keyname(self): diff --git a/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst b/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst new file mode 100644 index 0000000000000..34ea74a5a323d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst @@ -0,0 +1 @@ +Fixed range checks for color and pair numbers in :mod:`curses`. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index c70b0e2a19fad..0914e20466fab 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -176,18 +176,6 @@ static char *screen_encoding = NULL; /* Utility Functions */ -static inline int -color_pair_to_attr(short color_number) -{ - return ((int)color_number << 8); -} - -static inline short -attr_to_color_pair(int attr) -{ - return (short)((attr & A_COLOR) >> 8); -} - /* * Check the return code from a curses function and return None * or raise an exception as appropriate. These are exported using the @@ -618,7 +606,7 @@ _curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, if (type == 2) { funcname = "add_wch"; wstr[1] = L'\0'; - setcchar(&wcval, wstr, attr, attr_to_color_pair(attr), NULL); + setcchar(&wcval, wstr, attr, PAIR_NUMBER(attr), NULL); if (coordinates_group) rtn = mvwadd_wch(self->win,y,x, &wcval); else { @@ -2586,7 +2574,7 @@ NoArgOrFlagNoReturnFunctionBody(cbreak, flag) _curses.color_content color_number: short - The number of the color (0 - COLORS). + The number of the color (0 - (COLORS-1)). / Return the red, green, and blue (RGB) components of the specified color. @@ -2597,7 +2585,7 @@ which will be between 0 (no component) and 1000 (maximum amount of component). static PyObject * _curses_color_content_impl(PyObject *module, short color_number) -/*[clinic end generated code: output=cb15cf3120d4bfc1 input=5555abb1c11e11b7]*/ +/*[clinic end generated code: output=cb15cf3120d4bfc1 input=630f6737514db6ad]*/ { short r,g,b; @@ -2616,8 +2604,8 @@ _curses_color_content_impl(PyObject *module, short color_number) /*[clinic input] _curses.color_pair - color_number: short - The number of the color (0 - COLORS). + pair_number: short + The number of the color pair. / Return the attribute value for displaying text in the specified color. @@ -2627,13 +2615,13 @@ other A_* attributes. pair_number() is the counterpart to this function. [clinic start generated code]*/ static PyObject * -_curses_color_pair_impl(PyObject *module, short color_number) -/*[clinic end generated code: output=6a84cb6b29ecaf9a input=a9d3eb6f50e4dc12]*/ +_curses_color_pair_impl(PyObject *module, short pair_number) +/*[clinic end generated code: output=ce609d238b70dc11 input=8dd0d5da94cb15b5]*/ { PyCursesInitialised; PyCursesInitialisedColor; - return PyLong_FromLong(color_pair_to_attr(color_number)); + return PyLong_FromLong(COLOR_PAIR(pair_number)); } /*[clinic input] @@ -3028,7 +3016,7 @@ _curses_has_key_impl(PyObject *module, int key) _curses.init_color color_number: short - The number of the color to be changed (0 - COLORS). + The number of the color to be changed (0 - (COLORS-1)). r: short Red component (0 - 1000). g: short @@ -3041,13 +3029,13 @@ Change the definition of a color. When init_color() is used, all occurrences of that color on the screen immediately change to the new definition. This function is a no-op on -most terminals; it is active only if can_change_color() returns 1. +most terminals; it is active only if can_change_color() returns true. [clinic start generated code]*/ static PyObject * _curses_init_color_impl(PyObject *module, short color_number, short r, short g, short b) -/*[clinic end generated code: output=280236f5efe9776a input=f3a05bd38f619175]*/ +/*[clinic end generated code: output=280236f5efe9776a input=128601b5dc76d548]*/ { PyCursesInitialised; PyCursesInitialisedColor; @@ -3061,9 +3049,9 @@ _curses.init_pair pair_number: short The number of the color-pair to be changed (1 - (COLOR_PAIRS-1)). fg: short - Foreground color number (0 - COLORS). + Foreground color number (-1 - (COLORS-1)). bg: short - Background color number (0 - COLORS). + Background color number (-1 - (COLORS-1)). / Change the definition of a color-pair. @@ -3075,7 +3063,7 @@ all occurrences of that color-pair are changed to the new definition. static PyObject * _curses_init_pair_impl(PyObject *module, short pair_number, short fg, short bg) -/*[clinic end generated code: output=9c2ce39c22f376b6 input=c9f0b11b17a2ac6d]*/ +/*[clinic end generated code: output=9c2ce39c22f376b6 input=12c320ec14396ea2]*/ { PyCursesInitialised; PyCursesInitialisedColor; @@ -3715,7 +3703,7 @@ _curses_pair_content_impl(PyObject *module, short pair_number) if (pair_content(pair_number, &f, &b)==ERR) { PyErr_SetString(PyCursesError, - "Argument 1 was out of range. (1..COLOR_PAIRS-1)"); + "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); return NULL; } @@ -3740,7 +3728,7 @@ _curses_pair_number_impl(PyObject *module, int attr) PyCursesInitialised; PyCursesInitialisedColor; - return PyLong_FromLong(attr_to_color_pair(attr)); + return PyLong_FromLong(PAIR_NUMBER(attr)); } /*[clinic input] diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index 50d7f213e04e6..66ffcdfdb3f99 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2028,7 +2028,7 @@ PyDoc_STRVAR(_curses_color_content__doc__, "Return the red, green, and blue (RGB) components of the specified color.\n" "\n" " color_number\n" -" The number of the color (0 - COLORS).\n" +" The number of the color (0 - (COLORS-1)).\n" "\n" "A 3-tuple is returned, containing the R, G, B values for the given color,\n" "which will be between 0 (no component) and 1000 (maximum amount of component)."); @@ -2076,13 +2076,13 @@ _curses_color_content(PyObject *module, PyObject *arg) } PyDoc_STRVAR(_curses_color_pair__doc__, -"color_pair($module, color_number, /)\n" +"color_pair($module, pair_number, /)\n" "--\n" "\n" "Return the attribute value for displaying text in the specified color.\n" "\n" -" color_number\n" -" The number of the color (0 - COLORS).\n" +" pair_number\n" +" The number of the color pair.\n" "\n" "This attribute value can be combined with A_STANDOUT, A_REVERSE, and the\n" "other A_* attributes. pair_number() is the counterpart to this function."); @@ -2091,13 +2091,13 @@ PyDoc_STRVAR(_curses_color_pair__doc__, {"color_pair", (PyCFunction)_curses_color_pair, METH_O, _curses_color_pair__doc__}, static PyObject * -_curses_color_pair_impl(PyObject *module, short color_number); +_curses_color_pair_impl(PyObject *module, short pair_number); static PyObject * _curses_color_pair(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; - short color_number; + short pair_number; if (PyFloat_Check(arg)) { PyErr_SetString(PyExc_TypeError, @@ -2120,10 +2120,10 @@ _curses_color_pair(PyObject *module, PyObject *arg) goto exit; } else { - color_number = (short) ival; + pair_number = (short) ival; } } - return_value = _curses_color_pair_impl(module, color_number); + return_value = _curses_color_pair_impl(module, pair_number); exit: return return_value; @@ -2699,7 +2699,7 @@ PyDoc_STRVAR(_curses_init_color__doc__, "Change the definition of a color.\n" "\n" " color_number\n" -" The number of the color to be changed (0 - COLORS).\n" +" The number of the color to be changed (0 - (COLORS-1)).\n" " r\n" " Red component (0 - 1000).\n" " g\n" @@ -2709,7 +2709,7 @@ PyDoc_STRVAR(_curses_init_color__doc__, "\n" "When init_color() is used, all occurrences of that color on the screen\n" "immediately change to the new definition. This function is a no-op on\n" -"most terminals; it is active only if can_change_color() returns 1."); +"most terminals; it is active only if can_change_color() returns true."); #define _CURSES_INIT_COLOR_METHODDEF \ {"init_color", (PyCFunction)(void(*)(void))_curses_init_color, METH_FASTCALL, _curses_init_color__doc__}, @@ -2841,9 +2841,9 @@ PyDoc_STRVAR(_curses_init_pair__doc__, " pair_number\n" " The number of the color-pair to be changed (1 - (COLOR_PAIRS-1)).\n" " fg\n" -" Foreground color number (0 - COLORS).\n" +" Foreground color number (-1 - (COLORS-1)).\n" " bg\n" -" Background color number (0 - COLORS).\n" +" Background color number (-1 - (COLORS-1)).\n" "\n" "If the color-pair was previously initialized, the screen is refreshed and\n" "all occurrences of that color-pair are changed to the new definition."); @@ -4713,4 +4713,4 @@ _curses_use_default_colors(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=b53652f8acafd817 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5e739120041df368 input=a9049054013a1b77]*/ From webhook-mailer at python.org Sun Jan 3 23:48:31 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 04:48:31 -0000 Subject: [Python-checkins] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) Message-ID: https://github.com/python/cpython/commit/c94ee13ad596d26d1859078bc09806aa59bb0000 commit: c94ee13ad596d26d1859078bc09806aa59bb0000 branch: master author: Erlend Egeberg Aasland committer: ned-deily date: 2021-01-03T23:48:19-05:00 summary: bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) files: A Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 16816d1cf86a4..2afdc32f544ca 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -357,9 +357,9 @@ def library_recipes(): ), ), dict( - name="SQLite 3.33.0", - url="https://sqlite.org/2020/sqlite-autoconf-3330000.tar.gz", - checksum='842a8a100d7b01b09e543deb2b7951dd', + name="SQLite 3.34.0", + url="https://sqlite.org/2020/sqlite-autoconf-3340000.tar.gz", + checksum='7f33c9db7b713957fcb9271fe9049fef', extra_cflags=('-Os ' '-DSQLITE_ENABLE_FTS5 ' '-DSQLITE_ENABLE_FTS4 ' @@ -1615,7 +1615,7 @@ def buildDMG(): if os.path.exists(outdir): shutil.rmtree(outdir) - # We used to use the deployment target as the last characters of the + # We used to use the deployment target as the last characters of the # installer file name. With the introduction of weaklinked installer # variants, we may have two variants with the same file name, i.e. # both ending in '10.9'. To avoid this, we now use the major/minor diff --git a/Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst b/Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst new file mode 100644 index 0000000000000..2a625f98e9078 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst @@ -0,0 +1 @@ +Update macOS installer to use SQLite 3.34.0. From webhook-mailer at python.org Mon Jan 4 03:58:30 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Mon, 04 Jan 2021 08:58:30 -0000 Subject: [Python-checkins] [3.8] [3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077) (GH-24079) Message-ID: https://github.com/python/cpython/commit/82794cacc6073af9bc2b792a5ee21397f4c9037f commit: 82794cacc6073af9bc2b792a5ee21397f4c9037f branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-04T10:58:09+02:00 summary: [3.8] [3.9] bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874). (GH-24077) (GH-24079) (cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553) (cherry picked from commit b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e) files: A Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst M Doc/library/curses.rst M Lib/test/test_curses.py M Modules/_cursesmodule.c M Modules/clinic/_cursesmodule.c.h diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 7cd20253aeea6..5a7536412e6ce 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -112,14 +112,15 @@ The module :mod:`curses` defines the following functions: .. function:: color_content(color_number) Return the intensity of the red, green, and blue (RGB) components in the color - *color_number*, which must be between ``0`` and :const:`COLORS`. Return a 3-tuple, + *color_number*, which must be between ``0`` and ``COLORS - 1``. Return a 3-tuple, containing the R,G,B values for the given color, which will be between ``0`` (no component) and ``1000`` (maximum amount of component). -.. function:: color_pair(color_number) +.. function:: color_pair(pair_number) - Return the attribute value for displaying text in the specified color. This + Return the attribute value for displaying text in the specified color pair. + Only the first 256 color pairs are supported. This attribute value can be combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the other :const:`A_\*` attributes. :func:`pair_number` is the counterpart to this function. @@ -278,7 +279,7 @@ The module :mod:`curses` defines the following functions: Change the definition of a color, taking the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). The value of *color_number* must be between ``0`` and - :const:`COLORS`. Each of *r*, *g*, *b*, must be a value between ``0`` and + `COLORS - 1`. Each of *r*, *g*, *b*, must be a value between ``0`` and ``1000``. When :func:`init_color` is used, all occurrences of that color on the screen immediately change to the new definition. This function is a no-op on most terminals; it is active only if :func:`can_change_color` returns ``True``. @@ -291,7 +292,8 @@ The module :mod:`curses` defines the following functions: color number. The value of *pair_number* must be between ``1`` and ``COLOR_PAIRS - 1`` (the ``0`` color pair is wired to white on black and cannot be changed). The value of *fg* and *bg* arguments must be between ``0`` and - :const:`COLORS`. If the color-pair was previously initialized, the screen is + ``COLORS - 1``, or, after calling :func:`use_default_colors`, ``-1``. + If the color-pair was previously initialized, the screen is refreshed and all occurrences of that color-pair are changed to the new definition. @@ -441,7 +443,7 @@ The module :mod:`curses` defines the following functions: .. function:: pair_content(pair_number) Return a tuple ``(fg, bg)`` containing the colors for the requested color pair. - The value of *pair_number* must be between ``1`` and ``COLOR_PAIRS - 1``. + The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - 1``. .. function:: pair_number(attr) diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index b7349d9e42a5d..e39161fde311d 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -4,8 +4,7 @@ # This script doesn't actually display anything very coherent. but it # does call (nearly) every method and function. # -# Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr(), -# init_color() +# Functions not tested: {def,reset}_{shell,prog}_mode, getch(), getstr() # Only called, not tested: getmouse(), ungetmouse() # @@ -13,6 +12,7 @@ import string import sys import tempfile +import functools import unittest from test.support import requires, import_module, verbose, SaveSignals @@ -36,7 +36,17 @@ def requires_curses_func(name): return unittest.skipUnless(hasattr(curses, name), 'requires curses.%s' % name) +def requires_colors(test): + @functools.wraps(test) + def wrapped(self, *args, **kwargs): + if not curses.has_colors(): + self.skipTest('requires colors support') + curses.start_color() + test(self, *args, **kwargs) + return wrapped + term = os.environ.get('TERM') +SHORT_MAX = 0x7fff # If newterm was supported we could use it instead of initscr and not exit @unittest.skipIf(not term or term == 'unknown', @@ -47,6 +57,8 @@ class TestCurses(unittest.TestCase): @classmethod def setUpClass(cls): + if verbose: + print(f'TERM={term}', file=sys.stderr, flush=True) # testing setupterm() inside initscr/endwin # causes terminal breakage stdout_fd = sys.__stdout__.fileno() @@ -300,18 +312,111 @@ def test_module_funcs(self): curses.use_env(1) # Functions only available on a few platforms - def test_colors_funcs(self): - if not curses.has_colors(): - self.skipTest('requires colors support') - curses.start_color() - curses.init_pair(2, 1,1) - curses.color_content(1) - curses.color_pair(2) - curses.pair_content(min(curses.COLOR_PAIRS - 1, 0x7fff)) - curses.pair_number(0) - - if hasattr(curses, 'use_default_colors'): - curses.use_default_colors() + + def bad_colors(self): + return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + + def bad_pairs(self): + return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + + @requires_colors + def test_color_content(self): + self.assertEqual(curses.color_content(curses.COLOR_BLACK), (0, 0, 0)) + curses.color_content(0) + curses.color_content(min(curses.COLORS - 1, SHORT_MAX)) + + for color in self.bad_colors(): + self.assertRaises(OverflowError, curses.color_content, color) + if curses.COLORS <= SHORT_MAX: + self.assertRaises(curses.error, curses.color_content, curses.COLORS) + self.assertRaises(curses.error, curses.color_content, -1) + + @requires_colors + def test_init_color(self): + if not curses.can_change_color: + self.skipTest('cannot change color') + + old = curses.color_content(0) + try: + curses.init_color(0, *old) + except curses.error: + self.skipTest('cannot change color (init_color() failed)') + self.addCleanup(curses.init_color, 0, *old) + curses.init_color(0, 0, 0, 0) + self.assertEqual(curses.color_content(0), (0, 0, 0)) + curses.init_color(0, 1000, 1000, 1000) + self.assertEqual(curses.color_content(0), (1000, 1000, 1000)) + + maxcolor = min(curses.COLORS - 1, SHORT_MAX) + old = curses.color_content(maxcolor) + curses.init_color(maxcolor, *old) + self.addCleanup(curses.init_color, maxcolor, *old) + curses.init_color(maxcolor, 0, 500, 1000) + self.assertEqual(curses.color_content(maxcolor), (0, 500, 1000)) + + for color in self.bad_colors(): + self.assertRaises(OverflowError, curses.init_color, color, 0, 0, 0) + if curses.COLORS <= SHORT_MAX: + self.assertRaises(curses.error, curses.init_color, curses.COLORS, 0, 0, 0) + self.assertRaises(curses.error, curses.init_color, -1, 0, 0, 0) + for comp in (-1, 1001): + self.assertRaises(curses.error, curses.init_color, 0, comp, 0, 0) + self.assertRaises(curses.error, curses.init_color, 0, 0, comp, 0) + self.assertRaises(curses.error, curses.init_color, 0, 0, 0, comp) + + @requires_colors + def test_pair_content(self): + if not hasattr(curses, 'use_default_colors'): + self.assertEqual(curses.pair_content(0), + (curses.COLOR_WHITE, curses.COLOR_BLACK)) + curses.pair_content(0) + curses.pair_content(min(curses.COLOR_PAIRS - 1, SHORT_MAX)) + + for pair in self.bad_pairs(): + self.assertRaises(OverflowError, curses.pair_content, pair) + self.assertRaises(curses.error, curses.pair_content, -1) + + @requires_colors + def test_init_pair(self): + old = curses.pair_content(1) + curses.init_pair(1, *old) + self.addCleanup(curses.init_pair, 1, *old) + + curses.init_pair(1, 0, 0) + self.assertEqual(curses.pair_content(1), (0, 0)) + maxcolor = min(curses.COLORS - 1, SHORT_MAX) + curses.init_pair(1, maxcolor, maxcolor) + self.assertEqual(curses.pair_content(1), (maxcolor, maxcolor)) + maxpair = min(curses.COLOR_PAIRS - 1, SHORT_MAX) + curses.init_pair(maxpair, 2, 3) + self.assertEqual(curses.pair_content(maxpair), (2, 3)) + + for pair in self.bad_pairs(): + self.assertRaises(OverflowError, curses.init_pair, pair, 0, 0) + self.assertRaises(curses.error, curses.init_pair, -1, 0, 0) + for color in self.bad_colors(): + self.assertRaises(OverflowError, curses.init_pair, 1, color, 0) + self.assertRaises(OverflowError, curses.init_pair, 1, 0, color) + if curses.COLORS <= SHORT_MAX: + self.assertRaises(curses.error, curses.init_pair, 1, curses.COLORS, 0) + self.assertRaises(curses.error, curses.init_pair, 1, 0, curses.COLORS) + + @requires_colors + def test_color_attrs(self): + for pair in 0, 1, 255: + attr = curses.color_pair(pair) + self.assertEqual(curses.pair_number(attr), pair, attr) + self.assertEqual(curses.pair_number(attr | curses.A_BOLD), pair) + self.assertEqual(curses.color_pair(0), 0) + self.assertEqual(curses.pair_number(0), 0) + + @requires_curses_func('use_default_colors') + @requires_colors + def test_use_default_colors(self): + self.assertIn(curses.pair_content(0), + ((curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1))) + curses.use_default_colors() + self.assertEqual(curses.pair_content(0), (-1, -1)) @requires_curses_func('keyname') def test_keyname(self): diff --git a/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst b/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst new file mode 100644 index 0000000000000..34ea74a5a323d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst @@ -0,0 +1 @@ +Fixed range checks for color and pair numbers in :mod:`curses`. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index ac23d5d7474a0..47459d65ff6e4 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -176,18 +176,6 @@ static char *screen_encoding = NULL; /* Utility Functions */ -static inline int -color_pair_to_attr(short color_number) -{ - return ((int)color_number << 8); -} - -static inline short -attr_to_color_pair(int attr) -{ - return (short)((attr & A_COLOR) >> 8); -} - /* * Check the return code from a curses function and return None * or raise an exception as appropriate. These are exported using the @@ -618,7 +606,7 @@ _curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, if (type == 2) { funcname = "add_wch"; wstr[1] = L'\0'; - setcchar(&wcval, wstr, attr, attr_to_color_pair(attr), NULL); + setcchar(&wcval, wstr, attr, PAIR_NUMBER(attr), NULL); if (coordinates_group) rtn = mvwadd_wch(self->win,y,x, &wcval); else { @@ -2586,7 +2574,7 @@ NoArgOrFlagNoReturnFunctionBody(cbreak, flag) _curses.color_content color_number: short - The number of the color (0 - COLORS). + The number of the color (0 - (COLORS-1)). / Return the red, green, and blue (RGB) components of the specified color. @@ -2597,7 +2585,7 @@ which will be between 0 (no component) and 1000 (maximum amount of component). static PyObject * _curses_color_content_impl(PyObject *module, short color_number) -/*[clinic end generated code: output=cb15cf3120d4bfc1 input=5555abb1c11e11b7]*/ +/*[clinic end generated code: output=cb15cf3120d4bfc1 input=630f6737514db6ad]*/ { short r,g,b; @@ -2616,8 +2604,8 @@ _curses_color_content_impl(PyObject *module, short color_number) /*[clinic input] _curses.color_pair - color_number: short - The number of the color (0 - COLORS). + pair_number: short + The number of the color pair. / Return the attribute value for displaying text in the specified color. @@ -2627,13 +2615,13 @@ other A_* attributes. pair_number() is the counterpart to this function. [clinic start generated code]*/ static PyObject * -_curses_color_pair_impl(PyObject *module, short color_number) -/*[clinic end generated code: output=6a84cb6b29ecaf9a input=a9d3eb6f50e4dc12]*/ +_curses_color_pair_impl(PyObject *module, short pair_number) +/*[clinic end generated code: output=ce609d238b70dc11 input=8dd0d5da94cb15b5]*/ { PyCursesInitialised; PyCursesInitialisedColor; - return PyLong_FromLong(color_pair_to_attr(color_number)); + return PyLong_FromLong(COLOR_PAIR(pair_number)); } /*[clinic input] @@ -3028,7 +3016,7 @@ _curses_has_key_impl(PyObject *module, int key) _curses.init_color color_number: short - The number of the color to be changed (0 - COLORS). + The number of the color to be changed (0 - (COLORS-1)). r: short Red component (0 - 1000). g: short @@ -3041,13 +3029,13 @@ Change the definition of a color. When init_color() is used, all occurrences of that color on the screen immediately change to the new definition. This function is a no-op on -most terminals; it is active only if can_change_color() returns 1. +most terminals; it is active only if can_change_color() returns true. [clinic start generated code]*/ static PyObject * _curses_init_color_impl(PyObject *module, short color_number, short r, short g, short b) -/*[clinic end generated code: output=280236f5efe9776a input=f3a05bd38f619175]*/ +/*[clinic end generated code: output=280236f5efe9776a input=128601b5dc76d548]*/ { PyCursesInitialised; PyCursesInitialisedColor; @@ -3061,9 +3049,9 @@ _curses.init_pair pair_number: short The number of the color-pair to be changed (1 - (COLOR_PAIRS-1)). fg: short - Foreground color number (0 - COLORS). + Foreground color number (-1 - (COLORS-1)). bg: short - Background color number (0 - COLORS). + Background color number (-1 - (COLORS-1)). / Change the definition of a color-pair. @@ -3075,7 +3063,7 @@ all occurrences of that color-pair are changed to the new definition. static PyObject * _curses_init_pair_impl(PyObject *module, short pair_number, short fg, short bg) -/*[clinic end generated code: output=9c2ce39c22f376b6 input=c9f0b11b17a2ac6d]*/ +/*[clinic end generated code: output=9c2ce39c22f376b6 input=12c320ec14396ea2]*/ { PyCursesInitialised; PyCursesInitialisedColor; @@ -3631,7 +3619,7 @@ _curses_pair_content_impl(PyObject *module, short pair_number) if (pair_content(pair_number, &f, &b)==ERR) { PyErr_SetString(PyCursesError, - "Argument 1 was out of range. (1..COLOR_PAIRS-1)"); + "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); return NULL; } @@ -3656,7 +3644,7 @@ _curses_pair_number_impl(PyObject *module, int attr) PyCursesInitialised; PyCursesInitialisedColor; - return PyLong_FromLong(attr_to_color_pair(attr)); + return PyLong_FromLong(PAIR_NUMBER(attr)); } /*[clinic input] diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index 437604cb92ae6..889c2f64e1a11 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2028,7 +2028,7 @@ PyDoc_STRVAR(_curses_color_content__doc__, "Return the red, green, and blue (RGB) components of the specified color.\n" "\n" " color_number\n" -" The number of the color (0 - COLORS).\n" +" The number of the color (0 - (COLORS-1)).\n" "\n" "A 3-tuple is returned, containing the R, G, B values for the given color,\n" "which will be between 0 (no component) and 1000 (maximum amount of component)."); @@ -2076,13 +2076,13 @@ _curses_color_content(PyObject *module, PyObject *arg) } PyDoc_STRVAR(_curses_color_pair__doc__, -"color_pair($module, color_number, /)\n" +"color_pair($module, pair_number, /)\n" "--\n" "\n" "Return the attribute value for displaying text in the specified color.\n" "\n" -" color_number\n" -" The number of the color (0 - COLORS).\n" +" pair_number\n" +" The number of the color pair.\n" "\n" "This attribute value can be combined with A_STANDOUT, A_REVERSE, and the\n" "other A_* attributes. pair_number() is the counterpart to this function."); @@ -2091,13 +2091,13 @@ PyDoc_STRVAR(_curses_color_pair__doc__, {"color_pair", (PyCFunction)_curses_color_pair, METH_O, _curses_color_pair__doc__}, static PyObject * -_curses_color_pair_impl(PyObject *module, short color_number); +_curses_color_pair_impl(PyObject *module, short pair_number); static PyObject * _curses_color_pair(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; - short color_number; + short pair_number; if (PyFloat_Check(arg)) { PyErr_SetString(PyExc_TypeError, @@ -2120,10 +2120,10 @@ _curses_color_pair(PyObject *module, PyObject *arg) goto exit; } else { - color_number = (short) ival; + pair_number = (short) ival; } } - return_value = _curses_color_pair_impl(module, color_number); + return_value = _curses_color_pair_impl(module, pair_number); exit: return return_value; @@ -2699,7 +2699,7 @@ PyDoc_STRVAR(_curses_init_color__doc__, "Change the definition of a color.\n" "\n" " color_number\n" -" The number of the color to be changed (0 - COLORS).\n" +" The number of the color to be changed (0 - (COLORS-1)).\n" " r\n" " Red component (0 - 1000).\n" " g\n" @@ -2709,7 +2709,7 @@ PyDoc_STRVAR(_curses_init_color__doc__, "\n" "When init_color() is used, all occurrences of that color on the screen\n" "immediately change to the new definition. This function is a no-op on\n" -"most terminals; it is active only if can_change_color() returns 1."); +"most terminals; it is active only if can_change_color() returns true."); #define _CURSES_INIT_COLOR_METHODDEF \ {"init_color", (PyCFunction)(void(*)(void))_curses_init_color, METH_FASTCALL, _curses_init_color__doc__}, @@ -2841,9 +2841,9 @@ PyDoc_STRVAR(_curses_init_pair__doc__, " pair_number\n" " The number of the color-pair to be changed (1 - (COLOR_PAIRS-1)).\n" " fg\n" -" Foreground color number (0 - COLORS).\n" +" Foreground color number (-1 - (COLORS-1)).\n" " bg\n" -" Background color number (0 - COLORS).\n" +" Background color number (-1 - (COLORS-1)).\n" "\n" "If the color-pair was previously initialized, the screen is refreshed and\n" "all occurrences of that color-pair are changed to the new definition."); @@ -4559,4 +4559,4 @@ _curses_use_default_colors(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=820af7050893ed16 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c5267f2ffe238810 input=a9049054013a1b77]*/ From webhook-mailer at python.org Mon Jan 4 04:39:51 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 09:39:51 -0000 Subject: [Python-checkins] bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) Message-ID: https://github.com/python/cpython/commit/14097a2785414c728d41d8d730a469a8c46ecdb9 commit: 14097a2785414c728d41d8d730a469a8c46ecdb9 branch: master author: Ned Deily committer: ned-deily date: 2021-01-04T04:39:47-05:00 summary: bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) files: A Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst D Mac/BuildScript/openssl-mac-arm64.patch M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 2afdc32f544ca..4d7bc1054518c 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -242,15 +242,12 @@ def library_recipes(): result.extend([ dict( - name="OpenSSL 1.1.1g", - url="https://www.openssl.org/source/openssl-1.1.1g.tar.gz", - checksum='76766e98997660138cdaf13a187bd234', + name="OpenSSL 1.1.1i", + url="https://www.openssl.org/source/openssl-1.1.1i.tar.gz", + checksum='08987c3cf125202e2b0840035efb392c', buildrecipe=build_universal_openssl, configure=None, install=None, - patches=[ - "openssl-mac-arm64.patch", - ], ), ]) diff --git a/Mac/BuildScript/openssl-mac-arm64.patch b/Mac/BuildScript/openssl-mac-arm64.patch deleted file mode 100644 index 11267fb118744..0000000000000 --- a/Mac/BuildScript/openssl-mac-arm64.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -ur openssl-1.1.1g-orig/Configurations/10-main.conf openssl-1.1.1g/Configurations/10-main.conf ---- openssl-1.1.1g-orig/Configurations/10-main.conf 2020-04-21 14:22:39.000000000 +0200 -+++ openssl-1.1.1g/Configurations/10-main.conf 2020-07-26 12:21:32.000000000 +0200 -@@ -1557,6 +1557,14 @@ - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "macosx", - }, -+ "darwin64-arm64-cc" => { -+ inherit_from => [ "darwin-common", asm("aarch64_asm") ], -+ CFLAGS => add("-Wall"), -+ cflags => add("-arch arm64"), -+ lib_cppflags => add("-DL_ENDIAN"), -+ bn_ops => "SIXTY_FOUR_BIT_LONG", -+ perlasm_scheme => "ios64", -+ }, - - ##### GNU Hurd - "hurd-x86" => { -diff -ur openssl-1.1.1g-orig/config openssl-1.1.1g/config ---- openssl-1.1.1g-orig/config 2020-04-21 14:22:39.000000000 +0200 -+++ openssl-1.1.1g/config 2020-07-26 12:21:59.000000000 +0200 -@@ -255,6 +255,9 @@ - ;; - x86_64) - echo "x86_64-apple-darwin${VERSION}" -+ ;; -+ arm64) -+ echo "arm64-apple-darwin${VERSION}" - ;; - *) - echo "i686-apple-darwin${VERSION}" -@@ -497,6 +500,9 @@ - else - OUT="darwin64-x86_64-cc" - fi ;; -+ x86_64-apple-darwin*) -+ OUT="darwin64-arm64-cc" -+ ;; - armv6+7-*-iphoneos) - __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" - __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" diff --git a/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst b/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst new file mode 100644 index 0000000000000..3f9415f4a3606 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst @@ -0,0 +1 @@ +Update macOS installer build to use OpenSSL 1.1.1i. From webhook-mailer at python.org Mon Jan 4 04:43:20 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 09:43:20 -0000 Subject: [Python-checkins] bpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081) Message-ID: https://github.com/python/cpython/commit/a38e04b566879a5040ea97428d7ee4331d76513f commit: a38e04b566879a5040ea97428d7ee4331d76513f branch: master author: Ned Deily committer: ned-deily date: 2021-01-04T04:43:11-05:00 summary: bpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081) As of 2021-01-03, Tcl/Tk 8.6.11rc2 is expected to be the final release. files: A Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 4d7bc1054518c..deafcce4f8128 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -260,10 +260,10 @@ def library_recipes(): tk_patches = ['tk868_on_10_8_10_9.patch'] else: - tcl_tk_ver='8.6.10' - tcl_checksum='97c55573f8520bcab74e21bfd8d0aadc' + tcl_tk_ver='8.6.11' + tcl_checksum='8a4c004f48984a03a7747e9ba06e4da4' - tk_checksum='602a47ad9ecac7bf655ada729d140a94' + tk_checksum='c7ee71a2d05bba78dfffd76528dc17c6' tk_patches = [ ] diff --git a/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst b/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst new file mode 100644 index 0000000000000..39526b32935b8 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst @@ -0,0 +1,2 @@ +Update macOS installer build to use Tcl/Tk 8.6.11 (rc2, expected to be final +release). From webhook-mailer at python.org Mon Jan 4 04:43:57 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 09:43:57 -0000 Subject: [Python-checkins] Update Sphinx version for macOS installer build. (GH-24082) Message-ID: https://github.com/python/cpython/commit/0f3b96b368dd7ebb5dcd3759a30322dbd027f292 commit: 0f3b96b368dd7ebb5dcd3759a30322dbd027f292 branch: master author: Ned Deily committer: ned-deily date: 2021-01-04T04:43:53-05:00 summary: Update Sphinx version for macOS installer build. (GH-24082) files: M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index deafcce4f8128..ef64502ab780c 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -1135,7 +1135,6 @@ def buildPythonDocs(): if not os.path.exists(htmlDir): # Create virtual environment for docs builds with blurb and sphinx runCommand('make venv') - runCommand('venv/bin/python3 -m pip install -U Sphinx==2.3.1') runCommand('make html PYTHON=venv/bin/python') os.rename(htmlDir, docdir) os.chdir(curDir) From webhook-mailer at python.org Mon Jan 4 05:17:39 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 04 Jan 2021 10:17:39 -0000 Subject: [Python-checkins] bpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081) Message-ID: https://github.com/python/cpython/commit/cb882f97bc142380460ea519829dc4baf0eb01f2 commit: cb882f97bc142380460ea519829dc4baf0eb01f2 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-04T02:17:30-08:00 summary: bpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (GH-24081) As of 2021-01-03, Tcl/Tk 8.6.11rc2 is expected to be the final release. (cherry picked from commit a38e04b566879a5040ea97428d7ee4331d76513f) Co-authored-by: Ned Deily files: A Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 16816d1cf86a4..38c66801de885 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -263,10 +263,10 @@ def library_recipes(): tk_patches = ['tk868_on_10_8_10_9.patch'] else: - tcl_tk_ver='8.6.10' - tcl_checksum='97c55573f8520bcab74e21bfd8d0aadc' + tcl_tk_ver='8.6.11' + tcl_checksum='8a4c004f48984a03a7747e9ba06e4da4' - tk_checksum='602a47ad9ecac7bf655ada729d140a94' + tk_checksum='c7ee71a2d05bba78dfffd76528dc17c6' tk_patches = [ ] diff --git a/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst b/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst new file mode 100644 index 0000000000000..39526b32935b8 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst @@ -0,0 +1,2 @@ +Update macOS installer build to use Tcl/Tk 8.6.11 (rc2, expected to be final +release). From webhook-mailer at python.org Mon Jan 4 05:21:09 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 10:21:09 -0000 Subject: [Python-checkins] Update Sphinx version for macOS installer build. (GH-24082) (GH-24088) Message-ID: https://github.com/python/cpython/commit/ed2d3d15b27f3599edbe3bdd278e529e0f0ba566 commit: ed2d3d15b27f3599edbe3bdd278e529e0f0ba566 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-04T05:21:01-05:00 summary: Update Sphinx version for macOS installer build. (GH-24082) (GH-24088) (cherry picked from commit 0f3b96b368dd7ebb5dcd3759a30322dbd027f292) Co-authored-by: Ned Deily files: M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 2548b212d9ea4..eeb46990814bd 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -1090,7 +1090,6 @@ def buildPythonDocs(): if not os.path.exists(htmlDir): # Create virtual environment for docs builds with blurb and sphinx runCommand('make venv') - runCommand('venv/bin/python3 -m pip install -U Sphinx==2.3.1') runCommand('make html PYTHON=venv/bin/python') os.rename(htmlDir, docdir) os.chdir(curDir) From webhook-mailer at python.org Mon Jan 4 05:22:15 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 10:22:15 -0000 Subject: [Python-checkins] Update Sphinx version for macOS installer build. (GH-24082) (GH-24087) Message-ID: https://github.com/python/cpython/commit/fd235de6d3700da98cee370fb486957c04212c30 commit: fd235de6d3700da98cee370fb486957c04212c30 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-04T05:22:07-05:00 summary: Update Sphinx version for macOS installer build. (GH-24082) (GH-24087) (cherry picked from commit 0f3b96b368dd7ebb5dcd3759a30322dbd027f292) Co-authored-by: Ned Deily files: M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 38c66801de885..cb3398964e043 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -1138,7 +1138,6 @@ def buildPythonDocs(): if not os.path.exists(htmlDir): # Create virtual environment for docs builds with blurb and sphinx runCommand('make venv') - runCommand('venv/bin/python3 -m pip install -U Sphinx==2.3.1') runCommand('make html PYTHON=venv/bin/python') os.rename(htmlDir, docdir) os.chdir(curDir) From webhook-mailer at python.org Mon Jan 4 05:27:27 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 10:27:27 -0000 Subject: [Python-checkins] bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) (#24084) Message-ID: https://github.com/python/cpython/commit/f24ac455521e46bf9f6c7971aec0e4abec4451c4 commit: f24ac455521e46bf9f6c7971aec0e4abec4451c4 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-04T05:27:15-05:00 summary: bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) (#24084) (cherry picked from commit 14097a2785414c728d41d8d730a469a8c46ecdb9) Co-authored-by: Ned Deily files: A Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index eeb46990814bd..7ef3753ad5757 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -209,9 +209,9 @@ def library_recipes(): result.extend([ dict( - name="OpenSSL 1.1.1g", - url="https://www.openssl.org/source/openssl-1.1.1g.tar.gz", - checksum='76766e98997660138cdaf13a187bd234', + name="OpenSSL 1.1.1i", + url="https://www.openssl.org/source/openssl-1.1.1i.tar.gz", + checksum='08987c3cf125202e2b0840035efb392c', buildrecipe=build_universal_openssl, configure=None, install=None, diff --git a/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst b/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst new file mode 100644 index 0000000000000..3f9415f4a3606 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst @@ -0,0 +1 @@ +Update macOS installer build to use OpenSSL 1.1.1i. From webhook-mailer at python.org Mon Jan 4 05:28:37 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 10:28:37 -0000 Subject: [Python-checkins] bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) (GH-24083) Message-ID: https://github.com/python/cpython/commit/76489dd2998ac70ffb300d612792a7238c03438c commit: 76489dd2998ac70ffb300d612792a7238c03438c branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-04T05:28:29-05:00 summary: bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. (GH-24080) (GH-24083) (cherry picked from commit 14097a2785414c728d41d8d730a469a8c46ecdb9) Co-authored-by: Ned Deily files: A Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst D Mac/BuildScript/openssl-mac-arm64.patch M Mac/BuildScript/build-installer.py diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index cb3398964e043..b51859823a4a0 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -242,15 +242,12 @@ def library_recipes(): result.extend([ dict( - name="OpenSSL 1.1.1g", - url="https://www.openssl.org/source/openssl-1.1.1g.tar.gz", - checksum='76766e98997660138cdaf13a187bd234', + name="OpenSSL 1.1.1i", + url="https://www.openssl.org/source/openssl-1.1.1i.tar.gz", + checksum='08987c3cf125202e2b0840035efb392c', buildrecipe=build_universal_openssl, configure=None, install=None, - patches=[ - "openssl-mac-arm64.patch", - ], ), ]) diff --git a/Mac/BuildScript/openssl-mac-arm64.patch b/Mac/BuildScript/openssl-mac-arm64.patch deleted file mode 100644 index 11267fb118744..0000000000000 --- a/Mac/BuildScript/openssl-mac-arm64.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -ur openssl-1.1.1g-orig/Configurations/10-main.conf openssl-1.1.1g/Configurations/10-main.conf ---- openssl-1.1.1g-orig/Configurations/10-main.conf 2020-04-21 14:22:39.000000000 +0200 -+++ openssl-1.1.1g/Configurations/10-main.conf 2020-07-26 12:21:32.000000000 +0200 -@@ -1557,6 +1557,14 @@ - bn_ops => "SIXTY_FOUR_BIT_LONG", - perlasm_scheme => "macosx", - }, -+ "darwin64-arm64-cc" => { -+ inherit_from => [ "darwin-common", asm("aarch64_asm") ], -+ CFLAGS => add("-Wall"), -+ cflags => add("-arch arm64"), -+ lib_cppflags => add("-DL_ENDIAN"), -+ bn_ops => "SIXTY_FOUR_BIT_LONG", -+ perlasm_scheme => "ios64", -+ }, - - ##### GNU Hurd - "hurd-x86" => { -diff -ur openssl-1.1.1g-orig/config openssl-1.1.1g/config ---- openssl-1.1.1g-orig/config 2020-04-21 14:22:39.000000000 +0200 -+++ openssl-1.1.1g/config 2020-07-26 12:21:59.000000000 +0200 -@@ -255,6 +255,9 @@ - ;; - x86_64) - echo "x86_64-apple-darwin${VERSION}" -+ ;; -+ arm64) -+ echo "arm64-apple-darwin${VERSION}" - ;; - *) - echo "i686-apple-darwin${VERSION}" -@@ -497,6 +500,9 @@ - else - OUT="darwin64-x86_64-cc" - fi ;; -+ x86_64-apple-darwin*) -+ OUT="darwin64-arm64-cc" -+ ;; - armv6+7-*-iphoneos) - __CNF_CFLAGS="$__CNF_CFLAGS -arch armv6 -arch armv7" - __CNF_CXXFLAGS="$__CNF_CXXFLAGS -arch armv6 -arch armv7" diff --git a/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst b/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst new file mode 100644 index 0000000000000..3f9415f4a3606 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst @@ -0,0 +1 @@ +Update macOS installer build to use OpenSSL 1.1.1i. From webhook-mailer at python.org Mon Jan 4 05:30:25 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Mon, 04 Jan 2021 10:30:25 -0000 Subject: [Python-checkins] bpo-42789: Enable using /dev/tty in test_curses. (GH-24085) Message-ID: https://github.com/python/cpython/commit/b6fc0c406e6b4b86f59b1390142f35da0e364927 commit: b6fc0c406e6b4b86f59b1390142f35da0e364927 branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-04T12:30:20+02:00 summary: bpo-42789: Enable using /dev/tty in test_curses. (GH-24085) It was temporary disabled for debugging. files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 31fb882b72434..7b40d71474210 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -85,7 +85,7 @@ def setUp(self): else: try: # Try to open the terminal device. - tmp = open('/xdev/tty', 'wb', buffering=0) + tmp = open('/dev/tty', 'wb', buffering=0) except OSError: # As a fallback, use regular file to write control codes. # Some functions (like savetty) will not work, but at From webhook-mailer at python.org Mon Jan 4 05:37:06 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 04 Jan 2021 10:37:06 -0000 Subject: [Python-checkins] bpo-42692: fix __builtin_available check on older compilers (GH-23873) Message-ID: https://github.com/python/cpython/commit/df21f502fdccec234282bf0a211af979fd23def4 commit: df21f502fdccec234282bf0a211af979fd23def4 branch: master author: Joshua Root committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-04T02:36:58-08:00 summary: bpo-42692: fix __builtin_available check on older compilers (GH-23873) A compiler that doesn't define `__has_builtin` will error out when it is used on the same line as the check for it. Automerge-Triggered-By: GH:ronaldoussoren files: A Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst M Modules/posixmodule.c diff --git a/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst b/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst new file mode 100644 index 0000000000000..91582b945b803 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst @@ -0,0 +1 @@ +Fix __builtin_available check on older compilers. Patch by Joshua Root. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 13e3963bf510f..4468fd08e17a5 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -61,7 +61,13 @@ */ #if defined(__APPLE__) -#if defined(__has_builtin) && __has_builtin(__builtin_available) +#if defined(__has_builtin) +#if __has_builtin(__builtin_available) +#define HAVE_BUILTIN_AVAILABLE 1 +#endif +#endif + +#ifdef HAVE_BUILTIN_AVAILABLE # define HAVE_FSTATAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) # define HAVE_FACCESSAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) # define HAVE_FCHMODAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) From webhook-mailer at python.org Mon Jan 4 06:00:50 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 04 Jan 2021 11:00:50 -0000 Subject: [Python-checkins] bpo-42692: fix __builtin_available check on older compilers (GH-23873) (GH-24090) Message-ID: https://github.com/python/cpython/commit/eedeaef1f22d27264ce9b031da80fe2485e85e69 commit: eedeaef1f22d27264ce9b031da80fe2485e85e69 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-04T06:00:43-05:00 summary: bpo-42692: fix __builtin_available check on older compilers (GH-23873) (GH-24090) A compiler that doesn't define `__has_builtin` will error out when it is used on the same line as the check for it. Automerge-Triggered-By: GH:ronaldoussoren (cherry picked from commit df21f502fdccec234282bf0a211af979fd23def4) Co-authored-by: Joshua Root files: A Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst M Modules/posixmodule.c diff --git a/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst b/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst new file mode 100644 index 0000000000000..91582b945b803 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst @@ -0,0 +1 @@ +Fix __builtin_available check on older compilers. Patch by Joshua Root. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index d2ce8339e61f0..5e33502721c19 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -56,7 +56,13 @@ */ #if defined(__APPLE__) -#if defined(__has_builtin) && __has_builtin(__builtin_available) +#if defined(__has_builtin) +#if __has_builtin(__builtin_available) +#define HAVE_BUILTIN_AVAILABLE 1 +#endif +#endif + +#ifdef HAVE_BUILTIN_AVAILABLE # define HAVE_FSTATAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) # define HAVE_FACCESSAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) # define HAVE_FCHMODAT_RUNTIME __builtin_available(macOS 10.10, iOS 8.0, *) From webhook-mailer at python.org Mon Jan 4 08:51:27 2021 From: webhook-mailer at python.org (markshannon) Date: Mon, 04 Jan 2021 13:51:27 -0000 Subject: [Python-checkins] Delete the now unused c_do_not_emit_bytecode field. (#24094) Message-ID: https://github.com/python/cpython/commit/bf06b209da8c4ffc07887913f05990fa035aa1fb commit: bf06b209da8c4ffc07887913f05990fa035aa1fb branch: master author: Mark Shannon committer: markshannon date: 2021-01-04T13:51:17Z summary: Delete the now unused c_do_not_emit_bytecode field. (#24094) files: M Python/compile.c diff --git a/Python/compile.c b/Python/compile.c index 4ba91400001aa..54bd166c64e59 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -193,12 +193,6 @@ struct compiler { int c_optimize; /* optimization level */ int c_interactive; /* true if in interactive mode */ int c_nestlevel; - int c_do_not_emit_bytecode; /* The compiler won't emit any bytecode - if this value is different from zero. - This can be used to temporarily visit - nodes without emitting bytecode to - check only errors. */ - PyObject *c_const_cache; /* Python dict holding all constants, including names tuple */ struct compiler_unit *u; /* compiler state for current block */ @@ -379,7 +373,6 @@ PyAST_CompileObject(mod_ty mod, PyObject *filename, PyCompilerFlags *flags, c.c_flags = flags; c.c_optimize = (optimize == -1) ? _Py_GetConfig()->optimization_level : optimize; c.c_nestlevel = 0; - c.c_do_not_emit_bytecode = 0; _PyASTOptimizeState state; state.optimize = c.c_optimize; @@ -1181,9 +1174,6 @@ compiler_addop(struct compiler *c, int opcode) struct instr *i; int off; assert(!HAS_ARG(opcode)); - if (c->c_do_not_emit_bytecode) { - return 1; - } off = compiler_next_instr(c->u->u_curblock); if (off < 0) return 0; @@ -1337,10 +1327,6 @@ merge_consts_recursive(struct compiler *c, PyObject *o) static Py_ssize_t compiler_add_const(struct compiler *c, PyObject *o) { - if (c->c_do_not_emit_bytecode) { - return 0; - } - PyObject *key = merge_consts_recursive(c, o); if (key == NULL) { return -1; @@ -1354,10 +1340,6 @@ compiler_add_const(struct compiler *c, PyObject *o) static int compiler_addop_load_const(struct compiler *c, PyObject *o) { - if (c->c_do_not_emit_bytecode) { - return 1; - } - Py_ssize_t arg = compiler_add_const(c, o); if (arg < 0) return 0; @@ -1368,10 +1350,6 @@ static int compiler_addop_o(struct compiler *c, int opcode, PyObject *dict, PyObject *o) { - if (c->c_do_not_emit_bytecode) { - return 1; - } - Py_ssize_t arg = compiler_add_o(dict, o); if (arg < 0) return 0; @@ -1384,10 +1362,6 @@ compiler_addop_name(struct compiler *c, int opcode, PyObject *dict, { Py_ssize_t arg; - if (c->c_do_not_emit_bytecode) { - return 1; - } - PyObject *mangled = _Py_Mangle(c->u->u_private, o); if (!mangled) return 0; @@ -1408,10 +1382,6 @@ compiler_addop_i(struct compiler *c, int opcode, Py_ssize_t oparg) struct instr *i; int off; - if (c->c_do_not_emit_bytecode) { - return 1; - } - /* oparg value is unsigned, but a signed C int is usually used to store it in the C code (like Python/ceval.c). @@ -1452,9 +1422,6 @@ static int add_jump_to_block(basicblock *b, int opcode, int lineno, basicblock * static int compiler_addop_j(struct compiler *c, int opcode, basicblock *b) { - if (c->c_do_not_emit_bytecode) { - return 1; - } return add_jump_to_block(c->u->u_curblock, opcode, c->u->u_lineno, b); } From webhook-mailer at python.org Mon Jan 4 09:34:38 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 04 Jan 2021 14:34:38 -0000 Subject: [Python-checkins] bpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-22222) Message-ID: https://github.com/python/cpython/commit/c8a87addb1fa35dec79ed8f227eba3694fc36234 commit: c8a87addb1fa35dec79ed8f227eba3694fc36234 branch: master author: Mohamed Koubaa committer: vstinner date: 2021-01-04T15:34:26+01:00 summary: bpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-22222) files: A Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst M Modules/clinic/pyexpat.c.h M Modules/pyexpat.c diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst b/Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst new file mode 100644 index 0000000000000..cdf0e792cee81 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst @@ -0,0 +1,2 @@ +Port the :mod:`pyexpat` extension module to multi-phase initialization +(:pep:`489`). diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 923ca6bfa4127..7c56d6a8b2591 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -11,32 +11,26 @@ PyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__, "`isfinal\' should be true at end of input."); #define PYEXPAT_XMLPARSER_PARSE_METHODDEF \ - {"Parse", (PyCFunction)(void(*)(void))pyexpat_xmlparser_Parse, METH_FASTCALL, pyexpat_xmlparser_Parse__doc__}, + {"Parse", (PyCFunction)(void(*)(void))pyexpat_xmlparser_Parse, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_Parse__doc__}, static PyObject * -pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data, - int isfinal); +pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyTypeObject *cls, + PyObject *data, int isfinal); static PyObject * -pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject *const *args, Py_ssize_t nargs) +pyexpat_xmlparser_Parse(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; + static const char * const _keywords[] = {"", "", NULL}; + static _PyArg_Parser _parser = {"O|i:Parse", _keywords, 0}; PyObject *data; int isfinal = 0; - if (!_PyArg_CheckPositional("Parse", nargs, 1, 2)) { + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, + &data, &isfinal)) { goto exit; } - data = args[0]; - if (nargs < 2) { - goto skip_optional; - } - isfinal = _PyLong_AsInt(args[1]); - if (isfinal == -1 && PyErr_Occurred()) { - goto exit; - } -skip_optional: - return_value = pyexpat_xmlparser_Parse_impl(self, data, isfinal); + return_value = pyexpat_xmlparser_Parse_impl(self, cls, data, isfinal); exit: return return_value; @@ -49,7 +43,29 @@ PyDoc_STRVAR(pyexpat_xmlparser_ParseFile__doc__, "Parse XML data from file-like object."); #define PYEXPAT_XMLPARSER_PARSEFILE_METHODDEF \ - {"ParseFile", (PyCFunction)pyexpat_xmlparser_ParseFile, METH_O, pyexpat_xmlparser_ParseFile__doc__}, + {"ParseFile", (PyCFunction)(void(*)(void))pyexpat_xmlparser_ParseFile, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_ParseFile__doc__}, + +static PyObject * +pyexpat_xmlparser_ParseFile_impl(xmlparseobject *self, PyTypeObject *cls, + PyObject *file); + +static PyObject * +pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"", NULL}; + static _PyArg_Parser _parser = {"O:ParseFile", _keywords, 0}; + PyObject *file; + + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, + &file)) { + goto exit; + } + return_value = pyexpat_xmlparser_ParseFile_impl(self, cls, file); + +exit: + return return_value; +} PyDoc_STRVAR(pyexpat_xmlparser_SetBase__doc__, "SetBase($self, base, /)\n" @@ -135,59 +151,28 @@ PyDoc_STRVAR(pyexpat_xmlparser_ExternalEntityParserCreate__doc__, "Create a parser for parsing an external entity based on the information passed to the ExternalEntityRefHandler."); #define PYEXPAT_XMLPARSER_EXTERNALENTITYPARSERCREATE_METHODDEF \ - {"ExternalEntityParserCreate", (PyCFunction)(void(*)(void))pyexpat_xmlparser_ExternalEntityParserCreate, METH_FASTCALL, pyexpat_xmlparser_ExternalEntityParserCreate__doc__}, + {"ExternalEntityParserCreate", (PyCFunction)(void(*)(void))pyexpat_xmlparser_ExternalEntityParserCreate, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_ExternalEntityParserCreate__doc__}, static PyObject * pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self, + PyTypeObject *cls, const char *context, const char *encoding); static PyObject * -pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject *const *args, Py_ssize_t nargs) +pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; + static const char * const _keywords[] = {"", "", NULL}; + static _PyArg_Parser _parser = {"z|s:ExternalEntityParserCreate", _keywords, 0}; const char *context; const char *encoding = NULL; - if (!_PyArg_CheckPositional("ExternalEntityParserCreate", nargs, 1, 2)) { + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, + &context, &encoding)) { goto exit; } - if (args[0] == Py_None) { - context = NULL; - } - else if (PyUnicode_Check(args[0])) { - Py_ssize_t context_length; - context = PyUnicode_AsUTF8AndSize(args[0], &context_length); - if (context == NULL) { - goto exit; - } - if (strlen(context) != (size_t)context_length) { - PyErr_SetString(PyExc_ValueError, "embedded null character"); - goto exit; - } - } - else { - _PyArg_BadArgument("ExternalEntityParserCreate", "argument 1", "str or None", args[0]); - goto exit; - } - if (nargs < 2) { - goto skip_optional; - } - if (!PyUnicode_Check(args[1])) { - _PyArg_BadArgument("ExternalEntityParserCreate", "argument 2", "str", args[1]); - goto exit; - } - Py_ssize_t encoding_length; - encoding = PyUnicode_AsUTF8AndSize(args[1], &encoding_length); - if (encoding == NULL) { - goto exit; - } - if (strlen(encoding) != (size_t)encoding_length) { - PyErr_SetString(PyExc_ValueError, "embedded null character"); - goto exit; - } -skip_optional: - return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, context, encoding); + return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, cls, context, encoding); exit: return return_value; @@ -239,29 +224,25 @@ PyDoc_STRVAR(pyexpat_xmlparser_UseForeignDTD__doc__, "information to the parser. \'flag\' defaults to True if not provided."); #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF \ - {"UseForeignDTD", (PyCFunction)(void(*)(void))pyexpat_xmlparser_UseForeignDTD, METH_FASTCALL, pyexpat_xmlparser_UseForeignDTD__doc__}, + {"UseForeignDTD", (PyCFunction)(void(*)(void))pyexpat_xmlparser_UseForeignDTD, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, pyexpat_xmlparser_UseForeignDTD__doc__}, static PyObject * -pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, int flag); +pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, PyTypeObject *cls, + int flag); static PyObject * -pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject *const *args, Py_ssize_t nargs) +pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; + static const char * const _keywords[] = {"", NULL}; + static _PyArg_Parser _parser = {"|p:UseForeignDTD", _keywords, 0}; int flag = 1; - if (!_PyArg_CheckPositional("UseForeignDTD", nargs, 0, 1)) { - goto exit; - } - if (nargs < 1) { - goto skip_optional; - } - flag = PyObject_IsTrue(args[0]); - if (flag < 0) { + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, + &flag)) { goto exit; } -skip_optional: - return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, flag); + return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, cls, flag); exit: return return_value; @@ -387,4 +368,4 @@ pyexpat_ErrorString(PyObject *module, PyObject *arg) #ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */ -/*[clinic end generated code: output=14e37efc4ec10be2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=612b9d6a17a679a7 input=a9049054013a1b77]*/ diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 0ea438ae2ae5d..a13d340a3ea0f 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -47,7 +47,18 @@ enum HandlerTypes { _DummyDecl }; -static PyObject *ErrorObject; +typedef struct { + PyTypeObject *xml_parse_type; + PyObject *error; +} pyexpat_state; + +static inline pyexpat_state* +pyexpat_get_state(PyObject *module) +{ + void *state = PyModule_GetState(module); + assert(state != NULL); + return (pyexpat_state *)state; +} /* ----------------------------------------------------- */ @@ -73,8 +84,6 @@ typedef struct { #define CHARACTER_DATA_BUFFER_SIZE 8192 -static PyTypeObject Xmlparsetype; - typedef void (*xmlhandlersetter)(XML_Parser self, void *meth); typedef void* xmlhandler; @@ -107,7 +116,7 @@ set_error_attr(PyObject *err, const char *name, int value) * information. Always returns NULL. */ static PyObject * -set_error(xmlparseobject *self, enum XML_Error code) +set_error(pyexpat_state *state, xmlparseobject *self, enum XML_Error code) { PyObject *err; PyObject *buffer; @@ -119,13 +128,13 @@ set_error(xmlparseobject *self, enum XML_Error code) XML_ErrorString(code), lineno, column); if (buffer == NULL) return NULL; - err = PyObject_CallOneArg(ErrorObject, buffer); + err = PyObject_CallOneArg(state->error, buffer); Py_DECREF(buffer); if ( err != NULL && set_error_attr(err, "code", code) && set_error_attr(err, "offset", column) && set_error_attr(err, "lineno", lineno)) { - PyErr_SetObject(ErrorObject, err); + PyErr_SetObject(state->error, err); } Py_XDECREF(err); return NULL; @@ -680,13 +689,13 @@ class pyexpat.xmlparser "xmlparseobject *" "&Xmlparsetype" static PyObject * -get_parse_result(xmlparseobject *self, int rv) +get_parse_result(pyexpat_state *state, xmlparseobject *self, int rv) { if (PyErr_Occurred()) { return NULL; } if (rv == 0) { - return set_error(self, XML_GetErrorCode(self->itself)); + return set_error(state, self, XML_GetErrorCode(self->itself)); } if (flush_character_buffer(self) < 0) { return NULL; @@ -699,6 +708,7 @@ get_parse_result(xmlparseobject *self, int rv) /*[clinic input] pyexpat.xmlparser.Parse + cls: defining_class data: object isfinal: bool(accept={int}) = False / @@ -709,14 +719,15 @@ Parse XML data. [clinic start generated code]*/ static PyObject * -pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data, - int isfinal) -/*[clinic end generated code: output=f4db843dd1f4ed4b input=eb616027bfa9847f]*/ +pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyTypeObject *cls, + PyObject *data, int isfinal) +/*[clinic end generated code: output=8faffe07fe1f862a input=fc97f833558ca715]*/ { const char *s; Py_ssize_t slen; Py_buffer view; int rc; + pyexpat_state *state = PyType_GetModuleState(cls); if (PyUnicode_Check(data)) { view.buf = NULL; @@ -745,9 +756,10 @@ pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data, rc = XML_Parse(self->itself, s, (int)slen, isfinal); done: - if (view.buf != NULL) + if (view.buf != NULL) { PyBuffer_Release(&view); - return get_parse_result(self, rc); + } + return get_parse_result(state, self, rc); } /* File reading copied from cPickle */ @@ -796,6 +808,7 @@ readinst(char *buf, int buf_size, PyObject *meth) /*[clinic input] pyexpat.xmlparser.ParseFile + cls: defining_class file: object / @@ -803,13 +816,16 @@ Parse XML data from file-like object. [clinic start generated code]*/ static PyObject * -pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyObject *file) -/*[clinic end generated code: output=2adc6a13100cc42b input=fbb5a12b6038d735]*/ +pyexpat_xmlparser_ParseFile_impl(xmlparseobject *self, PyTypeObject *cls, + PyObject *file) +/*[clinic end generated code: output=34780a094c8ca3ae input=ba4bc9c541684793]*/ { int rv = 1; PyObject *readmethod = NULL; _Py_IDENTIFIER(read); + pyexpat_state *state = PyType_GetModuleState(cls); + if (_PyObject_LookupAttrId(file, &PyId_read, &readmethod) < 0) { return NULL; } @@ -823,7 +839,7 @@ pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyObject *file) void *buf = XML_GetBuffer(self->itself, BUF_SIZE); if (buf == NULL) { Py_XDECREF(readmethod); - return get_parse_result(self, 0); + return get_parse_result(state, self, 0); } bytes_read = readinst(buf, BUF_SIZE, readmethod); @@ -841,7 +857,7 @@ pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyObject *file) break; } Py_XDECREF(readmethod); - return get_parse_result(self, rv); + return get_parse_result(state, self, rv); } /*[clinic input] @@ -907,6 +923,7 @@ pyexpat_xmlparser_GetInputContext_impl(xmlparseobject *self) /*[clinic input] pyexpat.xmlparser.ExternalEntityParserCreate + cls: defining_class context: str(accept={str, NoneType}) encoding: str = NULL / @@ -916,16 +933,21 @@ Create a parser for parsing an external entity based on the information passed t static PyObject * pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self, + PyTypeObject *cls, const char *context, const char *encoding) -/*[clinic end generated code: output=535cda9d7a0fbcd6 input=b906714cc122c322]*/ +/*[clinic end generated code: output=01d4472b49cb3f92 input=ec70c6b9e6e9619a]*/ { xmlparseobject *new_parser; int i; - new_parser = PyObject_GC_New(xmlparseobject, &Xmlparsetype); - if (new_parser == NULL) + pyexpat_state *state = PyType_GetModuleState(cls); + + new_parser = PyObject_GC_New(xmlparseobject, state->xml_parse_type); + if (new_parser == NULL) { return NULL; + } + new_parser->buffer_size = self->buffer_size; new_parser->buffer_used = 0; new_parser->buffer = NULL; @@ -1006,6 +1028,7 @@ pyexpat_xmlparser_SetParamEntityParsing_impl(xmlparseobject *self, int flag) /*[clinic input] pyexpat.xmlparser.UseForeignDTD + cls: defining_class flag: bool = True / @@ -1017,14 +1040,16 @@ information to the parser. 'flag' defaults to True if not provided. [clinic start generated code]*/ static PyObject * -pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, int flag) -/*[clinic end generated code: output=cfaa9aa50bb0f65c input=78144c519d116a6e]*/ +pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, PyTypeObject *cls, + int flag) +/*[clinic end generated code: output=d7d98252bd25a20f input=23440ecb0573fb29]*/ { + pyexpat_state *state = PyType_GetModuleState(cls); enum XML_Error rc; rc = XML_UseForeignDTD(self->itself, flag ? XML_TRUE : XML_FALSE); if (rc != XML_ERROR_NONE) { - return set_error(self, rc); + return set_error(state, self, rc); } Py_RETURN_NONE; } @@ -1104,12 +1129,13 @@ PyUnknownEncodingHandler(void *encodingHandlerData, static PyObject * -newxmlparseobject(const char *encoding, const char *namespace_separator, PyObject *intern) +newxmlparseobject(pyexpat_state *state, const char *encoding, + const char *namespace_separator, PyObject *intern) { int i; xmlparseobject *self; - self = PyObject_GC_New(xmlparseobject, &Xmlparsetype); + self = PyObject_GC_New(xmlparseobject, state->xml_parse_type); if (self == NULL) return NULL; @@ -1177,7 +1203,9 @@ xmlparse_dealloc(xmlparseobject *self) self->buffer = NULL; } Py_XDECREF(self->intern); + PyTypeObject *tp = Py_TYPE(self); PyObject_GC_Del(self); + Py_DECREF(tp); } @@ -1464,38 +1492,22 @@ xmlparse_clear(xmlparseobject *op) PyDoc_STRVAR(Xmlparsetype__doc__, "XML parser"); -static PyTypeObject Xmlparsetype = { - PyVarObject_HEAD_INIT(NULL, 0) - "pyexpat.xmlparser", /*tp_name*/ - sizeof(xmlparseobject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)xmlparse_dealloc, /*tp_dealloc*/ - 0, /*tp_vectorcall_offset*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_as_async*/ - (reprfunc)0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - (hashfunc)0, /*tp_hash*/ - (ternaryfunc)0, /*tp_call*/ - (reprfunc)0, /*tp_str*/ - (getattrofunc)0, /* tp_getattro */ - (setattrofunc)0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - Xmlparsetype__doc__, /* tp_doc - Documentation string */ - (traverseproc)xmlparse_traverse, /* tp_traverse */ - (inquiry)xmlparse_clear, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - xmlparse_methods, /* tp_methods */ - xmlparse_members, /* tp_members */ - xmlparse_getsetlist, /* tp_getset */ +static PyType_Slot _xml_parse_type_spec_slots[] = { + {Py_tp_dealloc, xmlparse_dealloc}, + {Py_tp_doc, (void *)Xmlparsetype__doc__}, + {Py_tp_traverse, xmlparse_traverse}, + {Py_tp_clear, xmlparse_clear}, + {Py_tp_methods, xmlparse_methods}, + {Py_tp_members, xmlparse_members}, + {Py_tp_getset, xmlparse_getsetlist}, + {0, 0} +}; + +static PyType_Spec _xml_parse_type_spec = { + .name = "pyexpat.xmlparser", + .basicsize = sizeof(xmlparseobject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, + .slots = _xml_parse_type_spec_slots, }; /* End of code for xmlparser objects */ @@ -1541,7 +1553,8 @@ pyexpat_ParserCreate_impl(PyObject *module, const char *encoding, return NULL; } - result = newxmlparseobject(encoding, namespace_separator, intern); + pyexpat_state *state = pyexpat_get_state(module); + result = newxmlparseobject(state, encoding, namespace_separator, intern); if (intern_decref) { Py_DECREF(intern); } @@ -1583,14 +1596,10 @@ PyDoc_STRVAR(pyexpat_module_documentation, #define MODULE_NAME "pyexpat" #endif -#ifndef MODULE_INITFUNC -#define MODULE_INITFUNC PyInit_pyexpat -#endif - -static int init_handler_descrs(void) +static int init_handler_descrs(pyexpat_state *state) { int i; - assert(!PyType_HasFeature(&Xmlparsetype, Py_TPFLAGS_VALID_VERSION_TAG)); + assert(!PyType_HasFeature(state->xml_parse_type, Py_TPFLAGS_VALID_VERSION_TAG)); for (i = 0; handler_info[i].name != NULL; i++) { struct HandlerInfo *hi = &handler_info[i]; hi->getset.name = hi->name; @@ -1598,11 +1607,11 @@ static int init_handler_descrs(void) hi->getset.set = (setter)xmlparse_handler_setter; hi->getset.closure = &handler_info[i]; - PyObject *descr = PyDescr_NewGetSet(&Xmlparsetype, &hi->getset); + PyObject *descr = PyDescr_NewGetSet(state->xml_parse_type, &hi->getset); if (descr == NULL) return -1; - if (PyDict_SetDefault(Xmlparsetype.tp_dict, PyDescr_NAME(descr), descr) == NULL) { + if (PyDict_SetDefault(state->xml_parse_type->tp_dict, PyDescr_NAME(descr), descr) == NULL) { Py_DECREF(descr); return -1; } @@ -1846,37 +1855,35 @@ pyexpat_destructor(PyObject *op) static int pyexpat_exec(PyObject *mod) { - if (PyType_Ready(&Xmlparsetype) < 0) { - return -1; - } + pyexpat_state *state = pyexpat_get_state(mod); + state->xml_parse_type = (PyTypeObject *)PyType_FromModuleAndSpec( + mod, &_xml_parse_type_spec, NULL); - if (init_handler_descrs() < 0) { + if (state->xml_parse_type == NULL) { return -1; } - /* Add some symbolic constants to the module */ - if (ErrorObject == NULL) { - ErrorObject = PyErr_NewException("xml.parsers.expat.ExpatError", - NULL, NULL); + if (init_handler_descrs(state) < 0) { + return -1; } - if (ErrorObject == NULL) { + state->error = PyErr_NewException("xml.parsers.expat.ExpatError", + NULL, NULL); + if (state->error == NULL) { return -1; } - Py_INCREF(ErrorObject); - if (PyModule_AddObject(mod, "error", ErrorObject) < 0) { - Py_DECREF(ErrorObject); + /* Add some symbolic constants to the module */ + + if (PyModule_AddObjectRef(mod, "error", state->error) < 0) { return -1; } - Py_INCREF(ErrorObject); - if (PyModule_AddObject(mod, "ExpatError", ErrorObject) < 0) { - Py_DECREF(ErrorObject); + + if (PyModule_AddObjectRef(mod, "ExpatError", state->error) < 0) { return -1; } - Py_INCREF(&Xmlparsetype); - if (PyModule_AddObject(mod, "XMLParserType", - (PyObject *) &Xmlparsetype) < 0) { - Py_DECREF(&Xmlparsetype); + + if (PyModule_AddObjectRef(mod, "XMLParserType", + (PyObject *) state->xml_parse_type) < 0) { return -1; } @@ -1979,26 +1986,51 @@ pyexpat_exec(PyObject *mod) return 0; } +static int +pyexpat_traverse(PyObject *module, visitproc visit, void *arg) +{ + pyexpat_state *state = pyexpat_get_state(module); + Py_VISIT(state->xml_parse_type); + Py_VISIT(state->error); + return 0; +} + +static int +pyexpat_clear(PyObject *module) +{ + pyexpat_state *state = pyexpat_get_state(module); + Py_CLEAR(state->xml_parse_type); + Py_CLEAR(state->error); + return 0; +} + +static void +pyexpat_free(void *module) +{ + pyexpat_clear((PyObject *)module); +} + +static PyModuleDef_Slot pyexpat_slots[] = { + {Py_mod_exec, pyexpat_exec}, + {0, NULL} +}; + static struct PyModuleDef pyexpatmodule = { PyModuleDef_HEAD_INIT, .m_name = MODULE_NAME, .m_doc = pyexpat_module_documentation, - .m_size = -1, + .m_size = sizeof(pyexpat_state), .m_methods = pyexpat_methods, + .m_slots = pyexpat_slots, + .m_traverse = pyexpat_traverse, + .m_clear = pyexpat_clear, + .m_free = pyexpat_free }; PyMODINIT_FUNC PyInit_pyexpat(void) { - PyObject *mod = PyModule_Create(&pyexpatmodule); - if (mod == NULL) - return NULL; - - if (pyexpat_exec(mod) < 0) { - Py_DECREF(mod); - return NULL; - } - return mod; + return PyModuleDef_Init(&pyexpatmodule); } static void From webhook-mailer at python.org Mon Jan 4 11:19:25 2021 From: webhook-mailer at python.org (JulienPalard) Date: Mon, 04 Jan 2021 16:19:25 -0000 Subject: [Python-checkins] Revert "[3.8] [doc] Fix erroneous backslashes in signatures and names (GH-23658)" (GH-24093) Message-ID: https://github.com/python/cpython/commit/218ed0b013377764ba05f0d21e5b733f7bc481ac commit: 218ed0b013377764ba05f0d21e5b733f7bc481ac branch: 3.8 author: Julien Palard committer: JulienPalard date: 2021-01-04T17:19:16+01:00 summary: Revert "[3.8] [doc] Fix erroneous backslashes in signatures and names (GH-23658)" (GH-24093) This partially reverts commit 02349e2dc9d93202c658ae383b2de2e36b2366f8, which was removing backslashes in documentations compiled with Sphinx < 3, used for Python 3.8 and 3.9 docs. files: M Doc/library/asyncio-stream.rst M Doc/library/base64.rst M Doc/library/difflib.rst M Doc/library/email.header.rst M Doc/library/functions.rst M Doc/library/http.cookies.rst M Doc/library/io.rst M Doc/library/xml.dom.minidom.rst M Doc/requirements.txt diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 584bf10fc042b..714de8d41a350 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -192,7 +192,7 @@ StreamReader can be read. Use the :attr:`IncompleteReadError.partial` attribute to get the partially read data. - .. coroutinemethod:: readuntil(separator=b'\n') + .. coroutinemethod:: readuntil(separator=b'\\n') Read data from the stream until *separator* is found. diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index 3c63c15ad401e..ad9f5f58bee2a 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -178,7 +178,7 @@ The modern interface provides: .. versionadded:: 3.4 -.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v') +.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v') Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and return the decoded :class:`bytes`. diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index e6dd1dd7a54f0..a8543b38c197e 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -149,7 +149,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. contains a good example of its use. -.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n') +.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n') Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in context diff format. @@ -279,7 +279,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. emu -.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n') +.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n') Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in unified diff format. @@ -321,7 +321,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. See :ref:`difflib-interface` for a more detailed example. -.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n') +.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\\n') Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence of delta lines (also bytes) in the format returned by *dfunc*. diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst index e093f138936b3..07152c224f2ff 100644 --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -116,7 +116,7 @@ Here is the :class:`Header` class description: if *s* is a byte string. - .. method:: encode(splitchars=';, \t', maxlinelen=None, linesep='\n') + .. method:: encode(splitchars=';, \\t', maxlinelen=None, linesep='\\n') Encode a message header into an RFC-compliant format, possibly wrapping long lines and encapsulating non-ASCII parts in base64 or quoted-printable diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index be98d30488ab8..4f5fe6bc23069 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1312,7 +1312,7 @@ are always available. They are listed here in alphabetical order. supported. -.. function:: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) +.. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False) Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as keyword diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst index a2c1eb00d8b33..17792b200599b 100644 --- a/Doc/library/http.cookies.rst +++ b/Doc/library/http.cookies.rst @@ -93,7 +93,7 @@ Cookie Objects :meth:`value_decode` are inverses on the range of *value_decode*. -.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\r\n') +.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\\r\\n') Return a string representation suitable to be sent as HTTP headers. *attrs* and *header* are sent to each :class:`Morsel`'s :meth:`output` method. *sep* is used diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 667e4c654ff23..32151a0ace458 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -959,7 +959,7 @@ Text I/O .. versionadded:: 3.7 -.. class:: StringIO(initial_value='', newline='\n') +.. class:: StringIO(initial_value='', newline='\\n') An in-memory stream for text I/O. The text buffer is discarded when the :meth:`~IOBase.close` method is called. diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst index 673af8326a80e..8711242d95d74 100644 --- a/Doc/library/xml.dom.minidom.rst +++ b/Doc/library/xml.dom.minidom.rst @@ -164,7 +164,7 @@ module documentation. This section lists the differences between the API and The :meth:`toxml` method now preserves the attribute order specified by the user. -.. method:: Node.toprettyxml(indent="\t", newl="\n", encoding=None) +.. method:: Node.toprettyxml(indent="\\t", newl="\\n", encoding=None) Return a pretty-printed version of the document. *indent* specifies the indentation string and defaults to a tabulator; *newl* specifies the string diff --git a/Doc/requirements.txt b/Doc/requirements.txt index d30ff39c8c9a3..47b78eeac817e 100644 --- a/Doc/requirements.txt +++ b/Doc/requirements.txt @@ -3,7 +3,7 @@ # Sphinx version is pinned so that new versions that introduce new warnings # won't suddenly cause build failures. Updating the version is fine as long # as no warnings are raised by doing so. -sphinx +sphinx==2.4.4 blurb From webhook-mailer at python.org Mon Jan 4 11:19:37 2021 From: webhook-mailer at python.org (JulienPalard) Date: Mon, 04 Jan 2021 16:19:37 -0000 Subject: [Python-checkins] Revert "[3.9] [doc] Fix erroneous backslashes in signatures and names (GH-23658)" (GH-24092) Message-ID: https://github.com/python/cpython/commit/e6d0107e13ed957109e79b796984d3d026a8660d commit: e6d0107e13ed957109e79b796984d3d026a8660d branch: 3.9 author: Julien Palard committer: JulienPalard date: 2021-01-04T17:19:27+01:00 summary: Revert "[3.9] [doc] Fix erroneous backslashes in signatures and names (GH-23658)" (GH-24092) This partially reverts commit e89993cff4e60fcf32643fc613d0544f3dbcd98a, which was removing backslashes in documentations compiled with Sphinx < 3, used for Python 3.8 and 3.9 docs. files: M Doc/library/asyncio-stream.rst M Doc/library/base64.rst M Doc/library/difflib.rst M Doc/library/email.header.rst M Doc/library/functions.rst M Doc/library/http.cookies.rst M Doc/library/io.rst M Doc/library/xml.dom.minidom.rst diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 584bf10fc042b..714de8d41a350 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -192,7 +192,7 @@ StreamReader can be read. Use the :attr:`IncompleteReadError.partial` attribute to get the partially read data. - .. coroutinemethod:: readuntil(separator=b'\n') + .. coroutinemethod:: readuntil(separator=b'\\n') Read data from the stream until *separator* is found. diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index e6934431626a3..1ff22a00d6199 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -178,7 +178,7 @@ The modern interface provides: .. versionadded:: 3.4 -.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v') +.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v') Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and return the decoded :class:`bytes`. diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index a5ee0fb538979..aa08988c8b36f 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -149,7 +149,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. contains a good example of its use. -.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n') +.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n') Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in context diff format. @@ -279,7 +279,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. emu -.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n') +.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n') Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` generating the delta lines) in unified diff format. @@ -321,7 +321,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. See :ref:`difflib-interface` for a more detailed example. -.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n') +.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\\n') Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence of delta lines (also bytes) in the format returned by *dfunc*. diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst index e093f138936b3..07152c224f2ff 100644 --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -116,7 +116,7 @@ Here is the :class:`Header` class description: if *s* is a byte string. - .. method:: encode(splitchars=';, \t', maxlinelen=None, linesep='\n') + .. method:: encode(splitchars=';, \\t', maxlinelen=None, linesep='\\n') Encode a message header into an RFC-compliant format, possibly wrapping long lines and encapsulating non-ASCII parts in base64 or quoted-printable diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 548ef59a47c6d..9c12b6c48d8ff 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1316,7 +1316,7 @@ are always available. They are listed here in alphabetical order. supported. -.. function:: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) +.. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False) Print *objects* to the text stream *file*, separated by *sep* and followed by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as keyword diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst index a2c1eb00d8b33..17792b200599b 100644 --- a/Doc/library/http.cookies.rst +++ b/Doc/library/http.cookies.rst @@ -93,7 +93,7 @@ Cookie Objects :meth:`value_decode` are inverses on the range of *value_decode*. -.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\r\n') +.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\\r\\n') Return a string representation suitable to be sent as HTTP headers. *attrs* and *header* are sent to each :class:`Morsel`'s :meth:`output` method. *sep* is used diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 048cb2a7ff692..aecbec56866d7 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -964,7 +964,7 @@ Text I/O .. versionadded:: 3.7 -.. class:: StringIO(initial_value='', newline='\n') +.. class:: StringIO(initial_value='', newline='\\n') A text stream using an in-memory text buffer. It inherits :class:`TextIOBase`. diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst index e1cc96794221a..bf72c46561b7c 100644 --- a/Doc/library/xml.dom.minidom.rst +++ b/Doc/library/xml.dom.minidom.rst @@ -174,7 +174,7 @@ module documentation. This section lists the differences between the API and The :meth:`toxml` method now preserves the attribute order specified by the user. -.. method:: Node.toprettyxml(indent="\t", newl="\n", encoding=None, \ +.. method:: Node.toprettyxml(indent="\\t", newl="\\n", encoding=None, \ standalone=None) Return a pretty-printed version of the document. *indent* specifies the From webhook-mailer at python.org Mon Jan 4 12:24:30 2021 From: webhook-mailer at python.org (pablogsal) Date: Mon, 04 Jan 2021 17:24:30 -0000 Subject: [Python-checkins] Fix 'make suspicious' for the itertools module (GH-24097) Message-ID: https://github.com/python/cpython/commit/de833b601319da15d90c8f3cd3c44d239d6d5924 commit: de833b601319da15d90c8f3cd3c44d239d6d5924 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-04T17:24:22Z summary: Fix 'make suspicious' for the itertools module (GH-24097) files: M Doc/tools/susp-ignored.csv diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv index 0885c344ac74c..fd27ab5d80dc2 100644 --- a/Doc/tools/susp-ignored.csv +++ b/Doc/tools/susp-ignored.csv @@ -168,6 +168,7 @@ library/ipaddress,,::,2001:db00::0/24 library/ipaddress,,:db00,2001:db00::0/ffff:ff00:: library/ipaddress,,::,2001:db00::0/ffff:ff00:: library/itertools,,:step,elements from seq[start:stop:step] +library/itertools,,::,kernel = tuple(kernel)[::-1] library/itertools,,:stop,elements from seq[start:stop:step] library/logging.handlers,,:port,host:port library/mmap,,:i2,obj[i1:i2] From webhook-mailer at python.org Mon Jan 4 13:07:05 2021 From: webhook-mailer at python.org (markshannon) Date: Mon, 04 Jan 2021 18:07:05 -0000 Subject: [Python-checkins] bpo-42810: Mark jumps at end of if and try statements as artificial. (GH-24091) Message-ID: https://github.com/python/cpython/commit/127dde591686816e379d1add015304e6b9fb6954 commit: 127dde591686816e379d1add015304e6b9fb6954 branch: master author: Mark Shannon committer: markshannon date: 2021-01-04T18:06:55Z summary: bpo-42810: Mark jumps at end of if and try statements as artificial. (GH-24091) * Mark jumps at end of if and try statements as artificial. * Update importlib * Add comment explaining the purpose of ADDOP_JUMP_NOLINE. files: M Lib/test/test_sys_settrace.py M Python/compile.c M Python/importlib.h M Python/importlib_external.h M Python/importlib_zipimport.h diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 50b5672e35a32..83b03925c3a19 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -874,6 +874,48 @@ def func(): (5, 'line'), (5, 'return')]) + def test_nested_ifs(self): + + def func(): + a = b = 1 + if a == 1: + if b == 1: + x = 4 + else: + y = 6 + else: + z = 8 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (4, 'line'), + (4, 'return')]) + + def test_nested_try_if(self): + + def func(): + x = "hello" + try: + 3/0 + except ZeroDivisionError: + if x == 'raise': + raise ValueError() # line 6 + f = 7 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (3, 'exception'), + (4, 'line'), + (5, 'line'), + (7, 'line'), + (7, 'return')]) + class SkipLineEventsTraceTestCase(TraceTestCase): """Repeat the trace tests, but with per-line events skipped""" diff --git a/Python/compile.c b/Python/compile.c index 54bd166c64e59..ddeb666322570 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -207,6 +207,7 @@ static int compiler_next_instr(basicblock *); static int compiler_addop(struct compiler *, int); static int compiler_addop_i(struct compiler *, int, Py_ssize_t); static int compiler_addop_j(struct compiler *, int, basicblock *); +static int compiler_addop_j_noline(struct compiler *, int, basicblock *); static int compiler_error(struct compiler *, const char *); static int compiler_warn(struct compiler *, const char *, ...); static int compiler_nameop(struct compiler *, identifier, expr_context_ty); @@ -1425,6 +1426,12 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b) return add_jump_to_block(c->u->u_curblock, opcode, c->u->u_lineno, b); } +static int +compiler_addop_j_noline(struct compiler *c, int opcode, basicblock *b) +{ + return add_jump_to_block(c->u->u_curblock, opcode, -1, b); +} + /* NEXT_BLOCK() creates an implicit jump from the current block to the new block. @@ -1495,6 +1502,14 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b) return 0; \ } +/* Add a jump with no line number. + * Used for artificial jumps that have no corresponding + * token in the source code. */ +#define ADDOP_JUMP_NOLINE(C, OP, O) { \ + if (!compiler_addop_j_noline((C), (OP), (O))) \ + return 0; \ +} + #define ADDOP_COMPARE(C, CMP) { \ if (!compiler_addcompare((C), (cmpop_ty)(CMP))) \ return 0; \ @@ -2527,7 +2542,7 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *next, int cond) return 0; if (!compiler_jump_if(c, e->v.IfExp.body, next, cond)) return 0; - ADDOP_JUMP(c, JUMP_FORWARD, end); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, end); compiler_use_next_block(c, next2); if (!compiler_jump_if(c, e->v.IfExp.orelse, next, cond)) return 0; @@ -2560,11 +2575,11 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *next, int cond) basicblock *end = compiler_new_block(c); if (end == NULL) return 0; - ADDOP_JUMP(c, JUMP_FORWARD, end); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, end); compiler_use_next_block(c, cleanup); ADDOP(c, POP_TOP); if (!cond) { - ADDOP_JUMP(c, JUMP_FORWARD, next); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, next); } compiler_use_next_block(c, end); return 1; @@ -2599,7 +2614,7 @@ compiler_ifexp(struct compiler *c, expr_ty e) if (!compiler_jump_if(c, e->v.IfExp.test, next, 0)) return 0; VISIT(c, expr, e->v.IfExp.body); - ADDOP_JUMP(c, JUMP_FORWARD, end); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, end); compiler_use_next_block(c, next); VISIT(c, expr, e->v.IfExp.orelse); compiler_use_next_block(c, end); @@ -2686,7 +2701,7 @@ compiler_if(struct compiler *c, stmt_ty s) } VISIT_SEQ(c, stmt, s->v.If.body); if (asdl_seq_LEN(s->v.If.orelse)) { - ADDOP_JUMP(c, JUMP_FORWARD, end); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, end); compiler_use_next_block(c, next); VISIT_SEQ(c, stmt, s->v.If.orelse); } @@ -2945,7 +2960,7 @@ compiler_try_finally(struct compiler *c, stmt_ty s) ADDOP(c, POP_BLOCK); compiler_pop_fblock(c, FINALLY_TRY, body); VISIT_SEQ(c, stmt, s->v.Try.finalbody); - ADDOP_JUMP(c, JUMP_FORWARD, exit); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, exit); /* `finally` block */ compiler_use_next_block(c, end); if (!compiler_push_fblock(c, FINALLY_END, end, NULL, NULL)) @@ -3094,6 +3109,8 @@ compiler_try_except(struct compiler *c, stmt_ty s) return 0; VISIT_SEQ(c, stmt, handler->v.ExceptHandler.body); compiler_pop_fblock(c, HANDLER_CLEANUP, cleanup_body); + /* name = None; del name; # Mark as artificial */ + c->u->u_lineno = -1; ADDOP(c, POP_EXCEPT); ADDOP_JUMP(c, JUMP_FORWARD, end); } @@ -3907,7 +3924,7 @@ compiler_compare(struct compiler *c, expr_ty e) basicblock *end = compiler_new_block(c); if (end == NULL) return 0; - ADDOP_JUMP(c, JUMP_FORWARD, end); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, end); compiler_use_next_block(c, cleanup); ADDOP(c, ROT_TWO); ADDOP(c, POP_TOP); diff --git a/Python/importlib.h b/Python/importlib.h index 2f100515b5542..45cd13a483dd5 100644 --- a/Python/importlib.h +++ b/Python/importlib.h @@ -1046,814 +1046,814 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 114,165,0,0,0,114,80,0,0,0,41,3,114,103,0,0, 0,114,102,0,0,0,114,104,0,0,0,114,5,0,0,0, 114,5,0,0,0,114,6,0,0,0,218,14,95,108,111,97, - 100,95,117,110,108,111,99,107,101,100,162,2,0,0,115,58, + 100,95,117,110,108,111,99,107,101,100,162,2,0,0,115,60, 0,0,0,10,2,12,2,16,1,12,2,8,1,8,2,6, - 5,2,1,12,1,2,1,10,1,10,1,16,1,16,3,6, - 1,2,1,12,1,2,3,12,254,2,1,2,1,14,5,12, - 1,18,1,6,2,4,2,8,254,2,245,255,128,114,167,0, - 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,8,0,0,0,67,0,0,0,115,54,0,0,0, - 116,0,124,0,106,1,131,1,143,24,1,0,116,2,124,0, - 131,1,87,0,2,0,100,1,4,0,4,0,131,3,1,0, - 83,0,49,0,115,40,119,1,1,0,1,0,1,0,89,0, - 1,0,100,1,83,0,41,2,122,191,82,101,116,117,114,110, - 32,97,32,110,101,119,32,109,111,100,117,108,101,32,111,98, - 106,101,99,116,44,32,108,111,97,100,101,100,32,98,121,32, - 116,104,101,32,115,112,101,99,39,115,32,108,111,97,100,101, - 114,46,10,10,32,32,32,32,84,104,101,32,109,111,100,117, - 108,101,32,105,115,32,110,111,116,32,97,100,100,101,100,32, - 116,111,32,105,116,115,32,112,97,114,101,110,116,46,10,10, - 32,32,32,32,73,102,32,97,32,109,111,100,117,108,101,32, - 105,115,32,97,108,114,101,97,100,121,32,105,110,32,115,121, - 115,46,109,111,100,117,108,101,115,44,32,116,104,97,116,32, - 101,120,105,115,116,105,110,103,32,109,111,100,117,108,101,32, - 103,101,116,115,10,32,32,32,32,99,108,111,98,98,101,114, - 101,100,46,10,10,32,32,32,32,78,41,3,114,54,0,0, - 0,114,20,0,0,0,114,167,0,0,0,169,1,114,103,0, + 5,2,1,12,1,2,1,10,1,10,1,14,1,2,128,16, + 3,6,1,2,1,12,1,2,3,12,254,2,1,2,1,14, + 5,12,1,18,1,6,2,4,2,8,254,2,245,255,128,114, + 167,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,8,0,0,0,67,0,0,0,115,54,0, + 0,0,116,0,124,0,106,1,131,1,143,24,1,0,116,2, + 124,0,131,1,87,0,2,0,100,1,4,0,4,0,131,3, + 1,0,83,0,49,0,115,40,119,1,1,0,1,0,1,0, + 89,0,1,0,100,1,83,0,41,2,122,191,82,101,116,117, + 114,110,32,97,32,110,101,119,32,109,111,100,117,108,101,32, + 111,98,106,101,99,116,44,32,108,111,97,100,101,100,32,98, + 121,32,116,104,101,32,115,112,101,99,39,115,32,108,111,97, + 100,101,114,46,10,10,32,32,32,32,84,104,101,32,109,111, + 100,117,108,101,32,105,115,32,110,111,116,32,97,100,100,101, + 100,32,116,111,32,105,116,115,32,112,97,114,101,110,116,46, + 10,10,32,32,32,32,73,102,32,97,32,109,111,100,117,108, + 101,32,105,115,32,97,108,114,101,97,100,121,32,105,110,32, + 115,121,115,46,109,111,100,117,108,101,115,44,32,116,104,97, + 116,32,101,120,105,115,116,105,110,103,32,109,111,100,117,108, + 101,32,103,101,116,115,10,32,32,32,32,99,108,111,98,98, + 101,114,101,100,46,10,10,32,32,32,32,78,41,3,114,54, + 0,0,0,114,20,0,0,0,114,167,0,0,0,169,1,114, + 103,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,114,101,0,0,0,207,2,0,0,115,6,0,0, + 0,12,9,42,1,255,128,114,101,0,0,0,99,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0, + 0,64,0,0,0,115,140,0,0,0,101,0,90,1,100,0, + 90,2,100,1,90,3,100,2,90,4,101,5,100,3,100,4, + 132,0,131,1,90,6,101,7,100,20,100,6,100,7,132,1, + 131,1,90,8,101,7,100,21,100,8,100,9,132,1,131,1, + 90,9,101,5,100,10,100,11,132,0,131,1,90,10,101,5, + 100,12,100,13,132,0,131,1,90,11,101,7,101,12,100,14, + 100,15,132,0,131,1,131,1,90,13,101,7,101,12,100,16, + 100,17,132,0,131,1,131,1,90,14,101,7,101,12,100,18, + 100,19,132,0,131,1,131,1,90,15,101,7,101,16,131,1, + 90,17,100,5,83,0,41,22,218,15,66,117,105,108,116,105, + 110,73,109,112,111,114,116,101,114,122,144,77,101,116,97,32, + 112,97,116,104,32,105,109,112,111,114,116,32,102,111,114,32, + 98,117,105,108,116,45,105,110,32,109,111,100,117,108,101,115, + 46,10,10,32,32,32,32,65,108,108,32,109,101,116,104,111, + 100,115,32,97,114,101,32,101,105,116,104,101,114,32,99,108, + 97,115,115,32,111,114,32,115,116,97,116,105,99,32,109,101, + 116,104,111,100,115,32,116,111,32,97,118,111,105,100,32,116, + 104,101,32,110,101,101,100,32,116,111,10,32,32,32,32,105, + 110,115,116,97,110,116,105,97,116,101,32,116,104,101,32,99, + 108,97,115,115,46,10,10,32,32,32,32,122,8,98,117,105, + 108,116,45,105,110,99,1,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,5,0,0,0,67,0,0,0,115,22, + 0,0,0,100,1,124,0,106,0,155,2,100,2,116,1,106, + 2,155,0,100,3,157,5,83,0,41,5,250,115,82,101,116, + 117,114,110,32,114,101,112,114,32,102,111,114,32,116,104,101, + 32,109,111,100,117,108,101,46,10,10,32,32,32,32,32,32, + 32,32,84,104,101,32,109,101,116,104,111,100,32,105,115,32, + 100,101,112,114,101,99,97,116,101,100,46,32,32,84,104,101, + 32,105,109,112,111,114,116,32,109,97,99,104,105,110,101,114, + 121,32,100,111,101,115,32,116,104,101,32,106,111,98,32,105, + 116,115,101,108,102,46,10,10,32,32,32,32,32,32,32,32, + 122,8,60,109,111,100,117,108,101,32,122,2,32,40,122,2, + 41,62,78,41,3,114,9,0,0,0,114,169,0,0,0,114, + 145,0,0,0,169,1,114,104,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,114,107,0,0,0,233, + 2,0,0,115,4,0,0,0,22,7,255,128,122,27,66,117, + 105,108,116,105,110,73,109,112,111,114,116,101,114,46,109,111, + 100,117,108,101,95,114,101,112,114,78,99,4,0,0,0,0, + 0,0,0,0,0,0,0,4,0,0,0,5,0,0,0,67, + 0,0,0,115,42,0,0,0,124,2,100,0,117,1,114,12, + 100,0,83,0,116,0,160,1,124,1,161,1,114,38,116,2, + 124,1,124,0,124,0,106,3,100,1,141,3,83,0,100,0, + 83,0,169,2,78,114,144,0,0,0,41,4,114,61,0,0, + 0,90,10,105,115,95,98,117,105,108,116,105,110,114,98,0, + 0,0,114,145,0,0,0,169,4,218,3,99,108,115,114,85, + 0,0,0,218,4,112,97,116,104,218,6,116,97,114,103,101, + 116,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,9,102,105,110,100,95,115,112,101,99,242,2,0,0,115, + 12,0,0,0,8,2,4,1,10,1,16,1,4,2,255,128, + 122,25,66,117,105,108,116,105,110,73,109,112,111,114,116,101, + 114,46,102,105,110,100,95,115,112,101,99,99,3,0,0,0, + 0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0, + 67,0,0,0,115,30,0,0,0,124,0,160,0,124,1,124, + 2,161,2,125,3,124,3,100,1,117,1,114,26,124,3,106, + 1,83,0,100,1,83,0,41,2,122,175,70,105,110,100,32, + 116,104,101,32,98,117,105,108,116,45,105,110,32,109,111,100, + 117,108,101,46,10,10,32,32,32,32,32,32,32,32,73,102, + 32,39,112,97,116,104,39,32,105,115,32,101,118,101,114,32, + 115,112,101,99,105,102,105,101,100,32,116,104,101,110,32,116, + 104,101,32,115,101,97,114,99,104,32,105,115,32,99,111,110, + 115,105,100,101,114,101,100,32,97,32,102,97,105,108,117,114, + 101,46,10,10,32,32,32,32,32,32,32,32,84,104,105,115, + 32,109,101,116,104,111,100,32,105,115,32,100,101,112,114,101, + 99,97,116,101,100,46,32,32,85,115,101,32,102,105,110,100, + 95,115,112,101,99,40,41,32,105,110,115,116,101,97,100,46, + 10,10,32,32,32,32,32,32,32,32,78,41,2,114,177,0, + 0,0,114,116,0,0,0,41,4,114,174,0,0,0,114,85, + 0,0,0,114,175,0,0,0,114,103,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,218,11,102,105, + 110,100,95,109,111,100,117,108,101,251,2,0,0,115,6,0, + 0,0,12,9,18,1,255,128,122,27,66,117,105,108,116,105, + 110,73,109,112,111,114,116,101,114,46,102,105,110,100,95,109, + 111,100,117,108,101,99,1,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,4,0,0,0,67,0,0,0,115,46, + 0,0,0,124,0,106,0,116,1,106,2,118,1,114,34,116, + 3,100,1,160,4,124,0,106,0,161,1,124,0,106,0,100, + 2,141,2,130,1,116,5,116,6,106,7,124,0,131,2,83, + 0,41,4,122,24,67,114,101,97,116,101,32,97,32,98,117, + 105,108,116,45,105,110,32,109,111,100,117,108,101,114,81,0, + 0,0,114,19,0,0,0,78,41,8,114,20,0,0,0,114, + 18,0,0,0,114,82,0,0,0,114,83,0,0,0,114,49, + 0,0,0,114,71,0,0,0,114,61,0,0,0,90,14,99, + 114,101,97,116,101,95,98,117,105,108,116,105,110,114,168,0, 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, - 0,114,101,0,0,0,207,2,0,0,115,6,0,0,0,12, - 9,42,1,255,128,114,101,0,0,0,99,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,64, - 0,0,0,115,140,0,0,0,101,0,90,1,100,0,90,2, - 100,1,90,3,100,2,90,4,101,5,100,3,100,4,132,0, - 131,1,90,6,101,7,100,20,100,6,100,7,132,1,131,1, - 90,8,101,7,100,21,100,8,100,9,132,1,131,1,90,9, - 101,5,100,10,100,11,132,0,131,1,90,10,101,5,100,12, - 100,13,132,0,131,1,90,11,101,7,101,12,100,14,100,15, - 132,0,131,1,131,1,90,13,101,7,101,12,100,16,100,17, - 132,0,131,1,131,1,90,14,101,7,101,12,100,18,100,19, - 132,0,131,1,131,1,90,15,101,7,101,16,131,1,90,17, - 100,5,83,0,41,22,218,15,66,117,105,108,116,105,110,73, - 109,112,111,114,116,101,114,122,144,77,101,116,97,32,112,97, - 116,104,32,105,109,112,111,114,116,32,102,111,114,32,98,117, - 105,108,116,45,105,110,32,109,111,100,117,108,101,115,46,10, - 10,32,32,32,32,65,108,108,32,109,101,116,104,111,100,115, - 32,97,114,101,32,101,105,116,104,101,114,32,99,108,97,115, - 115,32,111,114,32,115,116,97,116,105,99,32,109,101,116,104, - 111,100,115,32,116,111,32,97,118,111,105,100,32,116,104,101, - 32,110,101,101,100,32,116,111,10,32,32,32,32,105,110,115, - 116,97,110,116,105,97,116,101,32,116,104,101,32,99,108,97, - 115,115,46,10,10,32,32,32,32,122,8,98,117,105,108,116, - 45,105,110,99,1,0,0,0,0,0,0,0,0,0,0,0, - 1,0,0,0,5,0,0,0,67,0,0,0,115,22,0,0, - 0,100,1,124,0,106,0,155,2,100,2,116,1,106,2,155, - 0,100,3,157,5,83,0,41,5,250,115,82,101,116,117,114, - 110,32,114,101,112,114,32,102,111,114,32,116,104,101,32,109, - 111,100,117,108,101,46,10,10,32,32,32,32,32,32,32,32, - 84,104,101,32,109,101,116,104,111,100,32,105,115,32,100,101, - 112,114,101,99,97,116,101,100,46,32,32,84,104,101,32,105, - 109,112,111,114,116,32,109,97,99,104,105,110,101,114,121,32, - 100,111,101,115,32,116,104,101,32,106,111,98,32,105,116,115, - 101,108,102,46,10,10,32,32,32,32,32,32,32,32,122,8, - 60,109,111,100,117,108,101,32,122,2,32,40,122,2,41,62, - 78,41,3,114,9,0,0,0,114,169,0,0,0,114,145,0, - 0,0,169,1,114,104,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,114,107,0,0,0,233,2,0, - 0,115,4,0,0,0,22,7,255,128,122,27,66,117,105,108, - 116,105,110,73,109,112,111,114,116,101,114,46,109,111,100,117, - 108,101,95,114,101,112,114,78,99,4,0,0,0,0,0,0, - 0,0,0,0,0,4,0,0,0,5,0,0,0,67,0,0, - 0,115,42,0,0,0,124,2,100,0,117,1,114,12,100,0, - 83,0,116,0,160,1,124,1,161,1,114,38,116,2,124,1, - 124,0,124,0,106,3,100,1,141,3,83,0,100,0,83,0, - 169,2,78,114,144,0,0,0,41,4,114,61,0,0,0,90, - 10,105,115,95,98,117,105,108,116,105,110,114,98,0,0,0, - 114,145,0,0,0,169,4,218,3,99,108,115,114,85,0,0, - 0,218,4,112,97,116,104,218,6,116,97,114,103,101,116,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,9, - 102,105,110,100,95,115,112,101,99,242,2,0,0,115,12,0, - 0,0,8,2,4,1,10,1,16,1,4,2,255,128,122,25, - 66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,46, - 102,105,110,100,95,115,112,101,99,99,3,0,0,0,0,0, - 0,0,0,0,0,0,4,0,0,0,4,0,0,0,67,0, - 0,0,115,30,0,0,0,124,0,160,0,124,1,124,2,161, - 2,125,3,124,3,100,1,117,1,114,26,124,3,106,1,83, - 0,100,1,83,0,41,2,122,175,70,105,110,100,32,116,104, - 101,32,98,117,105,108,116,45,105,110,32,109,111,100,117,108, - 101,46,10,10,32,32,32,32,32,32,32,32,73,102,32,39, - 112,97,116,104,39,32,105,115,32,101,118,101,114,32,115,112, - 101,99,105,102,105,101,100,32,116,104,101,110,32,116,104,101, - 32,115,101,97,114,99,104,32,105,115,32,99,111,110,115,105, - 100,101,114,101,100,32,97,32,102,97,105,108,117,114,101,46, - 10,10,32,32,32,32,32,32,32,32,84,104,105,115,32,109, - 101,116,104,111,100,32,105,115,32,100,101,112,114,101,99,97, - 116,101,100,46,32,32,85,115,101,32,102,105,110,100,95,115, - 112,101,99,40,41,32,105,110,115,116,101,97,100,46,10,10, - 32,32,32,32,32,32,32,32,78,41,2,114,177,0,0,0, - 114,116,0,0,0,41,4,114,174,0,0,0,114,85,0,0, - 0,114,175,0,0,0,114,103,0,0,0,114,5,0,0,0, - 114,5,0,0,0,114,6,0,0,0,218,11,102,105,110,100, - 95,109,111,100,117,108,101,251,2,0,0,115,6,0,0,0, - 12,9,18,1,255,128,122,27,66,117,105,108,116,105,110,73, - 109,112,111,114,116,101,114,46,102,105,110,100,95,109,111,100, - 117,108,101,99,1,0,0,0,0,0,0,0,0,0,0,0, - 1,0,0,0,4,0,0,0,67,0,0,0,115,46,0,0, - 0,124,0,106,0,116,1,106,2,118,1,114,34,116,3,100, - 1,160,4,124,0,106,0,161,1,124,0,106,0,100,2,141, - 2,130,1,116,5,116,6,106,7,124,0,131,2,83,0,41, - 4,122,24,67,114,101,97,116,101,32,97,32,98,117,105,108, - 116,45,105,110,32,109,111,100,117,108,101,114,81,0,0,0, - 114,19,0,0,0,78,41,8,114,20,0,0,0,114,18,0, - 0,0,114,82,0,0,0,114,83,0,0,0,114,49,0,0, - 0,114,71,0,0,0,114,61,0,0,0,90,14,99,114,101, - 97,116,101,95,98,117,105,108,116,105,110,114,168,0,0,0, - 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, - 156,0,0,0,7,3,0,0,115,12,0,0,0,12,3,12, - 1,4,1,6,255,12,2,255,128,122,29,66,117,105,108,116, - 105,110,73,109,112,111,114,116,101,114,46,99,114,101,97,116, - 101,95,109,111,100,117,108,101,99,1,0,0,0,0,0,0, - 0,0,0,0,0,1,0,0,0,3,0,0,0,67,0,0, - 0,115,16,0,0,0,116,0,116,1,106,2,124,0,131,2, - 1,0,100,1,83,0,41,2,122,22,69,120,101,99,32,97, - 32,98,117,105,108,116,45,105,110,32,109,111,100,117,108,101, - 78,41,3,114,71,0,0,0,114,61,0,0,0,90,12,101, - 120,101,99,95,98,117,105,108,116,105,110,114,171,0,0,0, - 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, - 157,0,0,0,15,3,0,0,115,4,0,0,0,16,3,255, - 128,122,27,66,117,105,108,116,105,110,73,109,112,111,114,116, - 101,114,46,101,120,101,99,95,109,111,100,117,108,101,99,2, + 0,114,156,0,0,0,7,3,0,0,115,12,0,0,0,12, + 3,12,1,4,1,6,255,12,2,255,128,122,29,66,117,105, + 108,116,105,110,73,109,112,111,114,116,101,114,46,99,114,101, + 97,116,101,95,109,111,100,117,108,101,99,1,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,67, + 0,0,0,115,16,0,0,0,116,0,116,1,106,2,124,0, + 131,2,1,0,100,1,83,0,41,2,122,22,69,120,101,99, + 32,97,32,98,117,105,108,116,45,105,110,32,109,111,100,117, + 108,101,78,41,3,114,71,0,0,0,114,61,0,0,0,90, + 12,101,120,101,99,95,98,117,105,108,116,105,110,114,171,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,157,0,0,0,15,3,0,0,115,4,0,0,0,16, + 3,255,128,122,27,66,117,105,108,116,105,110,73,109,112,111, + 114,116,101,114,46,101,120,101,99,95,109,111,100,117,108,101, + 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,1, + 83,0,41,2,122,57,82,101,116,117,114,110,32,78,111,110, + 101,32,97,115,32,98,117,105,108,116,45,105,110,32,109,111, + 100,117,108,101,115,32,100,111,32,110,111,116,32,104,97,118, + 101,32,99,111,100,101,32,111,98,106,101,99,116,115,46,78, + 114,5,0,0,0,169,2,114,174,0,0,0,114,85,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,8,103,101,116,95,99,111,100,101,20,3,0,0,115,4, + 0,0,0,4,4,255,128,122,24,66,117,105,108,116,105,110, + 73,109,112,111,114,116,101,114,46,103,101,116,95,99,111,100, + 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, + 0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,100, + 1,83,0,41,2,122,56,82,101,116,117,114,110,32,78,111, + 110,101,32,97,115,32,98,117,105,108,116,45,105,110,32,109, + 111,100,117,108,101,115,32,100,111,32,110,111,116,32,104,97, + 118,101,32,115,111,117,114,99,101,32,99,111,100,101,46,78, + 114,5,0,0,0,114,179,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,218,10,103,101,116,95,115, + 111,117,114,99,101,26,3,0,0,115,4,0,0,0,4,4, + 255,128,122,26,66,117,105,108,116,105,110,73,109,112,111,114, + 116,101,114,46,103,101,116,95,115,111,117,114,99,101,99,2, 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1, 0,0,0,67,0,0,0,115,4,0,0,0,100,1,83,0, - 41,2,122,57,82,101,116,117,114,110,32,78,111,110,101,32, - 97,115,32,98,117,105,108,116,45,105,110,32,109,111,100,117, - 108,101,115,32,100,111,32,110,111,116,32,104,97,118,101,32, - 99,111,100,101,32,111,98,106,101,99,116,115,46,78,114,5, - 0,0,0,169,2,114,174,0,0,0,114,85,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,8, - 103,101,116,95,99,111,100,101,20,3,0,0,115,4,0,0, - 0,4,4,255,128,122,24,66,117,105,108,116,105,110,73,109, - 112,111,114,116,101,114,46,103,101,116,95,99,111,100,101,99, - 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,83, - 0,41,2,122,56,82,101,116,117,114,110,32,78,111,110,101, + 41,3,122,52,82,101,116,117,114,110,32,70,97,108,115,101, 32,97,115,32,98,117,105,108,116,45,105,110,32,109,111,100, - 117,108,101,115,32,100,111,32,110,111,116,32,104,97,118,101, - 32,115,111,117,114,99,101,32,99,111,100,101,46,78,114,5, - 0,0,0,114,179,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,218,10,103,101,116,95,115,111,117, - 114,99,101,26,3,0,0,115,4,0,0,0,4,4,255,128, - 122,26,66,117,105,108,116,105,110,73,109,112,111,114,116,101, - 114,46,103,101,116,95,115,111,117,114,99,101,99,2,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0, - 0,67,0,0,0,115,4,0,0,0,100,1,83,0,41,3, - 122,52,82,101,116,117,114,110,32,70,97,108,115,101,32,97, - 115,32,98,117,105,108,116,45,105,110,32,109,111,100,117,108, - 101,115,32,97,114,101,32,110,101,118,101,114,32,112,97,99, - 107,97,103,101,115,46,70,78,114,5,0,0,0,114,179,0, + 117,108,101,115,32,97,114,101,32,110,101,118,101,114,32,112, + 97,99,107,97,103,101,115,46,70,78,114,5,0,0,0,114, + 179,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,114,122,0,0,0,32,3,0,0,115,4,0,0, + 0,4,4,255,128,122,26,66,117,105,108,116,105,110,73,109, + 112,111,114,116,101,114,46,105,115,95,112,97,99,107,97,103, + 101,41,2,78,78,41,1,78,41,18,114,9,0,0,0,114, + 8,0,0,0,114,1,0,0,0,114,10,0,0,0,114,145, + 0,0,0,218,12,115,116,97,116,105,99,109,101,116,104,111, + 100,114,107,0,0,0,218,11,99,108,97,115,115,109,101,116, + 104,111,100,114,177,0,0,0,114,178,0,0,0,114,156,0, + 0,0,114,157,0,0,0,114,90,0,0,0,114,180,0,0, + 0,114,181,0,0,0,114,122,0,0,0,114,105,0,0,0, + 114,164,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,169,0,0,0,222,2, + 0,0,115,48,0,0,0,8,0,4,2,4,7,2,2,10, + 1,2,8,12,1,2,8,12,1,2,11,10,1,2,7,10, + 1,2,4,2,1,12,1,2,4,2,1,12,1,2,4,2, + 1,12,1,12,4,255,128,114,169,0,0,0,99,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0, + 0,64,0,0,0,115,144,0,0,0,101,0,90,1,100,0, + 90,2,100,1,90,3,100,2,90,4,101,5,100,3,100,4, + 132,0,131,1,90,6,101,7,100,22,100,6,100,7,132,1, + 131,1,90,8,101,7,100,23,100,8,100,9,132,1,131,1, + 90,9,101,5,100,10,100,11,132,0,131,1,90,10,101,5, + 100,12,100,13,132,0,131,1,90,11,101,7,100,14,100,15, + 132,0,131,1,90,12,101,7,101,13,100,16,100,17,132,0, + 131,1,131,1,90,14,101,7,101,13,100,18,100,19,132,0, + 131,1,131,1,90,15,101,7,101,13,100,20,100,21,132,0, + 131,1,131,1,90,16,100,5,83,0,41,24,218,14,70,114, + 111,122,101,110,73,109,112,111,114,116,101,114,122,142,77,101, + 116,97,32,112,97,116,104,32,105,109,112,111,114,116,32,102, + 111,114,32,102,114,111,122,101,110,32,109,111,100,117,108,101, + 115,46,10,10,32,32,32,32,65,108,108,32,109,101,116,104, + 111,100,115,32,97,114,101,32,101,105,116,104,101,114,32,99, + 108,97,115,115,32,111,114,32,115,116,97,116,105,99,32,109, + 101,116,104,111,100,115,32,116,111,32,97,118,111,105,100,32, + 116,104,101,32,110,101,101,100,32,116,111,10,32,32,32,32, + 105,110,115,116,97,110,116,105,97,116,101,32,116,104,101,32, + 99,108,97,115,115,46,10,10,32,32,32,32,90,6,102,114, + 111,122,101,110,99,1,0,0,0,0,0,0,0,0,0,0, + 0,1,0,0,0,4,0,0,0,67,0,0,0,115,16,0, + 0,0,100,1,160,0,124,0,106,1,116,2,106,3,161,2, + 83,0,41,3,114,170,0,0,0,114,160,0,0,0,78,41, + 4,114,49,0,0,0,114,9,0,0,0,114,184,0,0,0, + 114,145,0,0,0,41,1,218,1,109,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,107,0,0,0,52,3, + 0,0,115,4,0,0,0,16,7,255,128,122,26,70,114,111, + 122,101,110,73,109,112,111,114,116,101,114,46,109,111,100,117, + 108,101,95,114,101,112,114,78,99,4,0,0,0,0,0,0, + 0,0,0,0,0,4,0,0,0,5,0,0,0,67,0,0, + 0,115,30,0,0,0,116,0,160,1,124,1,161,1,114,26, + 116,2,124,1,124,0,124,0,106,3,100,1,141,3,83,0, + 100,0,83,0,114,172,0,0,0,41,4,114,61,0,0,0, + 114,92,0,0,0,114,98,0,0,0,114,145,0,0,0,114, + 173,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,114,177,0,0,0,61,3,0,0,115,8,0,0, + 0,10,2,16,1,4,2,255,128,122,24,70,114,111,122,101, + 110,73,109,112,111,114,116,101,114,46,102,105,110,100,95,115, + 112,101,99,99,3,0,0,0,0,0,0,0,0,0,0,0, + 3,0,0,0,3,0,0,0,67,0,0,0,115,18,0,0, + 0,116,0,160,1,124,1,161,1,114,14,124,0,83,0,100, + 1,83,0,41,2,122,93,70,105,110,100,32,97,32,102,114, + 111,122,101,110,32,109,111,100,117,108,101,46,10,10,32,32, + 32,32,32,32,32,32,84,104,105,115,32,109,101,116,104,111, + 100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,46, + 32,32,85,115,101,32,102,105,110,100,95,115,112,101,99,40, + 41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,32, + 32,32,32,32,78,41,2,114,61,0,0,0,114,92,0,0, + 0,41,3,114,174,0,0,0,114,85,0,0,0,114,175,0, 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, - 0,114,122,0,0,0,32,3,0,0,115,4,0,0,0,4, - 4,255,128,122,26,66,117,105,108,116,105,110,73,109,112,111, - 114,116,101,114,46,105,115,95,112,97,99,107,97,103,101,41, - 2,78,78,41,1,78,41,18,114,9,0,0,0,114,8,0, - 0,0,114,1,0,0,0,114,10,0,0,0,114,145,0,0, - 0,218,12,115,116,97,116,105,99,109,101,116,104,111,100,114, - 107,0,0,0,218,11,99,108,97,115,115,109,101,116,104,111, - 100,114,177,0,0,0,114,178,0,0,0,114,156,0,0,0, - 114,157,0,0,0,114,90,0,0,0,114,180,0,0,0,114, - 181,0,0,0,114,122,0,0,0,114,105,0,0,0,114,164, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,114,169,0,0,0,222,2,0,0, - 115,48,0,0,0,8,0,4,2,4,7,2,2,10,1,2, - 8,12,1,2,8,12,1,2,11,10,1,2,7,10,1,2, - 4,2,1,12,1,2,4,2,1,12,1,2,4,2,1,12, - 1,12,4,255,128,114,169,0,0,0,99,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,64, - 0,0,0,115,144,0,0,0,101,0,90,1,100,0,90,2, - 100,1,90,3,100,2,90,4,101,5,100,3,100,4,132,0, - 131,1,90,6,101,7,100,22,100,6,100,7,132,1,131,1, - 90,8,101,7,100,23,100,8,100,9,132,1,131,1,90,9, - 101,5,100,10,100,11,132,0,131,1,90,10,101,5,100,12, - 100,13,132,0,131,1,90,11,101,7,100,14,100,15,132,0, - 131,1,90,12,101,7,101,13,100,16,100,17,132,0,131,1, - 131,1,90,14,101,7,101,13,100,18,100,19,132,0,131,1, - 131,1,90,15,101,7,101,13,100,20,100,21,132,0,131,1, - 131,1,90,16,100,5,83,0,41,24,218,14,70,114,111,122, - 101,110,73,109,112,111,114,116,101,114,122,142,77,101,116,97, - 32,112,97,116,104,32,105,109,112,111,114,116,32,102,111,114, - 32,102,114,111,122,101,110,32,109,111,100,117,108,101,115,46, - 10,10,32,32,32,32,65,108,108,32,109,101,116,104,111,100, - 115,32,97,114,101,32,101,105,116,104,101,114,32,99,108,97, - 115,115,32,111,114,32,115,116,97,116,105,99,32,109,101,116, - 104,111,100,115,32,116,111,32,97,118,111,105,100,32,116,104, - 101,32,110,101,101,100,32,116,111,10,32,32,32,32,105,110, - 115,116,97,110,116,105,97,116,101,32,116,104,101,32,99,108, - 97,115,115,46,10,10,32,32,32,32,90,6,102,114,111,122, - 101,110,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,4,0,0,0,67,0,0,0,115,16,0,0,0, - 100,1,160,0,124,0,106,1,116,2,106,3,161,2,83,0, - 41,3,114,170,0,0,0,114,160,0,0,0,78,41,4,114, - 49,0,0,0,114,9,0,0,0,114,184,0,0,0,114,145, - 0,0,0,41,1,218,1,109,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,114,107,0,0,0,52,3,0,0, - 115,4,0,0,0,16,7,255,128,122,26,70,114,111,122,101, - 110,73,109,112,111,114,116,101,114,46,109,111,100,117,108,101, - 95,114,101,112,114,78,99,4,0,0,0,0,0,0,0,0, - 0,0,0,4,0,0,0,5,0,0,0,67,0,0,0,115, - 30,0,0,0,116,0,160,1,124,1,161,1,114,26,116,2, - 124,1,124,0,124,0,106,3,100,1,141,3,83,0,100,0, - 83,0,114,172,0,0,0,41,4,114,61,0,0,0,114,92, - 0,0,0,114,98,0,0,0,114,145,0,0,0,114,173,0, + 0,114,178,0,0,0,68,3,0,0,115,4,0,0,0,18, + 7,255,128,122,26,70,114,111,122,101,110,73,109,112,111,114, + 116,101,114,46,102,105,110,100,95,109,111,100,117,108,101,99, + 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, + 1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,83, + 0,41,2,122,42,85,115,101,32,100,101,102,97,117,108,116, + 32,115,101,109,97,110,116,105,99,115,32,102,111,114,32,109, + 111,100,117,108,101,32,99,114,101,97,116,105,111,110,46,78, + 114,5,0,0,0,114,168,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,156,0,0,0,77,3, + 0,0,115,4,0,0,0,4,0,255,128,122,28,70,114,111, + 122,101,110,73,109,112,111,114,116,101,114,46,99,114,101,97, + 116,101,95,109,111,100,117,108,101,99,1,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,4,0,0,0,67,0, + 0,0,115,64,0,0,0,124,0,106,0,106,1,125,1,116, + 2,160,3,124,1,161,1,115,36,116,4,100,1,160,5,124, + 1,161,1,124,1,100,2,141,2,130,1,116,6,116,2,106, + 7,124,1,131,2,125,2,116,8,124,2,124,0,106,9,131, + 2,1,0,100,0,83,0,114,91,0,0,0,41,10,114,113, + 0,0,0,114,20,0,0,0,114,61,0,0,0,114,92,0, + 0,0,114,83,0,0,0,114,49,0,0,0,114,71,0,0, + 0,218,17,103,101,116,95,102,114,111,122,101,110,95,111,98, + 106,101,99,116,218,4,101,120,101,99,114,14,0,0,0,41, + 3,114,104,0,0,0,114,20,0,0,0,218,4,99,111,100, + 101,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 114,157,0,0,0,81,3,0,0,115,16,0,0,0,8,2, + 10,1,10,1,2,1,6,255,12,2,16,1,255,128,122,26, + 70,114,111,122,101,110,73,109,112,111,114,116,101,114,46,101, + 120,101,99,95,109,111,100,117,108,101,99,2,0,0,0,0, + 0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,67, + 0,0,0,115,10,0,0,0,116,0,124,0,124,1,131,2, + 83,0,41,2,122,95,76,111,97,100,32,97,32,102,114,111, + 122,101,110,32,109,111,100,117,108,101,46,10,10,32,32,32, + 32,32,32,32,32,84,104,105,115,32,109,101,116,104,111,100, + 32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,32, + 32,85,115,101,32,101,120,101,99,95,109,111,100,117,108,101, + 40,41,32,105,110,115,116,101,97,100,46,10,10,32,32,32, + 32,32,32,32,32,78,41,1,114,105,0,0,0,114,179,0, 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, - 0,114,177,0,0,0,61,3,0,0,115,8,0,0,0,10, - 2,16,1,4,2,255,128,122,24,70,114,111,122,101,110,73, - 109,112,111,114,116,101,114,46,102,105,110,100,95,115,112,101, - 99,99,3,0,0,0,0,0,0,0,0,0,0,0,3,0, - 0,0,3,0,0,0,67,0,0,0,115,18,0,0,0,116, - 0,160,1,124,1,161,1,114,14,124,0,83,0,100,1,83, - 0,41,2,122,93,70,105,110,100,32,97,32,102,114,111,122, - 101,110,32,109,111,100,117,108,101,46,10,10,32,32,32,32, - 32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,32, - 105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,32, - 85,115,101,32,102,105,110,100,95,115,112,101,99,40,41,32, - 105,110,115,116,101,97,100,46,10,10,32,32,32,32,32,32, - 32,32,78,41,2,114,61,0,0,0,114,92,0,0,0,41, - 3,114,174,0,0,0,114,85,0,0,0,114,175,0,0,0, - 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, - 178,0,0,0,68,3,0,0,115,4,0,0,0,18,7,255, - 128,122,26,70,114,111,122,101,110,73,109,112,111,114,116,101, - 114,46,102,105,110,100,95,109,111,100,117,108,101,99,1,0, - 0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0, - 0,0,67,0,0,0,115,4,0,0,0,100,1,83,0,41, - 2,122,42,85,115,101,32,100,101,102,97,117,108,116,32,115, - 101,109,97,110,116,105,99,115,32,102,111,114,32,109,111,100, - 117,108,101,32,99,114,101,97,116,105,111,110,46,78,114,5, - 0,0,0,114,168,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,114,156,0,0,0,77,3,0,0, - 115,4,0,0,0,4,0,255,128,122,28,70,114,111,122,101, - 110,73,109,112,111,114,116,101,114,46,99,114,101,97,116,101, - 95,109,111,100,117,108,101,99,1,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,4,0,0,0,67,0,0,0, - 115,64,0,0,0,124,0,106,0,106,1,125,1,116,2,160, - 3,124,1,161,1,115,36,116,4,100,1,160,5,124,1,161, - 1,124,1,100,2,141,2,130,1,116,6,116,2,106,7,124, - 1,131,2,125,2,116,8,124,2,124,0,106,9,131,2,1, - 0,100,0,83,0,114,91,0,0,0,41,10,114,113,0,0, - 0,114,20,0,0,0,114,61,0,0,0,114,92,0,0,0, - 114,83,0,0,0,114,49,0,0,0,114,71,0,0,0,218, - 17,103,101,116,95,102,114,111,122,101,110,95,111,98,106,101, - 99,116,218,4,101,120,101,99,114,14,0,0,0,41,3,114, - 104,0,0,0,114,20,0,0,0,218,4,99,111,100,101,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,157, - 0,0,0,81,3,0,0,115,16,0,0,0,8,2,10,1, - 10,1,2,1,6,255,12,2,16,1,255,128,122,26,70,114, - 111,122,101,110,73,109,112,111,114,116,101,114,46,101,120,101, - 99,95,109,111,100,117,108,101,99,2,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,3,0,0,0,67,0,0, - 0,115,10,0,0,0,116,0,124,0,124,1,131,2,83,0, - 41,2,122,95,76,111,97,100,32,97,32,102,114,111,122,101, - 110,32,109,111,100,117,108,101,46,10,10,32,32,32,32,32, - 32,32,32,84,104,105,115,32,109,101,116,104,111,100,32,105, - 115,32,100,101,112,114,101,99,97,116,101,100,46,32,32,85, - 115,101,32,101,120,101,99,95,109,111,100,117,108,101,40,41, - 32,105,110,115,116,101,97,100,46,10,10,32,32,32,32,32, - 32,32,32,78,41,1,114,105,0,0,0,114,179,0,0,0, + 0,114,164,0,0,0,90,3,0,0,115,4,0,0,0,10, + 8,255,128,122,26,70,114,111,122,101,110,73,109,112,111,114, + 116,101,114,46,108,111,97,100,95,109,111,100,117,108,101,99, + 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, + 3,0,0,0,67,0,0,0,115,10,0,0,0,116,0,160, + 1,124,1,161,1,83,0,41,2,122,45,82,101,116,117,114, + 110,32,116,104,101,32,99,111,100,101,32,111,98,106,101,99, + 116,32,102,111,114,32,116,104,101,32,102,114,111,122,101,110, + 32,109,111,100,117,108,101,46,78,41,2,114,61,0,0,0, + 114,186,0,0,0,114,179,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,180,0,0,0,100,3, + 0,0,115,4,0,0,0,10,4,255,128,122,23,70,114,111, + 122,101,110,73,109,112,111,114,116,101,114,46,103,101,116,95, + 99,111,100,101,99,2,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,1,0,0,0,67,0,0,0,115,4,0, + 0,0,100,1,83,0,41,2,122,54,82,101,116,117,114,110, + 32,78,111,110,101,32,97,115,32,102,114,111,122,101,110,32, + 109,111,100,117,108,101,115,32,100,111,32,110,111,116,32,104, + 97,118,101,32,115,111,117,114,99,101,32,99,111,100,101,46, + 78,114,5,0,0,0,114,179,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,114,181,0,0,0,106, + 3,0,0,115,4,0,0,0,4,4,255,128,122,25,70,114, + 111,122,101,110,73,109,112,111,114,116,101,114,46,103,101,116, + 95,115,111,117,114,99,101,99,2,0,0,0,0,0,0,0, + 0,0,0,0,2,0,0,0,3,0,0,0,67,0,0,0, + 115,10,0,0,0,116,0,160,1,124,1,161,1,83,0,41, + 2,122,46,82,101,116,117,114,110,32,84,114,117,101,32,105, + 102,32,116,104,101,32,102,114,111,122,101,110,32,109,111,100, + 117,108,101,32,105,115,32,97,32,112,97,99,107,97,103,101, + 46,78,41,2,114,61,0,0,0,90,17,105,115,95,102,114, + 111,122,101,110,95,112,97,99,107,97,103,101,114,179,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 114,122,0,0,0,112,3,0,0,115,4,0,0,0,10,4, + 255,128,122,25,70,114,111,122,101,110,73,109,112,111,114,116, + 101,114,46,105,115,95,112,97,99,107,97,103,101,41,2,78, + 78,41,1,78,41,17,114,9,0,0,0,114,8,0,0,0, + 114,1,0,0,0,114,10,0,0,0,114,145,0,0,0,114, + 182,0,0,0,114,107,0,0,0,114,183,0,0,0,114,177, + 0,0,0,114,178,0,0,0,114,156,0,0,0,114,157,0, + 0,0,114,164,0,0,0,114,94,0,0,0,114,180,0,0, + 0,114,181,0,0,0,114,122,0,0,0,114,5,0,0,0, 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, - 164,0,0,0,90,3,0,0,115,4,0,0,0,10,8,255, - 128,122,26,70,114,111,122,101,110,73,109,112,111,114,116,101, - 114,46,108,111,97,100,95,109,111,100,117,108,101,99,2,0, - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0, - 0,0,67,0,0,0,115,10,0,0,0,116,0,160,1,124, - 1,161,1,83,0,41,2,122,45,82,101,116,117,114,110,32, - 116,104,101,32,99,111,100,101,32,111,98,106,101,99,116,32, - 102,111,114,32,116,104,101,32,102,114,111,122,101,110,32,109, - 111,100,117,108,101,46,78,41,2,114,61,0,0,0,114,186, - 0,0,0,114,179,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,114,180,0,0,0,100,3,0,0, - 115,4,0,0,0,10,4,255,128,122,23,70,114,111,122,101, - 110,73,109,112,111,114,116,101,114,46,103,101,116,95,99,111, - 100,101,99,2,0,0,0,0,0,0,0,0,0,0,0,2, - 0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,0, - 100,1,83,0,41,2,122,54,82,101,116,117,114,110,32,78, - 111,110,101,32,97,115,32,102,114,111,122,101,110,32,109,111, - 100,117,108,101,115,32,100,111,32,110,111,116,32,104,97,118, - 101,32,115,111,117,114,99,101,32,99,111,100,101,46,78,114, - 5,0,0,0,114,179,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,114,181,0,0,0,106,3,0, - 0,115,4,0,0,0,4,4,255,128,122,25,70,114,111,122, - 101,110,73,109,112,111,114,116,101,114,46,103,101,116,95,115, - 111,117,114,99,101,99,2,0,0,0,0,0,0,0,0,0, - 0,0,2,0,0,0,3,0,0,0,67,0,0,0,115,10, - 0,0,0,116,0,160,1,124,1,161,1,83,0,41,2,122, - 46,82,101,116,117,114,110,32,84,114,117,101,32,105,102,32, - 116,104,101,32,102,114,111,122,101,110,32,109,111,100,117,108, - 101,32,105,115,32,97,32,112,97,99,107,97,103,101,46,78, - 41,2,114,61,0,0,0,90,17,105,115,95,102,114,111,122, - 101,110,95,112,97,99,107,97,103,101,114,179,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,122, - 0,0,0,112,3,0,0,115,4,0,0,0,10,4,255,128, - 122,25,70,114,111,122,101,110,73,109,112,111,114,116,101,114, - 46,105,115,95,112,97,99,107,97,103,101,41,2,78,78,41, - 1,78,41,17,114,9,0,0,0,114,8,0,0,0,114,1, - 0,0,0,114,10,0,0,0,114,145,0,0,0,114,182,0, - 0,0,114,107,0,0,0,114,183,0,0,0,114,177,0,0, - 0,114,178,0,0,0,114,156,0,0,0,114,157,0,0,0, - 114,164,0,0,0,114,94,0,0,0,114,180,0,0,0,114, - 181,0,0,0,114,122,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,184,0, - 0,0,41,3,0,0,115,50,0,0,0,8,0,4,2,4, - 7,2,2,10,1,2,8,12,1,2,6,12,1,2,8,10, - 1,2,3,10,1,2,8,10,1,2,9,2,1,12,1,2, - 4,2,1,12,1,2,4,2,1,16,1,255,128,114,184,0, - 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,64,0,0,0,115,32,0,0,0, - 101,0,90,1,100,0,90,2,100,1,90,3,100,2,100,3, - 132,0,90,4,100,4,100,5,132,0,90,5,100,6,83,0, - 41,7,218,18,95,73,109,112,111,114,116,76,111,99,107,67, - 111,110,116,101,120,116,122,36,67,111,110,116,101,120,116,32, - 109,97,110,97,103,101,114,32,102,111,114,32,116,104,101,32, - 105,109,112,111,114,116,32,108,111,99,107,46,99,1,0,0, - 0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0, - 0,67,0,0,0,115,12,0,0,0,116,0,160,1,161,0, - 1,0,100,1,83,0,41,2,122,24,65,99,113,117,105,114, - 101,32,116,104,101,32,105,109,112,111,114,116,32,108,111,99, - 107,46,78,41,2,114,61,0,0,0,114,62,0,0,0,114, - 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,114,58,0,0,0,125,3,0,0,115,4,0,0, - 0,12,2,255,128,122,28,95,73,109,112,111,114,116,76,111, - 99,107,67,111,110,116,101,120,116,46,95,95,101,110,116,101, - 114,95,95,99,4,0,0,0,0,0,0,0,0,0,0,0, - 4,0,0,0,2,0,0,0,67,0,0,0,115,12,0,0, - 0,116,0,160,1,161,0,1,0,100,1,83,0,41,2,122, - 60,82,101,108,101,97,115,101,32,116,104,101,32,105,109,112, - 111,114,116,32,108,111,99,107,32,114,101,103,97,114,100,108, - 101,115,115,32,111,102,32,97,110,121,32,114,97,105,115,101, - 100,32,101,120,99,101,112,116,105,111,110,115,46,78,41,2, - 114,61,0,0,0,114,64,0,0,0,41,4,114,33,0,0, - 0,218,8,101,120,99,95,116,121,112,101,218,9,101,120,99, - 95,118,97,108,117,101,218,13,101,120,99,95,116,114,97,99, - 101,98,97,99,107,114,5,0,0,0,114,5,0,0,0,114, - 6,0,0,0,114,60,0,0,0,129,3,0,0,115,4,0, - 0,0,12,2,255,128,122,27,95,73,109,112,111,114,116,76, - 111,99,107,67,111,110,116,101,120,116,46,95,95,101,120,105, - 116,95,95,78,41,6,114,9,0,0,0,114,8,0,0,0, - 114,1,0,0,0,114,10,0,0,0,114,58,0,0,0,114, - 60,0,0,0,114,5,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,114,189,0,0,0,121,3,0, - 0,115,10,0,0,0,8,0,4,2,8,2,12,4,255,128, - 114,189,0,0,0,99,3,0,0,0,0,0,0,0,0,0, - 0,0,5,0,0,0,5,0,0,0,67,0,0,0,115,64, - 0,0,0,124,1,160,0,100,1,124,2,100,2,24,0,161, - 2,125,3,116,1,124,3,131,1,124,2,107,0,114,36,116, - 2,100,3,131,1,130,1,124,3,100,4,25,0,125,4,124, - 0,114,60,100,5,160,3,124,4,124,0,161,2,83,0,124, - 4,83,0,41,7,122,50,82,101,115,111,108,118,101,32,97, - 32,114,101,108,97,116,105,118,101,32,109,111,100,117,108,101, - 32,110,97,109,101,32,116,111,32,97,110,32,97,98,115,111, - 108,117,116,101,32,111,110,101,46,114,135,0,0,0,114,42, - 0,0,0,122,50,97,116,116,101,109,112,116,101,100,32,114, - 101,108,97,116,105,118,101,32,105,109,112,111,114,116,32,98, - 101,121,111,110,100,32,116,111,112,45,108,101,118,101,108,32, - 112,97,99,107,97,103,101,114,25,0,0,0,250,5,123,125, - 46,123,125,78,41,4,218,6,114,115,112,108,105,116,218,3, - 108,101,110,114,83,0,0,0,114,49,0,0,0,41,5,114, - 20,0,0,0,218,7,112,97,99,107,97,103,101,218,5,108, - 101,118,101,108,90,4,98,105,116,115,90,4,98,97,115,101, - 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,218, - 13,95,114,101,115,111,108,118,101,95,110,97,109,101,134,3, - 0,0,115,12,0,0,0,16,2,12,1,8,1,8,1,20, - 1,255,128,114,198,0,0,0,99,3,0,0,0,0,0,0, - 0,0,0,0,0,4,0,0,0,4,0,0,0,67,0,0, - 0,115,34,0,0,0,124,0,160,0,124,1,124,2,161,2, - 125,3,124,3,100,0,117,0,114,24,100,0,83,0,116,1, - 124,1,124,3,131,2,83,0,114,0,0,0,0,41,2,114, - 178,0,0,0,114,98,0,0,0,41,4,218,6,102,105,110, - 100,101,114,114,20,0,0,0,114,175,0,0,0,114,116,0, + 184,0,0,0,41,3,0,0,115,50,0,0,0,8,0,4, + 2,4,7,2,2,10,1,2,8,12,1,2,6,12,1,2, + 8,10,1,2,3,10,1,2,8,10,1,2,9,2,1,12, + 1,2,4,2,1,12,1,2,4,2,1,16,1,255,128,114, + 184,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,64,0,0,0,115,32,0, + 0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,2, + 100,3,132,0,90,4,100,4,100,5,132,0,90,5,100,6, + 83,0,41,7,218,18,95,73,109,112,111,114,116,76,111,99, + 107,67,111,110,116,101,120,116,122,36,67,111,110,116,101,120, + 116,32,109,97,110,97,103,101,114,32,102,111,114,32,116,104, + 101,32,105,109,112,111,114,116,32,108,111,99,107,46,99,1, + 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2, + 0,0,0,67,0,0,0,115,12,0,0,0,116,0,160,1, + 161,0,1,0,100,1,83,0,41,2,122,24,65,99,113,117, + 105,114,101,32,116,104,101,32,105,109,112,111,114,116,32,108, + 111,99,107,46,78,41,2,114,61,0,0,0,114,62,0,0, + 0,114,51,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,6,0,0,0,114,58,0,0,0,125,3,0,0,115,4, + 0,0,0,12,2,255,128,122,28,95,73,109,112,111,114,116, + 76,111,99,107,67,111,110,116,101,120,116,46,95,95,101,110, + 116,101,114,95,95,99,4,0,0,0,0,0,0,0,0,0, + 0,0,4,0,0,0,2,0,0,0,67,0,0,0,115,12, + 0,0,0,116,0,160,1,161,0,1,0,100,1,83,0,41, + 2,122,60,82,101,108,101,97,115,101,32,116,104,101,32,105, + 109,112,111,114,116,32,108,111,99,107,32,114,101,103,97,114, + 100,108,101,115,115,32,111,102,32,97,110,121,32,114,97,105, + 115,101,100,32,101,120,99,101,112,116,105,111,110,115,46,78, + 41,2,114,61,0,0,0,114,64,0,0,0,41,4,114,33, + 0,0,0,218,8,101,120,99,95,116,121,112,101,218,9,101, + 120,99,95,118,97,108,117,101,218,13,101,120,99,95,116,114, + 97,99,101,98,97,99,107,114,5,0,0,0,114,5,0,0, + 0,114,6,0,0,0,114,60,0,0,0,129,3,0,0,115, + 4,0,0,0,12,2,255,128,122,27,95,73,109,112,111,114, + 116,76,111,99,107,67,111,110,116,101,120,116,46,95,95,101, + 120,105,116,95,95,78,41,6,114,9,0,0,0,114,8,0, + 0,0,114,1,0,0,0,114,10,0,0,0,114,58,0,0, + 0,114,60,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,114,189,0,0,0,121, + 3,0,0,115,10,0,0,0,8,0,4,2,8,2,12,4, + 255,128,114,189,0,0,0,99,3,0,0,0,0,0,0,0, + 0,0,0,0,5,0,0,0,5,0,0,0,67,0,0,0, + 115,64,0,0,0,124,1,160,0,100,1,124,2,100,2,24, + 0,161,2,125,3,116,1,124,3,131,1,124,2,107,0,114, + 36,116,2,100,3,131,1,130,1,124,3,100,4,25,0,125, + 4,124,0,114,60,100,5,160,3,124,4,124,0,161,2,83, + 0,124,4,83,0,41,7,122,50,82,101,115,111,108,118,101, + 32,97,32,114,101,108,97,116,105,118,101,32,109,111,100,117, + 108,101,32,110,97,109,101,32,116,111,32,97,110,32,97,98, + 115,111,108,117,116,101,32,111,110,101,46,114,135,0,0,0, + 114,42,0,0,0,122,50,97,116,116,101,109,112,116,101,100, + 32,114,101,108,97,116,105,118,101,32,105,109,112,111,114,116, + 32,98,101,121,111,110,100,32,116,111,112,45,108,101,118,101, + 108,32,112,97,99,107,97,103,101,114,25,0,0,0,250,5, + 123,125,46,123,125,78,41,4,218,6,114,115,112,108,105,116, + 218,3,108,101,110,114,83,0,0,0,114,49,0,0,0,41, + 5,114,20,0,0,0,218,7,112,97,99,107,97,103,101,218, + 5,108,101,118,101,108,90,4,98,105,116,115,90,4,98,97, + 115,101,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,218,13,95,114,101,115,111,108,118,101,95,110,97,109,101, + 134,3,0,0,115,12,0,0,0,16,2,12,1,8,1,8, + 1,20,1,255,128,114,198,0,0,0,99,3,0,0,0,0, + 0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,67, + 0,0,0,115,34,0,0,0,124,0,160,0,124,1,124,2, + 161,2,125,3,124,3,100,0,117,0,114,24,100,0,83,0, + 116,1,124,1,124,3,131,2,83,0,114,0,0,0,0,41, + 2,114,178,0,0,0,114,98,0,0,0,41,4,218,6,102, + 105,110,100,101,114,114,20,0,0,0,114,175,0,0,0,114, + 116,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, + 0,0,0,218,17,95,102,105,110,100,95,115,112,101,99,95, + 108,101,103,97,99,121,143,3,0,0,115,10,0,0,0,12, + 3,8,1,4,1,10,1,255,128,114,200,0,0,0,99,3, + 0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,10, + 0,0,0,67,0,0,0,115,36,1,0,0,116,0,106,1, + 125,3,124,3,100,1,117,0,114,22,116,2,100,2,131,1, + 130,1,124,3,115,38,116,3,160,4,100,3,116,5,161,2, + 1,0,124,0,116,0,106,6,118,0,125,4,124,3,68,0, + 93,230,125,5,116,7,131,0,143,94,1,0,122,10,124,5, + 106,8,125,6,87,0,110,54,4,0,116,9,144,1,121,34, + 1,0,1,0,1,0,116,10,124,5,124,0,124,1,131,3, + 125,7,124,7,100,1,117,0,114,126,89,0,87,0,100,1, + 4,0,4,0,131,3,1,0,113,52,89,0,110,12,124,6, + 124,0,124,1,124,2,131,3,125,7,87,0,100,1,4,0, + 4,0,131,3,1,0,110,16,49,0,115,162,119,1,1,0, + 1,0,1,0,89,0,1,0,124,7,100,1,117,1,144,1, + 114,26,124,4,144,1,115,18,124,0,116,0,106,6,118,0, + 144,1,114,18,116,0,106,6,124,0,25,0,125,8,122,10, + 124,8,106,11,125,9,87,0,110,26,4,0,116,9,144,1, + 121,32,1,0,1,0,1,0,124,7,6,0,89,0,2,0, + 1,0,83,0,124,9,100,1,117,0,144,1,114,10,124,7, + 2,0,1,0,83,0,124,9,2,0,1,0,83,0,124,7, + 2,0,1,0,83,0,113,52,100,1,83,0,119,0,119,0, + 41,4,122,21,70,105,110,100,32,97,32,109,111,100,117,108, + 101,39,115,32,115,112,101,99,46,78,122,53,115,121,115,46, + 109,101,116,97,95,112,97,116,104,32,105,115,32,78,111,110, + 101,44,32,80,121,116,104,111,110,32,105,115,32,108,105,107, + 101,108,121,32,115,104,117,116,116,105,110,103,32,100,111,119, + 110,122,22,115,121,115,46,109,101,116,97,95,112,97,116,104, + 32,105,115,32,101,109,112,116,121,41,12,114,18,0,0,0, + 218,9,109,101,116,97,95,112,97,116,104,114,83,0,0,0, + 114,95,0,0,0,114,96,0,0,0,114,163,0,0,0,114, + 99,0,0,0,114,189,0,0,0,114,177,0,0,0,114,2, + 0,0,0,114,200,0,0,0,114,113,0,0,0,41,10,114, + 20,0,0,0,114,175,0,0,0,114,176,0,0,0,114,201, + 0,0,0,90,9,105,115,95,114,101,108,111,97,100,114,199, + 0,0,0,114,177,0,0,0,114,103,0,0,0,114,104,0, + 0,0,114,113,0,0,0,114,5,0,0,0,114,5,0,0, + 0,114,6,0,0,0,218,10,95,102,105,110,100,95,115,112, + 101,99,152,3,0,0,115,64,0,0,0,6,2,8,1,8, + 2,4,3,12,1,10,5,8,1,8,1,2,1,10,1,14, + 1,12,1,8,1,16,1,4,128,42,2,10,1,18,2,10, + 1,2,1,10,1,14,1,12,4,10,2,8,1,8,2,8, + 2,2,128,4,2,2,243,2,244,255,128,114,202,0,0,0, + 99,3,0,0,0,0,0,0,0,0,0,0,0,3,0,0, + 0,5,0,0,0,67,0,0,0,115,110,0,0,0,116,0, + 124,0,116,1,131,2,115,28,116,2,100,1,160,3,116,4, + 124,0,131,1,161,1,131,1,130,1,124,2,100,2,107,0, + 114,44,116,5,100,3,131,1,130,1,124,2,100,2,107,4, + 114,82,116,0,124,1,116,1,131,2,115,70,116,2,100,4, + 131,1,130,1,124,1,115,82,116,6,100,5,131,1,130,1, + 124,0,115,106,124,2,100,2,107,2,114,102,116,5,100,6, + 131,1,130,1,100,7,83,0,100,7,83,0,41,8,122,28, + 86,101,114,105,102,121,32,97,114,103,117,109,101,110,116,115, + 32,97,114,101,32,34,115,97,110,101,34,46,122,31,109,111, + 100,117,108,101,32,110,97,109,101,32,109,117,115,116,32,98, + 101,32,115,116,114,44,32,110,111,116,32,123,125,114,25,0, + 0,0,122,18,108,101,118,101,108,32,109,117,115,116,32,98, + 101,32,62,61,32,48,122,31,95,95,112,97,99,107,97,103, + 101,95,95,32,110,111,116,32,115,101,116,32,116,111,32,97, + 32,115,116,114,105,110,103,122,54,97,116,116,101,109,112,116, + 101,100,32,114,101,108,97,116,105,118,101,32,105,109,112,111, + 114,116,32,119,105,116,104,32,110,111,32,107,110,111,119,110, + 32,112,97,114,101,110,116,32,112,97,99,107,97,103,101,122, + 17,69,109,112,116,121,32,109,111,100,117,108,101,32,110,97, + 109,101,78,41,7,218,10,105,115,105,110,115,116,97,110,99, + 101,218,3,115,116,114,218,9,84,121,112,101,69,114,114,111, + 114,114,49,0,0,0,114,3,0,0,0,218,10,86,97,108, + 117,101,69,114,114,111,114,114,83,0,0,0,169,3,114,20, + 0,0,0,114,196,0,0,0,114,197,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,218,13,95,115, + 97,110,105,116,121,95,99,104,101,99,107,199,3,0,0,115, + 26,0,0,0,10,2,18,1,8,1,8,1,8,1,10,1, + 8,1,4,1,8,1,12,2,8,1,8,255,255,128,114,208, + 0,0,0,122,16,78,111,32,109,111,100,117,108,101,32,110, + 97,109,101,100,32,122,4,123,33,114,125,99,2,0,0,0, + 0,0,0,0,0,0,0,0,9,0,0,0,8,0,0,0, + 67,0,0,0,115,22,1,0,0,100,0,125,2,124,0,160, + 0,100,1,161,1,100,2,25,0,125,3,124,3,114,128,124, + 3,116,1,106,2,118,1,114,42,116,3,124,1,124,3,131, + 2,1,0,124,0,116,1,106,2,118,0,114,62,116,1,106, + 2,124,0,25,0,83,0,116,1,106,2,124,3,25,0,125, + 4,122,10,124,4,106,4,125,2,87,0,110,44,4,0,116, + 5,144,1,121,20,1,0,1,0,1,0,116,6,100,3,23, + 0,160,7,124,0,124,3,161,2,125,5,116,8,124,5,124, + 0,100,4,141,2,100,0,130,2,116,9,124,0,124,2,131, + 2,125,6,124,6,100,0,117,0,114,164,116,8,116,6,160, + 7,124,0,161,1,124,0,100,4,141,2,130,1,116,10,124, + 6,131,1,125,7,124,3,144,1,114,14,116,1,106,2,124, + 3,25,0,125,4,124,0,160,0,100,1,161,1,100,5,25, + 0,125,8,122,18,116,11,124,4,124,8,124,7,131,3,1, + 0,87,0,124,7,83,0,4,0,116,5,144,1,121,18,1, + 0,1,0,1,0,100,6,124,3,155,2,100,7,124,8,155, + 2,157,4,125,5,116,12,160,13,124,5,116,14,161,2,1, + 0,89,0,124,7,83,0,124,7,83,0,119,0,119,0,41, + 8,78,114,135,0,0,0,114,25,0,0,0,122,23,59,32, + 123,33,114,125,32,105,115,32,110,111,116,32,97,32,112,97, + 99,107,97,103,101,114,19,0,0,0,233,2,0,0,0,122, + 27,67,97,110,110,111,116,32,115,101,116,32,97,110,32,97, + 116,116,114,105,98,117,116,101,32,111,110,32,122,18,32,102, + 111,114,32,99,104,105,108,100,32,109,111,100,117,108,101,32, + 41,15,114,136,0,0,0,114,18,0,0,0,114,99,0,0, + 0,114,71,0,0,0,114,148,0,0,0,114,2,0,0,0, + 218,8,95,69,82,82,95,77,83,71,114,49,0,0,0,218, + 19,77,111,100,117,108,101,78,111,116,70,111,117,110,100,69, + 114,114,111,114,114,202,0,0,0,114,167,0,0,0,114,12, + 0,0,0,114,95,0,0,0,114,96,0,0,0,114,163,0, + 0,0,41,9,114,20,0,0,0,218,7,105,109,112,111,114, + 116,95,114,175,0,0,0,114,137,0,0,0,90,13,112,97, + 114,101,110,116,95,109,111,100,117,108,101,114,102,0,0,0, + 114,103,0,0,0,114,104,0,0,0,90,5,99,104,105,108, + 100,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,23,95,102,105,110,100,95,97,110,100,95,108,111,97,100, + 95,117,110,108,111,99,107,101,100,218,3,0,0,115,60,0, + 0,0,4,1,14,1,4,1,10,1,10,1,10,2,10,1, + 10,1,2,1,10,1,14,1,16,1,14,1,10,1,8,1, + 18,1,8,2,6,1,10,2,14,1,2,1,14,1,4,4, + 14,253,16,1,14,1,8,1,2,253,2,242,255,128,114,213, + 0,0,0,99,2,0,0,0,0,0,0,0,0,0,0,0, + 4,0,0,0,8,0,0,0,67,0,0,0,115,128,0,0, + 0,116,0,124,0,131,1,143,62,1,0,116,1,106,2,160, + 3,124,0,116,4,161,2,125,2,124,2,116,4,117,0,114, + 56,116,5,124,0,124,1,131,2,87,0,2,0,100,1,4, + 0,4,0,131,3,1,0,83,0,87,0,100,1,4,0,4, + 0,131,3,1,0,110,16,49,0,115,76,119,1,1,0,1, + 0,1,0,89,0,1,0,124,2,100,1,117,0,114,116,100, + 2,160,6,124,0,161,1,125,3,116,7,124,3,124,0,100, + 3,141,2,130,1,116,8,124,0,131,1,1,0,124,2,83, + 0,41,4,122,25,70,105,110,100,32,97,110,100,32,108,111, + 97,100,32,116,104,101,32,109,111,100,117,108,101,46,78,122, + 40,105,109,112,111,114,116,32,111,102,32,123,125,32,104,97, + 108,116,101,100,59,32,78,111,110,101,32,105,110,32,115,121, + 115,46,109,111,100,117,108,101,115,114,19,0,0,0,41,9, + 114,54,0,0,0,114,18,0,0,0,114,99,0,0,0,114, + 38,0,0,0,218,14,95,78,69,69,68,83,95,76,79,65, + 68,73,78,71,114,213,0,0,0,114,49,0,0,0,114,211, + 0,0,0,114,69,0,0,0,41,4,114,20,0,0,0,114, + 212,0,0,0,114,104,0,0,0,114,79,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,218,14,95, + 102,105,110,100,95,97,110,100,95,108,111,97,100,253,3,0, + 0,115,24,0,0,0,10,2,14,1,8,1,54,1,8,2, + 4,1,2,1,4,255,12,2,8,2,4,1,255,128,114,215, + 0,0,0,114,25,0,0,0,99,3,0,0,0,0,0,0, + 0,0,0,0,0,3,0,0,0,4,0,0,0,67,0,0, + 0,115,42,0,0,0,116,0,124,0,124,1,124,2,131,3, + 1,0,124,2,100,1,107,4,114,32,116,1,124,0,124,1, + 124,2,131,3,125,0,116,2,124,0,116,3,131,2,83,0, + 41,3,97,50,1,0,0,73,109,112,111,114,116,32,97,110, + 100,32,114,101,116,117,114,110,32,116,104,101,32,109,111,100, + 117,108,101,32,98,97,115,101,100,32,111,110,32,105,116,115, + 32,110,97,109,101,44,32,116,104,101,32,112,97,99,107,97, + 103,101,32,116,104,101,32,99,97,108,108,32,105,115,10,32, + 32,32,32,98,101,105,110,103,32,109,97,100,101,32,102,114, + 111,109,44,32,97,110,100,32,116,104,101,32,108,101,118,101, + 108,32,97,100,106,117,115,116,109,101,110,116,46,10,10,32, + 32,32,32,84,104,105,115,32,102,117,110,99,116,105,111,110, + 32,114,101,112,114,101,115,101,110,116,115,32,116,104,101,32, + 103,114,101,97,116,101,115,116,32,99,111,109,109,111,110,32, + 100,101,110,111,109,105,110,97,116,111,114,32,111,102,32,102, + 117,110,99,116,105,111,110,97,108,105,116,121,10,32,32,32, + 32,98,101,116,119,101,101,110,32,105,109,112,111,114,116,95, + 109,111,100,117,108,101,32,97,110,100,32,95,95,105,109,112, + 111,114,116,95,95,46,32,84,104,105,115,32,105,110,99,108, + 117,100,101,115,32,115,101,116,116,105,110,103,32,95,95,112, + 97,99,107,97,103,101,95,95,32,105,102,10,32,32,32,32, + 116,104,101,32,108,111,97,100,101,114,32,100,105,100,32,110, + 111,116,46,10,10,32,32,32,32,114,25,0,0,0,78,41, + 4,114,208,0,0,0,114,198,0,0,0,114,215,0,0,0, + 218,11,95,103,99,100,95,105,109,112,111,114,116,114,207,0, 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, - 0,218,17,95,102,105,110,100,95,115,112,101,99,95,108,101, - 103,97,99,121,143,3,0,0,115,10,0,0,0,12,3,8, - 1,4,1,10,1,255,128,114,200,0,0,0,99,3,0,0, - 0,0,0,0,0,0,0,0,0,10,0,0,0,10,0,0, - 0,67,0,0,0,115,36,1,0,0,116,0,106,1,125,3, - 124,3,100,1,117,0,114,22,116,2,100,2,131,1,130,1, - 124,3,115,38,116,3,160,4,100,3,116,5,161,2,1,0, - 124,0,116,0,106,6,118,0,125,4,124,3,68,0,93,230, - 125,5,116,7,131,0,143,94,1,0,122,10,124,5,106,8, - 125,6,87,0,110,54,4,0,116,9,144,1,121,34,1,0, - 1,0,1,0,116,10,124,5,124,0,124,1,131,3,125,7, - 124,7,100,1,117,0,114,126,89,0,87,0,100,1,4,0, - 4,0,131,3,1,0,113,52,89,0,110,12,124,6,124,0, - 124,1,124,2,131,3,125,7,87,0,100,1,4,0,4,0, - 131,3,1,0,110,16,49,0,115,162,119,1,1,0,1,0, - 1,0,89,0,1,0,124,7,100,1,117,1,144,1,114,26, - 124,4,144,1,115,18,124,0,116,0,106,6,118,0,144,1, - 114,18,116,0,106,6,124,0,25,0,125,8,122,10,124,8, - 106,11,125,9,87,0,110,26,4,0,116,9,144,1,121,32, - 1,0,1,0,1,0,124,7,6,0,89,0,2,0,1,0, - 83,0,124,9,100,1,117,0,144,1,114,10,124,7,2,0, - 1,0,83,0,124,9,2,0,1,0,83,0,124,7,2,0, - 1,0,83,0,113,52,100,1,83,0,119,0,119,0,41,4, - 122,21,70,105,110,100,32,97,32,109,111,100,117,108,101,39, - 115,32,115,112,101,99,46,78,122,53,115,121,115,46,109,101, - 116,97,95,112,97,116,104,32,105,115,32,78,111,110,101,44, - 32,80,121,116,104,111,110,32,105,115,32,108,105,107,101,108, - 121,32,115,104,117,116,116,105,110,103,32,100,111,119,110,122, - 22,115,121,115,46,109,101,116,97,95,112,97,116,104,32,105, - 115,32,101,109,112,116,121,41,12,114,18,0,0,0,218,9, - 109,101,116,97,95,112,97,116,104,114,83,0,0,0,114,95, - 0,0,0,114,96,0,0,0,114,163,0,0,0,114,99,0, - 0,0,114,189,0,0,0,114,177,0,0,0,114,2,0,0, - 0,114,200,0,0,0,114,113,0,0,0,41,10,114,20,0, - 0,0,114,175,0,0,0,114,176,0,0,0,114,201,0,0, - 0,90,9,105,115,95,114,101,108,111,97,100,114,199,0,0, - 0,114,177,0,0,0,114,103,0,0,0,114,104,0,0,0, - 114,113,0,0,0,114,5,0,0,0,114,5,0,0,0,114, - 6,0,0,0,218,10,95,102,105,110,100,95,115,112,101,99, - 152,3,0,0,115,62,0,0,0,6,2,8,1,8,2,4, - 3,12,1,10,5,8,1,8,1,2,1,10,1,14,1,12, - 1,8,1,20,1,42,2,10,1,18,2,10,1,2,1,10, - 1,14,1,12,4,10,2,8,1,8,2,8,2,2,128,4, - 2,2,243,2,244,255,128,114,202,0,0,0,99,3,0,0, - 0,0,0,0,0,0,0,0,0,3,0,0,0,5,0,0, - 0,67,0,0,0,115,110,0,0,0,116,0,124,0,116,1, - 131,2,115,28,116,2,100,1,160,3,116,4,124,0,131,1, - 161,1,131,1,130,1,124,2,100,2,107,0,114,44,116,5, - 100,3,131,1,130,1,124,2,100,2,107,4,114,82,116,0, - 124,1,116,1,131,2,115,70,116,2,100,4,131,1,130,1, - 124,1,115,82,116,6,100,5,131,1,130,1,124,0,115,106, - 124,2,100,2,107,2,114,102,116,5,100,6,131,1,130,1, - 100,7,83,0,100,7,83,0,41,8,122,28,86,101,114,105, - 102,121,32,97,114,103,117,109,101,110,116,115,32,97,114,101, - 32,34,115,97,110,101,34,46,122,31,109,111,100,117,108,101, - 32,110,97,109,101,32,109,117,115,116,32,98,101,32,115,116, - 114,44,32,110,111,116,32,123,125,114,25,0,0,0,122,18, - 108,101,118,101,108,32,109,117,115,116,32,98,101,32,62,61, - 32,48,122,31,95,95,112,97,99,107,97,103,101,95,95,32, - 110,111,116,32,115,101,116,32,116,111,32,97,32,115,116,114, - 105,110,103,122,54,97,116,116,101,109,112,116,101,100,32,114, - 101,108,97,116,105,118,101,32,105,109,112,111,114,116,32,119, - 105,116,104,32,110,111,32,107,110,111,119,110,32,112,97,114, - 101,110,116,32,112,97,99,107,97,103,101,122,17,69,109,112, - 116,121,32,109,111,100,117,108,101,32,110,97,109,101,78,41, - 7,218,10,105,115,105,110,115,116,97,110,99,101,218,3,115, - 116,114,218,9,84,121,112,101,69,114,114,111,114,114,49,0, - 0,0,114,3,0,0,0,218,10,86,97,108,117,101,69,114, - 114,111,114,114,83,0,0,0,169,3,114,20,0,0,0,114, - 196,0,0,0,114,197,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,218,13,95,115,97,110,105,116, - 121,95,99,104,101,99,107,199,3,0,0,115,26,0,0,0, - 10,2,18,1,8,1,8,1,8,1,10,1,8,1,4,1, - 8,1,12,2,8,1,8,255,255,128,114,208,0,0,0,122, - 16,78,111,32,109,111,100,117,108,101,32,110,97,109,101,100, - 32,122,4,123,33,114,125,99,2,0,0,0,0,0,0,0, - 0,0,0,0,9,0,0,0,8,0,0,0,67,0,0,0, - 115,22,1,0,0,100,0,125,2,124,0,160,0,100,1,161, - 1,100,2,25,0,125,3,124,3,114,128,124,3,116,1,106, - 2,118,1,114,42,116,3,124,1,124,3,131,2,1,0,124, - 0,116,1,106,2,118,0,114,62,116,1,106,2,124,0,25, - 0,83,0,116,1,106,2,124,3,25,0,125,4,122,10,124, - 4,106,4,125,2,87,0,110,44,4,0,116,5,144,1,121, - 20,1,0,1,0,1,0,116,6,100,3,23,0,160,7,124, - 0,124,3,161,2,125,5,116,8,124,5,124,0,100,4,141, - 2,100,0,130,2,116,9,124,0,124,2,131,2,125,6,124, - 6,100,0,117,0,114,164,116,8,116,6,160,7,124,0,161, - 1,124,0,100,4,141,2,130,1,116,10,124,6,131,1,125, - 7,124,3,144,1,114,14,116,1,106,2,124,3,25,0,125, - 4,124,0,160,0,100,1,161,1,100,5,25,0,125,8,122, - 18,116,11,124,4,124,8,124,7,131,3,1,0,87,0,124, - 7,83,0,4,0,116,5,144,1,121,18,1,0,1,0,1, - 0,100,6,124,3,155,2,100,7,124,8,155,2,157,4,125, - 5,116,12,160,13,124,5,116,14,161,2,1,0,89,0,124, - 7,83,0,124,7,83,0,119,0,119,0,41,8,78,114,135, - 0,0,0,114,25,0,0,0,122,23,59,32,123,33,114,125, - 32,105,115,32,110,111,116,32,97,32,112,97,99,107,97,103, - 101,114,19,0,0,0,233,2,0,0,0,122,27,67,97,110, - 110,111,116,32,115,101,116,32,97,110,32,97,116,116,114,105, - 98,117,116,101,32,111,110,32,122,18,32,102,111,114,32,99, - 104,105,108,100,32,109,111,100,117,108,101,32,41,15,114,136, - 0,0,0,114,18,0,0,0,114,99,0,0,0,114,71,0, - 0,0,114,148,0,0,0,114,2,0,0,0,218,8,95,69, - 82,82,95,77,83,71,114,49,0,0,0,218,19,77,111,100, - 117,108,101,78,111,116,70,111,117,110,100,69,114,114,111,114, - 114,202,0,0,0,114,167,0,0,0,114,12,0,0,0,114, - 95,0,0,0,114,96,0,0,0,114,163,0,0,0,41,9, - 114,20,0,0,0,218,7,105,109,112,111,114,116,95,114,175, - 0,0,0,114,137,0,0,0,90,13,112,97,114,101,110,116, - 95,109,111,100,117,108,101,114,102,0,0,0,114,103,0,0, - 0,114,104,0,0,0,90,5,99,104,105,108,100,114,5,0, - 0,0,114,5,0,0,0,114,6,0,0,0,218,23,95,102, - 105,110,100,95,97,110,100,95,108,111,97,100,95,117,110,108, - 111,99,107,101,100,218,3,0,0,115,60,0,0,0,4,1, - 14,1,4,1,10,1,10,1,10,2,10,1,10,1,2,1, - 10,1,14,1,16,1,14,1,10,1,8,1,18,1,8,2, - 6,1,10,2,14,1,2,1,14,1,4,4,14,253,16,1, - 14,1,8,1,2,253,2,242,255,128,114,213,0,0,0,99, - 2,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, - 8,0,0,0,67,0,0,0,115,128,0,0,0,116,0,124, - 0,131,1,143,62,1,0,116,1,106,2,160,3,124,0,116, - 4,161,2,125,2,124,2,116,4,117,0,114,56,116,5,124, - 0,124,1,131,2,87,0,2,0,100,1,4,0,4,0,131, - 3,1,0,83,0,87,0,100,1,4,0,4,0,131,3,1, - 0,110,16,49,0,115,76,119,1,1,0,1,0,1,0,89, - 0,1,0,124,2,100,1,117,0,114,116,100,2,160,6,124, - 0,161,1,125,3,116,7,124,3,124,0,100,3,141,2,130, - 1,116,8,124,0,131,1,1,0,124,2,83,0,41,4,122, - 25,70,105,110,100,32,97,110,100,32,108,111,97,100,32,116, - 104,101,32,109,111,100,117,108,101,46,78,122,40,105,109,112, - 111,114,116,32,111,102,32,123,125,32,104,97,108,116,101,100, - 59,32,78,111,110,101,32,105,110,32,115,121,115,46,109,111, - 100,117,108,101,115,114,19,0,0,0,41,9,114,54,0,0, - 0,114,18,0,0,0,114,99,0,0,0,114,38,0,0,0, - 218,14,95,78,69,69,68,83,95,76,79,65,68,73,78,71, - 114,213,0,0,0,114,49,0,0,0,114,211,0,0,0,114, - 69,0,0,0,41,4,114,20,0,0,0,114,212,0,0,0, - 114,104,0,0,0,114,79,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,218,14,95,102,105,110,100, - 95,97,110,100,95,108,111,97,100,253,3,0,0,115,24,0, - 0,0,10,2,14,1,8,1,54,1,8,2,4,1,2,1, - 4,255,12,2,8,2,4,1,255,128,114,215,0,0,0,114, - 25,0,0,0,99,3,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,4,0,0,0,67,0,0,0,115,42,0, - 0,0,116,0,124,0,124,1,124,2,131,3,1,0,124,2, - 100,1,107,4,114,32,116,1,124,0,124,1,124,2,131,3, - 125,0,116,2,124,0,116,3,131,2,83,0,41,3,97,50, - 1,0,0,73,109,112,111,114,116,32,97,110,100,32,114,101, - 116,117,114,110,32,116,104,101,32,109,111,100,117,108,101,32, - 98,97,115,101,100,32,111,110,32,105,116,115,32,110,97,109, - 101,44,32,116,104,101,32,112,97,99,107,97,103,101,32,116, - 104,101,32,99,97,108,108,32,105,115,10,32,32,32,32,98, - 101,105,110,103,32,109,97,100,101,32,102,114,111,109,44,32, - 97,110,100,32,116,104,101,32,108,101,118,101,108,32,97,100, - 106,117,115,116,109,101,110,116,46,10,10,32,32,32,32,84, - 104,105,115,32,102,117,110,99,116,105,111,110,32,114,101,112, - 114,101,115,101,110,116,115,32,116,104,101,32,103,114,101,97, - 116,101,115,116,32,99,111,109,109,111,110,32,100,101,110,111, - 109,105,110,97,116,111,114,32,111,102,32,102,117,110,99,116, - 105,111,110,97,108,105,116,121,10,32,32,32,32,98,101,116, - 119,101,101,110,32,105,109,112,111,114,116,95,109,111,100,117, - 108,101,32,97,110,100,32,95,95,105,109,112,111,114,116,95, - 95,46,32,84,104,105,115,32,105,110,99,108,117,100,101,115, - 32,115,101,116,116,105,110,103,32,95,95,112,97,99,107,97, - 103,101,95,95,32,105,102,10,32,32,32,32,116,104,101,32, - 108,111,97,100,101,114,32,100,105,100,32,110,111,116,46,10, - 10,32,32,32,32,114,25,0,0,0,78,41,4,114,208,0, - 0,0,114,198,0,0,0,114,215,0,0,0,218,11,95,103, - 99,100,95,105,109,112,111,114,116,114,207,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,216,0, - 0,0,13,4,0,0,115,10,0,0,0,12,9,8,1,12, - 1,10,1,255,128,114,216,0,0,0,169,1,218,9,114,101, - 99,117,114,115,105,118,101,99,3,0,0,0,0,0,0,0, - 1,0,0,0,8,0,0,0,11,0,0,0,67,0,0,0, - 115,218,0,0,0,124,1,68,0,93,206,125,4,116,0,124, - 4,116,1,131,2,115,64,124,3,114,34,124,0,106,2,100, - 1,23,0,125,5,110,4,100,2,125,5,116,3,100,3,124, - 5,155,0,100,4,116,4,124,4,131,1,106,2,155,0,157, - 4,131,1,130,1,124,4,100,5,107,2,114,106,124,3,115, - 104,116,5,124,0,100,6,131,2,114,104,116,6,124,0,124, - 0,106,7,124,2,100,7,100,8,141,4,1,0,113,4,116, - 5,124,0,124,4,131,2,115,210,100,9,160,8,124,0,106, - 2,124,4,161,2,125,6,122,14,116,9,124,2,124,6,131, - 2,1,0,87,0,113,4,4,0,116,10,121,216,1,0,125, - 7,1,0,122,42,124,7,106,11,124,6,107,2,114,200,116, - 12,106,13,160,14,124,6,116,15,161,2,100,10,117,1,114, - 200,87,0,89,0,100,10,125,7,126,7,113,4,130,0,100, - 10,125,7,126,7,119,1,113,4,124,0,83,0,119,0,41, - 11,122,238,70,105,103,117,114,101,32,111,117,116,32,119,104, - 97,116,32,95,95,105,109,112,111,114,116,95,95,32,115,104, - 111,117,108,100,32,114,101,116,117,114,110,46,10,10,32,32, - 32,32,84,104,101,32,105,109,112,111,114,116,95,32,112,97, - 114,97,109,101,116,101,114,32,105,115,32,97,32,99,97,108, - 108,97,98,108,101,32,119,104,105,99,104,32,116,97,107,101, - 115,32,116,104,101,32,110,97,109,101,32,111,102,32,109,111, - 100,117,108,101,32,116,111,10,32,32,32,32,105,109,112,111, - 114,116,46,32,73,116,32,105,115,32,114,101,113,117,105,114, - 101,100,32,116,111,32,100,101,99,111,117,112,108,101,32,116, - 104,101,32,102,117,110,99,116,105,111,110,32,102,114,111,109, - 32,97,115,115,117,109,105,110,103,32,105,109,112,111,114,116, - 108,105,98,39,115,10,32,32,32,32,105,109,112,111,114,116, - 32,105,109,112,108,101,109,101,110,116,97,116,105,111,110,32, - 105,115,32,100,101,115,105,114,101,100,46,10,10,32,32,32, - 32,122,8,46,95,95,97,108,108,95,95,122,13,96,96,102, - 114,111,109,32,108,105,115,116,39,39,122,8,73,116,101,109, - 32,105,110,32,122,18,32,109,117,115,116,32,98,101,32,115, - 116,114,44,32,110,111,116,32,250,1,42,218,7,95,95,97, - 108,108,95,95,84,114,217,0,0,0,114,193,0,0,0,78, - 41,16,114,203,0,0,0,114,204,0,0,0,114,9,0,0, - 0,114,205,0,0,0,114,3,0,0,0,114,11,0,0,0, - 218,16,95,104,97,110,100,108,101,95,102,114,111,109,108,105, - 115,116,114,220,0,0,0,114,49,0,0,0,114,71,0,0, - 0,114,211,0,0,0,114,20,0,0,0,114,18,0,0,0, - 114,99,0,0,0,114,38,0,0,0,114,214,0,0,0,41, - 8,114,104,0,0,0,218,8,102,114,111,109,108,105,115,116, - 114,212,0,0,0,114,218,0,0,0,218,1,120,90,5,119, - 104,101,114,101,90,9,102,114,111,109,95,110,97,109,101,90, - 3,101,120,99,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,114,221,0,0,0,28,4,0,0,115,54,0,0, - 0,8,10,10,1,4,1,12,1,4,2,10,1,8,1,8, - 255,8,2,14,1,10,1,2,1,8,255,10,2,14,1,2, - 1,14,1,14,1,10,4,16,1,2,255,12,2,2,1,10, - 128,4,1,2,248,255,128,114,221,0,0,0,99,1,0,0, - 0,0,0,0,0,0,0,0,0,3,0,0,0,6,0,0, - 0,67,0,0,0,115,146,0,0,0,124,0,160,0,100,1, - 161,1,125,1,124,0,160,0,100,2,161,1,125,2,124,1, - 100,3,117,1,114,82,124,2,100,3,117,1,114,78,124,1, - 124,2,106,1,107,3,114,78,116,2,106,3,100,4,124,1, - 155,2,100,5,124,2,106,1,155,2,100,6,157,5,116,4, - 100,7,100,8,141,3,1,0,124,1,83,0,124,2,100,3, - 117,1,114,96,124,2,106,1,83,0,116,2,106,3,100,9, - 116,4,100,7,100,8,141,3,1,0,124,0,100,10,25,0, - 125,1,100,11,124,0,118,1,114,142,124,1,160,5,100,12, - 161,1,100,13,25,0,125,1,124,1,83,0,41,14,122,167, - 67,97,108,99,117,108,97,116,101,32,119,104,97,116,32,95, - 95,112,97,99,107,97,103,101,95,95,32,115,104,111,117,108, - 100,32,98,101,46,10,10,32,32,32,32,95,95,112,97,99, - 107,97,103,101,95,95,32,105,115,32,110,111,116,32,103,117, - 97,114,97,110,116,101,101,100,32,116,111,32,98,101,32,100, - 101,102,105,110,101,100,32,111,114,32,99,111,117,108,100,32, - 98,101,32,115,101,116,32,116,111,32,78,111,110,101,10,32, - 32,32,32,116,111,32,114,101,112,114,101,115,101,110,116,32, - 116,104,97,116,32,105,116,115,32,112,114,111,112,101,114,32, - 118,97,108,117,101,32,105,115,32,117,110,107,110,111,119,110, - 46,10,10,32,32,32,32,114,152,0,0,0,114,113,0,0, - 0,78,122,32,95,95,112,97,99,107,97,103,101,95,95,32, - 33,61,32,95,95,115,112,101,99,95,95,46,112,97,114,101, - 110,116,32,40,122,4,32,33,61,32,250,1,41,233,3,0, - 0,0,41,1,90,10,115,116,97,99,107,108,101,118,101,108, - 122,89,99,97,110,39,116,32,114,101,115,111,108,118,101,32, - 112,97,99,107,97,103,101,32,102,114,111,109,32,95,95,115, - 112,101,99,95,95,32,111,114,32,95,95,112,97,99,107,97, - 103,101,95,95,44,32,102,97,108,108,105,110,103,32,98,97, - 99,107,32,111,110,32,95,95,110,97,109,101,95,95,32,97, - 110,100,32,95,95,112,97,116,104,95,95,114,9,0,0,0, - 114,148,0,0,0,114,135,0,0,0,114,25,0,0,0,41, - 6,114,38,0,0,0,114,137,0,0,0,114,95,0,0,0, - 114,96,0,0,0,114,163,0,0,0,114,136,0,0,0,41, - 3,218,7,103,108,111,98,97,108,115,114,196,0,0,0,114, - 103,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,218,17,95,99,97,108,99,95,95,95,112,97,99, - 107,97,103,101,95,95,65,4,0,0,115,44,0,0,0,10, - 7,10,1,8,1,18,1,6,1,2,1,4,255,4,1,6, - 255,4,2,6,254,4,3,8,1,6,1,6,2,4,2,6, - 254,8,3,8,1,14,1,4,1,255,128,114,227,0,0,0, - 114,5,0,0,0,99,5,0,0,0,0,0,0,0,0,0, - 0,0,9,0,0,0,5,0,0,0,67,0,0,0,115,174, - 0,0,0,124,4,100,1,107,2,114,18,116,0,124,0,131, - 1,125,5,110,36,124,1,100,2,117,1,114,30,124,1,110, - 2,105,0,125,6,116,1,124,6,131,1,125,7,116,0,124, - 0,124,7,124,4,131,3,125,5,124,3,115,148,124,4,100, - 1,107,2,114,84,116,0,124,0,160,2,100,3,161,1,100, - 1,25,0,131,1,83,0,124,0,115,92,124,5,83,0,116, - 3,124,0,131,1,116,3,124,0,160,2,100,3,161,1,100, - 1,25,0,131,1,24,0,125,8,116,4,106,5,124,5,106, - 6,100,2,116,3,124,5,106,6,131,1,124,8,24,0,133, - 2,25,0,25,0,83,0,116,7,124,5,100,4,131,2,114, - 170,116,8,124,5,124,3,116,0,131,3,83,0,124,5,83, - 0,41,5,97,215,1,0,0,73,109,112,111,114,116,32,97, - 32,109,111,100,117,108,101,46,10,10,32,32,32,32,84,104, - 101,32,39,103,108,111,98,97,108,115,39,32,97,114,103,117, - 109,101,110,116,32,105,115,32,117,115,101,100,32,116,111,32, - 105,110,102,101,114,32,119,104,101,114,101,32,116,104,101,32, - 105,109,112,111,114,116,32,105,115,32,111,99,99,117,114,114, - 105,110,103,32,102,114,111,109,10,32,32,32,32,116,111,32, - 104,97,110,100,108,101,32,114,101,108,97,116,105,118,101,32, - 105,109,112,111,114,116,115,46,32,84,104,101,32,39,108,111, - 99,97,108,115,39,32,97,114,103,117,109,101,110,116,32,105, - 115,32,105,103,110,111,114,101,100,46,32,84,104,101,10,32, - 32,32,32,39,102,114,111,109,108,105,115,116,39,32,97,114, - 103,117,109,101,110,116,32,115,112,101,99,105,102,105,101,115, - 32,119,104,97,116,32,115,104,111,117,108,100,32,101,120,105, - 115,116,32,97,115,32,97,116,116,114,105,98,117,116,101,115, - 32,111,110,32,116,104,101,32,109,111,100,117,108,101,10,32, - 32,32,32,98,101,105,110,103,32,105,109,112,111,114,116,101, - 100,32,40,101,46,103,46,32,96,96,102,114,111,109,32,109, - 111,100,117,108,101,32,105,109,112,111,114,116,32,60,102,114, - 111,109,108,105,115,116,62,96,96,41,46,32,32,84,104,101, - 32,39,108,101,118,101,108,39,10,32,32,32,32,97,114,103, - 117,109,101,110,116,32,114,101,112,114,101,115,101,110,116,115, - 32,116,104,101,32,112,97,99,107,97,103,101,32,108,111,99, - 97,116,105,111,110,32,116,111,32,105,109,112,111,114,116,32, - 102,114,111,109,32,105,110,32,97,32,114,101,108,97,116,105, - 118,101,10,32,32,32,32,105,109,112,111,114,116,32,40,101, - 46,103,46,32,96,96,102,114,111,109,32,46,46,112,107,103, - 32,105,109,112,111,114,116,32,109,111,100,96,96,32,119,111, - 117,108,100,32,104,97,118,101,32,97,32,39,108,101,118,101, - 108,39,32,111,102,32,50,41,46,10,10,32,32,32,32,114, - 25,0,0,0,78,114,135,0,0,0,114,148,0,0,0,41, - 9,114,216,0,0,0,114,227,0,0,0,218,9,112,97,114, - 116,105,116,105,111,110,114,195,0,0,0,114,18,0,0,0, - 114,99,0,0,0,114,9,0,0,0,114,11,0,0,0,114, - 221,0,0,0,41,9,114,20,0,0,0,114,226,0,0,0, - 218,6,108,111,99,97,108,115,114,222,0,0,0,114,197,0, - 0,0,114,104,0,0,0,90,8,103,108,111,98,97,108,115, - 95,114,196,0,0,0,90,7,99,117,116,95,111,102,102,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,10, - 95,95,105,109,112,111,114,116,95,95,92,4,0,0,115,32, - 0,0,0,8,11,10,1,16,2,8,1,12,1,4,1,8, - 3,18,1,4,1,4,1,26,4,30,3,10,1,12,1,4, - 2,255,128,114,230,0,0,0,99,1,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,3,0,0,0,67,0,0, - 0,115,38,0,0,0,116,0,160,1,124,0,161,1,125,1, - 124,1,100,0,117,0,114,30,116,2,100,1,124,0,23,0, - 131,1,130,1,116,3,124,1,131,1,83,0,41,2,78,122, - 25,110,111,32,98,117,105,108,116,45,105,110,32,109,111,100, - 117,108,101,32,110,97,109,101,100,32,41,4,114,169,0,0, - 0,114,177,0,0,0,114,83,0,0,0,114,167,0,0,0, - 41,2,114,20,0,0,0,114,103,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,6,0,0,0,218,18,95,98,117, - 105,108,116,105,110,95,102,114,111,109,95,110,97,109,101,129, - 4,0,0,115,10,0,0,0,10,1,8,1,12,1,8,1, - 255,128,114,231,0,0,0,99,2,0,0,0,0,0,0,0, - 0,0,0,0,10,0,0,0,5,0,0,0,67,0,0,0, - 115,166,0,0,0,124,1,97,0,124,0,97,1,116,2,116, - 1,131,1,125,2,116,1,106,3,160,4,161,0,68,0,93, - 72,92,2,125,3,125,4,116,5,124,4,124,2,131,2,114, - 98,124,3,116,1,106,6,118,0,114,60,116,7,125,5,110, - 18,116,0,160,8,124,3,161,1,114,76,116,9,125,5,110, - 2,113,26,116,10,124,4,124,5,131,2,125,6,116,11,124, - 6,124,4,131,2,1,0,113,26,116,1,106,3,116,12,25, - 0,125,7,100,1,68,0,93,46,125,8,124,8,116,1,106, - 3,118,1,114,138,116,13,124,8,131,1,125,9,110,10,116, - 1,106,3,124,8,25,0,125,9,116,14,124,7,124,8,124, - 9,131,3,1,0,113,114,100,2,83,0,41,3,122,250,83, - 101,116,117,112,32,105,109,112,111,114,116,108,105,98,32,98, - 121,32,105,109,112,111,114,116,105,110,103,32,110,101,101,100, - 101,100,32,98,117,105,108,116,45,105,110,32,109,111,100,117, - 108,101,115,32,97,110,100,32,105,110,106,101,99,116,105,110, - 103,32,116,104,101,109,10,32,32,32,32,105,110,116,111,32, - 116,104,101,32,103,108,111,98,97,108,32,110,97,109,101,115, - 112,97,99,101,46,10,10,32,32,32,32,65,115,32,115,121, - 115,32,105,115,32,110,101,101,100,101,100,32,102,111,114,32, - 115,121,115,46,109,111,100,117,108,101,115,32,97,99,99,101, - 115,115,32,97,110,100,32,95,105,109,112,32,105,115,32,110, - 101,101,100,101,100,32,116,111,32,108,111,97,100,32,98,117, - 105,108,116,45,105,110,10,32,32,32,32,109,111,100,117,108, - 101,115,44,32,116,104,111,115,101,32,116,119,111,32,109,111, - 100,117,108,101,115,32,109,117,115,116,32,98,101,32,101,120, - 112,108,105,99,105,116,108,121,32,112,97,115,115,101,100,32, - 105,110,46,10,10,32,32,32,32,41,3,114,26,0,0,0, - 114,95,0,0,0,114,68,0,0,0,78,41,15,114,61,0, - 0,0,114,18,0,0,0,114,3,0,0,0,114,99,0,0, - 0,218,5,105,116,101,109,115,114,203,0,0,0,114,82,0, - 0,0,114,169,0,0,0,114,92,0,0,0,114,184,0,0, - 0,114,149,0,0,0,114,155,0,0,0,114,9,0,0,0, - 114,231,0,0,0,114,12,0,0,0,41,10,218,10,115,121, - 115,95,109,111,100,117,108,101,218,11,95,105,109,112,95,109, - 111,100,117,108,101,90,11,109,111,100,117,108,101,95,116,121, - 112,101,114,20,0,0,0,114,104,0,0,0,114,116,0,0, - 0,114,103,0,0,0,90,11,115,101,108,102,95,109,111,100, - 117,108,101,90,12,98,117,105,108,116,105,110,95,110,97,109, - 101,90,14,98,117,105,108,116,105,110,95,109,111,100,117,108, - 101,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, - 218,6,95,115,101,116,117,112,136,4,0,0,115,42,0,0, - 0,4,9,4,1,8,3,18,1,10,1,10,1,6,1,10, - 1,6,1,2,2,10,1,10,1,2,128,10,3,8,1,10, - 1,10,1,10,2,14,1,4,251,255,128,114,235,0,0,0, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,3,0,0,0,67,0,0,0,115,38,0,0,0,116,0, - 124,0,124,1,131,2,1,0,116,1,106,2,160,3,116,4, - 161,1,1,0,116,1,106,2,160,3,116,5,161,1,1,0, - 100,1,83,0,41,2,122,48,73,110,115,116,97,108,108,32, - 105,109,112,111,114,116,101,114,115,32,102,111,114,32,98,117, - 105,108,116,105,110,32,97,110,100,32,102,114,111,122,101,110, - 32,109,111,100,117,108,101,115,78,41,6,114,235,0,0,0, - 114,18,0,0,0,114,201,0,0,0,114,126,0,0,0,114, - 169,0,0,0,114,184,0,0,0,41,2,114,233,0,0,0, - 114,234,0,0,0,114,5,0,0,0,114,5,0,0,0,114, - 6,0,0,0,218,8,95,105,110,115,116,97,108,108,171,4, - 0,0,115,8,0,0,0,10,2,12,2,16,1,255,128,114, - 236,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, - 0,1,0,0,0,4,0,0,0,67,0,0,0,115,32,0, - 0,0,100,1,100,2,108,0,125,0,124,0,97,1,124,0, - 160,2,116,3,106,4,116,5,25,0,161,1,1,0,100,2, - 83,0,41,3,122,57,73,110,115,116,97,108,108,32,105,109, - 112,111,114,116,101,114,115,32,116,104,97,116,32,114,101,113, - 117,105,114,101,32,101,120,116,101,114,110,97,108,32,102,105, - 108,101,115,121,115,116,101,109,32,97,99,99,101,115,115,114, - 25,0,0,0,78,41,6,218,26,95,102,114,111,122,101,110, - 95,105,109,112,111,114,116,108,105,98,95,101,120,116,101,114, - 110,97,108,114,133,0,0,0,114,236,0,0,0,114,18,0, - 0,0,114,99,0,0,0,114,9,0,0,0,41,1,114,237, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, - 0,0,218,27,95,105,110,115,116,97,108,108,95,101,120,116, - 101,114,110,97,108,95,105,109,112,111,114,116,101,114,115,179, - 4,0,0,115,8,0,0,0,8,3,4,1,20,1,255,128, - 114,238,0,0,0,41,2,78,78,41,1,78,41,2,78,114, - 25,0,0,0,41,4,78,78,114,5,0,0,0,114,25,0, - 0,0,41,54,114,10,0,0,0,114,7,0,0,0,114,26, - 0,0,0,114,95,0,0,0,114,68,0,0,0,114,133,0, - 0,0,114,17,0,0,0,114,21,0,0,0,114,63,0,0, - 0,114,37,0,0,0,114,47,0,0,0,114,22,0,0,0, - 114,23,0,0,0,114,53,0,0,0,114,54,0,0,0,114, - 57,0,0,0,114,69,0,0,0,114,71,0,0,0,114,80, - 0,0,0,114,90,0,0,0,114,94,0,0,0,114,105,0, - 0,0,114,118,0,0,0,114,119,0,0,0,114,98,0,0, - 0,114,149,0,0,0,114,155,0,0,0,114,159,0,0,0, - 114,114,0,0,0,114,100,0,0,0,114,166,0,0,0,114, - 167,0,0,0,114,101,0,0,0,114,169,0,0,0,114,184, - 0,0,0,114,189,0,0,0,114,198,0,0,0,114,200,0, - 0,0,114,202,0,0,0,114,208,0,0,0,90,15,95,69, - 82,82,95,77,83,71,95,80,82,69,70,73,88,114,210,0, - 0,0,114,213,0,0,0,218,6,111,98,106,101,99,116,114, - 214,0,0,0,114,215,0,0,0,114,216,0,0,0,114,221, - 0,0,0,114,227,0,0,0,114,230,0,0,0,114,231,0, - 0,0,114,235,0,0,0,114,236,0,0,0,114,238,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,6,0,0,0,218,8,60,109,111,100,117,108,101,62,1, - 0,0,0,115,106,0,0,0,4,0,8,22,4,9,4,1, - 4,1,4,3,8,3,8,8,4,8,4,2,16,3,14,4, - 14,77,14,21,8,16,8,37,8,17,14,11,8,8,8,11, - 8,12,8,19,14,36,16,101,10,26,14,45,8,72,8,17, - 8,17,8,30,8,36,8,45,14,15,14,75,14,80,8,13, - 8,9,10,9,8,47,4,16,8,1,8,2,6,32,8,3, - 10,16,14,15,8,37,10,27,8,37,8,7,8,35,12,8, - 255,128, + 0,114,216,0,0,0,13,4,0,0,115,10,0,0,0,12, + 9,8,1,12,1,10,1,255,128,114,216,0,0,0,169,1, + 218,9,114,101,99,117,114,115,105,118,101,99,3,0,0,0, + 0,0,0,0,1,0,0,0,8,0,0,0,11,0,0,0, + 67,0,0,0,115,218,0,0,0,124,1,68,0,93,206,125, + 4,116,0,124,4,116,1,131,2,115,64,124,3,114,34,124, + 0,106,2,100,1,23,0,125,5,110,4,100,2,125,5,116, + 3,100,3,124,5,155,0,100,4,116,4,124,4,131,1,106, + 2,155,0,157,4,131,1,130,1,124,4,100,5,107,2,114, + 106,124,3,115,104,116,5,124,0,100,6,131,2,114,104,116, + 6,124,0,124,0,106,7,124,2,100,7,100,8,141,4,1, + 0,113,4,116,5,124,0,124,4,131,2,115,210,100,9,160, + 8,124,0,106,2,124,4,161,2,125,6,122,14,116,9,124, + 2,124,6,131,2,1,0,87,0,113,4,4,0,116,10,121, + 216,1,0,125,7,1,0,122,42,124,7,106,11,124,6,107, + 2,114,200,116,12,106,13,160,14,124,6,116,15,161,2,100, + 10,117,1,114,200,87,0,89,0,100,10,125,7,126,7,113, + 4,130,0,100,10,125,7,126,7,119,1,113,4,124,0,83, + 0,119,0,41,11,122,238,70,105,103,117,114,101,32,111,117, + 116,32,119,104,97,116,32,95,95,105,109,112,111,114,116,95, + 95,32,115,104,111,117,108,100,32,114,101,116,117,114,110,46, + 10,10,32,32,32,32,84,104,101,32,105,109,112,111,114,116, + 95,32,112,97,114,97,109,101,116,101,114,32,105,115,32,97, + 32,99,97,108,108,97,98,108,101,32,119,104,105,99,104,32, + 116,97,107,101,115,32,116,104,101,32,110,97,109,101,32,111, + 102,32,109,111,100,117,108,101,32,116,111,10,32,32,32,32, + 105,109,112,111,114,116,46,32,73,116,32,105,115,32,114,101, + 113,117,105,114,101,100,32,116,111,32,100,101,99,111,117,112, + 108,101,32,116,104,101,32,102,117,110,99,116,105,111,110,32, + 102,114,111,109,32,97,115,115,117,109,105,110,103,32,105,109, + 112,111,114,116,108,105,98,39,115,10,32,32,32,32,105,109, + 112,111,114,116,32,105,109,112,108,101,109,101,110,116,97,116, + 105,111,110,32,105,115,32,100,101,115,105,114,101,100,46,10, + 10,32,32,32,32,122,8,46,95,95,97,108,108,95,95,122, + 13,96,96,102,114,111,109,32,108,105,115,116,39,39,122,8, + 73,116,101,109,32,105,110,32,122,18,32,109,117,115,116,32, + 98,101,32,115,116,114,44,32,110,111,116,32,250,1,42,218, + 7,95,95,97,108,108,95,95,84,114,217,0,0,0,114,193, + 0,0,0,78,41,16,114,203,0,0,0,114,204,0,0,0, + 114,9,0,0,0,114,205,0,0,0,114,3,0,0,0,114, + 11,0,0,0,218,16,95,104,97,110,100,108,101,95,102,114, + 111,109,108,105,115,116,114,220,0,0,0,114,49,0,0,0, + 114,71,0,0,0,114,211,0,0,0,114,20,0,0,0,114, + 18,0,0,0,114,99,0,0,0,114,38,0,0,0,114,214, + 0,0,0,41,8,114,104,0,0,0,218,8,102,114,111,109, + 108,105,115,116,114,212,0,0,0,114,218,0,0,0,218,1, + 120,90,5,119,104,101,114,101,90,9,102,114,111,109,95,110, + 97,109,101,90,3,101,120,99,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,221,0,0,0,28,4,0,0, + 115,56,0,0,0,8,10,10,1,4,1,12,1,4,2,10, + 1,8,1,8,255,8,2,14,1,10,1,2,1,6,255,2, + 128,10,2,14,1,2,1,14,1,14,1,10,4,16,1,2, + 255,12,2,2,1,10,128,4,1,2,248,255,128,114,221,0, + 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,3, + 0,0,0,6,0,0,0,67,0,0,0,115,146,0,0,0, + 124,0,160,0,100,1,161,1,125,1,124,0,160,0,100,2, + 161,1,125,2,124,1,100,3,117,1,114,82,124,2,100,3, + 117,1,114,78,124,1,124,2,106,1,107,3,114,78,116,2, + 106,3,100,4,124,1,155,2,100,5,124,2,106,1,155,2, + 100,6,157,5,116,4,100,7,100,8,141,3,1,0,124,1, + 83,0,124,2,100,3,117,1,114,96,124,2,106,1,83,0, + 116,2,106,3,100,9,116,4,100,7,100,8,141,3,1,0, + 124,0,100,10,25,0,125,1,100,11,124,0,118,1,114,142, + 124,1,160,5,100,12,161,1,100,13,25,0,125,1,124,1, + 83,0,41,14,122,167,67,97,108,99,117,108,97,116,101,32, + 119,104,97,116,32,95,95,112,97,99,107,97,103,101,95,95, + 32,115,104,111,117,108,100,32,98,101,46,10,10,32,32,32, + 32,95,95,112,97,99,107,97,103,101,95,95,32,105,115,32, + 110,111,116,32,103,117,97,114,97,110,116,101,101,100,32,116, + 111,32,98,101,32,100,101,102,105,110,101,100,32,111,114,32, + 99,111,117,108,100,32,98,101,32,115,101,116,32,116,111,32, + 78,111,110,101,10,32,32,32,32,116,111,32,114,101,112,114, + 101,115,101,110,116,32,116,104,97,116,32,105,116,115,32,112, + 114,111,112,101,114,32,118,97,108,117,101,32,105,115,32,117, + 110,107,110,111,119,110,46,10,10,32,32,32,32,114,152,0, + 0,0,114,113,0,0,0,78,122,32,95,95,112,97,99,107, + 97,103,101,95,95,32,33,61,32,95,95,115,112,101,99,95, + 95,46,112,97,114,101,110,116,32,40,122,4,32,33,61,32, + 250,1,41,233,3,0,0,0,41,1,90,10,115,116,97,99, + 107,108,101,118,101,108,122,89,99,97,110,39,116,32,114,101, + 115,111,108,118,101,32,112,97,99,107,97,103,101,32,102,114, + 111,109,32,95,95,115,112,101,99,95,95,32,111,114,32,95, + 95,112,97,99,107,97,103,101,95,95,44,32,102,97,108,108, + 105,110,103,32,98,97,99,107,32,111,110,32,95,95,110,97, + 109,101,95,95,32,97,110,100,32,95,95,112,97,116,104,95, + 95,114,9,0,0,0,114,148,0,0,0,114,135,0,0,0, + 114,25,0,0,0,41,6,114,38,0,0,0,114,137,0,0, + 0,114,95,0,0,0,114,96,0,0,0,114,163,0,0,0, + 114,136,0,0,0,41,3,218,7,103,108,111,98,97,108,115, + 114,196,0,0,0,114,103,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,218,17,95,99,97,108,99, + 95,95,95,112,97,99,107,97,103,101,95,95,65,4,0,0, + 115,44,0,0,0,10,7,10,1,8,1,18,1,6,1,2, + 1,4,255,4,1,6,255,4,2,6,254,4,3,8,1,6, + 1,6,2,4,2,6,254,8,3,8,1,14,1,4,1,255, + 128,114,227,0,0,0,114,5,0,0,0,99,5,0,0,0, + 0,0,0,0,0,0,0,0,9,0,0,0,5,0,0,0, + 67,0,0,0,115,174,0,0,0,124,4,100,1,107,2,114, + 18,116,0,124,0,131,1,125,5,110,36,124,1,100,2,117, + 1,114,30,124,1,110,2,105,0,125,6,116,1,124,6,131, + 1,125,7,116,0,124,0,124,7,124,4,131,3,125,5,124, + 3,115,148,124,4,100,1,107,2,114,84,116,0,124,0,160, + 2,100,3,161,1,100,1,25,0,131,1,83,0,124,0,115, + 92,124,5,83,0,116,3,124,0,131,1,116,3,124,0,160, + 2,100,3,161,1,100,1,25,0,131,1,24,0,125,8,116, + 4,106,5,124,5,106,6,100,2,116,3,124,5,106,6,131, + 1,124,8,24,0,133,2,25,0,25,0,83,0,116,7,124, + 5,100,4,131,2,114,170,116,8,124,5,124,3,116,0,131, + 3,83,0,124,5,83,0,41,5,97,215,1,0,0,73,109, + 112,111,114,116,32,97,32,109,111,100,117,108,101,46,10,10, + 32,32,32,32,84,104,101,32,39,103,108,111,98,97,108,115, + 39,32,97,114,103,117,109,101,110,116,32,105,115,32,117,115, + 101,100,32,116,111,32,105,110,102,101,114,32,119,104,101,114, + 101,32,116,104,101,32,105,109,112,111,114,116,32,105,115,32, + 111,99,99,117,114,114,105,110,103,32,102,114,111,109,10,32, + 32,32,32,116,111,32,104,97,110,100,108,101,32,114,101,108, + 97,116,105,118,101,32,105,109,112,111,114,116,115,46,32,84, + 104,101,32,39,108,111,99,97,108,115,39,32,97,114,103,117, + 109,101,110,116,32,105,115,32,105,103,110,111,114,101,100,46, + 32,84,104,101,10,32,32,32,32,39,102,114,111,109,108,105, + 115,116,39,32,97,114,103,117,109,101,110,116,32,115,112,101, + 99,105,102,105,101,115,32,119,104,97,116,32,115,104,111,117, + 108,100,32,101,120,105,115,116,32,97,115,32,97,116,116,114, + 105,98,117,116,101,115,32,111,110,32,116,104,101,32,109,111, + 100,117,108,101,10,32,32,32,32,98,101,105,110,103,32,105, + 109,112,111,114,116,101,100,32,40,101,46,103,46,32,96,96, + 102,114,111,109,32,109,111,100,117,108,101,32,105,109,112,111, + 114,116,32,60,102,114,111,109,108,105,115,116,62,96,96,41, + 46,32,32,84,104,101,32,39,108,101,118,101,108,39,10,32, + 32,32,32,97,114,103,117,109,101,110,116,32,114,101,112,114, + 101,115,101,110,116,115,32,116,104,101,32,112,97,99,107,97, + 103,101,32,108,111,99,97,116,105,111,110,32,116,111,32,105, + 109,112,111,114,116,32,102,114,111,109,32,105,110,32,97,32, + 114,101,108,97,116,105,118,101,10,32,32,32,32,105,109,112, + 111,114,116,32,40,101,46,103,46,32,96,96,102,114,111,109, + 32,46,46,112,107,103,32,105,109,112,111,114,116,32,109,111, + 100,96,96,32,119,111,117,108,100,32,104,97,118,101,32,97, + 32,39,108,101,118,101,108,39,32,111,102,32,50,41,46,10, + 10,32,32,32,32,114,25,0,0,0,78,114,135,0,0,0, + 114,148,0,0,0,41,9,114,216,0,0,0,114,227,0,0, + 0,218,9,112,97,114,116,105,116,105,111,110,114,195,0,0, + 0,114,18,0,0,0,114,99,0,0,0,114,9,0,0,0, + 114,11,0,0,0,114,221,0,0,0,41,9,114,20,0,0, + 0,114,226,0,0,0,218,6,108,111,99,97,108,115,114,222, + 0,0,0,114,197,0,0,0,114,104,0,0,0,90,8,103, + 108,111,98,97,108,115,95,114,196,0,0,0,90,7,99,117, + 116,95,111,102,102,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,218,10,95,95,105,109,112,111,114,116,95,95, + 92,4,0,0,115,32,0,0,0,8,11,10,1,16,2,8, + 1,12,1,4,1,8,3,18,1,4,1,4,1,26,4,30, + 3,10,1,12,1,4,2,255,128,114,230,0,0,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3, + 0,0,0,67,0,0,0,115,38,0,0,0,116,0,160,1, + 124,0,161,1,125,1,124,1,100,0,117,0,114,30,116,2, + 100,1,124,0,23,0,131,1,130,1,116,3,124,1,131,1, + 83,0,41,2,78,122,25,110,111,32,98,117,105,108,116,45, + 105,110,32,109,111,100,117,108,101,32,110,97,109,101,100,32, + 41,4,114,169,0,0,0,114,177,0,0,0,114,83,0,0, + 0,114,167,0,0,0,41,2,114,20,0,0,0,114,103,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,218,18,95,98,117,105,108,116,105,110,95,102,114,111,109, + 95,110,97,109,101,129,4,0,0,115,10,0,0,0,10,1, + 8,1,12,1,8,1,255,128,114,231,0,0,0,99,2,0, + 0,0,0,0,0,0,0,0,0,0,10,0,0,0,5,0, + 0,0,67,0,0,0,115,166,0,0,0,124,1,97,0,124, + 0,97,1,116,2,116,1,131,1,125,2,116,1,106,3,160, + 4,161,0,68,0,93,72,92,2,125,3,125,4,116,5,124, + 4,124,2,131,2,114,98,124,3,116,1,106,6,118,0,114, + 60,116,7,125,5,110,18,116,0,160,8,124,3,161,1,114, + 76,116,9,125,5,110,2,113,26,116,10,124,4,124,5,131, + 2,125,6,116,11,124,6,124,4,131,2,1,0,113,26,116, + 1,106,3,116,12,25,0,125,7,100,1,68,0,93,46,125, + 8,124,8,116,1,106,3,118,1,114,138,116,13,124,8,131, + 1,125,9,110,10,116,1,106,3,124,8,25,0,125,9,116, + 14,124,7,124,8,124,9,131,3,1,0,113,114,100,2,83, + 0,41,3,122,250,83,101,116,117,112,32,105,109,112,111,114, + 116,108,105,98,32,98,121,32,105,109,112,111,114,116,105,110, + 103,32,110,101,101,100,101,100,32,98,117,105,108,116,45,105, + 110,32,109,111,100,117,108,101,115,32,97,110,100,32,105,110, + 106,101,99,116,105,110,103,32,116,104,101,109,10,32,32,32, + 32,105,110,116,111,32,116,104,101,32,103,108,111,98,97,108, + 32,110,97,109,101,115,112,97,99,101,46,10,10,32,32,32, + 32,65,115,32,115,121,115,32,105,115,32,110,101,101,100,101, + 100,32,102,111,114,32,115,121,115,46,109,111,100,117,108,101, + 115,32,97,99,99,101,115,115,32,97,110,100,32,95,105,109, + 112,32,105,115,32,110,101,101,100,101,100,32,116,111,32,108, + 111,97,100,32,98,117,105,108,116,45,105,110,10,32,32,32, + 32,109,111,100,117,108,101,115,44,32,116,104,111,115,101,32, + 116,119,111,32,109,111,100,117,108,101,115,32,109,117,115,116, + 32,98,101,32,101,120,112,108,105,99,105,116,108,121,32,112, + 97,115,115,101,100,32,105,110,46,10,10,32,32,32,32,41, + 3,114,26,0,0,0,114,95,0,0,0,114,68,0,0,0, + 78,41,15,114,61,0,0,0,114,18,0,0,0,114,3,0, + 0,0,114,99,0,0,0,218,5,105,116,101,109,115,114,203, + 0,0,0,114,82,0,0,0,114,169,0,0,0,114,92,0, + 0,0,114,184,0,0,0,114,149,0,0,0,114,155,0,0, + 0,114,9,0,0,0,114,231,0,0,0,114,12,0,0,0, + 41,10,218,10,115,121,115,95,109,111,100,117,108,101,218,11, + 95,105,109,112,95,109,111,100,117,108,101,90,11,109,111,100, + 117,108,101,95,116,121,112,101,114,20,0,0,0,114,104,0, + 0,0,114,116,0,0,0,114,103,0,0,0,90,11,115,101, + 108,102,95,109,111,100,117,108,101,90,12,98,117,105,108,116, + 105,110,95,110,97,109,101,90,14,98,117,105,108,116,105,110, + 95,109,111,100,117,108,101,114,5,0,0,0,114,5,0,0, + 0,114,6,0,0,0,218,6,95,115,101,116,117,112,136,4, + 0,0,115,42,0,0,0,4,9,4,1,8,3,18,1,10, + 1,10,1,6,1,10,1,6,1,2,2,10,1,10,1,2, + 128,10,3,8,1,10,1,10,1,10,2,14,1,4,251,255, + 128,114,235,0,0,0,99,2,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,3,0,0,0,67,0,0,0,115, + 38,0,0,0,116,0,124,0,124,1,131,2,1,0,116,1, + 106,2,160,3,116,4,161,1,1,0,116,1,106,2,160,3, + 116,5,161,1,1,0,100,1,83,0,41,2,122,48,73,110, + 115,116,97,108,108,32,105,109,112,111,114,116,101,114,115,32, + 102,111,114,32,98,117,105,108,116,105,110,32,97,110,100,32, + 102,114,111,122,101,110,32,109,111,100,117,108,101,115,78,41, + 6,114,235,0,0,0,114,18,0,0,0,114,201,0,0,0, + 114,126,0,0,0,114,169,0,0,0,114,184,0,0,0,41, + 2,114,233,0,0,0,114,234,0,0,0,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,218,8,95,105,110,115, + 116,97,108,108,171,4,0,0,115,8,0,0,0,10,2,12, + 2,16,1,255,128,114,236,0,0,0,99,0,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,67, + 0,0,0,115,32,0,0,0,100,1,100,2,108,0,125,0, + 124,0,97,1,124,0,160,2,116,3,106,4,116,5,25,0, + 161,1,1,0,100,2,83,0,41,3,122,57,73,110,115,116, + 97,108,108,32,105,109,112,111,114,116,101,114,115,32,116,104, + 97,116,32,114,101,113,117,105,114,101,32,101,120,116,101,114, + 110,97,108,32,102,105,108,101,115,121,115,116,101,109,32,97, + 99,99,101,115,115,114,25,0,0,0,78,41,6,218,26,95, + 102,114,111,122,101,110,95,105,109,112,111,114,116,108,105,98, + 95,101,120,116,101,114,110,97,108,114,133,0,0,0,114,236, + 0,0,0,114,18,0,0,0,114,99,0,0,0,114,9,0, + 0,0,41,1,114,237,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,218,27,95,105,110,115,116,97, + 108,108,95,101,120,116,101,114,110,97,108,95,105,109,112,111, + 114,116,101,114,115,179,4,0,0,115,8,0,0,0,8,3, + 4,1,20,1,255,128,114,238,0,0,0,41,2,78,78,41, + 1,78,41,2,78,114,25,0,0,0,41,4,78,78,114,5, + 0,0,0,114,25,0,0,0,41,54,114,10,0,0,0,114, + 7,0,0,0,114,26,0,0,0,114,95,0,0,0,114,68, + 0,0,0,114,133,0,0,0,114,17,0,0,0,114,21,0, + 0,0,114,63,0,0,0,114,37,0,0,0,114,47,0,0, + 0,114,22,0,0,0,114,23,0,0,0,114,53,0,0,0, + 114,54,0,0,0,114,57,0,0,0,114,69,0,0,0,114, + 71,0,0,0,114,80,0,0,0,114,90,0,0,0,114,94, + 0,0,0,114,105,0,0,0,114,118,0,0,0,114,119,0, + 0,0,114,98,0,0,0,114,149,0,0,0,114,155,0,0, + 0,114,159,0,0,0,114,114,0,0,0,114,100,0,0,0, + 114,166,0,0,0,114,167,0,0,0,114,101,0,0,0,114, + 169,0,0,0,114,184,0,0,0,114,189,0,0,0,114,198, + 0,0,0,114,200,0,0,0,114,202,0,0,0,114,208,0, + 0,0,90,15,95,69,82,82,95,77,83,71,95,80,82,69, + 70,73,88,114,210,0,0,0,114,213,0,0,0,218,6,111, + 98,106,101,99,116,114,214,0,0,0,114,215,0,0,0,114, + 216,0,0,0,114,221,0,0,0,114,227,0,0,0,114,230, + 0,0,0,114,231,0,0,0,114,235,0,0,0,114,236,0, + 0,0,114,238,0,0,0,114,5,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,218,8,60,109,111, + 100,117,108,101,62,1,0,0,0,115,106,0,0,0,4,0, + 8,22,4,9,4,1,4,1,4,3,8,3,8,8,4,8, + 4,2,16,3,14,4,14,77,14,21,8,16,8,37,8,17, + 14,11,8,8,8,11,8,12,8,19,14,36,16,101,10,26, + 14,45,8,72,8,17,8,17,8,30,8,36,8,45,14,15, + 14,75,14,80,8,13,8,9,10,9,8,47,4,16,8,1, + 8,2,6,32,8,3,10,16,14,15,8,37,10,27,8,37, + 8,7,8,35,12,8,255,128, }; diff --git a/Python/importlib_external.h b/Python/importlib_external.h index 93dcfb141052a..4b5d086e84c18 100644 --- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -991,7 +991,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 0,0,8,12,4,4,10,1,2,2,14,1,14,1,4,1, 2,128,10,2,16,8,6,1,8,3,14,1,14,1,10,1, 6,1,4,1,2,128,4,2,8,3,10,2,2,1,14,1, - 14,1,2,1,2,3,4,255,8,1,6,2,12,1,6,1, + 14,1,4,1,4,2,6,1,2,128,6,2,12,1,6,1, 12,1,12,1,4,2,2,244,2,226,255,128,114,194,0,0, 0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,4,0,0,0,64,0,0,0,115,88,0,0,0,101, @@ -1415,1260 +1415,1260 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 114,155,0,0,0,114,16,0,0,0,90,10,98,121,116,101, 115,95,100,97,116,97,90,11,99,111,100,101,95,111,98,106, 101,99,116,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,220,0,0,0,132,3,0,0,115,166,0,0,0, + 0,0,114,220,0,0,0,132,3,0,0,115,168,0,0,0, 10,7,4,1,4,1,4,1,4,1,4,1,2,1,12,1, 14,1,10,1,2,2,14,1,14,1,6,1,12,2,2,1, 14,1,14,1,4,1,2,3,2,1,6,254,2,4,12,1, 16,1,12,1,6,1,12,1,12,1,2,1,2,255,8,2, 4,254,10,3,4,1,2,1,2,1,4,254,8,4,2,1, - 6,255,2,3,2,1,2,1,6,1,2,1,2,1,8,251, - 18,7,4,1,8,2,2,1,4,255,6,2,2,1,2,1, - 6,254,10,3,10,1,12,1,12,1,18,1,6,1,4,255, - 6,2,10,1,10,1,14,1,6,2,6,1,4,255,2,2, - 16,1,4,3,14,254,2,1,8,1,2,254,2,233,2,225, - 2,250,2,251,255,128,122,21,83,111,117,114,99,101,76,111, - 97,100,101,114,46,103,101,116,95,99,111,100,101,78,41,10, - 114,130,0,0,0,114,129,0,0,0,114,131,0,0,0,114, - 230,0,0,0,114,231,0,0,0,114,233,0,0,0,114,232, - 0,0,0,114,236,0,0,0,114,240,0,0,0,114,220,0, - 0,0,114,7,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,228,0,0,0,73,3,0,0,115, - 18,0,0,0,8,0,8,2,8,8,8,14,8,10,8,7, - 14,10,12,8,255,128,114,228,0,0,0,99,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, - 0,0,0,0,115,92,0,0,0,101,0,90,1,100,0,90, - 2,100,1,90,3,100,2,100,3,132,0,90,4,100,4,100, - 5,132,0,90,5,100,6,100,7,132,0,90,6,101,7,135, - 0,102,1,100,8,100,9,132,8,131,1,90,8,101,7,100, - 10,100,11,132,0,131,1,90,9,100,12,100,13,132,0,90, - 10,101,7,100,14,100,15,132,0,131,1,90,11,135,0,4, - 0,90,12,83,0,41,16,218,10,70,105,108,101,76,111,97, - 100,101,114,122,103,66,97,115,101,32,102,105,108,101,32,108, - 111,97,100,101,114,32,99,108,97,115,115,32,119,104,105,99, - 104,32,105,109,112,108,101,109,101,110,116,115,32,116,104,101, - 32,108,111,97,100,101,114,32,112,114,111,116,111,99,111,108, - 32,109,101,116,104,111,100,115,32,116,104,97,116,10,32,32, - 32,32,114,101,113,117,105,114,101,32,102,105,108,101,32,115, - 121,115,116,101,109,32,117,115,97,103,101,46,99,3,0,0, - 0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0, - 0,67,0,0,0,115,16,0,0,0,124,1,124,0,95,0, - 124,2,124,0,95,1,100,1,83,0,41,2,122,75,67,97, - 99,104,101,32,116,104,101,32,109,111,100,117,108,101,32,110, - 97,109,101,32,97,110,100,32,116,104,101,32,112,97,116,104, - 32,116,111,32,116,104,101,32,102,105,108,101,32,102,111,117, - 110,100,32,98,121,32,116,104,101,10,32,32,32,32,32,32, - 32,32,102,105,110,100,101,114,46,78,114,163,0,0,0,41, - 3,114,123,0,0,0,114,143,0,0,0,114,52,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 216,0,0,0,222,3,0,0,115,6,0,0,0,6,3,10, - 1,255,128,122,19,70,105,108,101,76,111,97,100,101,114,46, - 95,95,105,110,105,116,95,95,99,2,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,2,0,0,0,67,0,0, - 0,115,24,0,0,0,124,0,106,0,124,1,106,0,107,2, - 111,22,124,0,106,1,124,1,106,1,107,2,83,0,114,114, - 0,0,0,169,2,218,9,95,95,99,108,97,115,115,95,95, - 114,136,0,0,0,169,2,114,123,0,0,0,90,5,111,116, - 104,101,114,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,6,95,95,101,113,95,95,228,3,0,0,115,8, - 0,0,0,12,1,10,1,2,255,255,128,122,17,70,105,108, - 101,76,111,97,100,101,114,46,95,95,101,113,95,95,99,1, - 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3, - 0,0,0,67,0,0,0,115,20,0,0,0,116,0,124,0, - 106,1,131,1,116,0,124,0,106,2,131,1,65,0,83,0, - 114,114,0,0,0,169,3,218,4,104,97,115,104,114,121,0, - 0,0,114,52,0,0,0,169,1,114,123,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,8,95, - 95,104,97,115,104,95,95,232,3,0,0,115,4,0,0,0, - 20,1,255,128,122,19,70,105,108,101,76,111,97,100,101,114, - 46,95,95,104,97,115,104,95,95,99,2,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,3,0,0,0,3,0, - 0,0,115,16,0,0,0,116,0,116,1,124,0,131,2,160, - 2,124,1,161,1,83,0,41,2,122,100,76,111,97,100,32, - 97,32,109,111,100,117,108,101,32,102,114,111,109,32,97,32, - 102,105,108,101,46,10,10,32,32,32,32,32,32,32,32,84, - 104,105,115,32,109,101,116,104,111,100,32,105,115,32,100,101, - 112,114,101,99,97,116,101,100,46,32,32,85,115,101,32,101, - 120,101,99,95,109,111,100,117,108,101,40,41,32,105,110,115, - 116,101,97,100,46,10,10,32,32,32,32,32,32,32,32,78, - 41,3,218,5,115,117,112,101,114,114,246,0,0,0,114,227, - 0,0,0,114,226,0,0,0,169,1,114,248,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,227,0,0,0,235,3, - 0,0,115,4,0,0,0,16,10,255,128,122,22,70,105,108, - 101,76,111,97,100,101,114,46,108,111,97,100,95,109,111,100, - 117,108,101,99,2,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,1,0,0,0,67,0,0,0,115,6,0,0, - 0,124,0,106,0,83,0,169,2,122,58,82,101,116,117,114, - 110,32,116,104,101,32,112,97,116,104,32,116,111,32,116,104, - 101,32,115,111,117,114,99,101,32,102,105,108,101,32,97,115, - 32,102,111,117,110,100,32,98,121,32,116,104,101,32,102,105, - 110,100,101,114,46,78,114,56,0,0,0,114,226,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 183,0,0,0,247,3,0,0,115,4,0,0,0,6,3,255, - 128,122,23,70,105,108,101,76,111,97,100,101,114,46,103,101, - 116,95,102,105,108,101,110,97,109,101,99,2,0,0,0,0, - 0,0,0,0,0,0,0,3,0,0,0,8,0,0,0,67, - 0,0,0,115,128,0,0,0,116,0,124,0,116,1,116,2, - 102,2,131,2,114,72,116,3,160,4,116,5,124,1,131,1, - 161,1,143,24,125,2,124,2,160,6,161,0,87,0,2,0, - 100,1,4,0,4,0,131,3,1,0,83,0,49,0,115,58, - 119,1,1,0,1,0,1,0,89,0,1,0,100,1,83,0, - 116,3,160,7,124,1,100,2,161,2,143,24,125,2,124,2, - 160,6,161,0,87,0,2,0,100,1,4,0,4,0,131,3, - 1,0,83,0,49,0,115,114,119,1,1,0,1,0,1,0, - 89,0,1,0,100,1,83,0,41,3,122,39,82,101,116,117, - 114,110,32,116,104,101,32,100,97,116,97,32,102,114,111,109, - 32,112,97,116,104,32,97,115,32,114,97,119,32,98,121,116, - 101,115,46,78,218,1,114,41,8,114,165,0,0,0,114,228, - 0,0,0,218,19,69,120,116,101,110,115,105,111,110,70,105, - 108,101,76,111,97,100,101,114,114,72,0,0,0,90,9,111, - 112,101,110,95,99,111,100,101,114,90,0,0,0,90,4,114, - 101,97,100,114,73,0,0,0,41,3,114,123,0,0,0,114, - 52,0,0,0,114,76,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,234,0,0,0,252,3,0, - 0,115,14,0,0,0,14,2,16,1,42,1,14,2,38,1, - 4,128,255,128,122,19,70,105,108,101,76,111,97,100,101,114, - 46,103,101,116,95,100,97,116,97,99,2,0,0,0,0,0, - 0,0,0,0,0,0,3,0,0,0,2,0,0,0,67,0, - 0,0,115,20,0,0,0,100,1,100,2,108,0,109,1,125, - 2,1,0,124,2,124,0,131,1,83,0,41,3,78,114,0, - 0,0,0,41,1,218,10,70,105,108,101,82,101,97,100,101, - 114,41,2,90,17,105,109,112,111,114,116,108,105,98,46,114, - 101,97,100,101,114,115,114,4,1,0,0,41,3,114,123,0, - 0,0,114,223,0,0,0,114,4,1,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,19,103,101,116, - 95,114,101,115,111,117,114,99,101,95,114,101,97,100,101,114, - 5,4,0,0,115,6,0,0,0,12,2,8,1,255,128,122, - 30,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95, - 114,101,115,111,117,114,99,101,95,114,101,97,100,101,114,41, - 13,114,130,0,0,0,114,129,0,0,0,114,131,0,0,0, - 114,132,0,0,0,114,216,0,0,0,114,250,0,0,0,114, - 254,0,0,0,114,140,0,0,0,114,227,0,0,0,114,183, - 0,0,0,114,234,0,0,0,114,5,1,0,0,90,13,95, - 95,99,108,97,115,115,99,101,108,108,95,95,114,7,0,0, - 0,114,7,0,0,0,114,0,1,0,0,114,8,0,0,0, - 114,246,0,0,0,217,3,0,0,115,26,0,0,0,8,0, - 4,2,8,3,8,6,8,4,2,3,14,1,2,11,10,1, - 8,4,2,9,18,1,255,128,114,246,0,0,0,99,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0, - 0,0,64,0,0,0,115,46,0,0,0,101,0,90,1,100, + 4,255,2,128,2,3,2,1,2,1,6,1,2,1,2,1, + 8,251,18,7,4,1,8,2,2,1,4,255,6,2,2,1, + 2,1,6,254,10,3,10,1,12,1,12,1,18,1,6,1, + 4,255,6,2,10,1,10,1,14,1,6,2,6,1,4,255, + 2,2,16,1,4,3,14,254,2,1,8,1,2,254,2,233, + 2,225,2,250,2,251,255,128,122,21,83,111,117,114,99,101, + 76,111,97,100,101,114,46,103,101,116,95,99,111,100,101,78, + 41,10,114,130,0,0,0,114,129,0,0,0,114,131,0,0, + 0,114,230,0,0,0,114,231,0,0,0,114,233,0,0,0, + 114,232,0,0,0,114,236,0,0,0,114,240,0,0,0,114, + 220,0,0,0,114,7,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,228,0,0,0,73,3,0, + 0,115,18,0,0,0,8,0,8,2,8,8,8,14,8,10, + 8,7,14,10,12,8,255,128,114,228,0,0,0,99,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0, + 0,0,0,0,0,0,115,92,0,0,0,101,0,90,1,100, 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, - 4,100,5,132,0,90,5,100,6,100,7,156,1,100,8,100, - 9,132,2,90,6,100,10,83,0,41,11,218,16,83,111,117, - 114,99,101,70,105,108,101,76,111,97,100,101,114,122,62,67, - 111,110,99,114,101,116,101,32,105,109,112,108,101,109,101,110, - 116,97,116,105,111,110,32,111,102,32,83,111,117,114,99,101, - 76,111,97,100,101,114,32,117,115,105,110,103,32,116,104,101, - 32,102,105,108,101,32,115,121,115,116,101,109,46,99,2,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0, - 0,0,67,0,0,0,115,22,0,0,0,116,0,124,1,131, - 1,125,2,124,2,106,1,124,2,106,2,100,1,156,2,83, - 0,41,3,122,33,82,101,116,117,114,110,32,116,104,101,32, - 109,101,116,97,100,97,116,97,32,102,111,114,32,116,104,101, - 32,112,97,116,104,46,41,2,114,173,0,0,0,114,241,0, - 0,0,78,41,3,114,57,0,0,0,218,8,115,116,95,109, - 116,105,109,101,90,7,115,116,95,115,105,122,101,41,3,114, - 123,0,0,0,114,52,0,0,0,114,245,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,231,0, - 0,0,15,4,0,0,115,6,0,0,0,8,2,14,1,255, - 128,122,27,83,111,117,114,99,101,70,105,108,101,76,111,97, - 100,101,114,46,112,97,116,104,95,115,116,97,116,115,99,4, - 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,5, - 0,0,0,67,0,0,0,115,24,0,0,0,116,0,124,1, - 131,1,125,4,124,0,106,1,124,2,124,3,124,4,100,1, - 141,3,83,0,41,2,78,169,1,218,5,95,109,111,100,101, - 41,2,114,119,0,0,0,114,232,0,0,0,41,5,114,123, - 0,0,0,114,112,0,0,0,114,111,0,0,0,114,37,0, - 0,0,114,60,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,233,0,0,0,20,4,0,0,115, - 6,0,0,0,8,2,16,1,255,128,122,32,83,111,117,114, - 99,101,70,105,108,101,76,111,97,100,101,114,46,95,99,97, - 99,104,101,95,98,121,116,101,99,111,100,101,114,68,0,0, - 0,114,8,1,0,0,99,3,0,0,0,0,0,0,0,1, - 0,0,0,9,0,0,0,11,0,0,0,67,0,0,0,115, - 4,1,0,0,116,0,124,1,131,1,92,2,125,4,125,5, - 103,0,125,6,124,4,114,62,116,1,124,4,131,1,115,62, - 116,0,124,4,131,1,92,2,125,4,125,7,124,6,160,2, - 124,7,161,1,1,0,124,4,114,62,116,1,124,4,131,1, - 114,28,116,3,124,6,131,1,68,0,93,98,125,7,116,4, - 124,4,124,7,131,2,125,4,122,14,116,5,160,6,124,4, - 161,1,1,0,87,0,113,70,4,0,116,7,121,116,1,0, - 1,0,1,0,89,0,113,70,4,0,116,8,144,1,121,2, - 1,0,125,8,1,0,122,30,116,9,160,10,100,1,124,4, - 124,8,161,3,1,0,87,0,89,0,100,2,125,8,126,8, - 1,0,100,2,83,0,100,2,125,8,126,8,119,1,122,30, - 116,11,124,1,124,2,124,3,131,3,1,0,116,9,160,10, - 100,3,124,1,161,2,1,0,87,0,100,2,83,0,4,0, - 116,8,121,252,1,0,125,8,1,0,122,28,116,9,160,10, - 100,1,124,1,124,8,161,3,1,0,87,0,89,0,100,2, - 125,8,126,8,100,2,83,0,100,2,125,8,126,8,119,1, - 119,0,100,2,83,0,119,0,41,4,122,27,87,114,105,116, - 101,32,98,121,116,101,115,32,100,97,116,97,32,116,111,32, - 97,32,102,105,108,101,46,122,27,99,111,117,108,100,32,110, - 111,116,32,99,114,101,97,116,101,32,123,33,114,125,58,32, - 123,33,114,125,78,122,12,99,114,101,97,116,101,100,32,123, - 33,114,125,41,12,114,55,0,0,0,114,64,0,0,0,114, - 190,0,0,0,114,50,0,0,0,114,48,0,0,0,114,18, - 0,0,0,90,5,109,107,100,105,114,218,15,70,105,108,101, - 69,120,105,115,116,115,69,114,114,111,114,114,58,0,0,0, - 114,139,0,0,0,114,153,0,0,0,114,77,0,0,0,41, - 9,114,123,0,0,0,114,52,0,0,0,114,37,0,0,0, - 114,9,1,0,0,218,6,112,97,114,101,110,116,114,101,0, - 0,0,114,47,0,0,0,114,43,0,0,0,114,235,0,0, + 4,100,5,132,0,90,5,100,6,100,7,132,0,90,6,101, + 7,135,0,102,1,100,8,100,9,132,8,131,1,90,8,101, + 7,100,10,100,11,132,0,131,1,90,9,100,12,100,13,132, + 0,90,10,101,7,100,14,100,15,132,0,131,1,90,11,135, + 0,4,0,90,12,83,0,41,16,218,10,70,105,108,101,76, + 111,97,100,101,114,122,103,66,97,115,101,32,102,105,108,101, + 32,108,111,97,100,101,114,32,99,108,97,115,115,32,119,104, + 105,99,104,32,105,109,112,108,101,109,101,110,116,115,32,116, + 104,101,32,108,111,97,100,101,114,32,112,114,111,116,111,99, + 111,108,32,109,101,116,104,111,100,115,32,116,104,97,116,10, + 32,32,32,32,114,101,113,117,105,114,101,32,102,105,108,101, + 32,115,121,115,116,101,109,32,117,115,97,103,101,46,99,3, + 0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2, + 0,0,0,67,0,0,0,115,16,0,0,0,124,1,124,0, + 95,0,124,2,124,0,95,1,100,1,83,0,41,2,122,75, + 67,97,99,104,101,32,116,104,101,32,109,111,100,117,108,101, + 32,110,97,109,101,32,97,110,100,32,116,104,101,32,112,97, + 116,104,32,116,111,32,116,104,101,32,102,105,108,101,32,102, + 111,117,110,100,32,98,121,32,116,104,101,10,32,32,32,32, + 32,32,32,32,102,105,110,100,101,114,46,78,114,163,0,0, + 0,41,3,114,123,0,0,0,114,143,0,0,0,114,52,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,216,0,0,0,222,3,0,0,115,6,0,0,0,6, + 3,10,1,255,128,122,19,70,105,108,101,76,111,97,100,101, + 114,46,95,95,105,110,105,116,95,95,99,2,0,0,0,0, + 0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,67, + 0,0,0,115,24,0,0,0,124,0,106,0,124,1,106,0, + 107,2,111,22,124,0,106,1,124,1,106,1,107,2,83,0, + 114,114,0,0,0,169,2,218,9,95,95,99,108,97,115,115, + 95,95,114,136,0,0,0,169,2,114,123,0,0,0,90,5, + 111,116,104,101,114,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,6,95,95,101,113,95,95,228,3,0,0, + 115,8,0,0,0,12,1,10,1,2,255,255,128,122,17,70, + 105,108,101,76,111,97,100,101,114,46,95,95,101,113,95,95, + 99,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,3,0,0,0,67,0,0,0,115,20,0,0,0,116,0, + 124,0,106,1,131,1,116,0,124,0,106,2,131,1,65,0, + 83,0,114,114,0,0,0,169,3,218,4,104,97,115,104,114, + 121,0,0,0,114,52,0,0,0,169,1,114,123,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 8,95,95,104,97,115,104,95,95,232,3,0,0,115,4,0, + 0,0,20,1,255,128,122,19,70,105,108,101,76,111,97,100, + 101,114,46,95,95,104,97,115,104,95,95,99,2,0,0,0, + 0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0, + 3,0,0,0,115,16,0,0,0,116,0,116,1,124,0,131, + 2,160,2,124,1,161,1,83,0,41,2,122,100,76,111,97, + 100,32,97,32,109,111,100,117,108,101,32,102,114,111,109,32, + 97,32,102,105,108,101,46,10,10,32,32,32,32,32,32,32, + 32,84,104,105,115,32,109,101,116,104,111,100,32,105,115,32, + 100,101,112,114,101,99,97,116,101,100,46,32,32,85,115,101, + 32,101,120,101,99,95,109,111,100,117,108,101,40,41,32,105, + 110,115,116,101,97,100,46,10,10,32,32,32,32,32,32,32, + 32,78,41,3,218,5,115,117,112,101,114,114,246,0,0,0, + 114,227,0,0,0,114,226,0,0,0,169,1,114,248,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,227,0,0,0, + 235,3,0,0,115,4,0,0,0,16,10,255,128,122,22,70, + 105,108,101,76,111,97,100,101,114,46,108,111,97,100,95,109, + 111,100,117,108,101,99,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,1,0,0,0,67,0,0,0,115,6, + 0,0,0,124,0,106,0,83,0,169,2,122,58,82,101,116, + 117,114,110,32,116,104,101,32,112,97,116,104,32,116,111,32, + 116,104,101,32,115,111,117,114,99,101,32,102,105,108,101,32, + 97,115,32,102,111,117,110,100,32,98,121,32,116,104,101,32, + 102,105,110,100,101,114,46,78,114,56,0,0,0,114,226,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,183,0,0,0,247,3,0,0,115,4,0,0,0,6, + 3,255,128,122,23,70,105,108,101,76,111,97,100,101,114,46, + 103,101,116,95,102,105,108,101,110,97,109,101,99,2,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,8,0,0, + 0,67,0,0,0,115,128,0,0,0,116,0,124,0,116,1, + 116,2,102,2,131,2,114,72,116,3,160,4,116,5,124,1, + 131,1,161,1,143,24,125,2,124,2,160,6,161,0,87,0, + 2,0,100,1,4,0,4,0,131,3,1,0,83,0,49,0, + 115,58,119,1,1,0,1,0,1,0,89,0,1,0,100,1, + 83,0,116,3,160,7,124,1,100,2,161,2,143,24,125,2, + 124,2,160,6,161,0,87,0,2,0,100,1,4,0,4,0, + 131,3,1,0,83,0,49,0,115,114,119,1,1,0,1,0, + 1,0,89,0,1,0,100,1,83,0,41,3,122,39,82,101, + 116,117,114,110,32,116,104,101,32,100,97,116,97,32,102,114, + 111,109,32,112,97,116,104,32,97,115,32,114,97,119,32,98, + 121,116,101,115,46,78,218,1,114,41,8,114,165,0,0,0, + 114,228,0,0,0,218,19,69,120,116,101,110,115,105,111,110, + 70,105,108,101,76,111,97,100,101,114,114,72,0,0,0,90, + 9,111,112,101,110,95,99,111,100,101,114,90,0,0,0,90, + 4,114,101,97,100,114,73,0,0,0,41,3,114,123,0,0, + 0,114,52,0,0,0,114,76,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,234,0,0,0,252, + 3,0,0,115,16,0,0,0,14,2,16,1,38,1,4,128, + 14,2,38,1,4,128,255,128,122,19,70,105,108,101,76,111, + 97,100,101,114,46,103,101,116,95,100,97,116,97,99,2,0, + 0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0, + 0,0,67,0,0,0,115,20,0,0,0,100,1,100,2,108, + 0,109,1,125,2,1,0,124,2,124,0,131,1,83,0,41, + 3,78,114,0,0,0,0,41,1,218,10,70,105,108,101,82, + 101,97,100,101,114,41,2,90,17,105,109,112,111,114,116,108, + 105,98,46,114,101,97,100,101,114,115,114,4,1,0,0,41, + 3,114,123,0,0,0,114,223,0,0,0,114,4,1,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 19,103,101,116,95,114,101,115,111,117,114,99,101,95,114,101, + 97,100,101,114,5,4,0,0,115,6,0,0,0,12,2,8, + 1,255,128,122,30,70,105,108,101,76,111,97,100,101,114,46, + 103,101,116,95,114,101,115,111,117,114,99,101,95,114,101,97, + 100,101,114,41,13,114,130,0,0,0,114,129,0,0,0,114, + 131,0,0,0,114,132,0,0,0,114,216,0,0,0,114,250, + 0,0,0,114,254,0,0,0,114,140,0,0,0,114,227,0, + 0,0,114,183,0,0,0,114,234,0,0,0,114,5,1,0, + 0,90,13,95,95,99,108,97,115,115,99,101,108,108,95,95, + 114,7,0,0,0,114,7,0,0,0,114,0,1,0,0,114, + 8,0,0,0,114,246,0,0,0,217,3,0,0,115,26,0, + 0,0,8,0,4,2,8,3,8,6,8,4,2,3,14,1, + 2,11,10,1,8,4,2,9,18,1,255,128,114,246,0,0, + 0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,3,0,0,0,64,0,0,0,115,46,0,0,0,101, + 0,90,1,100,0,90,2,100,1,90,3,100,2,100,3,132, + 0,90,4,100,4,100,5,132,0,90,5,100,6,100,7,156, + 1,100,8,100,9,132,2,90,6,100,10,83,0,41,11,218, + 16,83,111,117,114,99,101,70,105,108,101,76,111,97,100,101, + 114,122,62,67,111,110,99,114,101,116,101,32,105,109,112,108, + 101,109,101,110,116,97,116,105,111,110,32,111,102,32,83,111, + 117,114,99,101,76,111,97,100,101,114,32,117,115,105,110,103, + 32,116,104,101,32,102,105,108,101,32,115,121,115,116,101,109, + 46,99,2,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,3,0,0,0,67,0,0,0,115,22,0,0,0,116, + 0,124,1,131,1,125,2,124,2,106,1,124,2,106,2,100, + 1,156,2,83,0,41,3,122,33,82,101,116,117,114,110,32, + 116,104,101,32,109,101,116,97,100,97,116,97,32,102,111,114, + 32,116,104,101,32,112,97,116,104,46,41,2,114,173,0,0, + 0,114,241,0,0,0,78,41,3,114,57,0,0,0,218,8, + 115,116,95,109,116,105,109,101,90,7,115,116,95,115,105,122, + 101,41,3,114,123,0,0,0,114,52,0,0,0,114,245,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,231,0,0,0,15,4,0,0,115,6,0,0,0,8, + 2,14,1,255,128,122,27,83,111,117,114,99,101,70,105,108, + 101,76,111,97,100,101,114,46,112,97,116,104,95,115,116,97, + 116,115,99,4,0,0,0,0,0,0,0,0,0,0,0,5, + 0,0,0,5,0,0,0,67,0,0,0,115,24,0,0,0, + 116,0,124,1,131,1,125,4,124,0,106,1,124,2,124,3, + 124,4,100,1,141,3,83,0,41,2,78,169,1,218,5,95, + 109,111,100,101,41,2,114,119,0,0,0,114,232,0,0,0, + 41,5,114,123,0,0,0,114,112,0,0,0,114,111,0,0, + 0,114,37,0,0,0,114,60,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,233,0,0,0,20, + 4,0,0,115,6,0,0,0,8,2,16,1,255,128,122,32, + 83,111,117,114,99,101,70,105,108,101,76,111,97,100,101,114, + 46,95,99,97,99,104,101,95,98,121,116,101,99,111,100,101, + 114,68,0,0,0,114,8,1,0,0,99,3,0,0,0,0, + 0,0,0,1,0,0,0,9,0,0,0,11,0,0,0,67, + 0,0,0,115,4,1,0,0,116,0,124,1,131,1,92,2, + 125,4,125,5,103,0,125,6,124,4,114,62,116,1,124,4, + 131,1,115,62,116,0,124,4,131,1,92,2,125,4,125,7, + 124,6,160,2,124,7,161,1,1,0,124,4,114,62,116,1, + 124,4,131,1,114,28,116,3,124,6,131,1,68,0,93,98, + 125,7,116,4,124,4,124,7,131,2,125,4,122,14,116,5, + 160,6,124,4,161,1,1,0,87,0,113,70,4,0,116,7, + 121,116,1,0,1,0,1,0,89,0,113,70,4,0,116,8, + 144,1,121,2,1,0,125,8,1,0,122,30,116,9,160,10, + 100,1,124,4,124,8,161,3,1,0,87,0,89,0,100,2, + 125,8,126,8,1,0,100,2,83,0,100,2,125,8,126,8, + 119,1,122,30,116,11,124,1,124,2,124,3,131,3,1,0, + 116,9,160,10,100,3,124,1,161,2,1,0,87,0,100,2, + 83,0,4,0,116,8,121,252,1,0,125,8,1,0,122,28, + 116,9,160,10,100,1,124,1,124,8,161,3,1,0,87,0, + 89,0,100,2,125,8,126,8,100,2,83,0,100,2,125,8, + 126,8,119,1,119,0,100,2,83,0,119,0,41,4,122,27, + 87,114,105,116,101,32,98,121,116,101,115,32,100,97,116,97, + 32,116,111,32,97,32,102,105,108,101,46,122,27,99,111,117, + 108,100,32,110,111,116,32,99,114,101,97,116,101,32,123,33, + 114,125,58,32,123,33,114,125,78,122,12,99,114,101,97,116, + 101,100,32,123,33,114,125,41,12,114,55,0,0,0,114,64, + 0,0,0,114,190,0,0,0,114,50,0,0,0,114,48,0, + 0,0,114,18,0,0,0,90,5,109,107,100,105,114,218,15, + 70,105,108,101,69,120,105,115,116,115,69,114,114,111,114,114, + 58,0,0,0,114,139,0,0,0,114,153,0,0,0,114,77, + 0,0,0,41,9,114,123,0,0,0,114,52,0,0,0,114, + 37,0,0,0,114,9,1,0,0,218,6,112,97,114,101,110, + 116,114,101,0,0,0,114,47,0,0,0,114,43,0,0,0, + 114,235,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,114,232,0,0,0,25,4,0,0,115,60,0, + 0,0,12,2,4,1,12,2,12,1,10,1,12,254,12,4, + 10,1,2,1,14,1,12,1,4,2,16,1,6,3,4,1, + 4,255,16,2,8,128,2,1,12,1,18,1,14,1,8,2, + 2,1,18,255,8,128,2,254,4,255,2,248,255,128,122,25, + 83,111,117,114,99,101,70,105,108,101,76,111,97,100,101,114, + 46,115,101,116,95,100,97,116,97,78,41,7,114,130,0,0, + 0,114,129,0,0,0,114,131,0,0,0,114,132,0,0,0, + 114,231,0,0,0,114,233,0,0,0,114,232,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,6,1,0,0,11,4,0,0,115,12,0,0, + 0,8,0,4,2,8,2,8,5,18,5,255,128,114,6,1, + 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,64,0,0,0,115,32,0,0,0, + 101,0,90,1,100,0,90,2,100,1,90,3,100,2,100,3, + 132,0,90,4,100,4,100,5,132,0,90,5,100,6,83,0, + 41,7,218,20,83,111,117,114,99,101,108,101,115,115,70,105, + 108,101,76,111,97,100,101,114,122,45,76,111,97,100,101,114, + 32,119,104,105,99,104,32,104,97,110,100,108,101,115,32,115, + 111,117,114,99,101,108,101,115,115,32,102,105,108,101,32,105, + 109,112,111,114,116,115,46,99,2,0,0,0,0,0,0,0, + 0,0,0,0,5,0,0,0,5,0,0,0,67,0,0,0, + 115,68,0,0,0,124,0,160,0,124,1,161,1,125,2,124, + 0,160,1,124,2,161,1,125,3,124,1,124,2,100,1,156, + 2,125,4,116,2,124,3,124,1,124,4,131,3,1,0,116, + 3,116,4,124,3,131,1,100,2,100,0,133,2,25,0,124, + 1,124,2,100,3,141,3,83,0,41,4,78,114,163,0,0, + 0,114,149,0,0,0,41,2,114,121,0,0,0,114,111,0, + 0,0,41,5,114,183,0,0,0,114,234,0,0,0,114,156, + 0,0,0,114,169,0,0,0,114,242,0,0,0,41,5,114, + 123,0,0,0,114,143,0,0,0,114,52,0,0,0,114,37, + 0,0,0,114,155,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,220,0,0,0,60,4,0,0, + 115,24,0,0,0,10,1,10,1,2,4,2,1,6,254,12, + 4,2,1,14,1,2,1,2,1,6,253,255,128,122,29,83, + 111,117,114,99,101,108,101,115,115,70,105,108,101,76,111,97, + 100,101,114,46,103,101,116,95,99,111,100,101,99,2,0,0, + 0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0, + 0,67,0,0,0,115,4,0,0,0,100,1,83,0,41,2, + 122,39,82,101,116,117,114,110,32,78,111,110,101,32,97,115, + 32,116,104,101,114,101,32,105,115,32,110,111,32,115,111,117, + 114,99,101,32,99,111,100,101,46,78,114,7,0,0,0,114, + 226,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,236,0,0,0,76,4,0,0,115,4,0,0, + 0,4,2,255,128,122,31,83,111,117,114,99,101,108,101,115, + 115,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95, + 115,111,117,114,99,101,78,41,6,114,130,0,0,0,114,129, + 0,0,0,114,131,0,0,0,114,132,0,0,0,114,220,0, + 0,0,114,236,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,12,1,0,0, + 56,4,0,0,115,10,0,0,0,8,0,4,2,8,2,12, + 16,255,128,114,12,1,0,0,99,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,64,0,0, + 0,115,92,0,0,0,101,0,90,1,100,0,90,2,100,1, + 90,3,100,2,100,3,132,0,90,4,100,4,100,5,132,0, + 90,5,100,6,100,7,132,0,90,6,100,8,100,9,132,0, + 90,7,100,10,100,11,132,0,90,8,100,12,100,13,132,0, + 90,9,100,14,100,15,132,0,90,10,100,16,100,17,132,0, + 90,11,101,12,100,18,100,19,132,0,131,1,90,13,100,20, + 83,0,41,21,114,3,1,0,0,122,93,76,111,97,100,101, + 114,32,102,111,114,32,101,120,116,101,110,115,105,111,110,32, + 109,111,100,117,108,101,115,46,10,10,32,32,32,32,84,104, + 101,32,99,111,110,115,116,114,117,99,116,111,114,32,105,115, + 32,100,101,115,105,103,110,101,100,32,116,111,32,119,111,114, + 107,32,119,105,116,104,32,70,105,108,101,70,105,110,100,101, + 114,46,10,10,32,32,32,32,99,3,0,0,0,0,0,0, + 0,0,0,0,0,3,0,0,0,2,0,0,0,67,0,0, + 0,115,16,0,0,0,124,1,124,0,95,0,124,2,124,0, + 95,1,100,0,83,0,114,114,0,0,0,114,163,0,0,0, + 41,3,114,123,0,0,0,114,121,0,0,0,114,52,0,0, 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,232,0,0,0,25,4,0,0,115,60,0,0,0,12,2, - 4,1,12,2,12,1,10,1,12,254,12,4,10,1,2,1, - 14,1,12,1,4,2,16,1,6,3,4,1,4,255,16,2, - 8,128,2,1,12,1,18,1,14,1,8,2,2,1,18,255, - 8,128,2,254,4,255,2,248,255,128,122,25,83,111,117,114, - 99,101,70,105,108,101,76,111,97,100,101,114,46,115,101,116, - 95,100,97,116,97,78,41,7,114,130,0,0,0,114,129,0, - 0,0,114,131,0,0,0,114,132,0,0,0,114,231,0,0, - 0,114,233,0,0,0,114,232,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 6,1,0,0,11,4,0,0,115,12,0,0,0,8,0,4, - 2,8,2,8,5,18,5,255,128,114,6,1,0,0,99,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2, - 0,0,0,64,0,0,0,115,32,0,0,0,101,0,90,1, - 100,0,90,2,100,1,90,3,100,2,100,3,132,0,90,4, - 100,4,100,5,132,0,90,5,100,6,83,0,41,7,218,20, - 83,111,117,114,99,101,108,101,115,115,70,105,108,101,76,111, - 97,100,101,114,122,45,76,111,97,100,101,114,32,119,104,105, - 99,104,32,104,97,110,100,108,101,115,32,115,111,117,114,99, - 101,108,101,115,115,32,102,105,108,101,32,105,109,112,111,114, - 116,115,46,99,2,0,0,0,0,0,0,0,0,0,0,0, - 5,0,0,0,5,0,0,0,67,0,0,0,115,68,0,0, - 0,124,0,160,0,124,1,161,1,125,2,124,0,160,1,124, - 2,161,1,125,3,124,1,124,2,100,1,156,2,125,4,116, - 2,124,3,124,1,124,4,131,3,1,0,116,3,116,4,124, - 3,131,1,100,2,100,0,133,2,25,0,124,1,124,2,100, - 3,141,3,83,0,41,4,78,114,163,0,0,0,114,149,0, - 0,0,41,2,114,121,0,0,0,114,111,0,0,0,41,5, - 114,183,0,0,0,114,234,0,0,0,114,156,0,0,0,114, - 169,0,0,0,114,242,0,0,0,41,5,114,123,0,0,0, - 114,143,0,0,0,114,52,0,0,0,114,37,0,0,0,114, - 155,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,220,0,0,0,60,4,0,0,115,24,0,0, - 0,10,1,10,1,2,4,2,1,6,254,12,4,2,1,14, - 1,2,1,2,1,6,253,255,128,122,29,83,111,117,114,99, - 101,108,101,115,115,70,105,108,101,76,111,97,100,101,114,46, - 103,101,116,95,99,111,100,101,99,2,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0, - 0,115,4,0,0,0,100,1,83,0,41,2,122,39,82,101, - 116,117,114,110,32,78,111,110,101,32,97,115,32,116,104,101, - 114,101,32,105,115,32,110,111,32,115,111,117,114,99,101,32, - 99,111,100,101,46,78,114,7,0,0,0,114,226,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 236,0,0,0,76,4,0,0,115,4,0,0,0,4,2,255, - 128,122,31,83,111,117,114,99,101,108,101,115,115,70,105,108, - 101,76,111,97,100,101,114,46,103,101,116,95,115,111,117,114, - 99,101,78,41,6,114,130,0,0,0,114,129,0,0,0,114, - 131,0,0,0,114,132,0,0,0,114,220,0,0,0,114,236, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,12,1,0,0,56,4,0,0, - 115,10,0,0,0,8,0,4,2,8,2,12,16,255,128,114, - 12,1,0,0,99,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,3,0,0,0,64,0,0,0,115,92,0, - 0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,2, - 100,3,132,0,90,4,100,4,100,5,132,0,90,5,100,6, - 100,7,132,0,90,6,100,8,100,9,132,0,90,7,100,10, - 100,11,132,0,90,8,100,12,100,13,132,0,90,9,100,14, - 100,15,132,0,90,10,100,16,100,17,132,0,90,11,101,12, - 100,18,100,19,132,0,131,1,90,13,100,20,83,0,41,21, - 114,3,1,0,0,122,93,76,111,97,100,101,114,32,102,111, - 114,32,101,120,116,101,110,115,105,111,110,32,109,111,100,117, - 108,101,115,46,10,10,32,32,32,32,84,104,101,32,99,111, - 110,115,116,114,117,99,116,111,114,32,105,115,32,100,101,115, - 105,103,110,101,100,32,116,111,32,119,111,114,107,32,119,105, - 116,104,32,70,105,108,101,70,105,110,100,101,114,46,10,10, - 32,32,32,32,99,3,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,2,0,0,0,67,0,0,0,115,16,0, - 0,0,124,1,124,0,95,0,124,2,124,0,95,1,100,0, - 83,0,114,114,0,0,0,114,163,0,0,0,41,3,114,123, - 0,0,0,114,121,0,0,0,114,52,0,0,0,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,114,216,0,0, - 0,89,4,0,0,115,6,0,0,0,6,1,10,1,255,128, - 122,28,69,120,116,101,110,115,105,111,110,70,105,108,101,76, - 111,97,100,101,114,46,95,95,105,110,105,116,95,95,99,2, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2, - 0,0,0,67,0,0,0,115,24,0,0,0,124,0,106,0, - 124,1,106,0,107,2,111,22,124,0,106,1,124,1,106,1, - 107,2,83,0,114,114,0,0,0,114,247,0,0,0,114,249, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,250,0,0,0,93,4,0,0,115,8,0,0,0, - 12,1,10,1,2,255,255,128,122,26,69,120,116,101,110,115, - 105,111,110,70,105,108,101,76,111,97,100,101,114,46,95,95, - 101,113,95,95,99,1,0,0,0,0,0,0,0,0,0,0, - 0,1,0,0,0,3,0,0,0,67,0,0,0,115,20,0, - 0,0,116,0,124,0,106,1,131,1,116,0,124,0,106,2, - 131,1,65,0,83,0,114,114,0,0,0,114,251,0,0,0, - 114,253,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,254,0,0,0,97,4,0,0,115,4,0, - 0,0,20,1,255,128,122,28,69,120,116,101,110,115,105,111, - 110,70,105,108,101,76,111,97,100,101,114,46,95,95,104,97, - 115,104,95,95,99,2,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,5,0,0,0,67,0,0,0,115,36,0, - 0,0,116,0,160,1,116,2,106,3,124,1,161,2,125,2, - 116,0,160,4,100,1,124,1,106,5,124,0,106,6,161,3, - 1,0,124,2,83,0,41,3,122,38,67,114,101,97,116,101, - 32,97,110,32,117,110,105,116,105,97,108,105,122,101,100,32, - 101,120,116,101,110,115,105,111,110,32,109,111,100,117,108,101, - 122,38,101,120,116,101,110,115,105,111,110,32,109,111,100,117, - 108,101,32,123,33,114,125,32,108,111,97,100,101,100,32,102, - 114,111,109,32,123,33,114,125,78,41,7,114,139,0,0,0, - 114,221,0,0,0,114,167,0,0,0,90,14,99,114,101,97, - 116,101,95,100,121,110,97,109,105,99,114,153,0,0,0,114, - 121,0,0,0,114,52,0,0,0,41,3,114,123,0,0,0, - 114,191,0,0,0,114,223,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,219,0,0,0,100,4, - 0,0,115,16,0,0,0,4,2,6,1,4,255,6,2,8, - 1,4,255,4,2,255,128,122,33,69,120,116,101,110,115,105, - 111,110,70,105,108,101,76,111,97,100,101,114,46,99,114,101, - 97,116,101,95,109,111,100,117,108,101,99,2,0,0,0,0, - 0,0,0,0,0,0,0,2,0,0,0,5,0,0,0,67, - 0,0,0,115,36,0,0,0,116,0,160,1,116,2,106,3, - 124,1,161,2,1,0,116,0,160,4,100,1,124,0,106,5, - 124,0,106,6,161,3,1,0,100,2,83,0,41,3,122,30, - 73,110,105,116,105,97,108,105,122,101,32,97,110,32,101,120, - 116,101,110,115,105,111,110,32,109,111,100,117,108,101,122,40, - 101,120,116,101,110,115,105,111,110,32,109,111,100,117,108,101, - 32,123,33,114,125,32,101,120,101,99,117,116,101,100,32,102, - 114,111,109,32,123,33,114,125,78,41,7,114,139,0,0,0, - 114,221,0,0,0,114,167,0,0,0,90,12,101,120,101,99, - 95,100,121,110,97,109,105,99,114,153,0,0,0,114,121,0, - 0,0,114,52,0,0,0,169,2,114,123,0,0,0,114,223, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,224,0,0,0,108,4,0,0,115,10,0,0,0, - 14,2,6,1,8,1,8,255,255,128,122,31,69,120,116,101, + 114,216,0,0,0,89,4,0,0,115,6,0,0,0,6,1, + 10,1,255,128,122,28,69,120,116,101,110,115,105,111,110,70, + 105,108,101,76,111,97,100,101,114,46,95,95,105,110,105,116, + 95,95,99,2,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,2,0,0,0,67,0,0,0,115,24,0,0,0, + 124,0,106,0,124,1,106,0,107,2,111,22,124,0,106,1, + 124,1,106,1,107,2,83,0,114,114,0,0,0,114,247,0, + 0,0,114,249,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,250,0,0,0,93,4,0,0,115, + 8,0,0,0,12,1,10,1,2,255,255,128,122,26,69,120, + 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101, + 114,46,95,95,101,113,95,95,99,1,0,0,0,0,0,0, + 0,0,0,0,0,1,0,0,0,3,0,0,0,67,0,0, + 0,115,20,0,0,0,116,0,124,0,106,1,131,1,116,0, + 124,0,106,2,131,1,65,0,83,0,114,114,0,0,0,114, + 251,0,0,0,114,253,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,254,0,0,0,97,4,0, + 0,115,4,0,0,0,20,1,255,128,122,28,69,120,116,101, 110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,46, - 101,120,101,99,95,109,111,100,117,108,101,99,2,0,0,0, - 0,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0, - 3,0,0,0,115,36,0,0,0,116,0,124,0,106,1,131, - 1,100,1,25,0,137,0,116,2,135,0,102,1,100,2,100, - 3,132,8,116,3,68,0,131,1,131,1,83,0,41,5,122, - 49,82,101,116,117,114,110,32,84,114,117,101,32,105,102,32, - 116,104,101,32,101,120,116,101,110,115,105,111,110,32,109,111, - 100,117,108,101,32,105,115,32,97,32,112,97,99,107,97,103, - 101,46,114,3,0,0,0,99,1,0,0,0,0,0,0,0, - 0,0,0,0,2,0,0,0,4,0,0,0,51,0,0,0, - 115,26,0,0,0,124,0,93,18,125,1,136,0,100,0,124, - 1,23,0,107,2,86,0,1,0,113,2,100,1,83,0,41, - 2,114,216,0,0,0,78,114,7,0,0,0,169,2,114,5, - 0,0,0,218,6,115,117,102,102,105,120,169,1,90,9,102, - 105,108,101,95,110,97,109,101,114,7,0,0,0,114,8,0, - 0,0,114,9,0,0,0,117,4,0,0,115,8,0,0,0, - 4,0,2,1,20,255,255,128,122,49,69,120,116,101,110,115, - 105,111,110,70,105,108,101,76,111,97,100,101,114,46,105,115, - 95,112,97,99,107,97,103,101,46,60,108,111,99,97,108,115, - 62,46,60,103,101,110,101,120,112,114,62,78,41,4,114,55, - 0,0,0,114,52,0,0,0,218,3,97,110,121,114,212,0, - 0,0,114,226,0,0,0,114,7,0,0,0,114,16,1,0, - 0,114,8,0,0,0,114,186,0,0,0,114,4,0,0,115, - 10,0,0,0,14,2,12,1,2,1,8,255,255,128,122,30, + 95,95,104,97,115,104,95,95,99,2,0,0,0,0,0,0, + 0,0,0,0,0,3,0,0,0,5,0,0,0,67,0,0, + 0,115,36,0,0,0,116,0,160,1,116,2,106,3,124,1, + 161,2,125,2,116,0,160,4,100,1,124,1,106,5,124,0, + 106,6,161,3,1,0,124,2,83,0,41,3,122,38,67,114, + 101,97,116,101,32,97,110,32,117,110,105,116,105,97,108,105, + 122,101,100,32,101,120,116,101,110,115,105,111,110,32,109,111, + 100,117,108,101,122,38,101,120,116,101,110,115,105,111,110,32, + 109,111,100,117,108,101,32,123,33,114,125,32,108,111,97,100, + 101,100,32,102,114,111,109,32,123,33,114,125,78,41,7,114, + 139,0,0,0,114,221,0,0,0,114,167,0,0,0,90,14, + 99,114,101,97,116,101,95,100,121,110,97,109,105,99,114,153, + 0,0,0,114,121,0,0,0,114,52,0,0,0,41,3,114, + 123,0,0,0,114,191,0,0,0,114,223,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,219,0, + 0,0,100,4,0,0,115,16,0,0,0,4,2,6,1,4, + 255,6,2,8,1,4,255,4,2,255,128,122,33,69,120,116, + 101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114, + 46,99,114,101,97,116,101,95,109,111,100,117,108,101,99,2, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,5, + 0,0,0,67,0,0,0,115,36,0,0,0,116,0,160,1, + 116,2,106,3,124,1,161,2,1,0,116,0,160,4,100,1, + 124,0,106,5,124,0,106,6,161,3,1,0,100,2,83,0, + 41,3,122,30,73,110,105,116,105,97,108,105,122,101,32,97, + 110,32,101,120,116,101,110,115,105,111,110,32,109,111,100,117, + 108,101,122,40,101,120,116,101,110,115,105,111,110,32,109,111, + 100,117,108,101,32,123,33,114,125,32,101,120,101,99,117,116, + 101,100,32,102,114,111,109,32,123,33,114,125,78,41,7,114, + 139,0,0,0,114,221,0,0,0,114,167,0,0,0,90,12, + 101,120,101,99,95,100,121,110,97,109,105,99,114,153,0,0, + 0,114,121,0,0,0,114,52,0,0,0,169,2,114,123,0, + 0,0,114,223,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,224,0,0,0,108,4,0,0,115, + 10,0,0,0,14,2,6,1,8,1,8,255,255,128,122,31, 69,120,116,101,110,115,105,111,110,70,105,108,101,76,111,97, - 100,101,114,46,105,115,95,112,97,99,107,97,103,101,99,2, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1, - 0,0,0,67,0,0,0,115,4,0,0,0,100,1,83,0, - 41,2,122,63,82,101,116,117,114,110,32,78,111,110,101,32, - 97,115,32,97,110,32,101,120,116,101,110,115,105,111,110,32, - 109,111,100,117,108,101,32,99,97,110,110,111,116,32,99,114, - 101,97,116,101,32,97,32,99,111,100,101,32,111,98,106,101, - 99,116,46,78,114,7,0,0,0,114,226,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,220,0, - 0,0,120,4,0,0,115,4,0,0,0,4,2,255,128,122, - 28,69,120,116,101,110,115,105,111,110,70,105,108,101,76,111, - 97,100,101,114,46,103,101,116,95,99,111,100,101,99,2,0, - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0, - 0,0,67,0,0,0,115,4,0,0,0,100,1,83,0,41, - 2,122,53,82,101,116,117,114,110,32,78,111,110,101,32,97, - 115,32,101,120,116,101,110,115,105,111,110,32,109,111,100,117, - 108,101,115,32,104,97,118,101,32,110,111,32,115,111,117,114, - 99,101,32,99,111,100,101,46,78,114,7,0,0,0,114,226, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,236,0,0,0,124,4,0,0,115,4,0,0,0, - 4,2,255,128,122,30,69,120,116,101,110,115,105,111,110,70, - 105,108,101,76,111,97,100,101,114,46,103,101,116,95,115,111, - 117,114,99,101,99,2,0,0,0,0,0,0,0,0,0,0, - 0,2,0,0,0,1,0,0,0,67,0,0,0,115,6,0, - 0,0,124,0,106,0,83,0,114,1,1,0,0,114,56,0, + 100,101,114,46,101,120,101,99,95,109,111,100,117,108,101,99, + 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, + 4,0,0,0,3,0,0,0,115,36,0,0,0,116,0,124, + 0,106,1,131,1,100,1,25,0,137,0,116,2,135,0,102, + 1,100,2,100,3,132,8,116,3,68,0,131,1,131,1,83, + 0,41,5,122,49,82,101,116,117,114,110,32,84,114,117,101, + 32,105,102,32,116,104,101,32,101,120,116,101,110,115,105,111, + 110,32,109,111,100,117,108,101,32,105,115,32,97,32,112,97, + 99,107,97,103,101,46,114,3,0,0,0,99,1,0,0,0, + 0,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0, + 51,0,0,0,115,26,0,0,0,124,0,93,18,125,1,136, + 0,100,0,124,1,23,0,107,2,86,0,1,0,113,2,100, + 1,83,0,41,2,114,216,0,0,0,78,114,7,0,0,0, + 169,2,114,5,0,0,0,218,6,115,117,102,102,105,120,169, + 1,90,9,102,105,108,101,95,110,97,109,101,114,7,0,0, + 0,114,8,0,0,0,114,9,0,0,0,117,4,0,0,115, + 8,0,0,0,4,0,2,1,20,255,255,128,122,49,69,120, + 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101, + 114,46,105,115,95,112,97,99,107,97,103,101,46,60,108,111, + 99,97,108,115,62,46,60,103,101,110,101,120,112,114,62,78, + 41,4,114,55,0,0,0,114,52,0,0,0,218,3,97,110, + 121,114,212,0,0,0,114,226,0,0,0,114,7,0,0,0, + 114,16,1,0,0,114,8,0,0,0,114,186,0,0,0,114, + 4,0,0,115,10,0,0,0,14,2,12,1,2,1,8,255, + 255,128,122,30,69,120,116,101,110,115,105,111,110,70,105,108, + 101,76,111,97,100,101,114,46,105,115,95,112,97,99,107,97, + 103,101,99,2,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,0, + 100,1,83,0,41,2,122,63,82,101,116,117,114,110,32,78, + 111,110,101,32,97,115,32,97,110,32,101,120,116,101,110,115, + 105,111,110,32,109,111,100,117,108,101,32,99,97,110,110,111, + 116,32,99,114,101,97,116,101,32,97,32,99,111,100,101,32, + 111,98,106,101,99,116,46,78,114,7,0,0,0,114,226,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,220,0,0,0,120,4,0,0,115,4,0,0,0,4, + 2,255,128,122,28,69,120,116,101,110,115,105,111,110,70,105, + 108,101,76,111,97,100,101,114,46,103,101,116,95,99,111,100, + 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, + 0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,100, + 1,83,0,41,2,122,53,82,101,116,117,114,110,32,78,111, + 110,101,32,97,115,32,101,120,116,101,110,115,105,111,110,32, + 109,111,100,117,108,101,115,32,104,97,118,101,32,110,111,32, + 115,111,117,114,99,101,32,99,111,100,101,46,78,114,7,0, 0,0,114,226,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,183,0,0,0,128,4,0,0,115, - 4,0,0,0,6,3,255,128,122,32,69,120,116,101,110,115, + 0,114,8,0,0,0,114,236,0,0,0,124,4,0,0,115, + 4,0,0,0,4,2,255,128,122,30,69,120,116,101,110,115, 105,111,110,70,105,108,101,76,111,97,100,101,114,46,103,101, - 116,95,102,105,108,101,110,97,109,101,78,41,14,114,130,0, - 0,0,114,129,0,0,0,114,131,0,0,0,114,132,0,0, - 0,114,216,0,0,0,114,250,0,0,0,114,254,0,0,0, - 114,219,0,0,0,114,224,0,0,0,114,186,0,0,0,114, - 220,0,0,0,114,236,0,0,0,114,140,0,0,0,114,183, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,3,1,0,0,81,4,0,0, - 115,26,0,0,0,8,0,4,2,8,6,8,4,8,4,8, - 3,8,8,8,6,8,6,8,4,2,4,14,1,255,128,114, - 3,1,0,0,99,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,64,0,0,0,115,104,0, - 0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,2, - 100,3,132,0,90,4,100,4,100,5,132,0,90,5,100,6, - 100,7,132,0,90,6,100,8,100,9,132,0,90,7,100,10, - 100,11,132,0,90,8,100,12,100,13,132,0,90,9,100,14, - 100,15,132,0,90,10,100,16,100,17,132,0,90,11,100,18, - 100,19,132,0,90,12,100,20,100,21,132,0,90,13,100,22, - 100,23,132,0,90,14,100,24,83,0,41,25,218,14,95,78, - 97,109,101,115,112,97,99,101,80,97,116,104,97,38,1,0, - 0,82,101,112,114,101,115,101,110,116,115,32,97,32,110,97, - 109,101,115,112,97,99,101,32,112,97,99,107,97,103,101,39, - 115,32,112,97,116,104,46,32,32,73,116,32,117,115,101,115, - 32,116,104,101,32,109,111,100,117,108,101,32,110,97,109,101, - 10,32,32,32,32,116,111,32,102,105,110,100,32,105,116,115, - 32,112,97,114,101,110,116,32,109,111,100,117,108,101,44,32, - 97,110,100,32,102,114,111,109,32,116,104,101,114,101,32,105, - 116,32,108,111,111,107,115,32,117,112,32,116,104,101,32,112, - 97,114,101,110,116,39,115,10,32,32,32,32,95,95,112,97, - 116,104,95,95,46,32,32,87,104,101,110,32,116,104,105,115, - 32,99,104,97,110,103,101,115,44,32,116,104,101,32,109,111, - 100,117,108,101,39,115,32,111,119,110,32,112,97,116,104,32, - 105,115,32,114,101,99,111,109,112,117,116,101,100,44,10,32, - 32,32,32,117,115,105,110,103,32,112,97,116,104,95,102,105, - 110,100,101,114,46,32,32,70,111,114,32,116,111,112,45,108, - 101,118,101,108,32,109,111,100,117,108,101,115,44,32,116,104, - 101,32,112,97,114,101,110,116,32,109,111,100,117,108,101,39, - 115,32,112,97,116,104,10,32,32,32,32,105,115,32,115,121, - 115,46,112,97,116,104,46,99,4,0,0,0,0,0,0,0, - 0,0,0,0,4,0,0,0,3,0,0,0,67,0,0,0, - 115,36,0,0,0,124,1,124,0,95,0,124,2,124,0,95, - 1,116,2,124,0,160,3,161,0,131,1,124,0,95,4,124, - 3,124,0,95,5,100,0,83,0,114,114,0,0,0,41,6, - 218,5,95,110,97,109,101,218,5,95,112,97,116,104,114,116, - 0,0,0,218,16,95,103,101,116,95,112,97,114,101,110,116, - 95,112,97,116,104,218,17,95,108,97,115,116,95,112,97,114, - 101,110,116,95,112,97,116,104,218,12,95,112,97,116,104,95, - 102,105,110,100,101,114,169,4,114,123,0,0,0,114,121,0, - 0,0,114,52,0,0,0,90,11,112,97,116,104,95,102,105, - 110,100,101,114,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,216,0,0,0,141,4,0,0,115,10,0,0, - 0,6,1,6,1,14,1,10,1,255,128,122,23,95,78,97, - 109,101,115,112,97,99,101,80,97,116,104,46,95,95,105,110, - 105,116,95,95,99,1,0,0,0,0,0,0,0,0,0,0, - 0,4,0,0,0,3,0,0,0,67,0,0,0,115,38,0, - 0,0,124,0,106,0,160,1,100,1,161,1,92,3,125,1, - 125,2,125,3,124,2,100,2,107,2,114,30,100,3,83,0, - 124,1,100,4,102,2,83,0,41,6,122,62,82,101,116,117, - 114,110,115,32,97,32,116,117,112,108,101,32,111,102,32,40, - 112,97,114,101,110,116,45,109,111,100,117,108,101,45,110,97, - 109,101,44,32,112,97,114,101,110,116,45,112,97,116,104,45, - 97,116,116,114,45,110,97,109,101,41,114,79,0,0,0,114, - 10,0,0,0,41,2,114,15,0,0,0,114,52,0,0,0, - 90,8,95,95,112,97,116,104,95,95,78,41,2,114,19,1, - 0,0,114,49,0,0,0,41,4,114,123,0,0,0,114,11, - 1,0,0,218,3,100,111,116,90,2,109,101,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,23,95,102,105, - 110,100,95,112,97,114,101,110,116,95,112,97,116,104,95,110, - 97,109,101,115,147,4,0,0,115,10,0,0,0,18,2,8, - 1,4,2,8,3,255,128,122,38,95,78,97,109,101,115,112, - 97,99,101,80,97,116,104,46,95,102,105,110,100,95,112,97, - 114,101,110,116,95,112,97,116,104,95,110,97,109,101,115,99, - 1,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, - 3,0,0,0,67,0,0,0,115,28,0,0,0,124,0,160, - 0,161,0,92,2,125,1,125,2,116,1,116,2,106,3,124, - 1,25,0,124,2,131,2,83,0,114,114,0,0,0,41,4, - 114,26,1,0,0,114,135,0,0,0,114,15,0,0,0,218, - 7,109,111,100,117,108,101,115,41,3,114,123,0,0,0,90, - 18,112,97,114,101,110,116,95,109,111,100,117,108,101,95,110, - 97,109,101,90,14,112,97,116,104,95,97,116,116,114,95,110, - 97,109,101,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,21,1,0,0,157,4,0,0,115,6,0,0,0, - 12,1,16,1,255,128,122,31,95,78,97,109,101,115,112,97, - 99,101,80,97,116,104,46,95,103,101,116,95,112,97,114,101, - 110,116,95,112,97,116,104,99,1,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,4,0,0,0,67,0,0,0, - 115,80,0,0,0,116,0,124,0,160,1,161,0,131,1,125, - 1,124,1,124,0,106,2,107,3,114,74,124,0,160,3,124, - 0,106,4,124,1,161,2,125,2,124,2,100,0,117,1,114, - 68,124,2,106,5,100,0,117,0,114,68,124,2,106,6,114, - 68,124,2,106,6,124,0,95,7,124,1,124,0,95,2,124, - 0,106,7,83,0,114,114,0,0,0,41,8,114,116,0,0, - 0,114,21,1,0,0,114,22,1,0,0,114,23,1,0,0, - 114,19,1,0,0,114,144,0,0,0,114,182,0,0,0,114, - 20,1,0,0,41,3,114,123,0,0,0,90,11,112,97,114, - 101,110,116,95,112,97,116,104,114,191,0,0,0,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,218,12,95,114, - 101,99,97,108,99,117,108,97,116,101,161,4,0,0,115,18, - 0,0,0,12,2,10,1,14,1,18,3,6,1,8,1,6, - 1,6,1,255,128,122,27,95,78,97,109,101,115,112,97,99, - 101,80,97,116,104,46,95,114,101,99,97,108,99,117,108,97, - 116,101,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,3,0,0,0,67,0,0,0,115,12,0,0,0, - 116,0,124,0,160,1,161,0,131,1,83,0,114,114,0,0, - 0,41,2,218,4,105,116,101,114,114,28,1,0,0,114,253, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,8,95,95,105,116,101,114,95,95,174,4,0,0, - 115,4,0,0,0,12,1,255,128,122,23,95,78,97,109,101, - 115,112,97,99,101,80,97,116,104,46,95,95,105,116,101,114, - 95,95,99,2,0,0,0,0,0,0,0,0,0,0,0,2, - 0,0,0,2,0,0,0,67,0,0,0,115,12,0,0,0, - 124,0,160,0,161,0,124,1,25,0,83,0,114,114,0,0, - 0,169,1,114,28,1,0,0,41,2,114,123,0,0,0,218, - 5,105,110,100,101,120,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,11,95,95,103,101,116,105,116,101,109, - 95,95,177,4,0,0,115,4,0,0,0,12,1,255,128,122, - 26,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46, - 95,95,103,101,116,105,116,101,109,95,95,99,3,0,0,0, - 0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0, - 67,0,0,0,115,14,0,0,0,124,2,124,0,106,0,124, - 1,60,0,100,0,83,0,114,114,0,0,0,41,1,114,20, - 1,0,0,41,3,114,123,0,0,0,114,32,1,0,0,114, - 52,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,11,95,95,115,101,116,105,116,101,109,95,95, - 180,4,0,0,115,4,0,0,0,14,1,255,128,122,26,95, + 116,95,115,111,117,114,99,101,99,2,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0, + 0,115,6,0,0,0,124,0,106,0,83,0,114,1,1,0, + 0,114,56,0,0,0,114,226,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,183,0,0,0,128, + 4,0,0,115,4,0,0,0,6,3,255,128,122,32,69,120, + 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101, + 114,46,103,101,116,95,102,105,108,101,110,97,109,101,78,41, + 14,114,130,0,0,0,114,129,0,0,0,114,131,0,0,0, + 114,132,0,0,0,114,216,0,0,0,114,250,0,0,0,114, + 254,0,0,0,114,219,0,0,0,114,224,0,0,0,114,186, + 0,0,0,114,220,0,0,0,114,236,0,0,0,114,140,0, + 0,0,114,183,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,3,1,0,0, + 81,4,0,0,115,26,0,0,0,8,0,4,2,8,6,8, + 4,8,4,8,3,8,8,8,6,8,6,8,4,2,4,14, + 1,255,128,114,3,1,0,0,99,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,2,0,0,0,64,0,0, + 0,115,104,0,0,0,101,0,90,1,100,0,90,2,100,1, + 90,3,100,2,100,3,132,0,90,4,100,4,100,5,132,0, + 90,5,100,6,100,7,132,0,90,6,100,8,100,9,132,0, + 90,7,100,10,100,11,132,0,90,8,100,12,100,13,132,0, + 90,9,100,14,100,15,132,0,90,10,100,16,100,17,132,0, + 90,11,100,18,100,19,132,0,90,12,100,20,100,21,132,0, + 90,13,100,22,100,23,132,0,90,14,100,24,83,0,41,25, + 218,14,95,78,97,109,101,115,112,97,99,101,80,97,116,104, + 97,38,1,0,0,82,101,112,114,101,115,101,110,116,115,32, + 97,32,110,97,109,101,115,112,97,99,101,32,112,97,99,107, + 97,103,101,39,115,32,112,97,116,104,46,32,32,73,116,32, + 117,115,101,115,32,116,104,101,32,109,111,100,117,108,101,32, + 110,97,109,101,10,32,32,32,32,116,111,32,102,105,110,100, + 32,105,116,115,32,112,97,114,101,110,116,32,109,111,100,117, + 108,101,44,32,97,110,100,32,102,114,111,109,32,116,104,101, + 114,101,32,105,116,32,108,111,111,107,115,32,117,112,32,116, + 104,101,32,112,97,114,101,110,116,39,115,10,32,32,32,32, + 95,95,112,97,116,104,95,95,46,32,32,87,104,101,110,32, + 116,104,105,115,32,99,104,97,110,103,101,115,44,32,116,104, + 101,32,109,111,100,117,108,101,39,115,32,111,119,110,32,112, + 97,116,104,32,105,115,32,114,101,99,111,109,112,117,116,101, + 100,44,10,32,32,32,32,117,115,105,110,103,32,112,97,116, + 104,95,102,105,110,100,101,114,46,32,32,70,111,114,32,116, + 111,112,45,108,101,118,101,108,32,109,111,100,117,108,101,115, + 44,32,116,104,101,32,112,97,114,101,110,116,32,109,111,100, + 117,108,101,39,115,32,112,97,116,104,10,32,32,32,32,105, + 115,32,115,121,115,46,112,97,116,104,46,99,4,0,0,0, + 0,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0, + 67,0,0,0,115,36,0,0,0,124,1,124,0,95,0,124, + 2,124,0,95,1,116,2,124,0,160,3,161,0,131,1,124, + 0,95,4,124,3,124,0,95,5,100,0,83,0,114,114,0, + 0,0,41,6,218,5,95,110,97,109,101,218,5,95,112,97, + 116,104,114,116,0,0,0,218,16,95,103,101,116,95,112,97, + 114,101,110,116,95,112,97,116,104,218,17,95,108,97,115,116, + 95,112,97,114,101,110,116,95,112,97,116,104,218,12,95,112, + 97,116,104,95,102,105,110,100,101,114,169,4,114,123,0,0, + 0,114,121,0,0,0,114,52,0,0,0,90,11,112,97,116, + 104,95,102,105,110,100,101,114,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,216,0,0,0,141,4,0,0, + 115,10,0,0,0,6,1,6,1,14,1,10,1,255,128,122, + 23,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46, + 95,95,105,110,105,116,95,95,99,1,0,0,0,0,0,0, + 0,0,0,0,0,4,0,0,0,3,0,0,0,67,0,0, + 0,115,38,0,0,0,124,0,106,0,160,1,100,1,161,1, + 92,3,125,1,125,2,125,3,124,2,100,2,107,2,114,30, + 100,3,83,0,124,1,100,4,102,2,83,0,41,6,122,62, + 82,101,116,117,114,110,115,32,97,32,116,117,112,108,101,32, + 111,102,32,40,112,97,114,101,110,116,45,109,111,100,117,108, + 101,45,110,97,109,101,44,32,112,97,114,101,110,116,45,112, + 97,116,104,45,97,116,116,114,45,110,97,109,101,41,114,79, + 0,0,0,114,10,0,0,0,41,2,114,15,0,0,0,114, + 52,0,0,0,90,8,95,95,112,97,116,104,95,95,78,41, + 2,114,19,1,0,0,114,49,0,0,0,41,4,114,123,0, + 0,0,114,11,1,0,0,218,3,100,111,116,90,2,109,101, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 23,95,102,105,110,100,95,112,97,114,101,110,116,95,112,97, + 116,104,95,110,97,109,101,115,147,4,0,0,115,10,0,0, + 0,18,2,8,1,4,2,8,3,255,128,122,38,95,78,97, + 109,101,115,112,97,99,101,80,97,116,104,46,95,102,105,110, + 100,95,112,97,114,101,110,116,95,112,97,116,104,95,110,97, + 109,101,115,99,1,0,0,0,0,0,0,0,0,0,0,0, + 3,0,0,0,3,0,0,0,67,0,0,0,115,28,0,0, + 0,124,0,160,0,161,0,92,2,125,1,125,2,116,1,116, + 2,106,3,124,1,25,0,124,2,131,2,83,0,114,114,0, + 0,0,41,4,114,26,1,0,0,114,135,0,0,0,114,15, + 0,0,0,218,7,109,111,100,117,108,101,115,41,3,114,123, + 0,0,0,90,18,112,97,114,101,110,116,95,109,111,100,117, + 108,101,95,110,97,109,101,90,14,112,97,116,104,95,97,116, + 116,114,95,110,97,109,101,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,21,1,0,0,157,4,0,0,115, + 6,0,0,0,12,1,16,1,255,128,122,31,95,78,97,109, + 101,115,112,97,99,101,80,97,116,104,46,95,103,101,116,95, + 112,97,114,101,110,116,95,112,97,116,104,99,1,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0, + 67,0,0,0,115,80,0,0,0,116,0,124,0,160,1,161, + 0,131,1,125,1,124,1,124,0,106,2,107,3,114,74,124, + 0,160,3,124,0,106,4,124,1,161,2,125,2,124,2,100, + 0,117,1,114,68,124,2,106,5,100,0,117,0,114,68,124, + 2,106,6,114,68,124,2,106,6,124,0,95,7,124,1,124, + 0,95,2,124,0,106,7,83,0,114,114,0,0,0,41,8, + 114,116,0,0,0,114,21,1,0,0,114,22,1,0,0,114, + 23,1,0,0,114,19,1,0,0,114,144,0,0,0,114,182, + 0,0,0,114,20,1,0,0,41,3,114,123,0,0,0,90, + 11,112,97,114,101,110,116,95,112,97,116,104,114,191,0,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 218,12,95,114,101,99,97,108,99,117,108,97,116,101,161,4, + 0,0,115,18,0,0,0,12,2,10,1,14,1,18,3,6, + 1,8,1,6,1,6,1,255,128,122,27,95,78,97,109,101, + 115,112,97,99,101,80,97,116,104,46,95,114,101,99,97,108, + 99,117,108,97,116,101,99,1,0,0,0,0,0,0,0,0, + 0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,115, + 12,0,0,0,116,0,124,0,160,1,161,0,131,1,83,0, + 114,114,0,0,0,41,2,218,4,105,116,101,114,114,28,1, + 0,0,114,253,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,8,95,95,105,116,101,114,95,95, + 174,4,0,0,115,4,0,0,0,12,1,255,128,122,23,95, 78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,95, - 115,101,116,105,116,101,109,95,95,99,1,0,0,0,0,0, - 0,0,0,0,0,0,1,0,0,0,3,0,0,0,67,0, - 0,0,115,12,0,0,0,116,0,124,0,160,1,161,0,131, - 1,83,0,114,114,0,0,0,41,2,114,4,0,0,0,114, - 28,1,0,0,114,253,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,218,7,95,95,108,101,110,95, - 95,183,4,0,0,115,4,0,0,0,12,1,255,128,122,22, - 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95, - 95,108,101,110,95,95,99,1,0,0,0,0,0,0,0,0, + 105,116,101,114,95,95,99,2,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,115, + 12,0,0,0,124,0,160,0,161,0,124,1,25,0,83,0, + 114,114,0,0,0,169,1,114,28,1,0,0,41,2,114,123, + 0,0,0,218,5,105,110,100,101,120,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,11,95,95,103,101,116, + 105,116,101,109,95,95,177,4,0,0,115,4,0,0,0,12, + 1,255,128,122,26,95,78,97,109,101,115,112,97,99,101,80, + 97,116,104,46,95,95,103,101,116,105,116,101,109,95,95,99, + 3,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, + 3,0,0,0,67,0,0,0,115,14,0,0,0,124,2,124, + 0,106,0,124,1,60,0,100,0,83,0,114,114,0,0,0, + 41,1,114,20,1,0,0,41,3,114,123,0,0,0,114,32, + 1,0,0,114,52,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,218,11,95,95,115,101,116,105,116, + 101,109,95,95,180,4,0,0,115,4,0,0,0,14,1,255, + 128,122,26,95,78,97,109,101,115,112,97,99,101,80,97,116, + 104,46,95,95,115,101,116,105,116,101,109,95,95,99,1,0, + 0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0, + 0,0,67,0,0,0,115,12,0,0,0,116,0,124,0,160, + 1,161,0,131,1,83,0,114,114,0,0,0,41,2,114,4, + 0,0,0,114,28,1,0,0,114,253,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,7,95,95, + 108,101,110,95,95,183,4,0,0,115,4,0,0,0,12,1, + 255,128,122,22,95,78,97,109,101,115,112,97,99,101,80,97, + 116,104,46,95,95,108,101,110,95,95,99,1,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,67, + 0,0,0,115,12,0,0,0,100,1,160,0,124,0,106,1, + 161,1,83,0,41,2,78,122,20,95,78,97,109,101,115,112, + 97,99,101,80,97,116,104,40,123,33,114,125,41,41,2,114, + 70,0,0,0,114,20,1,0,0,114,253,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,218,8,95, + 95,114,101,112,114,95,95,186,4,0,0,115,4,0,0,0, + 12,1,255,128,122,23,95,78,97,109,101,115,112,97,99,101, + 80,97,116,104,46,95,95,114,101,112,114,95,95,99,2,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0, + 0,0,67,0,0,0,115,12,0,0,0,124,1,124,0,160, + 0,161,0,118,0,83,0,114,114,0,0,0,114,31,1,0, + 0,169,2,114,123,0,0,0,218,4,105,116,101,109,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,218,12,95, + 95,99,111,110,116,97,105,110,115,95,95,189,4,0,0,115, + 4,0,0,0,12,1,255,128,122,27,95,78,97,109,101,115, + 112,97,99,101,80,97,116,104,46,95,95,99,111,110,116,97, + 105,110,115,95,95,99,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,3,0,0,0,67,0,0,0,115,16, + 0,0,0,124,0,106,0,160,1,124,1,161,1,1,0,100, + 0,83,0,114,114,0,0,0,41,2,114,20,1,0,0,114, + 190,0,0,0,114,37,1,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,190,0,0,0,192,4,0, + 0,115,4,0,0,0,16,1,255,128,122,21,95,78,97,109, + 101,115,112,97,99,101,80,97,116,104,46,97,112,112,101,110, + 100,78,41,15,114,130,0,0,0,114,129,0,0,0,114,131, + 0,0,0,114,132,0,0,0,114,216,0,0,0,114,26,1, + 0,0,114,21,1,0,0,114,28,1,0,0,114,30,1,0, + 0,114,33,1,0,0,114,34,1,0,0,114,35,1,0,0, + 114,36,1,0,0,114,39,1,0,0,114,190,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,18,1,0,0,134,4,0,0,115,28,0,0, + 0,8,0,4,1,8,6,8,6,8,10,8,4,8,13,8, + 3,8,3,8,3,8,3,8,3,12,3,255,128,114,18,1, + 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,3,0,0,0,64,0,0,0,115,80,0,0,0, + 101,0,90,1,100,0,90,2,100,1,100,2,132,0,90,3, + 101,4,100,3,100,4,132,0,131,1,90,5,100,5,100,6, + 132,0,90,6,100,7,100,8,132,0,90,7,100,9,100,10, + 132,0,90,8,100,11,100,12,132,0,90,9,100,13,100,14, + 132,0,90,10,100,15,100,16,132,0,90,11,100,17,83,0, + 41,18,218,16,95,78,97,109,101,115,112,97,99,101,76,111, + 97,100,101,114,99,4,0,0,0,0,0,0,0,0,0,0, + 0,4,0,0,0,4,0,0,0,67,0,0,0,115,18,0, + 0,0,116,0,124,1,124,2,124,3,131,3,124,0,95,1, + 100,0,83,0,114,114,0,0,0,41,2,114,18,1,0,0, + 114,20,1,0,0,114,24,1,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,216,0,0,0,198,4, + 0,0,115,4,0,0,0,18,1,255,128,122,25,95,78,97, + 109,101,115,112,97,99,101,76,111,97,100,101,114,46,95,95, + 105,110,105,116,95,95,99,1,0,0,0,0,0,0,0,0, 0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,115, 12,0,0,0,100,1,160,0,124,0,106,1,161,1,83,0, - 41,2,78,122,20,95,78,97,109,101,115,112,97,99,101,80, - 97,116,104,40,123,33,114,125,41,41,2,114,70,0,0,0, - 114,20,1,0,0,114,253,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,8,95,95,114,101,112, - 114,95,95,186,4,0,0,115,4,0,0,0,12,1,255,128, - 122,23,95,78,97,109,101,115,112,97,99,101,80,97,116,104, - 46,95,95,114,101,112,114,95,95,99,2,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,3,0,0,0,67,0, - 0,0,115,12,0,0,0,124,1,124,0,160,0,161,0,118, - 0,83,0,114,114,0,0,0,114,31,1,0,0,169,2,114, - 123,0,0,0,218,4,105,116,101,109,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,12,95,95,99,111,110, - 116,97,105,110,115,95,95,189,4,0,0,115,4,0,0,0, - 12,1,255,128,122,27,95,78,97,109,101,115,112,97,99,101, - 80,97,116,104,46,95,95,99,111,110,116,97,105,110,115,95, - 95,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,3,0,0,0,67,0,0,0,115,16,0,0,0,124, - 0,106,0,160,1,124,1,161,1,1,0,100,0,83,0,114, - 114,0,0,0,41,2,114,20,1,0,0,114,190,0,0,0, - 114,37,1,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,190,0,0,0,192,4,0,0,115,4,0, - 0,0,16,1,255,128,122,21,95,78,97,109,101,115,112,97, - 99,101,80,97,116,104,46,97,112,112,101,110,100,78,41,15, - 114,130,0,0,0,114,129,0,0,0,114,131,0,0,0,114, - 132,0,0,0,114,216,0,0,0,114,26,1,0,0,114,21, - 1,0,0,114,28,1,0,0,114,30,1,0,0,114,33,1, - 0,0,114,34,1,0,0,114,35,1,0,0,114,36,1,0, - 0,114,39,1,0,0,114,190,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 18,1,0,0,134,4,0,0,115,28,0,0,0,8,0,4, - 1,8,6,8,6,8,10,8,4,8,13,8,3,8,3,8, - 3,8,3,8,3,12,3,255,128,114,18,1,0,0,99,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, - 0,0,0,64,0,0,0,115,80,0,0,0,101,0,90,1, - 100,0,90,2,100,1,100,2,132,0,90,3,101,4,100,3, - 100,4,132,0,131,1,90,5,100,5,100,6,132,0,90,6, - 100,7,100,8,132,0,90,7,100,9,100,10,132,0,90,8, - 100,11,100,12,132,0,90,9,100,13,100,14,132,0,90,10, - 100,15,100,16,132,0,90,11,100,17,83,0,41,18,218,16, + 41,3,122,115,82,101,116,117,114,110,32,114,101,112,114,32, + 102,111,114,32,116,104,101,32,109,111,100,117,108,101,46,10, + 10,32,32,32,32,32,32,32,32,84,104,101,32,109,101,116, + 104,111,100,32,105,115,32,100,101,112,114,101,99,97,116,101, + 100,46,32,32,84,104,101,32,105,109,112,111,114,116,32,109, + 97,99,104,105,110,101,114,121,32,100,111,101,115,32,116,104, + 101,32,106,111,98,32,105,116,115,101,108,102,46,10,10,32, + 32,32,32,32,32,32,32,122,25,60,109,111,100,117,108,101, + 32,123,33,114,125,32,40,110,97,109,101,115,112,97,99,101, + 41,62,78,41,2,114,70,0,0,0,114,130,0,0,0,41, + 1,114,223,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,11,109,111,100,117,108,101,95,114,101, + 112,114,201,4,0,0,115,4,0,0,0,12,7,255,128,122, + 28,95,78,97,109,101,115,112,97,99,101,76,111,97,100,101, + 114,46,109,111,100,117,108,101,95,114,101,112,114,99,2,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0, + 0,0,67,0,0,0,115,4,0,0,0,100,1,83,0,41, + 2,78,84,114,7,0,0,0,114,226,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,186,0,0, + 0,210,4,0,0,115,4,0,0,0,4,1,255,128,122,27, 95,78,97,109,101,115,112,97,99,101,76,111,97,100,101,114, - 99,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0, - 0,4,0,0,0,67,0,0,0,115,18,0,0,0,116,0, - 124,1,124,2,124,3,131,3,124,0,95,1,100,0,83,0, - 114,114,0,0,0,41,2,114,18,1,0,0,114,20,1,0, - 0,114,24,1,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,216,0,0,0,198,4,0,0,115,4, - 0,0,0,18,1,255,128,122,25,95,78,97,109,101,115,112, - 97,99,101,76,111,97,100,101,114,46,95,95,105,110,105,116, + 46,105,115,95,112,97,99,107,97,103,101,99,2,0,0,0, + 0,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0, + 67,0,0,0,115,4,0,0,0,100,1,83,0,41,2,78, + 114,10,0,0,0,114,7,0,0,0,114,226,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,236, + 0,0,0,213,4,0,0,115,4,0,0,0,4,1,255,128, + 122,27,95,78,97,109,101,115,112,97,99,101,76,111,97,100, + 101,114,46,103,101,116,95,115,111,117,114,99,101,99,2,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,6,0, + 0,0,67,0,0,0,115,16,0,0,0,116,0,100,1,100, + 2,100,3,100,4,100,5,141,4,83,0,41,6,78,114,10, + 0,0,0,122,8,60,115,116,114,105,110,103,62,114,222,0, + 0,0,84,41,1,114,238,0,0,0,41,1,114,239,0,0, + 0,114,226,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,220,0,0,0,216,4,0,0,115,4, + 0,0,0,16,1,255,128,122,25,95,78,97,109,101,115,112, + 97,99,101,76,111,97,100,101,114,46,103,101,116,95,99,111, + 100,101,99,2,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,0, + 100,1,83,0,114,217,0,0,0,114,7,0,0,0,114,218, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,114,219,0,0,0,219,4,0,0,115,4,0,0,0, + 4,0,255,128,122,30,95,78,97,109,101,115,112,97,99,101, + 76,111,97,100,101,114,46,99,114,101,97,116,101,95,109,111, + 100,117,108,101,99,2,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,1,0,0,0,67,0,0,0,115,4,0, + 0,0,100,0,83,0,114,114,0,0,0,114,7,0,0,0, + 114,13,1,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,114,224,0,0,0,222,4,0,0,115,4,0, + 0,0,4,1,255,128,122,28,95,78,97,109,101,115,112,97, + 99,101,76,111,97,100,101,114,46,101,120,101,99,95,109,111, + 100,117,108,101,99,2,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,4,0,0,0,67,0,0,0,115,26,0, + 0,0,116,0,160,1,100,1,124,0,106,2,161,2,1,0, + 116,0,160,3,124,0,124,1,161,2,83,0,41,3,122,98, + 76,111,97,100,32,97,32,110,97,109,101,115,112,97,99,101, + 32,109,111,100,117,108,101,46,10,10,32,32,32,32,32,32, + 32,32,84,104,105,115,32,109,101,116,104,111,100,32,105,115, + 32,100,101,112,114,101,99,97,116,101,100,46,32,32,85,115, + 101,32,101,120,101,99,95,109,111,100,117,108,101,40,41,32, + 105,110,115,116,101,97,100,46,10,10,32,32,32,32,32,32, + 32,32,122,38,110,97,109,101,115,112,97,99,101,32,109,111, + 100,117,108,101,32,108,111,97,100,101,100,32,119,105,116,104, + 32,112,97,116,104,32,123,33,114,125,78,41,4,114,139,0, + 0,0,114,153,0,0,0,114,20,1,0,0,114,225,0,0, + 0,114,226,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,227,0,0,0,225,4,0,0,115,10, + 0,0,0,6,7,4,1,4,255,12,3,255,128,122,28,95, + 78,97,109,101,115,112,97,99,101,76,111,97,100,101,114,46, + 108,111,97,100,95,109,111,100,117,108,101,78,41,12,114,130, + 0,0,0,114,129,0,0,0,114,131,0,0,0,114,216,0, + 0,0,114,213,0,0,0,114,41,1,0,0,114,186,0,0, + 0,114,236,0,0,0,114,220,0,0,0,114,219,0,0,0, + 114,224,0,0,0,114,227,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,40, + 1,0,0,197,4,0,0,115,22,0,0,0,8,0,8,1, + 2,3,10,1,8,8,8,3,8,3,8,3,8,3,12,3, + 255,128,114,40,1,0,0,99,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,4,0,0,0,64,0,0,0, + 115,118,0,0,0,101,0,90,1,100,0,90,2,100,1,90, + 3,101,4,100,2,100,3,132,0,131,1,90,5,101,4,100, + 4,100,5,132,0,131,1,90,6,101,7,100,6,100,7,132, + 0,131,1,90,8,101,7,100,8,100,9,132,0,131,1,90, + 9,101,7,100,19,100,11,100,12,132,1,131,1,90,10,101, + 7,100,20,100,13,100,14,132,1,131,1,90,11,101,7,100, + 21,100,15,100,16,132,1,131,1,90,12,101,4,100,17,100, + 18,132,0,131,1,90,13,100,10,83,0,41,22,218,10,80, + 97,116,104,70,105,110,100,101,114,122,62,77,101,116,97,32, + 112,97,116,104,32,102,105,110,100,101,114,32,102,111,114,32, + 115,121,115,46,112,97,116,104,32,97,110,100,32,112,97,99, + 107,97,103,101,32,95,95,112,97,116,104,95,95,32,97,116, + 116,114,105,98,117,116,101,115,46,99,0,0,0,0,0,0, + 0,0,0,0,0,0,2,0,0,0,4,0,0,0,67,0, + 0,0,115,64,0,0,0,116,0,116,1,106,2,160,3,161, + 0,131,1,68,0,93,44,92,2,125,0,125,1,124,1,100, + 1,117,0,114,40,116,1,106,2,124,0,61,0,113,14,116, + 4,124,1,100,2,131,2,114,58,124,1,160,5,161,0,1, + 0,113,14,100,1,83,0,41,3,122,125,67,97,108,108,32, + 116,104,101,32,105,110,118,97,108,105,100,97,116,101,95,99, + 97,99,104,101,115,40,41,32,109,101,116,104,111,100,32,111, + 110,32,97,108,108,32,112,97,116,104,32,101,110,116,114,121, + 32,102,105,110,100,101,114,115,10,32,32,32,32,32,32,32, + 32,115,116,111,114,101,100,32,105,110,32,115,121,115,46,112, + 97,116,104,95,105,109,112,111,114,116,101,114,95,99,97,99, + 104,101,115,32,40,119,104,101,114,101,32,105,109,112,108,101, + 109,101,110,116,101,100,41,46,78,218,17,105,110,118,97,108, + 105,100,97,116,101,95,99,97,99,104,101,115,41,6,218,4, + 108,105,115,116,114,15,0,0,0,218,19,112,97,116,104,95, + 105,109,112,111,114,116,101,114,95,99,97,99,104,101,218,5, + 105,116,101,109,115,114,133,0,0,0,114,43,1,0,0,41, + 2,114,121,0,0,0,218,6,102,105,110,100,101,114,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,43,1, + 0,0,244,4,0,0,115,16,0,0,0,22,4,8,1,10, + 1,10,1,8,1,2,128,4,252,255,128,122,28,80,97,116, + 104,70,105,110,100,101,114,46,105,110,118,97,108,105,100,97, + 116,101,95,99,97,99,104,101,115,99,1,0,0,0,0,0, + 0,0,0,0,0,0,2,0,0,0,9,0,0,0,67,0, + 0,0,115,76,0,0,0,116,0,106,1,100,1,117,1,114, + 28,116,0,106,1,115,28,116,2,160,3,100,2,116,4,161, + 2,1,0,116,0,106,1,68,0,93,34,125,1,122,14,124, + 1,124,0,131,1,87,0,2,0,1,0,83,0,4,0,116, + 5,121,74,1,0,1,0,1,0,89,0,113,34,100,1,83, + 0,119,0,41,3,122,46,83,101,97,114,99,104,32,115,121, + 115,46,112,97,116,104,95,104,111,111,107,115,32,102,111,114, + 32,97,32,102,105,110,100,101,114,32,102,111,114,32,39,112, + 97,116,104,39,46,78,122,23,115,121,115,46,112,97,116,104, + 95,104,111,111,107,115,32,105,115,32,101,109,112,116,121,41, + 6,114,15,0,0,0,218,10,112,97,116,104,95,104,111,111, + 107,115,114,81,0,0,0,114,82,0,0,0,114,142,0,0, + 0,114,122,0,0,0,41,2,114,52,0,0,0,90,4,104, + 111,111,107,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,218,11,95,112,97,116,104,95,104,111,111,107,115,254, + 4,0,0,115,20,0,0,0,16,3,12,1,10,1,2,1, + 14,1,12,1,4,1,4,2,2,253,255,128,122,22,80,97, + 116,104,70,105,110,100,101,114,46,95,112,97,116,104,95,104, + 111,111,107,115,99,2,0,0,0,0,0,0,0,0,0,0, + 0,3,0,0,0,8,0,0,0,67,0,0,0,115,100,0, + 0,0,124,1,100,1,107,2,114,40,122,12,116,0,160,1, + 161,0,125,1,87,0,110,18,4,0,116,2,121,98,1,0, + 1,0,1,0,89,0,100,2,83,0,122,16,116,3,106,4, + 124,1,25,0,125,2,87,0,124,2,83,0,4,0,116,5, + 121,96,1,0,1,0,1,0,124,0,160,6,124,1,161,1, + 125,2,124,2,116,3,106,4,124,1,60,0,89,0,124,2, + 83,0,119,0,119,0,41,3,122,210,71,101,116,32,116,104, + 101,32,102,105,110,100,101,114,32,102,111,114,32,116,104,101, + 32,112,97,116,104,32,101,110,116,114,121,32,102,114,111,109, + 32,115,121,115,46,112,97,116,104,95,105,109,112,111,114,116, + 101,114,95,99,97,99,104,101,46,10,10,32,32,32,32,32, + 32,32,32,73,102,32,116,104,101,32,112,97,116,104,32,101, + 110,116,114,121,32,105,115,32,110,111,116,32,105,110,32,116, + 104,101,32,99,97,99,104,101,44,32,102,105,110,100,32,116, + 104,101,32,97,112,112,114,111,112,114,105,97,116,101,32,102, + 105,110,100,101,114,10,32,32,32,32,32,32,32,32,97,110, + 100,32,99,97,99,104,101,32,105,116,46,32,73,102,32,110, + 111,32,102,105,110,100,101,114,32,105,115,32,97,118,97,105, + 108,97,98,108,101,44,32,115,116,111,114,101,32,78,111,110, + 101,46,10,10,32,32,32,32,32,32,32,32,114,10,0,0, + 0,78,41,7,114,18,0,0,0,114,63,0,0,0,218,17, + 70,105,108,101,78,111,116,70,111,117,110,100,69,114,114,111, + 114,114,15,0,0,0,114,45,1,0,0,218,8,75,101,121, + 69,114,114,111,114,114,49,1,0,0,41,3,114,202,0,0, + 0,114,52,0,0,0,114,47,1,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,20,95,112,97,116, + 104,95,105,109,112,111,114,116,101,114,95,99,97,99,104,101, + 11,5,0,0,115,30,0,0,0,8,8,2,1,12,1,12, + 1,6,3,2,1,12,1,4,4,12,253,10,1,12,1,4, + 1,2,253,2,250,255,128,122,31,80,97,116,104,70,105,110, + 100,101,114,46,95,112,97,116,104,95,105,109,112,111,114,116, + 101,114,95,99,97,99,104,101,99,3,0,0,0,0,0,0, + 0,0,0,0,0,6,0,0,0,4,0,0,0,67,0,0, + 0,115,82,0,0,0,116,0,124,2,100,1,131,2,114,26, + 124,2,160,1,124,1,161,1,92,2,125,3,125,4,110,14, + 124,2,160,2,124,1,161,1,125,3,103,0,125,4,124,3, + 100,0,117,1,114,60,116,3,160,4,124,1,124,3,161,2, + 83,0,116,3,160,5,124,1,100,0,161,2,125,5,124,4, + 124,5,95,6,124,5,83,0,41,2,78,114,141,0,0,0, + 41,7,114,133,0,0,0,114,141,0,0,0,114,210,0,0, + 0,114,139,0,0,0,114,205,0,0,0,114,187,0,0,0, + 114,182,0,0,0,41,6,114,202,0,0,0,114,143,0,0, + 0,114,47,1,0,0,114,144,0,0,0,114,145,0,0,0, + 114,191,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,16,95,108,101,103,97,99,121,95,103,101, + 116,95,115,112,101,99,33,5,0,0,115,20,0,0,0,10, + 4,16,1,10,2,4,1,8,1,12,1,12,1,6,1,4, + 1,255,128,122,27,80,97,116,104,70,105,110,100,101,114,46, + 95,108,101,103,97,99,121,95,103,101,116,95,115,112,101,99, + 78,99,4,0,0,0,0,0,0,0,0,0,0,0,9,0, + 0,0,5,0,0,0,67,0,0,0,115,166,0,0,0,103, + 0,125,4,124,2,68,0,93,134,125,5,116,0,124,5,116, + 1,116,2,102,2,131,2,115,28,113,8,124,0,160,3,124, + 5,161,1,125,6,124,6,100,1,117,1,114,142,116,4,124, + 6,100,2,131,2,114,70,124,6,160,5,124,1,124,3,161, + 2,125,7,110,12,124,0,160,6,124,1,124,6,161,2,125, + 7,124,7,100,1,117,0,114,92,113,8,124,7,106,7,100, + 1,117,1,114,110,124,7,2,0,1,0,83,0,124,7,106, + 8,125,8,124,8,100,1,117,0,114,132,116,9,100,3,131, + 1,130,1,124,4,160,10,124,8,161,1,1,0,113,8,116, + 11,160,12,124,1,100,1,161,2,125,7,124,4,124,7,95, + 8,124,7,83,0,41,4,122,63,70,105,110,100,32,116,104, + 101,32,108,111,97,100,101,114,32,111,114,32,110,97,109,101, + 115,112,97,99,101,95,112,97,116,104,32,102,111,114,32,116, + 104,105,115,32,109,111,100,117,108,101,47,112,97,99,107,97, + 103,101,32,110,97,109,101,46,78,114,207,0,0,0,122,19, + 115,112,101,99,32,109,105,115,115,105,110,103,32,108,111,97, + 100,101,114,41,13,114,165,0,0,0,114,90,0,0,0,218, + 5,98,121,116,101,115,114,52,1,0,0,114,133,0,0,0, + 114,207,0,0,0,114,53,1,0,0,114,144,0,0,0,114, + 182,0,0,0,114,122,0,0,0,114,171,0,0,0,114,139, + 0,0,0,114,187,0,0,0,41,9,114,202,0,0,0,114, + 143,0,0,0,114,52,0,0,0,114,206,0,0,0,218,14, + 110,97,109,101,115,112,97,99,101,95,112,97,116,104,90,5, + 101,110,116,114,121,114,47,1,0,0,114,191,0,0,0,114, + 145,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,9,95,103,101,116,95,115,112,101,99,48,5, + 0,0,115,44,0,0,0,4,5,8,1,14,1,2,1,10, + 1,8,1,10,1,14,1,12,2,8,1,2,1,10,1,8, + 1,6,1,8,1,8,1,10,5,2,128,12,2,6,1,4, + 1,255,128,122,20,80,97,116,104,70,105,110,100,101,114,46, + 95,103,101,116,95,115,112,101,99,99,4,0,0,0,0,0, + 0,0,0,0,0,0,6,0,0,0,5,0,0,0,67,0, + 0,0,115,94,0,0,0,124,2,100,1,117,0,114,14,116, + 0,106,1,125,2,124,0,160,2,124,1,124,2,124,3,161, + 3,125,4,124,4,100,1,117,0,114,40,100,1,83,0,124, + 4,106,3,100,1,117,0,114,90,124,4,106,4,125,5,124, + 5,114,86,100,1,124,4,95,5,116,6,124,1,124,5,124, + 0,106,2,131,3,124,4,95,4,124,4,83,0,100,1,83, + 0,124,4,83,0,41,2,122,141,84,114,121,32,116,111,32, + 102,105,110,100,32,97,32,115,112,101,99,32,102,111,114,32, + 39,102,117,108,108,110,97,109,101,39,32,111,110,32,115,121, + 115,46,112,97,116,104,32,111,114,32,39,112,97,116,104,39, + 46,10,10,32,32,32,32,32,32,32,32,84,104,101,32,115, + 101,97,114,99,104,32,105,115,32,98,97,115,101,100,32,111, + 110,32,115,121,115,46,112,97,116,104,95,104,111,111,107,115, + 32,97,110,100,32,115,121,115,46,112,97,116,104,95,105,109, + 112,111,114,116,101,114,95,99,97,99,104,101,46,10,32,32, + 32,32,32,32,32,32,78,41,7,114,15,0,0,0,114,52, + 0,0,0,114,56,1,0,0,114,144,0,0,0,114,182,0, + 0,0,114,185,0,0,0,114,18,1,0,0,41,6,114,202, + 0,0,0,114,143,0,0,0,114,52,0,0,0,114,206,0, + 0,0,114,191,0,0,0,114,55,1,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,207,0,0,0, + 80,5,0,0,115,28,0,0,0,8,6,6,1,14,1,8, + 1,4,1,10,1,6,1,4,1,6,3,16,1,4,1,4, + 2,4,2,255,128,122,20,80,97,116,104,70,105,110,100,101, + 114,46,102,105,110,100,95,115,112,101,99,99,3,0,0,0, + 0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0, + 67,0,0,0,115,30,0,0,0,124,0,160,0,124,1,124, + 2,161,2,125,3,124,3,100,1,117,0,114,24,100,1,83, + 0,124,3,106,1,83,0,41,2,122,170,102,105,110,100,32, + 116,104,101,32,109,111,100,117,108,101,32,111,110,32,115,121, + 115,46,112,97,116,104,32,111,114,32,39,112,97,116,104,39, + 32,98,97,115,101,100,32,111,110,32,115,121,115,46,112,97, + 116,104,95,104,111,111,107,115,32,97,110,100,10,32,32,32, + 32,32,32,32,32,115,121,115,46,112,97,116,104,95,105,109, + 112,111,114,116,101,114,95,99,97,99,104,101,46,10,10,32, + 32,32,32,32,32,32,32,84,104,105,115,32,109,101,116,104, + 111,100,32,105,115,32,100,101,112,114,101,99,97,116,101,100, + 46,32,32,85,115,101,32,102,105,110,100,95,115,112,101,99, + 40,41,32,105,110,115,116,101,97,100,46,10,10,32,32,32, + 32,32,32,32,32,78,114,208,0,0,0,114,209,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 210,0,0,0,104,5,0,0,115,10,0,0,0,12,8,8, + 1,4,1,6,1,255,128,122,22,80,97,116,104,70,105,110, + 100,101,114,46,102,105,110,100,95,109,111,100,117,108,101,99, + 0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, + 4,0,0,0,79,0,0,0,115,28,0,0,0,100,1,100, + 2,108,0,109,1,125,2,1,0,124,2,106,2,124,0,105, + 0,124,1,164,1,142,1,83,0,41,4,97,32,1,0,0, + 10,32,32,32,32,32,32,32,32,70,105,110,100,32,100,105, + 115,116,114,105,98,117,116,105,111,110,115,46,10,10,32,32, + 32,32,32,32,32,32,82,101,116,117,114,110,32,97,110,32, + 105,116,101,114,97,98,108,101,32,111,102,32,97,108,108,32, + 68,105,115,116,114,105,98,117,116,105,111,110,32,105,110,115, + 116,97,110,99,101,115,32,99,97,112,97,98,108,101,32,111, + 102,10,32,32,32,32,32,32,32,32,108,111,97,100,105,110, + 103,32,116,104,101,32,109,101,116,97,100,97,116,97,32,102, + 111,114,32,112,97,99,107,97,103,101,115,32,109,97,116,99, + 104,105,110,103,32,96,96,99,111,110,116,101,120,116,46,110, + 97,109,101,96,96,10,32,32,32,32,32,32,32,32,40,111, + 114,32,97,108,108,32,110,97,109,101,115,32,105,102,32,96, + 96,78,111,110,101,96,96,32,105,110,100,105,99,97,116,101, + 100,41,32,97,108,111,110,103,32,116,104,101,32,112,97,116, + 104,115,32,105,110,32,116,104,101,32,108,105,115,116,10,32, + 32,32,32,32,32,32,32,111,102,32,100,105,114,101,99,116, + 111,114,105,101,115,32,96,96,99,111,110,116,101,120,116,46, + 112,97,116,104,96,96,46,10,32,32,32,32,32,32,32,32, + 114,0,0,0,0,41,1,218,18,77,101,116,97,100,97,116, + 97,80,97,116,104,70,105,110,100,101,114,78,41,3,90,18, + 105,109,112,111,114,116,108,105,98,46,109,101,116,97,100,97, + 116,97,114,57,1,0,0,218,18,102,105,110,100,95,100,105, + 115,116,114,105,98,117,116,105,111,110,115,41,3,114,124,0, + 0,0,114,125,0,0,0,114,57,1,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,58,1,0,0, + 117,5,0,0,115,6,0,0,0,12,10,16,1,255,128,122, + 29,80,97,116,104,70,105,110,100,101,114,46,102,105,110,100, + 95,100,105,115,116,114,105,98,117,116,105,111,110,115,41,1, + 78,41,2,78,78,41,1,78,41,14,114,130,0,0,0,114, + 129,0,0,0,114,131,0,0,0,114,132,0,0,0,114,213, + 0,0,0,114,43,1,0,0,114,49,1,0,0,114,214,0, + 0,0,114,52,1,0,0,114,53,1,0,0,114,56,1,0, + 0,114,207,0,0,0,114,210,0,0,0,114,58,1,0,0, + 114,7,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,114,42,1,0,0,240,4,0,0,115,38,0, + 0,0,8,0,4,2,2,2,10,1,2,9,10,1,2,12, + 10,1,2,21,10,1,2,14,12,1,2,31,12,1,2,23, + 12,1,2,12,14,1,255,128,114,42,1,0,0,99,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,64,0,0,0,115,90,0,0,0,101,0,90,1,100, + 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, + 4,100,5,132,0,90,5,101,6,90,7,100,6,100,7,132, + 0,90,8,100,8,100,9,132,0,90,9,100,19,100,11,100, + 12,132,1,90,10,100,13,100,14,132,0,90,11,101,12,100, + 15,100,16,132,0,131,1,90,13,100,17,100,18,132,0,90, + 14,100,10,83,0,41,20,218,10,70,105,108,101,70,105,110, + 100,101,114,122,172,70,105,108,101,45,98,97,115,101,100,32, + 102,105,110,100,101,114,46,10,10,32,32,32,32,73,110,116, + 101,114,97,99,116,105,111,110,115,32,119,105,116,104,32,116, + 104,101,32,102,105,108,101,32,115,121,115,116,101,109,32,97, + 114,101,32,99,97,99,104,101,100,32,102,111,114,32,112,101, + 114,102,111,114,109,97,110,99,101,44,32,98,101,105,110,103, + 10,32,32,32,32,114,101,102,114,101,115,104,101,100,32,119, + 104,101,110,32,116,104,101,32,100,105,114,101,99,116,111,114, + 121,32,116,104,101,32,102,105,110,100,101,114,32,105,115,32, + 104,97,110,100,108,105,110,103,32,104,97,115,32,98,101,101, + 110,32,109,111,100,105,102,105,101,100,46,10,10,32,32,32, + 32,99,2,0,0,0,0,0,0,0,0,0,0,0,5,0, + 0,0,6,0,0,0,7,0,0,0,115,84,0,0,0,103, + 0,125,3,124,2,68,0,93,32,92,2,137,0,125,4,124, + 3,160,0,135,0,102,1,100,1,100,2,132,8,124,4,68, + 0,131,1,161,1,1,0,113,8,124,3,124,0,95,1,124, + 1,112,54,100,3,124,0,95,2,100,4,124,0,95,3,116, + 4,131,0,124,0,95,5,116,4,131,0,124,0,95,6,100, + 5,83,0,41,6,122,154,73,110,105,116,105,97,108,105,122, + 101,32,119,105,116,104,32,116,104,101,32,112,97,116,104,32, + 116,111,32,115,101,97,114,99,104,32,111,110,32,97,110,100, + 32,97,32,118,97,114,105,97,98,108,101,32,110,117,109,98, + 101,114,32,111,102,10,32,32,32,32,32,32,32,32,50,45, + 116,117,112,108,101,115,32,99,111,110,116,97,105,110,105,110, + 103,32,116,104,101,32,108,111,97,100,101,114,32,97,110,100, + 32,116,104,101,32,102,105,108,101,32,115,117,102,102,105,120, + 101,115,32,116,104,101,32,108,111,97,100,101,114,10,32,32, + 32,32,32,32,32,32,114,101,99,111,103,110,105,122,101,115, + 46,99,1,0,0,0,0,0,0,0,0,0,0,0,2,0, + 0,0,3,0,0,0,51,0,0,0,115,22,0,0,0,124, + 0,93,14,125,1,124,1,136,0,102,2,86,0,1,0,113, + 2,100,0,83,0,114,114,0,0,0,114,7,0,0,0,114, + 14,1,0,0,169,1,114,144,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,9,0,0,0,146,5,0,0,115,4, + 0,0,0,22,0,255,128,122,38,70,105,108,101,70,105,110, + 100,101,114,46,95,95,105,110,105,116,95,95,46,60,108,111, + 99,97,108,115,62,46,60,103,101,110,101,120,112,114,62,114, + 79,0,0,0,114,109,0,0,0,78,41,7,114,171,0,0, + 0,218,8,95,108,111,97,100,101,114,115,114,52,0,0,0, + 218,11,95,112,97,116,104,95,109,116,105,109,101,218,3,115, + 101,116,218,11,95,112,97,116,104,95,99,97,99,104,101,218, + 19,95,114,101,108,97,120,101,100,95,112,97,116,104,95,99, + 97,99,104,101,41,5,114,123,0,0,0,114,52,0,0,0, + 218,14,108,111,97,100,101,114,95,100,101,116,97,105,108,115, + 90,7,108,111,97,100,101,114,115,114,193,0,0,0,114,7, + 0,0,0,114,60,1,0,0,114,8,0,0,0,114,216,0, + 0,0,140,5,0,0,115,18,0,0,0,4,4,12,1,26, + 1,6,1,10,2,6,1,8,1,12,1,255,128,122,19,70, + 105,108,101,70,105,110,100,101,114,46,95,95,105,110,105,116, 95,95,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,3,0,0,0,67,0,0,0,115,12,0,0,0, - 100,1,160,0,124,0,106,1,161,1,83,0,41,3,122,115, - 82,101,116,117,114,110,32,114,101,112,114,32,102,111,114,32, - 116,104,101,32,109,111,100,117,108,101,46,10,10,32,32,32, - 32,32,32,32,32,84,104,101,32,109,101,116,104,111,100,32, - 105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,32, - 84,104,101,32,105,109,112,111,114,116,32,109,97,99,104,105, - 110,101,114,121,32,100,111,101,115,32,116,104,101,32,106,111, - 98,32,105,116,115,101,108,102,46,10,10,32,32,32,32,32, - 32,32,32,122,25,60,109,111,100,117,108,101,32,123,33,114, - 125,32,40,110,97,109,101,115,112,97,99,101,41,62,78,41, - 2,114,70,0,0,0,114,130,0,0,0,41,1,114,223,0, - 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,218,11,109,111,100,117,108,101,95,114,101,112,114,201,4, - 0,0,115,4,0,0,0,12,7,255,128,122,28,95,78,97, - 109,101,115,112,97,99,101,76,111,97,100,101,114,46,109,111, - 100,117,108,101,95,114,101,112,114,99,2,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,1,0,0,0,67,0, - 0,0,115,4,0,0,0,100,1,83,0,41,2,78,84,114, - 7,0,0,0,114,226,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,186,0,0,0,210,4,0, - 0,115,4,0,0,0,4,1,255,128,122,27,95,78,97,109, - 101,115,112,97,99,101,76,111,97,100,101,114,46,105,115,95, - 112,97,99,107,97,103,101,99,2,0,0,0,0,0,0,0, - 0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0, - 115,4,0,0,0,100,1,83,0,41,2,78,114,10,0,0, - 0,114,7,0,0,0,114,226,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,236,0,0,0,213, - 4,0,0,115,4,0,0,0,4,1,255,128,122,27,95,78, - 97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,103, - 101,116,95,115,111,117,114,99,101,99,2,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,6,0,0,0,67,0, - 0,0,115,16,0,0,0,116,0,100,1,100,2,100,3,100, - 4,100,5,141,4,83,0,41,6,78,114,10,0,0,0,122, - 8,60,115,116,114,105,110,103,62,114,222,0,0,0,84,41, - 1,114,238,0,0,0,41,1,114,239,0,0,0,114,226,0, - 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,114,220,0,0,0,216,4,0,0,115,4,0,0,0,16, - 1,255,128,122,25,95,78,97,109,101,115,112,97,99,101,76, - 111,97,100,101,114,46,103,101,116,95,99,111,100,101,99,2, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1, - 0,0,0,67,0,0,0,115,4,0,0,0,100,1,83,0, - 114,217,0,0,0,114,7,0,0,0,114,218,0,0,0,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,219, - 0,0,0,219,4,0,0,115,4,0,0,0,4,0,255,128, - 122,30,95,78,97,109,101,115,112,97,99,101,76,111,97,100, - 101,114,46,99,114,101,97,116,101,95,109,111,100,117,108,101, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,0, - 83,0,114,114,0,0,0,114,7,0,0,0,114,13,1,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,224,0,0,0,222,4,0,0,115,4,0,0,0,4,1, - 255,128,122,28,95,78,97,109,101,115,112,97,99,101,76,111, - 97,100,101,114,46,101,120,101,99,95,109,111,100,117,108,101, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,4,0,0,0,67,0,0,0,115,26,0,0,0,116,0, - 160,1,100,1,124,0,106,2,161,2,1,0,116,0,160,3, - 124,0,124,1,161,2,83,0,41,3,122,98,76,111,97,100, - 32,97,32,110,97,109,101,115,112,97,99,101,32,109,111,100, - 117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104, - 105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,112, - 114,101,99,97,116,101,100,46,32,32,85,115,101,32,101,120, - 101,99,95,109,111,100,117,108,101,40,41,32,105,110,115,116, - 101,97,100,46,10,10,32,32,32,32,32,32,32,32,122,38, - 110,97,109,101,115,112,97,99,101,32,109,111,100,117,108,101, - 32,108,111,97,100,101,100,32,119,105,116,104,32,112,97,116, - 104,32,123,33,114,125,78,41,4,114,139,0,0,0,114,153, - 0,0,0,114,20,1,0,0,114,225,0,0,0,114,226,0, + 0,0,0,2,0,0,0,67,0,0,0,115,10,0,0,0, + 100,1,124,0,95,0,100,2,83,0,41,3,122,31,73,110, + 118,97,108,105,100,97,116,101,32,116,104,101,32,100,105,114, + 101,99,116,111,114,121,32,109,116,105,109,101,46,114,109,0, + 0,0,78,41,1,114,62,1,0,0,114,253,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,43, + 1,0,0,154,5,0,0,115,4,0,0,0,10,2,255,128, + 122,28,70,105,108,101,70,105,110,100,101,114,46,105,110,118, + 97,108,105,100,97,116,101,95,99,97,99,104,101,115,99,2, + 0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,3, + 0,0,0,67,0,0,0,115,42,0,0,0,124,0,160,0, + 124,1,161,1,125,2,124,2,100,1,117,0,114,26,100,1, + 103,0,102,2,83,0,124,2,106,1,124,2,106,2,112,38, + 103,0,102,2,83,0,41,2,122,197,84,114,121,32,116,111, + 32,102,105,110,100,32,97,32,108,111,97,100,101,114,32,102, + 111,114,32,116,104,101,32,115,112,101,99,105,102,105,101,100, + 32,109,111,100,117,108,101,44,32,111,114,32,116,104,101,32, + 110,97,109,101,115,112,97,99,101,10,32,32,32,32,32,32, + 32,32,112,97,99,107,97,103,101,32,112,111,114,116,105,111, + 110,115,46,32,82,101,116,117,114,110,115,32,40,108,111,97, + 100,101,114,44,32,108,105,115,116,45,111,102,45,112,111,114, + 116,105,111,110,115,41,46,10,10,32,32,32,32,32,32,32, + 32,84,104,105,115,32,109,101,116,104,111,100,32,105,115,32, + 100,101,112,114,101,99,97,116,101,100,46,32,32,85,115,101, + 32,102,105,110,100,95,115,112,101,99,40,41,32,105,110,115, + 116,101,97,100,46,10,10,32,32,32,32,32,32,32,32,78, + 41,3,114,207,0,0,0,114,144,0,0,0,114,182,0,0, + 0,41,3,114,123,0,0,0,114,143,0,0,0,114,191,0, 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,114,227,0,0,0,225,4,0,0,115,10,0,0,0,6, - 7,4,1,4,255,12,3,255,128,122,28,95,78,97,109,101, - 115,112,97,99,101,76,111,97,100,101,114,46,108,111,97,100, - 95,109,111,100,117,108,101,78,41,12,114,130,0,0,0,114, - 129,0,0,0,114,131,0,0,0,114,216,0,0,0,114,213, - 0,0,0,114,41,1,0,0,114,186,0,0,0,114,236,0, - 0,0,114,220,0,0,0,114,219,0,0,0,114,224,0,0, - 0,114,227,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,40,1,0,0,197, - 4,0,0,115,22,0,0,0,8,0,8,1,2,3,10,1, - 8,8,8,3,8,3,8,3,8,3,12,3,255,128,114,40, - 1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,4,0,0,0,64,0,0,0,115,118,0,0, - 0,101,0,90,1,100,0,90,2,100,1,90,3,101,4,100, - 2,100,3,132,0,131,1,90,5,101,4,100,4,100,5,132, - 0,131,1,90,6,101,7,100,6,100,7,132,0,131,1,90, - 8,101,7,100,8,100,9,132,0,131,1,90,9,101,7,100, - 19,100,11,100,12,132,1,131,1,90,10,101,7,100,20,100, - 13,100,14,132,1,131,1,90,11,101,7,100,21,100,15,100, - 16,132,1,131,1,90,12,101,4,100,17,100,18,132,0,131, - 1,90,13,100,10,83,0,41,22,218,10,80,97,116,104,70, - 105,110,100,101,114,122,62,77,101,116,97,32,112,97,116,104, - 32,102,105,110,100,101,114,32,102,111,114,32,115,121,115,46, - 112,97,116,104,32,97,110,100,32,112,97,99,107,97,103,101, - 32,95,95,112,97,116,104,95,95,32,97,116,116,114,105,98, - 117,116,101,115,46,99,0,0,0,0,0,0,0,0,0,0, - 0,0,2,0,0,0,4,0,0,0,67,0,0,0,115,64, - 0,0,0,116,0,116,1,106,2,160,3,161,0,131,1,68, - 0,93,44,92,2,125,0,125,1,124,1,100,1,117,0,114, - 40,116,1,106,2,124,0,61,0,113,14,116,4,124,1,100, - 2,131,2,114,58,124,1,160,5,161,0,1,0,113,14,100, - 1,83,0,41,3,122,125,67,97,108,108,32,116,104,101,32, - 105,110,118,97,108,105,100,97,116,101,95,99,97,99,104,101, - 115,40,41,32,109,101,116,104,111,100,32,111,110,32,97,108, - 108,32,112,97,116,104,32,101,110,116,114,121,32,102,105,110, - 100,101,114,115,10,32,32,32,32,32,32,32,32,115,116,111, - 114,101,100,32,105,110,32,115,121,115,46,112,97,116,104,95, - 105,109,112,111,114,116,101,114,95,99,97,99,104,101,115,32, - 40,119,104,101,114,101,32,105,109,112,108,101,109,101,110,116, - 101,100,41,46,78,218,17,105,110,118,97,108,105,100,97,116, - 101,95,99,97,99,104,101,115,41,6,218,4,108,105,115,116, - 114,15,0,0,0,218,19,112,97,116,104,95,105,109,112,111, - 114,116,101,114,95,99,97,99,104,101,218,5,105,116,101,109, - 115,114,133,0,0,0,114,43,1,0,0,41,2,114,121,0, - 0,0,218,6,102,105,110,100,101,114,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,43,1,0,0,244,4, - 0,0,115,16,0,0,0,22,4,8,1,10,1,10,1,8, - 1,2,128,4,252,255,128,122,28,80,97,116,104,70,105,110, - 100,101,114,46,105,110,118,97,108,105,100,97,116,101,95,99, - 97,99,104,101,115,99,1,0,0,0,0,0,0,0,0,0, - 0,0,2,0,0,0,9,0,0,0,67,0,0,0,115,76, - 0,0,0,116,0,106,1,100,1,117,1,114,28,116,0,106, - 1,115,28,116,2,160,3,100,2,116,4,161,2,1,0,116, - 0,106,1,68,0,93,34,125,1,122,14,124,1,124,0,131, - 1,87,0,2,0,1,0,83,0,4,0,116,5,121,74,1, - 0,1,0,1,0,89,0,113,34,100,1,83,0,119,0,41, - 3,122,46,83,101,97,114,99,104,32,115,121,115,46,112,97, - 116,104,95,104,111,111,107,115,32,102,111,114,32,97,32,102, - 105,110,100,101,114,32,102,111,114,32,39,112,97,116,104,39, - 46,78,122,23,115,121,115,46,112,97,116,104,95,104,111,111, - 107,115,32,105,115,32,101,109,112,116,121,41,6,114,15,0, - 0,0,218,10,112,97,116,104,95,104,111,111,107,115,114,81, - 0,0,0,114,82,0,0,0,114,142,0,0,0,114,122,0, - 0,0,41,2,114,52,0,0,0,90,4,104,111,111,107,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,11, - 95,112,97,116,104,95,104,111,111,107,115,254,4,0,0,115, - 20,0,0,0,16,3,12,1,10,1,2,1,14,1,12,1, - 4,1,4,2,2,253,255,128,122,22,80,97,116,104,70,105, - 110,100,101,114,46,95,112,97,116,104,95,104,111,111,107,115, - 99,2,0,0,0,0,0,0,0,0,0,0,0,3,0,0, - 0,8,0,0,0,67,0,0,0,115,100,0,0,0,124,1, - 100,1,107,2,114,40,122,12,116,0,160,1,161,0,125,1, - 87,0,110,18,4,0,116,2,121,98,1,0,1,0,1,0, - 89,0,100,2,83,0,122,16,116,3,106,4,124,1,25,0, - 125,2,87,0,124,2,83,0,4,0,116,5,121,96,1,0, - 1,0,1,0,124,0,160,6,124,1,161,1,125,2,124,2, - 116,3,106,4,124,1,60,0,89,0,124,2,83,0,119,0, - 119,0,41,3,122,210,71,101,116,32,116,104,101,32,102,105, - 110,100,101,114,32,102,111,114,32,116,104,101,32,112,97,116, - 104,32,101,110,116,114,121,32,102,114,111,109,32,115,121,115, - 46,112,97,116,104,95,105,109,112,111,114,116,101,114,95,99, - 97,99,104,101,46,10,10,32,32,32,32,32,32,32,32,73, - 102,32,116,104,101,32,112,97,116,104,32,101,110,116,114,121, - 32,105,115,32,110,111,116,32,105,110,32,116,104,101,32,99, - 97,99,104,101,44,32,102,105,110,100,32,116,104,101,32,97, - 112,112,114,111,112,114,105,97,116,101,32,102,105,110,100,101, - 114,10,32,32,32,32,32,32,32,32,97,110,100,32,99,97, - 99,104,101,32,105,116,46,32,73,102,32,110,111,32,102,105, - 110,100,101,114,32,105,115,32,97,118,97,105,108,97,98,108, - 101,44,32,115,116,111,114,101,32,78,111,110,101,46,10,10, - 32,32,32,32,32,32,32,32,114,10,0,0,0,78,41,7, - 114,18,0,0,0,114,63,0,0,0,218,17,70,105,108,101, - 78,111,116,70,111,117,110,100,69,114,114,111,114,114,15,0, - 0,0,114,45,1,0,0,218,8,75,101,121,69,114,114,111, - 114,114,49,1,0,0,41,3,114,202,0,0,0,114,52,0, - 0,0,114,47,1,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,20,95,112,97,116,104,95,105,109, - 112,111,114,116,101,114,95,99,97,99,104,101,11,5,0,0, - 115,30,0,0,0,8,8,2,1,12,1,12,1,6,3,2, - 1,12,1,4,4,12,253,10,1,12,1,4,1,2,253,2, - 250,255,128,122,31,80,97,116,104,70,105,110,100,101,114,46, - 95,112,97,116,104,95,105,109,112,111,114,116,101,114,95,99, - 97,99,104,101,99,3,0,0,0,0,0,0,0,0,0,0, - 0,6,0,0,0,4,0,0,0,67,0,0,0,115,82,0, - 0,0,116,0,124,2,100,1,131,2,114,26,124,2,160,1, - 124,1,161,1,92,2,125,3,125,4,110,14,124,2,160,2, - 124,1,161,1,125,3,103,0,125,4,124,3,100,0,117,1, - 114,60,116,3,160,4,124,1,124,3,161,2,83,0,116,3, - 160,5,124,1,100,0,161,2,125,5,124,4,124,5,95,6, - 124,5,83,0,41,2,78,114,141,0,0,0,41,7,114,133, - 0,0,0,114,141,0,0,0,114,210,0,0,0,114,139,0, - 0,0,114,205,0,0,0,114,187,0,0,0,114,182,0,0, - 0,41,6,114,202,0,0,0,114,143,0,0,0,114,47,1, - 0,0,114,144,0,0,0,114,145,0,0,0,114,191,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,16,95,108,101,103,97,99,121,95,103,101,116,95,115,112, - 101,99,33,5,0,0,115,20,0,0,0,10,4,16,1,10, - 2,4,1,8,1,12,1,12,1,6,1,4,1,255,128,122, - 27,80,97,116,104,70,105,110,100,101,114,46,95,108,101,103, - 97,99,121,95,103,101,116,95,115,112,101,99,78,99,4,0, - 0,0,0,0,0,0,0,0,0,0,9,0,0,0,5,0, - 0,0,67,0,0,0,115,166,0,0,0,103,0,125,4,124, - 2,68,0,93,134,125,5,116,0,124,5,116,1,116,2,102, - 2,131,2,115,28,113,8,124,0,160,3,124,5,161,1,125, - 6,124,6,100,1,117,1,114,142,116,4,124,6,100,2,131, - 2,114,70,124,6,160,5,124,1,124,3,161,2,125,7,110, - 12,124,0,160,6,124,1,124,6,161,2,125,7,124,7,100, - 1,117,0,114,92,113,8,124,7,106,7,100,1,117,1,114, - 110,124,7,2,0,1,0,83,0,124,7,106,8,125,8,124, - 8,100,1,117,0,114,132,116,9,100,3,131,1,130,1,124, - 4,160,10,124,8,161,1,1,0,113,8,116,11,160,12,124, - 1,100,1,161,2,125,7,124,4,124,7,95,8,124,7,83, - 0,41,4,122,63,70,105,110,100,32,116,104,101,32,108,111, - 97,100,101,114,32,111,114,32,110,97,109,101,115,112,97,99, - 101,95,112,97,116,104,32,102,111,114,32,116,104,105,115,32, - 109,111,100,117,108,101,47,112,97,99,107,97,103,101,32,110, - 97,109,101,46,78,114,207,0,0,0,122,19,115,112,101,99, - 32,109,105,115,115,105,110,103,32,108,111,97,100,101,114,41, - 13,114,165,0,0,0,114,90,0,0,0,218,5,98,121,116, - 101,115,114,52,1,0,0,114,133,0,0,0,114,207,0,0, - 0,114,53,1,0,0,114,144,0,0,0,114,182,0,0,0, - 114,122,0,0,0,114,171,0,0,0,114,139,0,0,0,114, - 187,0,0,0,41,9,114,202,0,0,0,114,143,0,0,0, - 114,52,0,0,0,114,206,0,0,0,218,14,110,97,109,101, - 115,112,97,99,101,95,112,97,116,104,90,5,101,110,116,114, - 121,114,47,1,0,0,114,191,0,0,0,114,145,0,0,0, + 0,114,141,0,0,0,160,5,0,0,115,10,0,0,0,10, + 7,8,1,8,1,16,1,255,128,122,22,70,105,108,101,70, + 105,110,100,101,114,46,102,105,110,100,95,108,111,97,100,101, + 114,99,6,0,0,0,0,0,0,0,0,0,0,0,7,0, + 0,0,6,0,0,0,67,0,0,0,115,26,0,0,0,124, + 1,124,2,124,3,131,2,125,6,116,0,124,2,124,3,124, + 6,124,4,100,1,141,4,83,0,41,2,78,114,181,0,0, + 0,41,1,114,194,0,0,0,41,7,114,123,0,0,0,114, + 192,0,0,0,114,143,0,0,0,114,52,0,0,0,90,4, + 115,109,115,108,114,206,0,0,0,114,144,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,56,1, + 0,0,172,5,0,0,115,10,0,0,0,10,1,8,1,2, + 1,6,255,255,128,122,20,70,105,108,101,70,105,110,100,101, + 114,46,95,103,101,116,95,115,112,101,99,78,99,3,0,0, + 0,0,0,0,0,0,0,0,0,14,0,0,0,8,0,0, + 0,67,0,0,0,115,100,1,0,0,100,1,125,3,124,1, + 160,0,100,2,161,1,100,3,25,0,125,4,122,24,116,1, + 124,0,106,2,112,34,116,3,160,4,161,0,131,1,106,5, + 125,5,87,0,110,20,4,0,116,6,144,1,121,98,1,0, + 1,0,1,0,100,4,125,5,89,0,124,5,124,0,106,7, + 107,3,114,88,124,0,160,8,161,0,1,0,124,5,124,0, + 95,7,116,9,131,0,114,110,124,0,106,10,125,6,124,4, + 160,11,161,0,125,7,110,10,124,0,106,12,125,6,124,4, + 125,7,124,7,124,6,118,0,114,214,116,13,124,0,106,2, + 124,4,131,2,125,8,124,0,106,14,68,0,93,58,92,2, + 125,9,125,10,100,5,124,9,23,0,125,11,116,13,124,8, + 124,11,131,2,125,12,116,15,124,12,131,1,114,204,124,0, + 160,16,124,10,124,1,124,12,124,8,103,1,124,2,161,5, + 2,0,1,0,83,0,113,146,116,17,124,8,131,1,125,3, + 124,0,106,14,68,0,93,86,92,2,125,9,125,10,116,13, + 124,0,106,2,124,4,124,9,23,0,131,2,125,12,116,18, + 106,19,100,6,124,12,100,3,100,7,141,3,1,0,124,7, + 124,9,23,0,124,6,118,0,144,1,114,50,116,15,124,12, + 131,1,144,1,114,50,124,0,160,16,124,10,124,1,124,12, + 100,8,124,2,161,5,2,0,1,0,83,0,113,220,124,3, + 144,1,114,94,116,18,160,19,100,9,124,8,161,2,1,0, + 116,18,160,20,124,1,100,8,161,2,125,13,124,8,103,1, + 124,13,95,21,124,13,83,0,100,8,83,0,119,0,41,10, + 122,111,84,114,121,32,116,111,32,102,105,110,100,32,97,32, + 115,112,101,99,32,102,111,114,32,116,104,101,32,115,112,101, + 99,105,102,105,101,100,32,109,111,100,117,108,101,46,10,10, + 32,32,32,32,32,32,32,32,82,101,116,117,114,110,115,32, + 116,104,101,32,109,97,116,99,104,105,110,103,32,115,112,101, + 99,44,32,111,114,32,78,111,110,101,32,105,102,32,110,111, + 116,32,102,111,117,110,100,46,10,32,32,32,32,32,32,32, + 32,70,114,79,0,0,0,114,39,0,0,0,114,109,0,0, + 0,114,216,0,0,0,122,9,116,114,121,105,110,103,32,123, + 125,41,1,90,9,118,101,114,98,111,115,105,116,121,78,122, + 25,112,111,115,115,105,98,108,101,32,110,97,109,101,115,112, + 97,99,101,32,102,111,114,32,123,125,41,22,114,49,0,0, + 0,114,57,0,0,0,114,52,0,0,0,114,18,0,0,0, + 114,63,0,0,0,114,7,1,0,0,114,58,0,0,0,114, + 62,1,0,0,218,11,95,102,105,108,108,95,99,97,99,104, + 101,114,21,0,0,0,114,65,1,0,0,114,110,0,0,0, + 114,64,1,0,0,114,48,0,0,0,114,61,1,0,0,114, + 62,0,0,0,114,56,1,0,0,114,64,0,0,0,114,139, + 0,0,0,114,153,0,0,0,114,187,0,0,0,114,182,0, + 0,0,41,14,114,123,0,0,0,114,143,0,0,0,114,206, + 0,0,0,90,12,105,115,95,110,97,109,101,115,112,97,99, + 101,90,11,116,97,105,108,95,109,111,100,117,108,101,114,173, + 0,0,0,90,5,99,97,99,104,101,90,12,99,97,99,104, + 101,95,109,111,100,117,108,101,90,9,98,97,115,101,95,112, + 97,116,104,114,15,1,0,0,114,192,0,0,0,90,13,105, + 110,105,116,95,102,105,108,101,110,97,109,101,90,9,102,117, + 108,108,95,112,97,116,104,114,191,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,207,0,0,0, + 177,5,0,0,115,80,0,0,0,4,5,14,1,2,1,24, + 1,14,1,6,1,10,1,8,1,6,1,6,2,6,1,10, + 1,6,2,4,1,8,2,12,1,14,1,8,1,10,1,8, + 1,24,1,2,128,8,4,14,2,16,1,16,1,14,1,10, + 1,10,1,4,1,8,255,2,128,6,2,12,1,12,1,8, + 1,4,1,4,1,2,219,255,128,122,20,70,105,108,101,70, + 105,110,100,101,114,46,102,105,110,100,95,115,112,101,99,99, + 1,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0, + 10,0,0,0,67,0,0,0,115,190,0,0,0,124,0,106, + 0,125,1,122,22,116,1,160,2,124,1,112,22,116,1,160, + 3,161,0,161,1,125,2,87,0,110,24,4,0,116,4,116, + 5,116,6,102,3,121,188,1,0,1,0,1,0,103,0,125, + 2,89,0,116,7,106,8,160,9,100,1,161,1,115,78,116, + 10,124,2,131,1,124,0,95,11,110,74,116,10,131,0,125, + 3,124,2,68,0,93,56,125,4,124,4,160,12,100,2,161, + 1,92,3,125,5,125,6,125,7,124,6,114,130,100,3,160, + 13,124,5,124,7,160,14,161,0,161,2,125,8,110,4,124, + 5,125,8,124,3,160,15,124,8,161,1,1,0,113,88,124, + 3,124,0,95,11,116,7,106,8,160,9,116,16,161,1,114, + 184,100,4,100,5,132,0,124,2,68,0,131,1,124,0,95, + 17,100,6,83,0,100,6,83,0,119,0,41,7,122,68,70, + 105,108,108,32,116,104,101,32,99,97,99,104,101,32,111,102, + 32,112,111,116,101,110,116,105,97,108,32,109,111,100,117,108, + 101,115,32,97,110,100,32,112,97,99,107,97,103,101,115,32, + 102,111,114,32,116,104,105,115,32,100,105,114,101,99,116,111, + 114,121,46,114,14,0,0,0,114,79,0,0,0,114,69,0, + 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,4,0,0,0,83,0,0,0,115,20,0,0,0, + 104,0,124,0,93,12,125,1,124,1,160,0,161,0,146,2, + 113,4,83,0,114,7,0,0,0,41,1,114,110,0,0,0, + 41,2,114,5,0,0,0,90,2,102,110,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,13,0,0,0,254, + 5,0,0,115,4,0,0,0,20,0,255,128,122,41,70,105, + 108,101,70,105,110,100,101,114,46,95,102,105,108,108,95,99, + 97,99,104,101,46,60,108,111,99,97,108,115,62,46,60,115, + 101,116,99,111,109,112,62,78,41,18,114,52,0,0,0,114, + 18,0,0,0,90,7,108,105,115,116,100,105,114,114,63,0, + 0,0,114,50,1,0,0,218,15,80,101,114,109,105,115,115, + 105,111,110,69,114,114,111,114,218,18,78,111,116,65,68,105, + 114,101,99,116,111,114,121,69,114,114,111,114,114,15,0,0, + 0,114,22,0,0,0,114,23,0,0,0,114,63,1,0,0, + 114,64,1,0,0,114,105,0,0,0,114,70,0,0,0,114, + 110,0,0,0,218,3,97,100,100,114,24,0,0,0,114,65, + 1,0,0,41,9,114,123,0,0,0,114,52,0,0,0,90, + 8,99,111,110,116,101,110,116,115,90,21,108,111,119,101,114, + 95,115,117,102,102,105,120,95,99,111,110,116,101,110,116,115, + 114,38,1,0,0,114,121,0,0,0,114,25,1,0,0,114, + 15,1,0,0,90,8,110,101,119,95,110,97,109,101,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,67,1, + 0,0,225,5,0,0,115,40,0,0,0,6,2,2,1,22, + 1,18,1,6,3,12,3,12,1,6,7,8,1,16,1,4, + 1,18,1,4,2,12,1,6,1,12,1,20,1,4,255,2, + 233,255,128,122,22,70,105,108,101,70,105,110,100,101,114,46, + 95,102,105,108,108,95,99,97,99,104,101,99,1,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,0, + 7,0,0,0,115,18,0,0,0,135,0,135,1,102,2,100, + 1,100,2,132,8,125,2,124,2,83,0,41,4,97,20,1, + 0,0,65,32,99,108,97,115,115,32,109,101,116,104,111,100, + 32,119,104,105,99,104,32,114,101,116,117,114,110,115,32,97, + 32,99,108,111,115,117,114,101,32,116,111,32,117,115,101,32, + 111,110,32,115,121,115,46,112,97,116,104,95,104,111,111,107, + 10,32,32,32,32,32,32,32,32,119,104,105,99,104,32,119, + 105,108,108,32,114,101,116,117,114,110,32,97,110,32,105,110, + 115,116,97,110,99,101,32,117,115,105,110,103,32,116,104,101, + 32,115,112,101,99,105,102,105,101,100,32,108,111,97,100,101, + 114,115,32,97,110,100,32,116,104,101,32,112,97,116,104,10, + 32,32,32,32,32,32,32,32,99,97,108,108,101,100,32,111, + 110,32,116,104,101,32,99,108,111,115,117,114,101,46,10,10, + 32,32,32,32,32,32,32,32,73,102,32,116,104,101,32,112, + 97,116,104,32,99,97,108,108,101,100,32,111,110,32,116,104, + 101,32,99,108,111,115,117,114,101,32,105,115,32,110,111,116, + 32,97,32,100,105,114,101,99,116,111,114,121,44,32,73,109, + 112,111,114,116,69,114,114,111,114,32,105,115,10,32,32,32, + 32,32,32,32,32,114,97,105,115,101,100,46,10,10,32,32, + 32,32,32,32,32,32,99,1,0,0,0,0,0,0,0,0, + 0,0,0,1,0,0,0,4,0,0,0,19,0,0,0,115, + 36,0,0,0,116,0,124,0,131,1,115,20,116,1,100,1, + 124,0,100,2,141,2,130,1,136,0,124,0,103,1,136,1, + 162,1,82,0,142,0,83,0,41,4,122,45,80,97,116,104, + 32,104,111,111,107,32,102,111,114,32,105,109,112,111,114,116, + 108,105,98,46,109,97,99,104,105,110,101,114,121,46,70,105, + 108,101,70,105,110,100,101,114,46,122,30,111,110,108,121,32, + 100,105,114,101,99,116,111,114,105,101,115,32,97,114,101,32, + 115,117,112,112,111,114,116,101,100,114,56,0,0,0,78,41, + 2,114,64,0,0,0,114,122,0,0,0,114,56,0,0,0, + 169,2,114,202,0,0,0,114,66,1,0,0,114,7,0,0, + 0,114,8,0,0,0,218,24,112,97,116,104,95,104,111,111, + 107,95,102,111,114,95,70,105,108,101,70,105,110,100,101,114, + 10,6,0,0,115,8,0,0,0,8,2,12,1,16,1,255, + 128,122,54,70,105,108,101,70,105,110,100,101,114,46,112,97, + 116,104,95,104,111,111,107,46,60,108,111,99,97,108,115,62, + 46,112,97,116,104,95,104,111,111,107,95,102,111,114,95,70, + 105,108,101,70,105,110,100,101,114,78,114,7,0,0,0,41, + 3,114,202,0,0,0,114,66,1,0,0,114,72,1,0,0, + 114,7,0,0,0,114,71,1,0,0,114,8,0,0,0,218, + 9,112,97,116,104,95,104,111,111,107,0,6,0,0,115,6, + 0,0,0,14,10,4,6,255,128,122,20,70,105,108,101,70, + 105,110,100,101,114,46,112,97,116,104,95,104,111,111,107,99, + 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, + 3,0,0,0,67,0,0,0,115,12,0,0,0,100,1,160, + 0,124,0,106,1,161,1,83,0,41,2,78,122,16,70,105, + 108,101,70,105,110,100,101,114,40,123,33,114,125,41,41,2, + 114,70,0,0,0,114,52,0,0,0,114,253,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,36, + 1,0,0,18,6,0,0,115,4,0,0,0,12,1,255,128, + 122,19,70,105,108,101,70,105,110,100,101,114,46,95,95,114, + 101,112,114,95,95,41,1,78,41,15,114,130,0,0,0,114, + 129,0,0,0,114,131,0,0,0,114,132,0,0,0,114,216, + 0,0,0,114,43,1,0,0,114,147,0,0,0,114,210,0, + 0,0,114,141,0,0,0,114,56,1,0,0,114,207,0,0, + 0,114,67,1,0,0,114,214,0,0,0,114,73,1,0,0, + 114,36,1,0,0,114,7,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,59,1,0,0,131,5, + 0,0,115,26,0,0,0,8,0,4,2,8,7,8,14,4, + 4,8,2,8,12,10,5,8,48,2,31,10,1,12,17,255, + 128,114,59,1,0,0,99,4,0,0,0,0,0,0,0,0, + 0,0,0,6,0,0,0,8,0,0,0,67,0,0,0,115, + 148,0,0,0,124,0,160,0,100,1,161,1,125,4,124,0, + 160,0,100,2,161,1,125,5,124,4,115,66,124,5,114,36, + 124,5,106,1,125,4,110,30,124,2,124,3,107,2,114,56, + 116,2,124,1,124,2,131,2,125,4,110,10,116,3,124,1, + 124,2,131,2,125,4,124,5,115,84,116,4,124,1,124,2, + 124,4,100,3,141,3,125,5,122,38,124,5,124,0,100,2, + 60,0,124,4,124,0,100,1,60,0,124,2,124,0,100,4, + 60,0,124,3,124,0,100,5,60,0,87,0,100,0,83,0, + 4,0,116,5,121,142,1,0,1,0,1,0,89,0,100,0, + 83,0,119,0,100,0,83,0,41,6,78,218,10,95,95,108, + 111,97,100,101,114,95,95,218,8,95,95,115,112,101,99,95, + 95,114,60,1,0,0,90,8,95,95,102,105,108,101,95,95, + 90,10,95,95,99,97,99,104,101,100,95,95,41,6,218,3, + 103,101,116,114,144,0,0,0,114,12,1,0,0,114,6,1, + 0,0,114,194,0,0,0,218,9,69,120,99,101,112,116,105, + 111,110,41,6,90,2,110,115,114,121,0,0,0,90,8,112, + 97,116,104,110,97,109,101,90,9,99,112,97,116,104,110,97, + 109,101,114,144,0,0,0,114,191,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,14,95,102,105, + 120,95,117,112,95,109,111,100,117,108,101,24,6,0,0,115, + 40,0,0,0,10,2,10,1,4,1,4,1,8,1,8,1, + 12,1,10,2,4,1,14,1,2,1,8,1,8,1,8,1, + 14,1,12,1,6,2,2,254,4,255,255,128,114,78,1,0, + 0,99,0,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,3,0,0,0,67,0,0,0,115,38,0,0,0,116, + 0,116,1,160,2,161,0,102,2,125,0,116,3,116,4,102, + 2,125,1,116,5,116,6,102,2,125,2,124,0,124,1,124, + 2,103,3,83,0,41,2,122,95,82,101,116,117,114,110,115, + 32,97,32,108,105,115,116,32,111,102,32,102,105,108,101,45, + 98,97,115,101,100,32,109,111,100,117,108,101,32,108,111,97, + 100,101,114,115,46,10,10,32,32,32,32,69,97,99,104,32, + 105,116,101,109,32,105,115,32,97,32,116,117,112,108,101,32, + 40,108,111,97,100,101,114,44,32,115,117,102,102,105,120,101, + 115,41,46,10,32,32,32,32,78,41,7,114,3,1,0,0, + 114,167,0,0,0,218,18,101,120,116,101,110,115,105,111,110, + 95,115,117,102,102,105,120,101,115,114,6,1,0,0,114,106, + 0,0,0,114,12,1,0,0,114,94,0,0,0,41,3,90, + 10,101,120,116,101,110,115,105,111,110,115,90,6,115,111,117, + 114,99,101,90,8,98,121,116,101,99,111,100,101,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,188,0,0, + 0,47,6,0,0,115,10,0,0,0,12,5,8,1,8,1, + 10,1,255,128,114,188,0,0,0,99,1,0,0,0,0,0, + 0,0,0,0,0,0,1,0,0,0,1,0,0,0,67,0, + 0,0,115,8,0,0,0,124,0,97,0,100,0,83,0,114, + 114,0,0,0,41,1,114,139,0,0,0,41,1,218,17,95, + 98,111,111,116,115,116,114,97,112,95,109,111,100,117,108,101, 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 9,95,103,101,116,95,115,112,101,99,48,5,0,0,115,44, - 0,0,0,4,5,8,1,14,1,2,1,10,1,8,1,10, - 1,14,1,12,2,8,1,2,1,10,1,8,1,6,1,8, - 1,8,1,10,5,2,128,12,2,6,1,4,1,255,128,122, - 20,80,97,116,104,70,105,110,100,101,114,46,95,103,101,116, - 95,115,112,101,99,99,4,0,0,0,0,0,0,0,0,0, - 0,0,6,0,0,0,5,0,0,0,67,0,0,0,115,94, - 0,0,0,124,2,100,1,117,0,114,14,116,0,106,1,125, - 2,124,0,160,2,124,1,124,2,124,3,161,3,125,4,124, - 4,100,1,117,0,114,40,100,1,83,0,124,4,106,3,100, - 1,117,0,114,90,124,4,106,4,125,5,124,5,114,86,100, - 1,124,4,95,5,116,6,124,1,124,5,124,0,106,2,131, - 3,124,4,95,4,124,4,83,0,100,1,83,0,124,4,83, - 0,41,2,122,141,84,114,121,32,116,111,32,102,105,110,100, - 32,97,32,115,112,101,99,32,102,111,114,32,39,102,117,108, - 108,110,97,109,101,39,32,111,110,32,115,121,115,46,112,97, - 116,104,32,111,114,32,39,112,97,116,104,39,46,10,10,32, - 32,32,32,32,32,32,32,84,104,101,32,115,101,97,114,99, - 104,32,105,115,32,98,97,115,101,100,32,111,110,32,115,121, - 115,46,112,97,116,104,95,104,111,111,107,115,32,97,110,100, - 32,115,121,115,46,112,97,116,104,95,105,109,112,111,114,116, - 101,114,95,99,97,99,104,101,46,10,32,32,32,32,32,32, - 32,32,78,41,7,114,15,0,0,0,114,52,0,0,0,114, - 56,1,0,0,114,144,0,0,0,114,182,0,0,0,114,185, - 0,0,0,114,18,1,0,0,41,6,114,202,0,0,0,114, - 143,0,0,0,114,52,0,0,0,114,206,0,0,0,114,191, - 0,0,0,114,55,1,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,207,0,0,0,80,5,0,0, - 115,28,0,0,0,8,6,6,1,14,1,8,1,4,1,10, - 1,6,1,4,1,6,3,16,1,4,1,4,2,4,2,255, - 128,122,20,80,97,116,104,70,105,110,100,101,114,46,102,105, - 110,100,95,115,112,101,99,99,3,0,0,0,0,0,0,0, - 0,0,0,0,4,0,0,0,4,0,0,0,67,0,0,0, - 115,30,0,0,0,124,0,160,0,124,1,124,2,161,2,125, - 3,124,3,100,1,117,0,114,24,100,1,83,0,124,3,106, - 1,83,0,41,2,122,170,102,105,110,100,32,116,104,101,32, - 109,111,100,117,108,101,32,111,110,32,115,121,115,46,112,97, - 116,104,32,111,114,32,39,112,97,116,104,39,32,98,97,115, - 101,100,32,111,110,32,115,121,115,46,112,97,116,104,95,104, - 111,111,107,115,32,97,110,100,10,32,32,32,32,32,32,32, - 32,115,121,115,46,112,97,116,104,95,105,109,112,111,114,116, - 101,114,95,99,97,99,104,101,46,10,10,32,32,32,32,32, - 32,32,32,84,104,105,115,32,109,101,116,104,111,100,32,105, - 115,32,100,101,112,114,101,99,97,116,101,100,46,32,32,85, - 115,101,32,102,105,110,100,95,115,112,101,99,40,41,32,105, - 110,115,116,101,97,100,46,10,10,32,32,32,32,32,32,32, - 32,78,114,208,0,0,0,114,209,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,210,0,0,0, - 104,5,0,0,115,10,0,0,0,12,8,8,1,4,1,6, - 1,255,128,122,22,80,97,116,104,70,105,110,100,101,114,46, - 102,105,110,100,95,109,111,100,117,108,101,99,0,0,0,0, - 0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0, - 79,0,0,0,115,28,0,0,0,100,1,100,2,108,0,109, - 1,125,2,1,0,124,2,106,2,124,0,105,0,124,1,164, - 1,142,1,83,0,41,4,97,32,1,0,0,10,32,32,32, - 32,32,32,32,32,70,105,110,100,32,100,105,115,116,114,105, - 98,117,116,105,111,110,115,46,10,10,32,32,32,32,32,32, - 32,32,82,101,116,117,114,110,32,97,110,32,105,116,101,114, - 97,98,108,101,32,111,102,32,97,108,108,32,68,105,115,116, - 114,105,98,117,116,105,111,110,32,105,110,115,116,97,110,99, - 101,115,32,99,97,112,97,98,108,101,32,111,102,10,32,32, - 32,32,32,32,32,32,108,111,97,100,105,110,103,32,116,104, - 101,32,109,101,116,97,100,97,116,97,32,102,111,114,32,112, - 97,99,107,97,103,101,115,32,109,97,116,99,104,105,110,103, - 32,96,96,99,111,110,116,101,120,116,46,110,97,109,101,96, - 96,10,32,32,32,32,32,32,32,32,40,111,114,32,97,108, - 108,32,110,97,109,101,115,32,105,102,32,96,96,78,111,110, - 101,96,96,32,105,110,100,105,99,97,116,101,100,41,32,97, - 108,111,110,103,32,116,104,101,32,112,97,116,104,115,32,105, - 110,32,116,104,101,32,108,105,115,116,10,32,32,32,32,32, - 32,32,32,111,102,32,100,105,114,101,99,116,111,114,105,101, - 115,32,96,96,99,111,110,116,101,120,116,46,112,97,116,104, - 96,96,46,10,32,32,32,32,32,32,32,32,114,0,0,0, - 0,41,1,218,18,77,101,116,97,100,97,116,97,80,97,116, - 104,70,105,110,100,101,114,78,41,3,90,18,105,109,112,111, - 114,116,108,105,98,46,109,101,116,97,100,97,116,97,114,57, - 1,0,0,218,18,102,105,110,100,95,100,105,115,116,114,105, - 98,117,116,105,111,110,115,41,3,114,124,0,0,0,114,125, - 0,0,0,114,57,1,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,58,1,0,0,117,5,0,0, - 115,6,0,0,0,12,10,16,1,255,128,122,29,80,97,116, - 104,70,105,110,100,101,114,46,102,105,110,100,95,100,105,115, - 116,114,105,98,117,116,105,111,110,115,41,1,78,41,2,78, - 78,41,1,78,41,14,114,130,0,0,0,114,129,0,0,0, - 114,131,0,0,0,114,132,0,0,0,114,213,0,0,0,114, - 43,1,0,0,114,49,1,0,0,114,214,0,0,0,114,52, - 1,0,0,114,53,1,0,0,114,56,1,0,0,114,207,0, - 0,0,114,210,0,0,0,114,58,1,0,0,114,7,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,42,1,0,0,240,4,0,0,115,38,0,0,0,8,0, - 4,2,2,2,10,1,2,9,10,1,2,12,10,1,2,21, - 10,1,2,14,12,1,2,31,12,1,2,23,12,1,2,12, - 14,1,255,128,114,42,1,0,0,99,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,64,0, - 0,0,115,90,0,0,0,101,0,90,1,100,0,90,2,100, - 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132, - 0,90,5,101,6,90,7,100,6,100,7,132,0,90,8,100, - 8,100,9,132,0,90,9,100,19,100,11,100,12,132,1,90, - 10,100,13,100,14,132,0,90,11,101,12,100,15,100,16,132, - 0,131,1,90,13,100,17,100,18,132,0,90,14,100,10,83, - 0,41,20,218,10,70,105,108,101,70,105,110,100,101,114,122, - 172,70,105,108,101,45,98,97,115,101,100,32,102,105,110,100, - 101,114,46,10,10,32,32,32,32,73,110,116,101,114,97,99, - 116,105,111,110,115,32,119,105,116,104,32,116,104,101,32,102, - 105,108,101,32,115,121,115,116,101,109,32,97,114,101,32,99, - 97,99,104,101,100,32,102,111,114,32,112,101,114,102,111,114, - 109,97,110,99,101,44,32,98,101,105,110,103,10,32,32,32, - 32,114,101,102,114,101,115,104,101,100,32,119,104,101,110,32, - 116,104,101,32,100,105,114,101,99,116,111,114,121,32,116,104, - 101,32,102,105,110,100,101,114,32,105,115,32,104,97,110,100, - 108,105,110,103,32,104,97,115,32,98,101,101,110,32,109,111, - 100,105,102,105,101,100,46,10,10,32,32,32,32,99,2,0, - 0,0,0,0,0,0,0,0,0,0,5,0,0,0,6,0, - 0,0,7,0,0,0,115,84,0,0,0,103,0,125,3,124, - 2,68,0,93,32,92,2,137,0,125,4,124,3,160,0,135, - 0,102,1,100,1,100,2,132,8,124,4,68,0,131,1,161, - 1,1,0,113,8,124,3,124,0,95,1,124,1,112,54,100, - 3,124,0,95,2,100,4,124,0,95,3,116,4,131,0,124, - 0,95,5,116,4,131,0,124,0,95,6,100,5,83,0,41, - 6,122,154,73,110,105,116,105,97,108,105,122,101,32,119,105, - 116,104,32,116,104,101,32,112,97,116,104,32,116,111,32,115, - 101,97,114,99,104,32,111,110,32,97,110,100,32,97,32,118, - 97,114,105,97,98,108,101,32,110,117,109,98,101,114,32,111, - 102,10,32,32,32,32,32,32,32,32,50,45,116,117,112,108, - 101,115,32,99,111,110,116,97,105,110,105,110,103,32,116,104, - 101,32,108,111,97,100,101,114,32,97,110,100,32,116,104,101, - 32,102,105,108,101,32,115,117,102,102,105,120,101,115,32,116, - 104,101,32,108,111,97,100,101,114,10,32,32,32,32,32,32, - 32,32,114,101,99,111,103,110,105,122,101,115,46,99,1,0, - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0, - 0,0,51,0,0,0,115,22,0,0,0,124,0,93,14,125, - 1,124,1,136,0,102,2,86,0,1,0,113,2,100,0,83, - 0,114,114,0,0,0,114,7,0,0,0,114,14,1,0,0, - 169,1,114,144,0,0,0,114,7,0,0,0,114,8,0,0, - 0,114,9,0,0,0,146,5,0,0,115,4,0,0,0,22, - 0,255,128,122,38,70,105,108,101,70,105,110,100,101,114,46, - 95,95,105,110,105,116,95,95,46,60,108,111,99,97,108,115, - 62,46,60,103,101,110,101,120,112,114,62,114,79,0,0,0, - 114,109,0,0,0,78,41,7,114,171,0,0,0,218,8,95, - 108,111,97,100,101,114,115,114,52,0,0,0,218,11,95,112, - 97,116,104,95,109,116,105,109,101,218,3,115,101,116,218,11, - 95,112,97,116,104,95,99,97,99,104,101,218,19,95,114,101, - 108,97,120,101,100,95,112,97,116,104,95,99,97,99,104,101, - 41,5,114,123,0,0,0,114,52,0,0,0,218,14,108,111, - 97,100,101,114,95,100,101,116,97,105,108,115,90,7,108,111, - 97,100,101,114,115,114,193,0,0,0,114,7,0,0,0,114, - 60,1,0,0,114,8,0,0,0,114,216,0,0,0,140,5, - 0,0,115,18,0,0,0,4,4,12,1,26,1,6,1,10, - 2,6,1,8,1,12,1,255,128,122,19,70,105,108,101,70, - 105,110,100,101,114,46,95,95,105,110,105,116,95,95,99,1, - 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2, - 0,0,0,67,0,0,0,115,10,0,0,0,100,1,124,0, - 95,0,100,2,83,0,41,3,122,31,73,110,118,97,108,105, - 100,97,116,101,32,116,104,101,32,100,105,114,101,99,116,111, - 114,121,32,109,116,105,109,101,46,114,109,0,0,0,78,41, - 1,114,62,1,0,0,114,253,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,43,1,0,0,154, - 5,0,0,115,4,0,0,0,10,2,255,128,122,28,70,105, - 108,101,70,105,110,100,101,114,46,105,110,118,97,108,105,100, - 97,116,101,95,99,97,99,104,101,115,99,2,0,0,0,0, - 0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,67, - 0,0,0,115,42,0,0,0,124,0,160,0,124,1,161,1, - 125,2,124,2,100,1,117,0,114,26,100,1,103,0,102,2, - 83,0,124,2,106,1,124,2,106,2,112,38,103,0,102,2, - 83,0,41,2,122,197,84,114,121,32,116,111,32,102,105,110, - 100,32,97,32,108,111,97,100,101,114,32,102,111,114,32,116, - 104,101,32,115,112,101,99,105,102,105,101,100,32,109,111,100, - 117,108,101,44,32,111,114,32,116,104,101,32,110,97,109,101, - 115,112,97,99,101,10,32,32,32,32,32,32,32,32,112,97, - 99,107,97,103,101,32,112,111,114,116,105,111,110,115,46,32, - 82,101,116,117,114,110,115,32,40,108,111,97,100,101,114,44, - 32,108,105,115,116,45,111,102,45,112,111,114,116,105,111,110, - 115,41,46,10,10,32,32,32,32,32,32,32,32,84,104,105, - 115,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114, - 101,99,97,116,101,100,46,32,32,85,115,101,32,102,105,110, - 100,95,115,112,101,99,40,41,32,105,110,115,116,101,97,100, - 46,10,10,32,32,32,32,32,32,32,32,78,41,3,114,207, - 0,0,0,114,144,0,0,0,114,182,0,0,0,41,3,114, - 123,0,0,0,114,143,0,0,0,114,191,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,141,0, - 0,0,160,5,0,0,115,10,0,0,0,10,7,8,1,8, - 1,16,1,255,128,122,22,70,105,108,101,70,105,110,100,101, - 114,46,102,105,110,100,95,108,111,97,100,101,114,99,6,0, - 0,0,0,0,0,0,0,0,0,0,7,0,0,0,6,0, - 0,0,67,0,0,0,115,26,0,0,0,124,1,124,2,124, - 3,131,2,125,6,116,0,124,2,124,3,124,6,124,4,100, - 1,141,4,83,0,41,2,78,114,181,0,0,0,41,1,114, - 194,0,0,0,41,7,114,123,0,0,0,114,192,0,0,0, - 114,143,0,0,0,114,52,0,0,0,90,4,115,109,115,108, - 114,206,0,0,0,114,144,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,56,1,0,0,172,5, - 0,0,115,10,0,0,0,10,1,8,1,2,1,6,255,255, - 128,122,20,70,105,108,101,70,105,110,100,101,114,46,95,103, - 101,116,95,115,112,101,99,78,99,3,0,0,0,0,0,0, - 0,0,0,0,0,14,0,0,0,8,0,0,0,67,0,0, - 0,115,100,1,0,0,100,1,125,3,124,1,160,0,100,2, - 161,1,100,3,25,0,125,4,122,24,116,1,124,0,106,2, - 112,34,116,3,160,4,161,0,131,1,106,5,125,5,87,0, - 110,20,4,0,116,6,144,1,121,98,1,0,1,0,1,0, - 100,4,125,5,89,0,124,5,124,0,106,7,107,3,114,88, - 124,0,160,8,161,0,1,0,124,5,124,0,95,7,116,9, - 131,0,114,110,124,0,106,10,125,6,124,4,160,11,161,0, - 125,7,110,10,124,0,106,12,125,6,124,4,125,7,124,7, - 124,6,118,0,114,214,116,13,124,0,106,2,124,4,131,2, - 125,8,124,0,106,14,68,0,93,58,92,2,125,9,125,10, - 100,5,124,9,23,0,125,11,116,13,124,8,124,11,131,2, - 125,12,116,15,124,12,131,1,114,204,124,0,160,16,124,10, - 124,1,124,12,124,8,103,1,124,2,161,5,2,0,1,0, - 83,0,113,146,116,17,124,8,131,1,125,3,124,0,106,14, - 68,0,93,86,92,2,125,9,125,10,116,13,124,0,106,2, - 124,4,124,9,23,0,131,2,125,12,116,18,106,19,100,6, - 124,12,100,3,100,7,141,3,1,0,124,7,124,9,23,0, - 124,6,118,0,144,1,114,50,116,15,124,12,131,1,144,1, - 114,50,124,0,160,16,124,10,124,1,124,12,100,8,124,2, - 161,5,2,0,1,0,83,0,113,220,124,3,144,1,114,94, - 116,18,160,19,100,9,124,8,161,2,1,0,116,18,160,20, - 124,1,100,8,161,2,125,13,124,8,103,1,124,13,95,21, - 124,13,83,0,100,8,83,0,119,0,41,10,122,111,84,114, - 121,32,116,111,32,102,105,110,100,32,97,32,115,112,101,99, - 32,102,111,114,32,116,104,101,32,115,112,101,99,105,102,105, - 101,100,32,109,111,100,117,108,101,46,10,10,32,32,32,32, - 32,32,32,32,82,101,116,117,114,110,115,32,116,104,101,32, - 109,97,116,99,104,105,110,103,32,115,112,101,99,44,32,111, - 114,32,78,111,110,101,32,105,102,32,110,111,116,32,102,111, - 117,110,100,46,10,32,32,32,32,32,32,32,32,70,114,79, - 0,0,0,114,39,0,0,0,114,109,0,0,0,114,216,0, - 0,0,122,9,116,114,121,105,110,103,32,123,125,41,1,90, - 9,118,101,114,98,111,115,105,116,121,78,122,25,112,111,115, - 115,105,98,108,101,32,110,97,109,101,115,112,97,99,101,32, - 102,111,114,32,123,125,41,22,114,49,0,0,0,114,57,0, - 0,0,114,52,0,0,0,114,18,0,0,0,114,63,0,0, - 0,114,7,1,0,0,114,58,0,0,0,114,62,1,0,0, - 218,11,95,102,105,108,108,95,99,97,99,104,101,114,21,0, - 0,0,114,65,1,0,0,114,110,0,0,0,114,64,1,0, - 0,114,48,0,0,0,114,61,1,0,0,114,62,0,0,0, - 114,56,1,0,0,114,64,0,0,0,114,139,0,0,0,114, - 153,0,0,0,114,187,0,0,0,114,182,0,0,0,41,14, - 114,123,0,0,0,114,143,0,0,0,114,206,0,0,0,90, - 12,105,115,95,110,97,109,101,115,112,97,99,101,90,11,116, - 97,105,108,95,109,111,100,117,108,101,114,173,0,0,0,90, - 5,99,97,99,104,101,90,12,99,97,99,104,101,95,109,111, - 100,117,108,101,90,9,98,97,115,101,95,112,97,116,104,114, - 15,1,0,0,114,192,0,0,0,90,13,105,110,105,116,95, - 102,105,108,101,110,97,109,101,90,9,102,117,108,108,95,112, - 97,116,104,114,191,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,207,0,0,0,177,5,0,0, - 115,80,0,0,0,4,5,14,1,2,1,24,1,14,1,6, - 1,10,1,8,1,6,1,6,2,6,1,10,1,6,2,4, - 1,8,2,12,1,14,1,8,1,10,1,8,1,24,1,2, - 128,8,4,14,2,16,1,16,1,14,1,10,1,10,1,4, - 1,8,255,2,128,6,2,12,1,12,1,8,1,4,1,4, - 1,2,219,255,128,122,20,70,105,108,101,70,105,110,100,101, - 114,46,102,105,110,100,95,115,112,101,99,99,1,0,0,0, - 0,0,0,0,0,0,0,0,9,0,0,0,10,0,0,0, - 67,0,0,0,115,190,0,0,0,124,0,106,0,125,1,122, - 22,116,1,160,2,124,1,112,22,116,1,160,3,161,0,161, - 1,125,2,87,0,110,24,4,0,116,4,116,5,116,6,102, - 3,121,188,1,0,1,0,1,0,103,0,125,2,89,0,116, - 7,106,8,160,9,100,1,161,1,115,78,116,10,124,2,131, - 1,124,0,95,11,110,74,116,10,131,0,125,3,124,2,68, - 0,93,56,125,4,124,4,160,12,100,2,161,1,92,3,125, - 5,125,6,125,7,124,6,114,130,100,3,160,13,124,5,124, - 7,160,14,161,0,161,2,125,8,110,4,124,5,125,8,124, - 3,160,15,124,8,161,1,1,0,113,88,124,3,124,0,95, - 11,116,7,106,8,160,9,116,16,161,1,114,184,100,4,100, - 5,132,0,124,2,68,0,131,1,124,0,95,17,100,6,83, - 0,100,6,83,0,119,0,41,7,122,68,70,105,108,108,32, - 116,104,101,32,99,97,99,104,101,32,111,102,32,112,111,116, - 101,110,116,105,97,108,32,109,111,100,117,108,101,115,32,97, - 110,100,32,112,97,99,107,97,103,101,115,32,102,111,114,32, - 116,104,105,115,32,100,105,114,101,99,116,111,114,121,46,114, - 14,0,0,0,114,79,0,0,0,114,69,0,0,0,99,1, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,4, - 0,0,0,83,0,0,0,115,20,0,0,0,104,0,124,0, - 93,12,125,1,124,1,160,0,161,0,146,2,113,4,83,0, - 114,7,0,0,0,41,1,114,110,0,0,0,41,2,114,5, - 0,0,0,90,2,102,110,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,13,0,0,0,254,5,0,0,115, - 4,0,0,0,20,0,255,128,122,41,70,105,108,101,70,105, - 110,100,101,114,46,95,102,105,108,108,95,99,97,99,104,101, - 46,60,108,111,99,97,108,115,62,46,60,115,101,116,99,111, - 109,112,62,78,41,18,114,52,0,0,0,114,18,0,0,0, - 90,7,108,105,115,116,100,105,114,114,63,0,0,0,114,50, - 1,0,0,218,15,80,101,114,109,105,115,115,105,111,110,69, - 114,114,111,114,218,18,78,111,116,65,68,105,114,101,99,116, - 111,114,121,69,114,114,111,114,114,15,0,0,0,114,22,0, - 0,0,114,23,0,0,0,114,63,1,0,0,114,64,1,0, - 0,114,105,0,0,0,114,70,0,0,0,114,110,0,0,0, - 218,3,97,100,100,114,24,0,0,0,114,65,1,0,0,41, - 9,114,123,0,0,0,114,52,0,0,0,90,8,99,111,110, - 116,101,110,116,115,90,21,108,111,119,101,114,95,115,117,102, - 102,105,120,95,99,111,110,116,101,110,116,115,114,38,1,0, - 0,114,121,0,0,0,114,25,1,0,0,114,15,1,0,0, - 90,8,110,101,119,95,110,97,109,101,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,67,1,0,0,225,5, - 0,0,115,40,0,0,0,6,2,2,1,22,1,18,1,6, - 3,12,3,12,1,6,7,8,1,16,1,4,1,18,1,4, - 2,12,1,6,1,12,1,20,1,4,255,2,233,255,128,122, - 22,70,105,108,101,70,105,110,100,101,114,46,95,102,105,108, - 108,95,99,97,99,104,101,99,1,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,3,0,0,0,7,0,0,0, - 115,18,0,0,0,135,0,135,1,102,2,100,1,100,2,132, - 8,125,2,124,2,83,0,41,4,97,20,1,0,0,65,32, - 99,108,97,115,115,32,109,101,116,104,111,100,32,119,104,105, - 99,104,32,114,101,116,117,114,110,115,32,97,32,99,108,111, - 115,117,114,101,32,116,111,32,117,115,101,32,111,110,32,115, - 121,115,46,112,97,116,104,95,104,111,111,107,10,32,32,32, - 32,32,32,32,32,119,104,105,99,104,32,119,105,108,108,32, - 114,101,116,117,114,110,32,97,110,32,105,110,115,116,97,110, - 99,101,32,117,115,105,110,103,32,116,104,101,32,115,112,101, - 99,105,102,105,101,100,32,108,111,97,100,101,114,115,32,97, - 110,100,32,116,104,101,32,112,97,116,104,10,32,32,32,32, - 32,32,32,32,99,97,108,108,101,100,32,111,110,32,116,104, - 101,32,99,108,111,115,117,114,101,46,10,10,32,32,32,32, - 32,32,32,32,73,102,32,116,104,101,32,112,97,116,104,32, - 99,97,108,108,101,100,32,111,110,32,116,104,101,32,99,108, - 111,115,117,114,101,32,105,115,32,110,111,116,32,97,32,100, - 105,114,101,99,116,111,114,121,44,32,73,109,112,111,114,116, - 69,114,114,111,114,32,105,115,10,32,32,32,32,32,32,32, - 32,114,97,105,115,101,100,46,10,10,32,32,32,32,32,32, - 32,32,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,4,0,0,0,19,0,0,0,115,36,0,0,0, - 116,0,124,0,131,1,115,20,116,1,100,1,124,0,100,2, - 141,2,130,1,136,0,124,0,103,1,136,1,162,1,82,0, - 142,0,83,0,41,4,122,45,80,97,116,104,32,104,111,111, - 107,32,102,111,114,32,105,109,112,111,114,116,108,105,98,46, - 109,97,99,104,105,110,101,114,121,46,70,105,108,101,70,105, - 110,100,101,114,46,122,30,111,110,108,121,32,100,105,114,101, - 99,116,111,114,105,101,115,32,97,114,101,32,115,117,112,112, - 111,114,116,101,100,114,56,0,0,0,78,41,2,114,64,0, - 0,0,114,122,0,0,0,114,56,0,0,0,169,2,114,202, - 0,0,0,114,66,1,0,0,114,7,0,0,0,114,8,0, - 0,0,218,24,112,97,116,104,95,104,111,111,107,95,102,111, - 114,95,70,105,108,101,70,105,110,100,101,114,10,6,0,0, - 115,8,0,0,0,8,2,12,1,16,1,255,128,122,54,70, - 105,108,101,70,105,110,100,101,114,46,112,97,116,104,95,104, - 111,111,107,46,60,108,111,99,97,108,115,62,46,112,97,116, - 104,95,104,111,111,107,95,102,111,114,95,70,105,108,101,70, - 105,110,100,101,114,78,114,7,0,0,0,41,3,114,202,0, - 0,0,114,66,1,0,0,114,72,1,0,0,114,7,0,0, - 0,114,71,1,0,0,114,8,0,0,0,218,9,112,97,116, - 104,95,104,111,111,107,0,6,0,0,115,6,0,0,0,14, - 10,4,6,255,128,122,20,70,105,108,101,70,105,110,100,101, - 114,46,112,97,116,104,95,104,111,111,107,99,1,0,0,0, - 0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0, - 67,0,0,0,115,12,0,0,0,100,1,160,0,124,0,106, - 1,161,1,83,0,41,2,78,122,16,70,105,108,101,70,105, - 110,100,101,114,40,123,33,114,125,41,41,2,114,70,0,0, - 0,114,52,0,0,0,114,253,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,36,1,0,0,18, - 6,0,0,115,4,0,0,0,12,1,255,128,122,19,70,105, - 108,101,70,105,110,100,101,114,46,95,95,114,101,112,114,95, - 95,41,1,78,41,15,114,130,0,0,0,114,129,0,0,0, - 114,131,0,0,0,114,132,0,0,0,114,216,0,0,0,114, - 43,1,0,0,114,147,0,0,0,114,210,0,0,0,114,141, - 0,0,0,114,56,1,0,0,114,207,0,0,0,114,67,1, - 0,0,114,214,0,0,0,114,73,1,0,0,114,36,1,0, - 0,114,7,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,59,1,0,0,131,5,0,0,115,26, - 0,0,0,8,0,4,2,8,7,8,14,4,4,8,2,8, - 12,10,5,8,48,2,31,10,1,12,17,255,128,114,59,1, - 0,0,99,4,0,0,0,0,0,0,0,0,0,0,0,6, - 0,0,0,8,0,0,0,67,0,0,0,115,148,0,0,0, - 124,0,160,0,100,1,161,1,125,4,124,0,160,0,100,2, - 161,1,125,5,124,4,115,66,124,5,114,36,124,5,106,1, - 125,4,110,30,124,2,124,3,107,2,114,56,116,2,124,1, - 124,2,131,2,125,4,110,10,116,3,124,1,124,2,131,2, - 125,4,124,5,115,84,116,4,124,1,124,2,124,4,100,3, - 141,3,125,5,122,38,124,5,124,0,100,2,60,0,124,4, - 124,0,100,1,60,0,124,2,124,0,100,4,60,0,124,3, - 124,0,100,5,60,0,87,0,100,0,83,0,4,0,116,5, - 121,142,1,0,1,0,1,0,89,0,100,0,83,0,119,0, - 100,0,83,0,41,6,78,218,10,95,95,108,111,97,100,101, - 114,95,95,218,8,95,95,115,112,101,99,95,95,114,60,1, - 0,0,90,8,95,95,102,105,108,101,95,95,90,10,95,95, - 99,97,99,104,101,100,95,95,41,6,218,3,103,101,116,114, - 144,0,0,0,114,12,1,0,0,114,6,1,0,0,114,194, - 0,0,0,218,9,69,120,99,101,112,116,105,111,110,41,6, - 90,2,110,115,114,121,0,0,0,90,8,112,97,116,104,110, - 97,109,101,90,9,99,112,97,116,104,110,97,109,101,114,144, - 0,0,0,114,191,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,14,95,102,105,120,95,117,112, - 95,109,111,100,117,108,101,24,6,0,0,115,40,0,0,0, - 10,2,10,1,4,1,4,1,8,1,8,1,12,1,10,2, - 4,1,14,1,2,1,8,1,8,1,8,1,14,1,12,1, - 6,2,2,254,4,255,255,128,114,78,1,0,0,99,0,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0, - 0,0,67,0,0,0,115,38,0,0,0,116,0,116,1,160, - 2,161,0,102,2,125,0,116,3,116,4,102,2,125,1,116, - 5,116,6,102,2,125,2,124,0,124,1,124,2,103,3,83, - 0,41,2,122,95,82,101,116,117,114,110,115,32,97,32,108, - 105,115,116,32,111,102,32,102,105,108,101,45,98,97,115,101, - 100,32,109,111,100,117,108,101,32,108,111,97,100,101,114,115, - 46,10,10,32,32,32,32,69,97,99,104,32,105,116,101,109, - 32,105,115,32,97,32,116,117,112,108,101,32,40,108,111,97, - 100,101,114,44,32,115,117,102,102,105,120,101,115,41,46,10, - 32,32,32,32,78,41,7,114,3,1,0,0,114,167,0,0, - 0,218,18,101,120,116,101,110,115,105,111,110,95,115,117,102, - 102,105,120,101,115,114,6,1,0,0,114,106,0,0,0,114, - 12,1,0,0,114,94,0,0,0,41,3,90,10,101,120,116, - 101,110,115,105,111,110,115,90,6,115,111,117,114,99,101,90, - 8,98,121,116,101,99,111,100,101,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,188,0,0,0,47,6,0, - 0,115,10,0,0,0,12,5,8,1,8,1,10,1,255,128, - 114,188,0,0,0,99,1,0,0,0,0,0,0,0,0,0, - 0,0,1,0,0,0,1,0,0,0,67,0,0,0,115,8, - 0,0,0,124,0,97,0,100,0,83,0,114,114,0,0,0, - 41,1,114,139,0,0,0,41,1,218,17,95,98,111,111,116, - 115,116,114,97,112,95,109,111,100,117,108,101,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,21,95,115,101, - 116,95,98,111,111,116,115,116,114,97,112,95,109,111,100,117, - 108,101,58,6,0,0,115,4,0,0,0,8,2,255,128,114, - 81,1,0,0,99,1,0,0,0,0,0,0,0,0,0,0, - 0,2,0,0,0,4,0,0,0,67,0,0,0,115,50,0, - 0,0,116,0,124,0,131,1,1,0,116,1,131,0,125,1, - 116,2,106,3,160,4,116,5,106,6,124,1,142,0,103,1, - 161,1,1,0,116,2,106,7,160,8,116,9,161,1,1,0, - 100,1,83,0,41,2,122,41,73,110,115,116,97,108,108,32, - 116,104,101,32,112,97,116,104,45,98,97,115,101,100,32,105, - 109,112,111,114,116,32,99,111,109,112,111,110,101,110,116,115, - 46,78,41,10,114,81,1,0,0,114,188,0,0,0,114,15, - 0,0,0,114,48,1,0,0,114,171,0,0,0,114,59,1, - 0,0,114,73,1,0,0,218,9,109,101,116,97,95,112,97, - 116,104,114,190,0,0,0,114,42,1,0,0,41,2,114,80, - 1,0,0,90,17,115,117,112,112,111,114,116,101,100,95,108, - 111,97,100,101,114,115,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,8,95,105,110,115,116,97,108,108,63, - 6,0,0,115,10,0,0,0,8,2,6,1,20,1,16,1, - 255,128,114,83,1,0,0,41,1,114,68,0,0,0,41,1, - 78,41,3,78,78,78,41,2,114,0,0,0,0,114,0,0, - 0,0,41,1,84,41,1,78,41,1,78,41,83,114,132,0, - 0,0,114,139,0,0,0,114,167,0,0,0,114,72,0,0, - 0,114,15,0,0,0,114,81,0,0,0,114,164,0,0,0, - 114,22,0,0,0,114,211,0,0,0,90,2,110,116,114,18, - 0,0,0,114,196,0,0,0,90,5,112,111,115,105,120,114, - 42,0,0,0,218,3,97,108,108,114,45,0,0,0,114,46, - 0,0,0,114,66,0,0,0,114,25,0,0,0,90,37,95, - 67,65,83,69,95,73,78,83,69,78,83,73,84,73,86,69, - 95,80,76,65,84,70,79,82,77,83,95,66,89,84,69,83, - 95,75,69,89,114,24,0,0,0,114,26,0,0,0,114,21, - 0,0,0,114,33,0,0,0,114,38,0,0,0,114,40,0, - 0,0,114,48,0,0,0,114,55,0,0,0,114,57,0,0, - 0,114,61,0,0,0,114,62,0,0,0,114,64,0,0,0, - 114,67,0,0,0,114,77,0,0,0,218,4,116,121,112,101, - 218,8,95,95,99,111,100,101,95,95,114,166,0,0,0,114, - 31,0,0,0,114,152,0,0,0,114,30,0,0,0,114,35, - 0,0,0,114,243,0,0,0,114,97,0,0,0,114,93,0, - 0,0,114,106,0,0,0,114,190,0,0,0,114,79,1,0, - 0,114,212,0,0,0,114,94,0,0,0,90,23,68,69,66, - 85,71,95,66,89,84,69,67,79,68,69,95,83,85,70,70, - 73,88,69,83,90,27,79,80,84,73,77,73,90,69,68,95, - 66,89,84,69,67,79,68,69,95,83,85,70,70,73,88,69, - 83,114,102,0,0,0,114,107,0,0,0,114,113,0,0,0, - 114,117,0,0,0,114,119,0,0,0,114,140,0,0,0,114, - 147,0,0,0,114,156,0,0,0,114,160,0,0,0,114,162, - 0,0,0,114,169,0,0,0,114,174,0,0,0,114,175,0, - 0,0,114,180,0,0,0,218,6,111,98,106,101,99,116,114, - 189,0,0,0,114,194,0,0,0,114,195,0,0,0,114,215, - 0,0,0,114,228,0,0,0,114,246,0,0,0,114,6,1, - 0,0,114,12,1,0,0,114,3,1,0,0,114,18,1,0, - 0,114,40,1,0,0,114,42,1,0,0,114,59,1,0,0, - 114,78,1,0,0,114,188,0,0,0,114,81,1,0,0,114, - 83,1,0,0,114,7,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,218,8,60,109,111,100,117,108, - 101,62,1,0,0,0,115,172,0,0,0,4,0,4,22,8, - 3,8,1,8,1,8,1,8,1,10,3,4,1,8,1,10, - 1,8,2,4,3,10,1,6,2,22,2,8,1,10,1,14, - 1,4,4,4,1,2,1,2,1,4,255,8,4,6,16,8, - 3,8,5,8,5,8,6,8,6,8,12,8,10,8,9,8, - 5,8,7,10,9,10,22,0,127,16,24,12,1,4,2,4, - 1,6,2,6,1,10,1,8,2,6,2,8,2,16,2,8, - 71,8,40,8,19,8,12,8,12,8,31,8,17,8,33,8, - 28,10,24,10,13,10,10,8,11,6,14,4,3,2,1,12, - 255,14,68,14,64,16,30,0,127,14,17,18,50,18,45,18, - 25,14,53,14,63,14,43,0,127,14,20,0,127,10,22,8, - 23,8,11,12,5,255,128, + 21,95,115,101,116,95,98,111,111,116,115,116,114,97,112,95, + 109,111,100,117,108,101,58,6,0,0,115,4,0,0,0,8, + 2,255,128,114,81,1,0,0,99,1,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,4,0,0,0,67,0,0, + 0,115,50,0,0,0,116,0,124,0,131,1,1,0,116,1, + 131,0,125,1,116,2,106,3,160,4,116,5,106,6,124,1, + 142,0,103,1,161,1,1,0,116,2,106,7,160,8,116,9, + 161,1,1,0,100,1,83,0,41,2,122,41,73,110,115,116, + 97,108,108,32,116,104,101,32,112,97,116,104,45,98,97,115, + 101,100,32,105,109,112,111,114,116,32,99,111,109,112,111,110, + 101,110,116,115,46,78,41,10,114,81,1,0,0,114,188,0, + 0,0,114,15,0,0,0,114,48,1,0,0,114,171,0,0, + 0,114,59,1,0,0,114,73,1,0,0,218,9,109,101,116, + 97,95,112,97,116,104,114,190,0,0,0,114,42,1,0,0, + 41,2,114,80,1,0,0,90,17,115,117,112,112,111,114,116, + 101,100,95,108,111,97,100,101,114,115,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,8,95,105,110,115,116, + 97,108,108,63,6,0,0,115,10,0,0,0,8,2,6,1, + 20,1,16,1,255,128,114,83,1,0,0,41,1,114,68,0, + 0,0,41,1,78,41,3,78,78,78,41,2,114,0,0,0, + 0,114,0,0,0,0,41,1,84,41,1,78,41,1,78,41, + 83,114,132,0,0,0,114,139,0,0,0,114,167,0,0,0, + 114,72,0,0,0,114,15,0,0,0,114,81,0,0,0,114, + 164,0,0,0,114,22,0,0,0,114,211,0,0,0,90,2, + 110,116,114,18,0,0,0,114,196,0,0,0,90,5,112,111, + 115,105,120,114,42,0,0,0,218,3,97,108,108,114,45,0, + 0,0,114,46,0,0,0,114,66,0,0,0,114,25,0,0, + 0,90,37,95,67,65,83,69,95,73,78,83,69,78,83,73, + 84,73,86,69,95,80,76,65,84,70,79,82,77,83,95,66, + 89,84,69,83,95,75,69,89,114,24,0,0,0,114,26,0, + 0,0,114,21,0,0,0,114,33,0,0,0,114,38,0,0, + 0,114,40,0,0,0,114,48,0,0,0,114,55,0,0,0, + 114,57,0,0,0,114,61,0,0,0,114,62,0,0,0,114, + 64,0,0,0,114,67,0,0,0,114,77,0,0,0,218,4, + 116,121,112,101,218,8,95,95,99,111,100,101,95,95,114,166, + 0,0,0,114,31,0,0,0,114,152,0,0,0,114,30,0, + 0,0,114,35,0,0,0,114,243,0,0,0,114,97,0,0, + 0,114,93,0,0,0,114,106,0,0,0,114,190,0,0,0, + 114,79,1,0,0,114,212,0,0,0,114,94,0,0,0,90, + 23,68,69,66,85,71,95,66,89,84,69,67,79,68,69,95, + 83,85,70,70,73,88,69,83,90,27,79,80,84,73,77,73, + 90,69,68,95,66,89,84,69,67,79,68,69,95,83,85,70, + 70,73,88,69,83,114,102,0,0,0,114,107,0,0,0,114, + 113,0,0,0,114,117,0,0,0,114,119,0,0,0,114,140, + 0,0,0,114,147,0,0,0,114,156,0,0,0,114,160,0, + 0,0,114,162,0,0,0,114,169,0,0,0,114,174,0,0, + 0,114,175,0,0,0,114,180,0,0,0,218,6,111,98,106, + 101,99,116,114,189,0,0,0,114,194,0,0,0,114,195,0, + 0,0,114,215,0,0,0,114,228,0,0,0,114,246,0,0, + 0,114,6,1,0,0,114,12,1,0,0,114,3,1,0,0, + 114,18,1,0,0,114,40,1,0,0,114,42,1,0,0,114, + 59,1,0,0,114,78,1,0,0,114,188,0,0,0,114,81, + 1,0,0,114,83,1,0,0,114,7,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,8,60,109, + 111,100,117,108,101,62,1,0,0,0,115,172,0,0,0,4, + 0,4,22,8,3,8,1,8,1,8,1,8,1,10,3,4, + 1,8,1,10,1,8,2,4,3,10,1,6,2,22,2,8, + 1,10,1,14,1,4,4,4,1,2,1,2,1,4,255,8, + 4,6,16,8,3,8,5,8,5,8,6,8,6,8,12,8, + 10,8,9,8,5,8,7,10,9,10,22,0,127,16,24,12, + 1,4,2,4,1,6,2,6,1,10,1,8,2,6,2,8, + 2,16,2,8,71,8,40,8,19,8,12,8,12,8,31,8, + 17,8,33,8,28,10,24,10,13,10,10,8,11,6,14,4, + 3,2,1,12,255,14,68,14,64,16,30,0,127,14,17,18, + 50,18,45,18,25,14,53,14,63,14,43,0,127,14,20,0, + 127,10,22,8,23,8,11,12,5,255,128, }; diff --git a/Python/importlib_zipimport.h b/Python/importlib_zipimport.h index 79296d495b588..03f7b606fbda6 100644 --- a/Python/importlib_zipimport.h +++ b/Python/importlib_zipimport.h @@ -890,144 +890,144 @@ const unsigned char _Py_M__zipimport[] = { 95,109,116,105,109,101,90,11,115,111,117,114,99,101,95,115, 105,122,101,114,50,0,0,0,114,9,0,0,0,114,9,0, 0,0,114,10,0,0,0,218,15,95,117,110,109,97,114,115, - 104,97,108,95,99,111,100,101,107,2,0,0,115,72,0,0, + 104,97,108,95,99,111,100,101,107,2,0,0,115,74,0,0, 0,2,2,2,1,6,254,14,5,12,2,4,1,12,1,10, 1,2,1,2,255,8,1,2,255,10,2,8,1,4,1,4, - 1,2,1,4,254,4,5,8,1,6,255,8,4,6,255,4, - 3,22,3,18,1,2,255,4,2,8,1,4,255,4,2,18, - 2,10,1,16,1,4,1,255,128,114,157,0,0,0,99,1, - 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4, - 0,0,0,67,0,0,0,115,28,0,0,0,124,0,160,0, - 100,1,100,2,161,2,125,0,124,0,160,0,100,3,100,2, - 161,2,125,0,124,0,83,0,41,4,78,115,2,0,0,0, - 13,10,243,1,0,0,0,10,243,1,0,0,0,13,41,1, - 114,19,0,0,0,41,1,218,6,115,111,117,114,99,101,114, - 9,0,0,0,114,9,0,0,0,114,10,0,0,0,218,23, - 95,110,111,114,109,97,108,105,122,101,95,108,105,110,101,95, - 101,110,100,105,110,103,115,152,2,0,0,115,8,0,0,0, - 12,1,12,1,4,1,255,128,114,161,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,6,0, - 0,0,67,0,0,0,115,24,0,0,0,116,0,124,1,131, - 1,125,1,116,1,124,1,124,0,100,1,100,2,100,3,141, - 4,83,0,41,4,78,114,78,0,0,0,84,41,1,90,12, - 100,111,110,116,95,105,110,104,101,114,105,116,41,2,114,161, - 0,0,0,218,7,99,111,109,112,105,108,101,41,2,114,57, - 0,0,0,114,160,0,0,0,114,9,0,0,0,114,9,0, - 0,0,114,10,0,0,0,218,15,95,99,111,109,112,105,108, - 101,95,115,111,117,114,99,101,159,2,0,0,115,6,0,0, - 0,8,1,16,1,255,128,114,163,0,0,0,99,2,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,11,0,0, - 0,67,0,0,0,115,68,0,0,0,116,0,160,1,124,0, - 100,1,63,0,100,2,23,0,124,0,100,3,63,0,100,4, - 64,0,124,0,100,5,64,0,124,1,100,6,63,0,124,1, - 100,3,63,0,100,7,64,0,124,1,100,5,64,0,100,8, - 20,0,100,9,100,9,100,9,102,9,161,1,83,0,41,10, - 78,233,9,0,0,0,105,188,7,0,0,233,5,0,0,0, - 233,15,0,0,0,233,31,0,0,0,233,11,0,0,0,233, - 63,0,0,0,114,88,0,0,0,114,14,0,0,0,41,2, - 114,133,0,0,0,90,6,109,107,116,105,109,101,41,2,218, - 1,100,114,140,0,0,0,114,9,0,0,0,114,9,0,0, - 0,114,10,0,0,0,218,14,95,112,97,114,115,101,95,100, - 111,115,116,105,109,101,165,2,0,0,115,20,0,0,0,4, - 1,10,1,10,1,6,1,6,1,10,1,10,1,6,1,6, - 249,255,128,114,171,0,0,0,99,2,0,0,0,0,0,0, - 0,0,0,0,0,6,0,0,0,10,0,0,0,67,0,0, - 0,115,110,0,0,0,122,82,124,1,100,1,100,0,133,2, - 25,0,100,2,118,0,115,22,74,0,130,1,124,1,100,0, - 100,1,133,2,25,0,125,1,124,0,106,0,124,1,25,0, - 125,2,124,2,100,3,25,0,125,3,124,2,100,4,25,0, - 125,4,124,2,100,5,25,0,125,5,116,1,124,4,124,3, - 131,2,124,5,102,2,87,0,83,0,4,0,116,2,116,3, - 116,4,102,3,121,108,1,0,1,0,1,0,89,0,100,6, - 83,0,119,0,41,7,78,114,14,0,0,0,169,2,218,1, - 99,218,1,111,114,165,0,0,0,233,6,0,0,0,233,3, - 0,0,0,41,2,114,0,0,0,0,114,0,0,0,0,41, - 5,114,28,0,0,0,114,171,0,0,0,114,26,0,0,0, - 218,10,73,110,100,101,120,69,114,114,111,114,114,156,0,0, - 0,41,6,114,32,0,0,0,114,13,0,0,0,114,58,0, - 0,0,114,133,0,0,0,114,134,0,0,0,90,17,117,110, - 99,111,109,112,114,101,115,115,101,100,95,115,105,122,101,114, - 9,0,0,0,114,9,0,0,0,114,10,0,0,0,114,153, - 0,0,0,178,2,0,0,115,24,0,0,0,2,1,20,2, - 12,1,10,1,8,3,8,1,8,1,16,1,18,1,6,1, - 2,255,255,128,114,153,0,0,0,99,2,0,0,0,0,0, - 0,0,0,0,0,0,3,0,0,0,8,0,0,0,67,0, - 0,0,115,80,0,0,0,124,1,100,1,100,0,133,2,25, - 0,100,2,118,0,115,20,74,0,130,1,124,1,100,0,100, - 1,133,2,25,0,125,1,122,14,124,0,106,0,124,1,25, - 0,125,2,87,0,110,18,4,0,116,1,121,78,1,0,1, - 0,1,0,89,0,100,0,83,0,116,2,124,0,106,3,124, - 2,131,2,83,0,119,0,41,3,78,114,14,0,0,0,114, - 172,0,0,0,41,4,114,28,0,0,0,114,26,0,0,0, - 114,56,0,0,0,114,29,0,0,0,41,3,114,32,0,0, - 0,114,13,0,0,0,114,58,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,114,151,0,0,0,197, - 2,0,0,115,18,0,0,0,20,2,12,1,2,2,14,1, - 12,1,6,1,12,2,2,253,255,128,114,151,0,0,0,99, - 2,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0, - 11,0,0,0,67,0,0,0,115,18,1,0,0,116,0,124, - 0,124,1,131,2,125,2,100,0,125,3,116,1,68,0,93, - 204,92,3,125,4,125,5,125,6,124,2,124,4,23,0,125, - 7,116,2,106,3,100,1,124,0,106,4,116,5,124,7,100, - 2,100,3,141,5,1,0,122,14,124,0,106,6,124,7,25, - 0,125,8,87,0,110,18,4,0,116,7,144,1,121,16,1, - 0,1,0,1,0,89,0,113,18,124,8,100,4,25,0,125, - 9,116,8,124,0,106,4,124,8,131,2,125,10,100,0,125, - 11,124,5,114,182,122,20,116,9,124,0,124,9,124,7,124, - 1,124,10,131,5,125,11,87,0,110,50,4,0,116,10,144, - 1,121,14,1,0,125,12,1,0,122,16,124,12,125,3,87, - 0,89,0,100,0,125,12,126,12,110,18,100,0,125,12,126, - 12,119,1,116,11,124,9,124,10,131,2,125,11,124,11,100, - 0,117,0,114,202,113,18,124,8,100,4,25,0,125,9,124, - 11,124,6,124,9,102,3,2,0,1,0,83,0,124,3,114, - 252,100,5,124,3,155,0,157,2,125,13,116,12,124,13,124, - 1,100,6,141,2,124,3,130,2,116,12,100,7,124,1,155, - 2,157,2,124,1,100,6,141,2,130,1,119,0,119,0,41, - 8,78,122,13,116,114,121,105,110,103,32,123,125,123,125,123, - 125,114,88,0,0,0,41,1,90,9,118,101,114,98,111,115, - 105,116,121,114,0,0,0,0,122,20,109,111,100,117,108,101, - 32,108,111,97,100,32,102,97,105,108,101,100,58,32,114,62, - 0,0,0,114,61,0,0,0,41,13,114,36,0,0,0,114, - 91,0,0,0,114,45,0,0,0,114,80,0,0,0,114,29, - 0,0,0,114,20,0,0,0,114,28,0,0,0,114,26,0, - 0,0,114,56,0,0,0,114,157,0,0,0,114,79,0,0, - 0,114,163,0,0,0,114,3,0,0,0,41,14,114,32,0, - 0,0,114,38,0,0,0,114,13,0,0,0,90,12,105,109, - 112,111,114,116,95,101,114,114,111,114,114,92,0,0,0,114, - 93,0,0,0,114,51,0,0,0,114,66,0,0,0,114,58, - 0,0,0,114,40,0,0,0,114,128,0,0,0,114,50,0, - 0,0,90,3,101,120,99,114,81,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,114,48,0,0,0, - 212,2,0,0,115,60,0,0,0,10,1,4,1,14,1,8, - 1,22,1,2,1,14,1,14,1,4,1,8,2,12,1,4, - 1,4,1,2,1,20,1,16,1,16,1,8,128,10,2,8, - 1,2,3,8,1,14,1,4,2,10,1,14,1,18,2,2, - 241,2,247,255,128,114,48,0,0,0,41,46,114,86,0,0, - 0,90,26,95,102,114,111,122,101,110,95,105,109,112,111,114, - 116,108,105,98,95,101,120,116,101,114,110,97,108,114,21,0, - 0,0,114,1,0,0,0,114,2,0,0,0,90,17,95,102, - 114,111,122,101,110,95,105,109,112,111,114,116,108,105,98,114, - 45,0,0,0,114,150,0,0,0,114,112,0,0,0,114,154, - 0,0,0,114,71,0,0,0,114,133,0,0,0,114,69,0, - 0,0,90,7,95,95,97,108,108,95,95,114,20,0,0,0, - 90,15,112,97,116,104,95,115,101,112,97,114,97,116,111,114, - 115,114,18,0,0,0,114,79,0,0,0,114,3,0,0,0, - 114,25,0,0,0,218,4,116,121,112,101,114,74,0,0,0, - 114,115,0,0,0,114,117,0,0,0,114,119,0,0,0,90, - 13,95,76,111,97,100,101,114,66,97,115,105,99,115,114,4, - 0,0,0,114,91,0,0,0,114,36,0,0,0,114,37,0, - 0,0,114,35,0,0,0,114,27,0,0,0,114,124,0,0, - 0,114,144,0,0,0,114,146,0,0,0,114,56,0,0,0, - 114,149,0,0,0,114,157,0,0,0,218,8,95,95,99,111, - 100,101,95,95,114,155,0,0,0,114,161,0,0,0,114,163, - 0,0,0,114,171,0,0,0,114,153,0,0,0,114,151,0, - 0,0,114,48,0,0,0,114,9,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,218,8,60,109,111, - 100,117,108,101,62,1,0,0,0,115,92,0,0,0,4,0, - 8,16,16,1,8,1,8,1,8,1,8,1,8,1,8,1, - 8,1,8,2,6,3,14,1,16,3,4,4,8,2,4,2, - 4,1,4,1,18,2,0,127,0,127,12,34,12,1,2,1, - 2,1,4,252,8,9,8,4,8,9,8,31,2,126,2,254, - 4,29,8,5,8,21,8,46,8,8,10,40,8,5,8,7, - 8,6,8,13,8,19,12,15,255,128, + 1,2,1,4,254,4,5,8,1,4,255,2,128,8,4,6, + 255,4,3,22,3,18,1,2,255,4,2,8,1,4,255,4, + 2,18,2,10,1,16,1,4,1,255,128,114,157,0,0,0, + 99,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0, + 0,4,0,0,0,67,0,0,0,115,28,0,0,0,124,0, + 160,0,100,1,100,2,161,2,125,0,124,0,160,0,100,3, + 100,2,161,2,125,0,124,0,83,0,41,4,78,115,2,0, + 0,0,13,10,243,1,0,0,0,10,243,1,0,0,0,13, + 41,1,114,19,0,0,0,41,1,218,6,115,111,117,114,99, + 101,114,9,0,0,0,114,9,0,0,0,114,10,0,0,0, + 218,23,95,110,111,114,109,97,108,105,122,101,95,108,105,110, + 101,95,101,110,100,105,110,103,115,152,2,0,0,115,8,0, + 0,0,12,1,12,1,4,1,255,128,114,161,0,0,0,99, + 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, + 6,0,0,0,67,0,0,0,115,24,0,0,0,116,0,124, + 1,131,1,125,1,116,1,124,1,124,0,100,1,100,2,100, + 3,141,4,83,0,41,4,78,114,78,0,0,0,84,41,1, + 90,12,100,111,110,116,95,105,110,104,101,114,105,116,41,2, + 114,161,0,0,0,218,7,99,111,109,112,105,108,101,41,2, + 114,57,0,0,0,114,160,0,0,0,114,9,0,0,0,114, + 9,0,0,0,114,10,0,0,0,218,15,95,99,111,109,112, + 105,108,101,95,115,111,117,114,99,101,159,2,0,0,115,6, + 0,0,0,8,1,16,1,255,128,114,163,0,0,0,99,2, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,11, + 0,0,0,67,0,0,0,115,68,0,0,0,116,0,160,1, + 124,0,100,1,63,0,100,2,23,0,124,0,100,3,63,0, + 100,4,64,0,124,0,100,5,64,0,124,1,100,6,63,0, + 124,1,100,3,63,0,100,7,64,0,124,1,100,5,64,0, + 100,8,20,0,100,9,100,9,100,9,102,9,161,1,83,0, + 41,10,78,233,9,0,0,0,105,188,7,0,0,233,5,0, + 0,0,233,15,0,0,0,233,31,0,0,0,233,11,0,0, + 0,233,63,0,0,0,114,88,0,0,0,114,14,0,0,0, + 41,2,114,133,0,0,0,90,6,109,107,116,105,109,101,41, + 2,218,1,100,114,140,0,0,0,114,9,0,0,0,114,9, + 0,0,0,114,10,0,0,0,218,14,95,112,97,114,115,101, + 95,100,111,115,116,105,109,101,165,2,0,0,115,20,0,0, + 0,4,1,10,1,10,1,6,1,6,1,10,1,10,1,6, + 1,6,249,255,128,114,171,0,0,0,99,2,0,0,0,0, + 0,0,0,0,0,0,0,6,0,0,0,10,0,0,0,67, + 0,0,0,115,110,0,0,0,122,82,124,1,100,1,100,0, + 133,2,25,0,100,2,118,0,115,22,74,0,130,1,124,1, + 100,0,100,1,133,2,25,0,125,1,124,0,106,0,124,1, + 25,0,125,2,124,2,100,3,25,0,125,3,124,2,100,4, + 25,0,125,4,124,2,100,5,25,0,125,5,116,1,124,4, + 124,3,131,2,124,5,102,2,87,0,83,0,4,0,116,2, + 116,3,116,4,102,3,121,108,1,0,1,0,1,0,89,0, + 100,6,83,0,119,0,41,7,78,114,14,0,0,0,169,2, + 218,1,99,218,1,111,114,165,0,0,0,233,6,0,0,0, + 233,3,0,0,0,41,2,114,0,0,0,0,114,0,0,0, + 0,41,5,114,28,0,0,0,114,171,0,0,0,114,26,0, + 0,0,218,10,73,110,100,101,120,69,114,114,111,114,114,156, + 0,0,0,41,6,114,32,0,0,0,114,13,0,0,0,114, + 58,0,0,0,114,133,0,0,0,114,134,0,0,0,90,17, + 117,110,99,111,109,112,114,101,115,115,101,100,95,115,105,122, + 101,114,9,0,0,0,114,9,0,0,0,114,10,0,0,0, + 114,153,0,0,0,178,2,0,0,115,24,0,0,0,2,1, + 20,2,12,1,10,1,8,3,8,1,8,1,16,1,18,1, + 6,1,2,255,255,128,114,153,0,0,0,99,2,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,8,0,0,0, + 67,0,0,0,115,80,0,0,0,124,1,100,1,100,0,133, + 2,25,0,100,2,118,0,115,20,74,0,130,1,124,1,100, + 0,100,1,133,2,25,0,125,1,122,14,124,0,106,0,124, + 1,25,0,125,2,87,0,110,18,4,0,116,1,121,78,1, + 0,1,0,1,0,89,0,100,0,83,0,116,2,124,0,106, + 3,124,2,131,2,83,0,119,0,41,3,78,114,14,0,0, + 0,114,172,0,0,0,41,4,114,28,0,0,0,114,26,0, + 0,0,114,56,0,0,0,114,29,0,0,0,41,3,114,32, + 0,0,0,114,13,0,0,0,114,58,0,0,0,114,9,0, + 0,0,114,9,0,0,0,114,10,0,0,0,114,151,0,0, + 0,197,2,0,0,115,18,0,0,0,20,2,12,1,2,2, + 14,1,12,1,6,1,12,2,2,253,255,128,114,151,0,0, + 0,99,2,0,0,0,0,0,0,0,0,0,0,0,14,0, + 0,0,11,0,0,0,67,0,0,0,115,18,1,0,0,116, + 0,124,0,124,1,131,2,125,2,100,0,125,3,116,1,68, + 0,93,204,92,3,125,4,125,5,125,6,124,2,124,4,23, + 0,125,7,116,2,106,3,100,1,124,0,106,4,116,5,124, + 7,100,2,100,3,141,5,1,0,122,14,124,0,106,6,124, + 7,25,0,125,8,87,0,110,18,4,0,116,7,144,1,121, + 16,1,0,1,0,1,0,89,0,113,18,124,8,100,4,25, + 0,125,9,116,8,124,0,106,4,124,8,131,2,125,10,100, + 0,125,11,124,5,114,182,122,20,116,9,124,0,124,9,124, + 7,124,1,124,10,131,5,125,11,87,0,110,50,4,0,116, + 10,144,1,121,14,1,0,125,12,1,0,122,16,124,12,125, + 3,87,0,89,0,100,0,125,12,126,12,110,18,100,0,125, + 12,126,12,119,1,116,11,124,9,124,10,131,2,125,11,124, + 11,100,0,117,0,114,202,113,18,124,8,100,4,25,0,125, + 9,124,11,124,6,124,9,102,3,2,0,1,0,83,0,124, + 3,114,252,100,5,124,3,155,0,157,2,125,13,116,12,124, + 13,124,1,100,6,141,2,124,3,130,2,116,12,100,7,124, + 1,155,2,157,2,124,1,100,6,141,2,130,1,119,0,119, + 0,41,8,78,122,13,116,114,121,105,110,103,32,123,125,123, + 125,123,125,114,88,0,0,0,41,1,90,9,118,101,114,98, + 111,115,105,116,121,114,0,0,0,0,122,20,109,111,100,117, + 108,101,32,108,111,97,100,32,102,97,105,108,101,100,58,32, + 114,62,0,0,0,114,61,0,0,0,41,13,114,36,0,0, + 0,114,91,0,0,0,114,45,0,0,0,114,80,0,0,0, + 114,29,0,0,0,114,20,0,0,0,114,28,0,0,0,114, + 26,0,0,0,114,56,0,0,0,114,157,0,0,0,114,79, + 0,0,0,114,163,0,0,0,114,3,0,0,0,41,14,114, + 32,0,0,0,114,38,0,0,0,114,13,0,0,0,90,12, + 105,109,112,111,114,116,95,101,114,114,111,114,114,92,0,0, + 0,114,93,0,0,0,114,51,0,0,0,114,66,0,0,0, + 114,58,0,0,0,114,40,0,0,0,114,128,0,0,0,114, + 50,0,0,0,90,3,101,120,99,114,81,0,0,0,114,9, + 0,0,0,114,9,0,0,0,114,10,0,0,0,114,48,0, + 0,0,212,2,0,0,115,60,0,0,0,10,1,4,1,14, + 1,8,1,22,1,2,1,14,1,14,1,4,1,8,2,12, + 1,4,1,4,1,2,1,20,1,16,1,16,1,8,128,10, + 2,8,1,2,3,8,1,14,1,4,2,10,1,14,1,18, + 2,2,241,2,247,255,128,114,48,0,0,0,41,46,114,86, + 0,0,0,90,26,95,102,114,111,122,101,110,95,105,109,112, + 111,114,116,108,105,98,95,101,120,116,101,114,110,97,108,114, + 21,0,0,0,114,1,0,0,0,114,2,0,0,0,90,17, + 95,102,114,111,122,101,110,95,105,109,112,111,114,116,108,105, + 98,114,45,0,0,0,114,150,0,0,0,114,112,0,0,0, + 114,154,0,0,0,114,71,0,0,0,114,133,0,0,0,114, + 69,0,0,0,90,7,95,95,97,108,108,95,95,114,20,0, + 0,0,90,15,112,97,116,104,95,115,101,112,97,114,97,116, + 111,114,115,114,18,0,0,0,114,79,0,0,0,114,3,0, + 0,0,114,25,0,0,0,218,4,116,121,112,101,114,74,0, + 0,0,114,115,0,0,0,114,117,0,0,0,114,119,0,0, + 0,90,13,95,76,111,97,100,101,114,66,97,115,105,99,115, + 114,4,0,0,0,114,91,0,0,0,114,36,0,0,0,114, + 37,0,0,0,114,35,0,0,0,114,27,0,0,0,114,124, + 0,0,0,114,144,0,0,0,114,146,0,0,0,114,56,0, + 0,0,114,149,0,0,0,114,157,0,0,0,218,8,95,95, + 99,111,100,101,95,95,114,155,0,0,0,114,161,0,0,0, + 114,163,0,0,0,114,171,0,0,0,114,153,0,0,0,114, + 151,0,0,0,114,48,0,0,0,114,9,0,0,0,114,9, + 0,0,0,114,9,0,0,0,114,10,0,0,0,218,8,60, + 109,111,100,117,108,101,62,1,0,0,0,115,92,0,0,0, + 4,0,8,16,16,1,8,1,8,1,8,1,8,1,8,1, + 8,1,8,1,8,2,6,3,14,1,16,3,4,4,8,2, + 4,2,4,1,4,1,18,2,0,127,0,127,12,34,12,1, + 2,1,2,1,4,252,8,9,8,4,8,9,8,31,2,126, + 2,254,4,29,8,5,8,21,8,46,8,8,10,40,8,5, + 8,7,8,6,8,13,8,19,12,15,255,128, }; From webhook-mailer at python.org Mon Jan 4 15:56:46 2021 From: webhook-mailer at python.org (zooba) Date: Mon, 04 Jan 2021 20:56:46 -0000 Subject: [Python-checkins] Do not remove x bit from published directories (GH-24101) Message-ID: https://github.com/python/cpython/commit/af4cd16479f2d55bee3db899e7679d7cde1d2ab7 commit: af4cd16479f2d55bee3db899e7679d7cde1d2ab7 branch: master author: Steve Dower committer: zooba date: 2021-01-04T20:56:32Z summary: Do not remove x bit from published directories (GH-24101) files: M Tools/msi/uploadrelease.ps1 diff --git a/Tools/msi/uploadrelease.ps1 b/Tools/msi/uploadrelease.ps1 index d3673b4582983..7c825c443f228 100644 --- a/Tools/msi/uploadrelease.ps1 +++ b/Tools/msi/uploadrelease.ps1 @@ -90,7 +90,7 @@ if (-not $skipupload) { $d = "$target/$($p[0])/" & $plink -batch $user@$server mkdir $d & $plink -batch $user@$server chgrp downloads $d - & $plink -batch $user@$server chmod g-x,o+rx $d + & $plink -batch $user@$server chmod o+rx $d & $pscp -batch $chm.FullName "$user@${server}:$d" if (-not $?) { throw "Failed to upload $chm" } @@ -115,7 +115,7 @@ if (-not $skipupload) { $sd = "$d$($a.Name)$($p[1])/" & $plink -batch $user@$server mkdir $sd & $plink -batch $user@$server chgrp downloads $sd - & $plink -batch $user@$server chmod g-x,o+rx $sd + & $plink -batch $user@$server chmod o+rx $sd & $pscp -batch $msi.FullName "$user@${server}:$sd" if (-not $?) { throw "Failed to upload $msi" } & $plink -batch $user@$server chgrp downloads $sd* From webhook-mailer at python.org Mon Jan 4 16:15:01 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 04 Jan 2021 21:15:01 -0000 Subject: [Python-checkins] Do not remove x bit from published directories (GH-24101) Message-ID: https://github.com/python/cpython/commit/a87bf5fd361b61b45bdfe52731c41fa6681a0f7b commit: a87bf5fd361b61b45bdfe52731c41fa6681a0f7b branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-04T13:14:51-08:00 summary: Do not remove x bit from published directories (GH-24101) (cherry picked from commit af4cd16479f2d55bee3db899e7679d7cde1d2ab7) Co-authored-by: Steve Dower files: M Tools/msi/uploadrelease.ps1 diff --git a/Tools/msi/uploadrelease.ps1 b/Tools/msi/uploadrelease.ps1 index d3673b4582983..7c825c443f228 100644 --- a/Tools/msi/uploadrelease.ps1 +++ b/Tools/msi/uploadrelease.ps1 @@ -90,7 +90,7 @@ if (-not $skipupload) { $d = "$target/$($p[0])/" & $plink -batch $user@$server mkdir $d & $plink -batch $user@$server chgrp downloads $d - & $plink -batch $user@$server chmod g-x,o+rx $d + & $plink -batch $user@$server chmod o+rx $d & $pscp -batch $chm.FullName "$user@${server}:$d" if (-not $?) { throw "Failed to upload $chm" } @@ -115,7 +115,7 @@ if (-not $skipupload) { $sd = "$d$($a.Name)$($p[1])/" & $plink -batch $user@$server mkdir $sd & $plink -batch $user@$server chgrp downloads $sd - & $plink -batch $user@$server chmod g-x,o+rx $sd + & $plink -batch $user@$server chmod o+rx $sd & $pscp -batch $msi.FullName "$user@${server}:$sd" if (-not $?) { throw "Failed to upload $msi" } & $plink -batch $user@$server chgrp downloads $sd* From webhook-mailer at python.org Mon Jan 4 16:17:13 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 04 Jan 2021 21:17:13 -0000 Subject: [Python-checkins] Do not remove x bit from published directories (GH-24101) Message-ID: https://github.com/python/cpython/commit/def7dc3b715d92ccc3e8a6a58ac36779435e41c9 commit: def7dc3b715d92ccc3e8a6a58ac36779435e41c9 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-04T13:17:05-08:00 summary: Do not remove x bit from published directories (GH-24101) (cherry picked from commit af4cd16479f2d55bee3db899e7679d7cde1d2ab7) Co-authored-by: Steve Dower files: M Tools/msi/uploadrelease.ps1 diff --git a/Tools/msi/uploadrelease.ps1 b/Tools/msi/uploadrelease.ps1 index d3673b4582983..7c825c443f228 100644 --- a/Tools/msi/uploadrelease.ps1 +++ b/Tools/msi/uploadrelease.ps1 @@ -90,7 +90,7 @@ if (-not $skipupload) { $d = "$target/$($p[0])/" & $plink -batch $user@$server mkdir $d & $plink -batch $user@$server chgrp downloads $d - & $plink -batch $user@$server chmod g-x,o+rx $d + & $plink -batch $user@$server chmod o+rx $d & $pscp -batch $chm.FullName "$user@${server}:$d" if (-not $?) { throw "Failed to upload $chm" } @@ -115,7 +115,7 @@ if (-not $skipupload) { $sd = "$d$($a.Name)$($p[1])/" & $plink -batch $user@$server mkdir $sd & $plink -batch $user@$server chgrp downloads $sd - & $plink -batch $user@$server chmod g-x,o+rx $sd + & $plink -batch $user@$server chmod o+rx $sd & $pscp -batch $msi.FullName "$user@${server}:$sd" if (-not $?) { throw "Failed to upload $msi" } & $plink -batch $user@$server chgrp downloads $sd* From webhook-mailer at python.org Mon Jan 4 16:19:56 2021 From: webhook-mailer at python.org (pablogsal) Date: Mon, 04 Jan 2021 21:19:56 -0000 Subject: [Python-checkins] Python 3.10.0a4 Message-ID: https://github.com/python/cpython/commit/445f7f54b1dd334db6cd5999da262e3caeed492a commit: 445f7f54b1dd334db6cd5999da262e3caeed492a branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-04T17:26:00Z summary: Python 3.10.0a4 files: A Misc/NEWS.d/3.10.0a4.rst D Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst D Misc/NEWS.d/next/Build/2020-12-11-18-04-38.bpo-31904.j3j6d8.rst D Misc/NEWS.d/next/Build/2020-12-13-14-43-10.bpo-42598.7ipr5H.rst D Misc/NEWS.d/next/Build/2020-12-20-02-35-28.bpo-42604.gRd89w.rst D Misc/NEWS.d/next/Build/2020-12-22-17-57-04.bpo-27640.j3a8r0.rst D Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst D Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst D Misc/NEWS.d/next/C API/2020-10-21-18-43-06.bpo-42111.9pvtrc.rst D Misc/NEWS.d/next/C API/2020-11-22-13-46-06.bpo-1635741.-fJLzA.rst D Misc/NEWS.d/next/C API/2020-12-09-00-35-25.bpo-32381.Je08Ny.rst D Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst D Misc/NEWS.d/next/Core and Builtins/2020-05-13-18-50-27.bpo-39465.j7nl6A.rst D Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst D Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst D Misc/NEWS.d/next/Core and Builtins/2020-10-12-14-51-59.bpo-42008.ijWw2I.rst D Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst D Misc/NEWS.d/next/Core and Builtins/2020-11-19-23-12-57.bpo-40137.bihl9O.rst D Misc/NEWS.d/next/Core and Builtins/2020-11-20-00-57-47.bpo-42195.HeqcpS.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-10-17-06-52.bpo-42615.Je6Q-r.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-13-15-23-09.bpo-30858.-f9G4z.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-16-14-44-21.bpo-42246.RtIEY7.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-22-20-30-11.bpo-42246.7BrPLg.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-25-23-30-58.bpo-42745.XsFoHS.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-27-18-07-43.bpo-27794.sxgfGi.rst D Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst D Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst D Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst D Misc/NEWS.d/next/Documentation/2019-03-04-18-51-21.bpo-34398.YedUqW.rst D Misc/NEWS.d/next/Documentation/2020-12-16-21-06-16.bpo-17140.1leSEg.rst D Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst D Misc/NEWS.d/next/Library/2020-06-12-21-23-20.bpo-37193.wJximU.rst D Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst D Misc/NEWS.d/next/Library/2020-08-03-17-54-32.bpo-41462.ek38d_.rst D Misc/NEWS.d/next/Library/2020-08-11-17-44-07.bpo-31904.cb13ea.rst D Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst D Misc/NEWS.d/next/Library/2020-09-30-13-35-29.bpo-41891.pNAeYI.rst D Misc/NEWS.d/next/Library/2020-10-02-10-19-49.bpo-41907.wiIEsz.rst D Misc/NEWS.d/next/Library/2020-10-06-23-59-20.bpo-41960.icQ7Xd.rst D Misc/NEWS.d/next/Library/2020-10-17-12-42-08.bpo-42059.ZGMZ3D.rst D Misc/NEWS.d/next/Library/2020-10-20-23-28-55.bpo-1635741.Iyka3r.rst D Misc/NEWS.d/next/Library/2020-10-25-14-48-57.bpo-42090.Ubuc0j.rst D Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst D Misc/NEWS.d/next/Library/2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst D Misc/NEWS.d/next/Library/2020-11-17-22-06-15.bpo-42393.BB0oXc.rst D Misc/NEWS.d/next/Library/2020-11-20-19-00-27.bpo-34463.aJcm56.rst D Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst D Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst D Misc/NEWS.d/next/Library/2020-12-06-12-00-00.bpo-42470.iqtC4L.rst D Misc/NEWS.d/next/Library/2020-12-07-13-21-00.bpo-28964.UTQikc.rst D Misc/NEWS.d/next/Library/2020-12-08-22-43-35.bpo-42678.ba9ktU.rst D Misc/NEWS.d/next/Library/2020-12-09-10-59-16.bpo-42517.FKEVcZ.rst D Misc/NEWS.d/next/Library/2020-12-09-14-15-48.bpo-34750.x8TASR.rst D Misc/NEWS.d/next/Library/2020-12-09-15-23-28.bpo-31904.g3k5k3.rst D Misc/NEWS.d/next/Library/2020-12-09-19-45-32.bpo-42385.boGbjo.rst D Misc/NEWS.d/next/Library/2020-12-10-00-09-40.bpo-41559.1l4yjP.rst D Misc/NEWS.d/next/Library/2020-12-10-09-24-44.bpo-41877.iJSCvM.rst D Misc/NEWS.d/next/Library/2020-12-10-18-36-52.bpo-39717.sK2u0w.rst D Misc/NEWS.d/next/Library/2020-12-10-19-49-52.bpo-41877.wiVlPc.rst D Misc/NEWS.d/next/Library/2020-12-13-22-05-35.bpo-42382.2YtKo5.rst D Misc/NEWS.d/next/Library/2020-12-14-08-23-57.bpo-36541.qdEtZv.rst D Misc/NEWS.d/next/Library/2020-12-14-22-31-22.bpo-42639.5Z3iWX.rst D Misc/NEWS.d/next/Library/2020-12-15-10-00-04.bpo-42644.XgLCNx.rst D Misc/NEWS.d/next/Library/2020-12-15-15-14-29.bpo-42639.uJ3h8I.rst D Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst D Misc/NEWS.d/next/Library/2020-12-16-16-16-33.bpo-37961.jrESEq.rst D Misc/NEWS.d/next/Library/2020-12-16-23-28-52.bpo-1635741.Quy3zn.rst D Misc/NEWS.d/next/Library/2020-12-19-12-33-38.bpo-9694.CkKK9V.rst D Misc/NEWS.d/next/Library/2020-12-19-17-32-43.bpo-42685.kwZlwp.rst D Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst D Misc/NEWS.d/next/Library/2020-12-21-22-59-26.bpo-15303.zozVrq.rst D Misc/NEWS.d/next/Library/2020-12-21-23-34-57.bpo-35728.9m-azF.rst D Misc/NEWS.d/next/Library/2020-12-22-13-16-43.bpo-25246.GhhCTl.rst D Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst D Misc/NEWS.d/next/Library/2020-12-23-15-16-12.bpo-38308.lB4Sv0.rst D Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst D Misc/NEWS.d/next/Library/2020-12-25-12-32-47.bpo-42655.W5ytpV.rst D Misc/NEWS.d/next/Library/2020-12-25-23-23-11.bpo-42740.F0rQ_E.rst D Misc/NEWS.d/next/Library/2020-12-27-18-47-01.bpo-23328._xqepZ.rst D Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst D Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst D Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst D Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst D Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst D Misc/NEWS.d/next/Tests/2020-07-30-18-06-15.bpo-31904.y3d8dk.rst D Misc/NEWS.d/next/Tests/2020-07-30-18-43-05.bpo-41443.834gyg.rst D Misc/NEWS.d/next/Tests/2020-10-29-21-26-46.bpo-42199.KksGCV.rst D Misc/NEWS.d/next/Tests/2020-12-09-15-23-28.bpo-31904.ghj38d.rst D Misc/NEWS.d/next/Tests/2020-12-15-17-38-04.bpo-42641.uzwlF_.rst D Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst D Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst D Misc/NEWS.d/next/Tools-Demos/2020-12-16-09-10-32.bpo-42613.J-jnm5.rst D Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst D Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst D Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst D Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst M Include/patchlevel.h M Lib/pydoc_data/topics.py M README.rst diff --git a/Include/patchlevel.h b/Include/patchlevel.h index 1af225ca0936b..691362a532c60 100644 --- a/Include/patchlevel.h +++ b/Include/patchlevel.h @@ -20,10 +20,10 @@ #define PY_MINOR_VERSION 10 #define PY_MICRO_VERSION 0 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA -#define PY_RELEASE_SERIAL 3 +#define PY_RELEASE_SERIAL 4 /* Version as a string */ -#define PY_VERSION "3.10.0a3+" +#define PY_VERSION "3.10.0a4" /*--end constants--*/ /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py index 49630bb4b81d7..93d2ddfba5d04 100644 --- a/Lib/pydoc_data/topics.py +++ b/Lib/pydoc_data/topics.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Autogenerated by Sphinx on Mon Dec 7 19:34:00 2020 +# Autogenerated by Sphinx on Mon Jan 4 17:25:50 2021 topics = {'assert': 'The "assert" statement\n' '**********************\n' '\n' @@ -461,13 +461,12 @@ '\n' ' async_for_stmt ::= "async" for_stmt\n' '\n' - 'An *asynchronous iterable* is able to call asynchronous code in ' - 'its\n' - '*iter* implementation, and *asynchronous iterator* can call\n' - 'asynchronous code in its *next* method.\n' + 'An *asynchronous iterable* provides an "__aiter__" method that\n' + 'directly returns an *asynchronous iterator*, which can call\n' + 'asynchronous code in its "__anext__" method.\n' '\n' 'The "async for" statement allows convenient iteration over\n' - 'asynchronous iterators.\n' + 'asynchronous iterables.\n' '\n' 'The following code:\n' '\n' @@ -2383,8 +2382,9 @@ 'compatible\n' 'with an exception if it is the class or a base class of the ' 'exception\n' - 'object or a tuple containing an item compatible with the ' - 'exception.\n' + 'object, or a tuple containing an item that is the class or a ' + 'base\n' + 'class of the exception object.\n' '\n' 'If no except clause matches the exception, the search for an ' 'exception\n' @@ -2451,11 +2451,32 @@ '(see\n' 'section The standard type hierarchy) identifying the point in ' 'the\n' - 'program where the exception occurred. "sys.exc_info()" values ' - 'are\n' - 'restored to their previous values (before the call) when ' - 'returning\n' - 'from a function that handled an exception.\n' + 'program where the exception occurred. The details about the ' + 'exception\n' + 'accessed via "sys.exc_info()" are restored to their previous ' + 'values\n' + 'when leaving an exception handler:\n' + '\n' + ' >>> print(sys.exc_info())\n' + ' (None, None, None)\n' + ' >>> try:\n' + ' ... raise TypeError\n' + ' ... except:\n' + ' ... print(sys.exc_info())\n' + ' ... try:\n' + ' ... raise ValueError\n' + ' ... except:\n' + ' ... print(sys.exc_info())\n' + ' ... print(sys.exc_info())\n' + ' ...\n' + " (, TypeError(), )\n' + " (, ValueError(), )\n' + " (, TypeError(), )\n' + ' >>> print(sys.exc_info())\n' + ' (None, None, None)\n' '\n' 'The optional "else" clause is executed if the control flow ' 'leaves the\n' @@ -2985,13 +3006,12 @@ '\n' ' async_for_stmt ::= "async" for_stmt\n' '\n' - 'An *asynchronous iterable* is able to call asynchronous code in ' - 'its\n' - '*iter* implementation, and *asynchronous iterator* can call\n' - 'asynchronous code in its *next* method.\n' + 'An *asynchronous iterable* provides an "__aiter__" method that\n' + 'directly returns an *asynchronous iterator*, which can call\n' + 'asynchronous code in its "__anext__" method.\n' '\n' 'The "async for" statement allows convenient iteration over\n' - 'asynchronous iterators.\n' + 'asynchronous iterables.\n' '\n' 'The following code:\n' '\n' @@ -5524,44 +5544,51 @@ ' | | formats the result in either fixed-point ' 'format or in |\n' ' | | scientific notation, depending on its ' - 'magnitude. The |\n' - ' | | precise rules are as follows: suppose that ' - 'the result |\n' + 'magnitude. A |\n' + ' | | precision of "0" is treated as equivalent ' + 'to a precision |\n' + ' | | of "1". The precise rules are as follows: ' + 'suppose that |\n' + ' | | the result formatted with presentation ' + 'type "\'e\'" and |\n' + ' | | precision "p-1" would have exponent ' + '"exp". Then, if "m <= |\n' + ' | | exp < p", where "m" is -4 for floats and ' + '-6 for |\n' + ' | | "Decimals", the number is formatted with ' + 'presentation type |\n' + ' | | "\'f\'" and precision "p-1-exp". ' + 'Otherwise, the number is |\n' ' | | formatted with presentation type "\'e\'" ' - 'and precision "p-1" |\n' - ' | | would have exponent "exp". Then, if "m <= ' - 'exp < p", where |\n' - ' | | "m" is -4 for floats and -6 for ' - '"Decimals", the number is |\n' - ' | | formatted with presentation type "\'f\'" ' 'and precision |\n' - ' | | "p-1-exp". Otherwise, the number is ' - 'formatted with |\n' - ' | | presentation type "\'e\'" and precision ' - '"p-1". In both cases |\n' - ' | | insignificant trailing zeros are removed ' - 'from the |\n' - ' | | significand, and the decimal point is also ' - 'removed if |\n' - ' | | there are no remaining digits following ' - 'it, unless the |\n' - ' | | "\'#\'" option is used. Positive and ' - 'negative infinity, |\n' - ' | | positive and negative zero, and nans, are ' - 'formatted as |\n' - ' | | "inf", "-inf", "0", "-0" and "nan" ' - 'respectively, |\n' - ' | | regardless of the precision. A precision ' - 'of "0" is |\n' - ' | | treated as equivalent to a precision of ' - '"1". With no |\n' - ' | | precision given, uses a precision of "6" ' - 'significant |\n' - ' | | digits for "float", and shows all ' - 'coefficient digits for |\n' - ' | | ' - '"Decimal". ' - '|\n' + ' | | "p-1". In both cases insignificant ' + 'trailing zeros are |\n' + ' | | removed from the significand, and the ' + 'decimal point is |\n' + ' | | also removed if there are no remaining ' + 'digits following |\n' + ' | | it, unless the "\'#\'" option is used. ' + 'With no precision |\n' + ' | | given, uses a precision of "6" significant ' + 'digits for |\n' + ' | | "float". For "Decimal", the coefficient of ' + 'the result is |\n' + ' | | formed from the coefficient digits of the ' + 'value; |\n' + ' | | scientific notation is used for values ' + 'smaller than "1e-6" |\n' + ' | | in absolute value and values where the ' + 'place value of the |\n' + ' | | least significant digit is larger than 1, ' + 'and fixed-point |\n' + ' | | notation is used otherwise. Positive and ' + 'negative |\n' + ' | | infinity, positive and negative zero, and ' + 'nans, are |\n' + ' | | formatted as "inf", "-inf", "0", "-0" and ' + '"nan" |\n' + ' | | respectively, regardless of the ' + 'precision. |\n' ' ' '+-----------+------------------------------------------------------------+\n' ' | "\'G\'" | General format. Same as "\'g\'" except ' @@ -5586,19 +5613,24 @@ 'percent sign. |\n' ' ' '+-----------+------------------------------------------------------------+\n' - ' | None | Similar to "\'g\'", except that ' - 'fixed-point notation, when |\n' - ' | | used, has at least one digit past the ' - 'decimal point. The |\n' - ' | | default precision is as high as needed to ' - 'represent the |\n' - ' | | particular value. The overall effect is to ' - 'match the |\n' - ' | | output of "str()" as altered by the other ' - 'format |\n' - ' | | ' - 'modifiers. ' - '|\n' + ' | None | For "float" this is the same as "\'g\'", ' + 'except that when |\n' + ' | | fixed-point notation is used to format the ' + 'result, it |\n' + ' | | always includes at least one digit past ' + 'the decimal point. |\n' + ' | | The precision used is as large as needed ' + 'to represent the |\n' + ' | | given value faithfully. For "Decimal", ' + 'this is the same |\n' + ' | | as either "\'g\'" or "\'G\'" depending on ' + 'the value of |\n' + ' | | "context.capitals" for the current decimal ' + 'context. The |\n' + ' | | overall effect is to match the output of ' + '"str()" as |\n' + ' | | altered by the other format ' + 'modifiers. |\n' ' ' '+-----------+------------------------------------------------------------+\n' '\n' @@ -5972,8 +6004,10 @@ '\n' 'Names listed in a "global" statement must not be defined as ' 'formal\n' - 'parameters or in a "for" loop control target, "class" definition,\n' - 'function definition, "import" statement, or variable annotation.\n' + 'parameters, or as targets in "with" statements or "except" ' + 'clauses, or\n' + 'in a "for" target list, "class" definition, function definition,\n' + '"import" statement, or variable annotation.\n' '\n' '**CPython implementation detail:** The current implementation does ' 'not\n' @@ -7925,7 +7959,7 @@ 'immediate\n' ' subclasses. This method returns a list of all those ' 'references\n' - ' still alive. Example:\n' + ' still alive. The list is in definition order. Example:\n' '\n' ' >>> int.__subclasses__()\n' " []\n" @@ -11224,7 +11258,8 @@ 'object is ?compatible? with the exception. An object is compatible\n' 'with an exception if it is the class or a base class of the ' 'exception\n' - 'object or a tuple containing an item compatible with the exception.\n' + 'object, or a tuple containing an item that is the class or a base\n' + 'class of the exception object.\n' '\n' 'If no except clause matches the exception, the search for an ' 'exception\n' @@ -11279,9 +11314,31 @@ 'the\n' 'exception class, the exception instance and a traceback object (see\n' 'section The standard type hierarchy) identifying the point in the\n' - 'program where the exception occurred. "sys.exc_info()" values are\n' - 'restored to their previous values (before the call) when returning\n' - 'from a function that handled an exception.\n' + 'program where the exception occurred. The details about the ' + 'exception\n' + 'accessed via "sys.exc_info()" are restored to their previous values\n' + 'when leaving an exception handler:\n' + '\n' + ' >>> print(sys.exc_info())\n' + ' (None, None, None)\n' + ' >>> try:\n' + ' ... raise TypeError\n' + ' ... except:\n' + ' ... print(sys.exc_info())\n' + ' ... try:\n' + ' ... raise ValueError\n' + ' ... except:\n' + ' ... print(sys.exc_info())\n' + ' ... print(sys.exc_info())\n' + ' ...\n' + " (, TypeError(), )\n' + " (, ValueError(), )\n' + " (, TypeError(), )\n' + ' >>> print(sys.exc_info())\n' + ' (None, None, None)\n' '\n' 'The optional "else" clause is executed if the control flow leaves ' 'the\n' @@ -11445,7 +11502,6 @@ ' There are two types of integers:\n' '\n' ' Integers ("int")\n' - '\n' ' These represent numbers in an unlimited range, subject to\n' ' available (virtual) memory only. For the purpose of ' 'shift\n' diff --git a/Misc/NEWS.d/3.10.0a4.rst b/Misc/NEWS.d/3.10.0a4.rst new file mode 100644 index 0000000000000..882e03d82169a --- /dev/null +++ b/Misc/NEWS.d/3.10.0a4.rst @@ -0,0 +1,995 @@ +.. bpo: 42814 +.. date: 2021-01-03-04-41-25 +.. nonce: sDvVbb +.. release date: 2021-01-04 +.. section: Core and Builtins + +Fix undefined behavior in ``Objects/genericaliasobject.c``. + +.. + +.. bpo: 42806 +.. date: 2021-01-03-00-20-38 +.. nonce: mLAobJ +.. section: Core and Builtins + +Fix the column offsets for f-strings :mod:`ast` nodes surrounded by +parentheses and for nodes that spawn multiple lines. Patch by Pablo Galindo. + +.. + +.. bpo: 40631 +.. date: 2020-12-31-20-58-22 +.. nonce: deRMCx +.. section: Core and Builtins + +Fix regression where a single parenthesized starred expression was a valid +assignment target. + +.. + +.. bpo: 27794 +.. date: 2020-12-27-18-07-43 +.. nonce: sxgfGi +.. section: Core and Builtins + +Improve the error message for failed writes/deletes to property objects. +When possible, the attribute name is now shown. Patch provided by Yurii +Karabas. + +.. + +.. bpo: 42745 +.. date: 2020-12-25-23-30-58 +.. nonce: XsFoHS +.. section: Core and Builtins + +Make the type attribute lookup cache per-interpreter. Patch by Victor +Stinner. + +.. + +.. bpo: 42246 +.. date: 2020-12-22-20-30-11 +.. nonce: 7BrPLg +.. section: Core and Builtins + +Jumps to jumps are not eliminated when it would break PEP 626. + +.. + +.. bpo: 42246 +.. date: 2020-12-16-14-44-21 +.. nonce: RtIEY7 +.. section: Core and Builtins + +Make sure that the ``f_lasti`` and ``f_lineno`` attributes of a frame are +set correctly when an exception is raised or re-raised. Required for PEP +626. + +.. + +.. bpo: 32381 +.. date: 2020-12-15-18-43-43 +.. nonce: 3tIofL +.. section: Core and Builtins + +The coding cookie (ex: ``# coding: latin1``) is now ignored in the command +passed to the :option:`-c` command line option. Patch by Victor Stinner. + +.. + +.. bpo: 30858 +.. date: 2020-12-13-15-23-09 +.. nonce: -f9G4z +.. section: Core and Builtins + +Improve error location in expressions that contain assignments. Patch by +Pablo Galindo and Lysandros Nikolaou. + +.. + +.. bpo: 42615 +.. date: 2020-12-10-17-06-52 +.. nonce: Je6Q-r +.. section: Core and Builtins + +Remove jump commands made redundant by the deletion of unreachable bytecode +blocks + +.. + +.. bpo: 42639 +.. date: 2020-12-09-01-55-10 +.. nonce: 5pI5HG +.. section: Core and Builtins + +Make the :mod:`atexit` module state per-interpreter. It is now safe have +more than one :mod:`atexit` module instance. Patch by Dong-hee Na and Victor +Stinner. + +.. + +.. bpo: 32381 +.. date: 2020-12-04-17-17-44 +.. nonce: NY5t2S +.. section: Core and Builtins + +Fix encoding name when running a ``.pyc`` file on Windows: +:c:func:`PyRun_SimpleFileExFlags()` now uses the correct encoding to decode +the filename. + +.. + +.. bpo: 42195 +.. date: 2020-11-20-00-57-47 +.. nonce: HeqcpS +.. section: Core and Builtins + +The ``__args__`` of the parameterized generics for :data:`typing.Callable` +and :class:`collections.abc.Callable` are now consistent. The ``__args__`` +for :class:`collections.abc.Callable` are now flattened while +:data:`typing.Callable`'s have not changed. To allow this change, +:class:`types.GenericAlias` can now be subclassed and +``collections.abc.Callable``'s ``__class_getitem__`` will now return a +subclass of ``types.GenericAlias``. Tests for typing were also updated to +not subclass things like ``Callable[..., T]`` as that is not a valid base +class. Finally, both ``Callable``\ s no longer validate their ``argtypes``, +in ``Callable[[argtypes], resulttype]`` to prepare for :pep:`612`. Patch by +Ken Jin. + +.. + +.. bpo: 40137 +.. date: 2020-11-19-23-12-57 +.. nonce: bihl9O +.. section: Core and Builtins + +Convert functools module to use :c:func:`PyType_FromModuleAndSpec`. + +.. + +.. bpo: 40077 +.. date: 2020-11-03-13-46-10 +.. nonce: NfAIdj +.. section: Core and Builtins + +Convert :mod:`array` to use heap types, and establish module state for +these. + +.. + +.. bpo: 42008 +.. date: 2020-10-12-14-51-59 +.. nonce: ijWw2I +.. section: Core and Builtins + +Fix _random.Random() seeding. + +.. + +.. bpo: 1635741 +.. date: 2020-09-12-19-21-52 +.. nonce: F2kDrU +.. section: Core and Builtins + +Port the :mod:`pyexpat` extension module to multi-phase initialization +(:pep:`489`). + +.. + +.. bpo: 40521 +.. date: 2020-05-14-02-55-39 +.. nonce: dIlXsZ +.. section: Core and Builtins + +Make the Unicode dictionary of interned strings compatible with +subinterpreters. Patch by Victor Stinner. + +.. + +.. bpo: 39465 +.. date: 2020-05-13-18-50-27 +.. nonce: j7nl6A +.. section: Core and Builtins + +Make :c:func:`_PyUnicode_FromId` function compatible with subinterpreters. +Each interpreter now has an array of identifier objects (interned strings +decoded from UTF-8). Patch by Victor Stinner. + +.. + +.. bpo: 42257 +.. date: 2020-12-31-23-05-53 +.. nonce: ALQy7B +.. section: Library + +Handle empty string in variable executable in platform.libc_ver() + +.. + +.. bpo: 42772 +.. date: 2020-12-30-17-16-43 +.. nonce: Xe7WFV +.. section: Library + +randrange() now raises a TypeError when step is specified without a stop +argument. Formerly, it silently ignored the step argument. + +.. + +.. bpo: 42759 +.. date: 2020-12-27-22-19-26 +.. nonce: lGi_03 +.. section: Library + +Fixed equality comparison of :class:`tkinter.Variable` and +:class:`tkinter.font.Font`. Objects which belong to different Tcl +interpreters are now always different, even if they have the same name. + +.. + +.. bpo: 42756 +.. date: 2020-12-27-21-22-01 +.. nonce: dHMPJ9 +.. section: Library + +Configure LMTP Unix-domain socket to use socket global default timeout when +a timeout is not explicitly provided. + +.. + +.. bpo: 23328 +.. date: 2020-12-27-18-47-01 +.. nonce: _xqepZ +.. section: Library + +Allow / character in username, password fields on _PROXY envars. + +.. + +.. bpo: 42740 +.. date: 2020-12-25-23-23-11 +.. nonce: F0rQ_E +.. section: Library + +:func:`typing.get_args` and :func:`typing.get_origin` now support :pep:`604` +union types and :pep:`612` additions to ``Callable``. + +.. + +.. bpo: 42655 +.. date: 2020-12-25-12-32-47 +.. nonce: W5ytpV +.. section: Library + +:mod:`subprocess` *extra_groups* is now correctly passed into setgroups() +system call. + +.. + +.. bpo: 42727 +.. date: 2020-12-23-19-43-06 +.. nonce: WH3ODh +.. section: Library + +``EnumMeta.__prepare__`` now accepts ``**kwds`` to properly support +``__init_subclass__`` + +.. + +.. bpo: 38308 +.. date: 2020-12-23-15-16-12 +.. nonce: lB4Sv0 +.. section: Library + +Add optional *weights* to *statistics.harmonic_mean()*. + +.. + +.. bpo: 42721 +.. date: 2020-12-22-22-47-22 +.. nonce: I5Ai5L +.. section: Library + +When simple query dialogs (:mod:`tkinter.simpledialog`), message boxes +(:mod:`tkinter.messagebox`) or color choose dialog +(:mod:`tkinter.colorchooser`) are created without arguments *master* and +*parent*, and the default root window is not yet created, and +:func:`~tkinter.NoDefaultRoot` was not called, a new temporal hidden root +window will be created automatically. It will not be set as the default root +window and will be destroyed right after closing the dialog window. It will +help to use these simple dialog windows in programs which do not need other +GUI. + +.. + +.. bpo: 25246 +.. date: 2020-12-22-13-16-43 +.. nonce: GhhCTl +.. section: Library + +Optimized :meth:`collections.deque.remove`. + +.. + +.. bpo: 35728 +.. date: 2020-12-21-23-34-57 +.. nonce: 9m-azF +.. section: Library + +Added a root parameter to :func:`tkinter.font.nametofont`. + +.. + +.. bpo: 15303 +.. date: 2020-12-21-22-59-26 +.. nonce: zozVrq +.. section: Library + +:mod:`tkinter` supports now widgets with boolean value False. + +.. + +.. bpo: 42681 +.. date: 2020-12-20-22-50-15 +.. nonce: lDO6jb +.. section: Library + +Fixed range checks for color and pair numbers in :mod:`curses`. + +.. + +.. bpo: 42685 +.. date: 2020-12-19-17-32-43 +.. nonce: kwZlwp +.. section: Library + +Improved placing of simple query windows in Tkinter (such as +:func:`tkinter.simpledialog.askinteger`). They are now centered at the +center of the parent window if it is specified and shown, otherwise at the +center of the screen. + +.. + +.. bpo: 9694 +.. date: 2020-12-19-12-33-38 +.. nonce: CkKK9V +.. section: Library + +Argparse help no longer uses the confusing phrase, "optional arguments". It +uses "options" instead. + +.. + +.. bpo: 1635741 +.. date: 2020-12-16-23-28-52 +.. nonce: Quy3zn +.. section: Library + +Port the :mod:`_thread` extension module to the multiphase initialization +API (:pep:`489`) and convert its static types to heap types. + +.. + +.. bpo: 37961 +.. date: 2020-12-16-16-16-33 +.. nonce: jrESEq +.. section: Library + +Fix crash in :func:`tracemalloc.Traceback.__repr__` (regressed in Python +3.9). + +.. + +.. bpo: 42630 +.. date: 2020-12-15-17-51-27 +.. nonce: jf4jBl +.. section: Library + +:mod:`tkinter` functions and constructors which need a default root window +raise now :exc:`RuntimeError` with descriptive message instead of obscure +:exc:`AttributeError` or :exc:`NameError` if it is not created yet or cannot +be created automatically. + +.. + +.. bpo: 42639 +.. date: 2020-12-15-15-14-29 +.. nonce: uJ3h8I +.. section: Library + +:func:`atexit._run_exitfuncs` now logs callback exceptions using +:data:`sys.unraisablehook`, rather than logging them directly into +:data:`sys.stderr` and raise the last exception. + +.. + +.. bpo: 42644 +.. date: 2020-12-15-10-00-04 +.. nonce: XgLCNx +.. section: Library + +``logging.disable`` will now validate the types and value of its parameter. +It also now accepts strings representing the levels (as does +``loging.setLevel``) instead of only the numerical values. + +.. + +.. bpo: 42639 +.. date: 2020-12-14-22-31-22 +.. nonce: 5Z3iWX +.. section: Library + +At Python exit, if a callback registered with :func:`atexit.register` fails, +its exception is now logged. Previously, only some exceptions were logged, +and the last exception was always silently ignored. + +.. + +.. bpo: 36541 +.. date: 2020-12-14-08-23-57 +.. nonce: qdEtZv +.. section: Library + +Fixed lib2to3.pgen2 to be able to parse PEP-570 positional only argument +syntax. + +.. + +.. bpo: 42382 +.. date: 2020-12-13-22-05-35 +.. nonce: 2YtKo5 +.. section: Library + +In ``importlib.metadata``: - ``EntryPoint`` objects now expose a ``.dist`` +object referencing the ``Distribution`` when constructed from a +``Distribution``. - Add support for package discovery under package +normalization rules. - The object returned by ``metadata()`` now has a +formally-defined protocol called ``PackageMetadata`` with declared support +for the ``.get_all()`` method. - Synced with importlib_metadata 3.3. + +.. + +.. bpo: 41877 +.. date: 2020-12-10-19-49-52 +.. nonce: wiVlPc +.. section: Library + +A check is added against misspellings of autospect, auto_spec and set_spec +being passed as arguments to patch, patch.object and create_autospec. + +.. + +.. bpo: 39717 +.. date: 2020-12-10-18-36-52 +.. nonce: sK2u0w +.. section: Library + +[tarfile] update nested exception raising to use ``from None`` or ``from e`` + +.. + +.. bpo: 41877 +.. date: 2020-12-10-09-24-44 +.. nonce: iJSCvM +.. section: Library + +AttributeError for suspected misspellings of assertions on mocks are now +pointing out that the cause are misspelled assertions and also what to do if +the misspelling is actually an intended attribute name. The unittest.mock +document is also updated to reflect the current set of recognised +misspellings. + +.. + +.. bpo: 41559 +.. date: 2020-12-10-00-09-40 +.. nonce: 1l4yjP +.. section: Library + +Implemented :pep:`612`: added ``ParamSpec`` and ``Concatenate`` to +:mod:`typing`. Patch by Ken Jin. + +.. + +.. bpo: 42385 +.. date: 2020-12-09-19-45-32 +.. nonce: boGbjo +.. section: Library + +StrEnum: fix _generate_next_value_ to return a str + +.. + +.. bpo: 31904 +.. date: 2020-12-09-15-23-28 +.. nonce: g3k5k3 +.. section: Library + +Define THREAD_STACK_SIZE for VxWorks. + +.. + +.. bpo: 34750 +.. date: 2020-12-09-14-15-48 +.. nonce: x8TASR +.. section: Library + +[Enum] `_EnumDict.update()` is now supported + +.. + +.. bpo: 42517 +.. date: 2020-12-09-10-59-16 +.. nonce: FKEVcZ +.. section: Library + +Enum: private names do not become members / do not generate errors -- they +remain normal attributes + +.. + +.. bpo: 42678 +.. date: 2020-12-08-22-43-35 +.. nonce: ba9ktU +.. section: Library + +``Enum``: call ``__init_subclass__`` after members have been added + +.. + +.. bpo: 28964 +.. date: 2020-12-07-13-21-00 +.. nonce: UTQikc +.. section: Library + +:func:`ast.literal_eval` adds line number information (if available) in +error message for malformed nodes. + +.. + +.. bpo: 42470 +.. date: 2020-12-06-12-00-00 +.. nonce: iqtC4L +.. section: Library + +:func:`random.sample` no longer warns on a sequence which is also a set. + +.. + +.. bpo: 31904 +.. date: 2020-11-27-18-09-59 +.. nonce: g8k43d +.. section: Library + +:func:`posixpath.expanduser` returns the input *path* unchanged if user home +directory is None on VxWorks. + +.. + +.. bpo: 42388 +.. date: 2020-11-22-11-22-28 +.. nonce: LMgM6B +.. section: Library + +Fix subprocess.check_output(..., input=None) behavior when text=True to be +consistent with that of the documentation and universal_newlines=True. + +.. + +.. bpo: 34463 +.. date: 2020-11-20-19-00-27 +.. nonce: aJcm56 +.. section: Library + +Fixed discrepancy between :mod:`traceback` and the interpreter in formatting +of SyntaxError with lineno not set (:mod:`traceback` was changed to match +interpreter). + +.. + +.. bpo: 42393 +.. date: 2020-11-17-22-06-15 +.. nonce: BB0oXc +.. section: Library + +Raise :exc:`OverflowError` instead of silent truncation in +:meth:`socket.ntohs` and :meth:`socket.htons`. Silent truncation was +deprecated in Python 3.7. Patch by Erlend E. Aasland + +.. + +.. bpo: 42222 +.. date: 2020-10-31-10-28-32 +.. nonce: Cfl1eR +.. section: Library + +Harmonized random.randrange() argument handling to match range(). + +* The integer test and conversion in randrange() now uses + operator.index(). +* Non-integer arguments to randrange() are deprecated. +* The *ValueError* is deprecated in favor of a *TypeError*. +* It now runs a little faster than before. + +(Contributed by Raymond Hettinger and Serhiy Storchaka.) + +.. + +.. bpo: 42163 +.. date: 2020-10-29-09-22-56 +.. nonce: O4VcCY +.. section: Library + +Restore compatibility for ``uname_result`` around deepcopy and _replace. + +.. + +.. bpo: 42090 +.. date: 2020-10-25-14-48-57 +.. nonce: Ubuc0j +.. section: Library + +``zipfile.Path.joinpath`` now accepts arbitrary arguments, same as +``pathlib.Path.joinpath``. + +.. + +.. bpo: 1635741 +.. date: 2020-10-20-23-28-55 +.. nonce: Iyka3r +.. section: Library + +Port the _csv module to the multi-phase initialization API (:pep:`489`). + +.. + +.. bpo: 42059 +.. date: 2020-10-17-12-42-08 +.. nonce: ZGMZ3D +.. section: Library + +:class:`typing.TypedDict` types created using the alternative call-style +syntax now correctly respect the ``total`` keyword argument when setting +their ``__required_keys__`` and ``__optional_keys__`` class attributes. + +.. + +.. bpo: 41960 +.. date: 2020-10-06-23-59-20 +.. nonce: icQ7Xd +.. section: Library + +Add ``globalns`` and ``localns`` parameters to the :func:`inspect.signature` +and :meth:`inspect.Signature.from_callable`. + +.. + +.. bpo: 41907 +.. date: 2020-10-02-10-19-49 +.. nonce: wiIEsz +.. section: Library + +fix ``format()`` behavior for ``IntFlag`` + +.. + +.. bpo: 41891 +.. date: 2020-09-30-13-35-29 +.. nonce: pNAeYI +.. section: Library + +Ensure asyncio.wait_for waits for task completion + +.. + +.. bpo: 24792 +.. date: 2020-09-11-16-07-00 +.. nonce: Z-ARra +.. section: Library + +Fixed bug where :mod:`zipimporter` sometimes reports an incorrect cause of +import errors. + +.. + +.. bpo: 31904 +.. date: 2020-08-11-17-44-07 +.. nonce: cb13ea +.. section: Library + +Fix site and sysconfig modules for VxWorks RTOS which has no home +directories. + +.. + +.. bpo: 41462 +.. date: 2020-08-03-17-54-32 +.. nonce: ek38d_ +.. section: Library + +Add :func:`os.set_blocking()` support for VxWorks RTOS. + +.. + +.. bpo: 40219 +.. date: 2020-07-13-19-43-11 +.. nonce: MUoJEP +.. section: Library + +Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to prevent hiding +part of the content label. + +.. + +.. bpo: 37193 +.. date: 2020-06-12-21-23-20 +.. nonce: wJximU +.. section: Library + +Fixed memory leak in ``socketserver.ThreadingMixIn`` introduced in Python +3.7. + +.. + +.. bpo: 39068 +.. date: 2019-12-16-17-55-31 +.. nonce: Ti3f9P +.. section: Library + +Fix initialization race condition in :func:`a85encode` and :func:`b85encode` +in :mod:`base64`. Patch by Brandon Stansbury. + +.. + +.. bpo: 17140 +.. date: 2020-12-16-21-06-16 +.. nonce: 1leSEg +.. section: Documentation + +Add documentation for the :class:`multiprocessing.pool.ThreadPool` class. + +.. + +.. bpo: 34398 +.. date: 2019-03-04-18-51-21 +.. nonce: YedUqW +.. section: Documentation + +Prominently feature listings from the glossary in documentation search +results. Patch by Ammar Askar. + +.. + +.. bpo: 42794 +.. date: 2021-01-01-08-52-36 +.. nonce: -7-XGz +.. section: Tests + +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. + +.. + +.. bpo: 31904 +.. date: 2020-12-17-15-42-44 +.. nonce: d8g3l0d5 +.. section: Tests + +Skip some asyncio tests on VxWorks. + +.. + +.. bpo: 42641 +.. date: 2020-12-15-17-38-04 +.. nonce: uzwlF_ +.. section: Tests + +Enhance ``test_select.test_select()``: it now takes 500 ms rather than 10 +seconds. Use Python rather than a shell to make the test more portable. + +.. + +.. bpo: 31904 +.. date: 2020-12-09-15-23-28 +.. nonce: ghj38d +.. section: Tests + +Skip some tests in _test_all_chown_common() on VxWorks. + +.. + +.. bpo: 42199 +.. date: 2020-10-29-21-26-46 +.. nonce: KksGCV +.. section: Tests + +Fix bytecode helper assertNotInBytecode. + +.. + +.. bpo: 41443 +.. date: 2020-07-30-18-43-05 +.. nonce: 834gyg +.. section: Tests + +Add more attribute checking in test_posix.py + +.. + +.. bpo: 31904 +.. date: 2020-07-30-18-06-15 +.. nonce: y3d8dk +.. section: Tests + +Disable os.popen and impacted tests on VxWorks + +.. + +.. bpo: 41439 +.. date: 2020-07-30-14-08-58 +.. nonce: yhteoi +.. section: Tests + +Port test_ssl and test_uuid to VxWorks RTOS. + +.. + +.. bpo: 42692 +.. date: 2021-01-04-05-07-30 +.. nonce: OO11SN +.. section: Build + +Fix __builtin_available check on older compilers. Patch by Joshua Root. + +.. + +.. bpo: 27640 +.. date: 2020-12-22-17-57-04 +.. nonce: j3a8r0 +.. section: Build + +Added ``--disable-test-modules`` option to the ``configure`` script: don't +build nor install test modules. Patch by Xavier de Gaye, Thomas Petazzoni +and Peixing Xin. + +.. + +.. bpo: 42604 +.. date: 2020-12-20-02-35-28 +.. nonce: gRd89w +.. section: Build + +Now all platforms use a value for the "EXT_SUFFIX" build variable derived +from SOABI (for instance in freeBSD, "EXT_SUFFIX" is now ".cpython-310d.so" +instead of ".so"). Previosuly only Linux, Mac and VxWorks were using a value +for "EXT_SUFFIX" that included "SOABI". + +.. + +.. bpo: 42598 +.. date: 2020-12-13-14-43-10 +.. nonce: 7ipr5H +.. section: Build + +Fix implicit function declarations in configure which could have resulted in +incorrect configuration checks. Patch contributed by Joshua Root. + +.. + +.. bpo: 31904 +.. date: 2020-12-11-18-04-38 +.. nonce: j3j6d8 +.. section: Build + +Enable libpython3.so for VxWorks. + +.. + +.. bpo: 29076 +.. date: 2020-02-28-14-33-15 +.. nonce: Gtixi5 +.. section: Build + +Add fish shell support to macOS installer. + +.. + +.. bpo: 42361 +.. date: 2021-01-04-01-17-17 +.. nonce: eolZAi +.. section: macOS + +Update macOS installer build to use Tcl/Tk 8.6.11 (rc2, expected to be final +release). + +.. + +.. bpo: 41837 +.. date: 2021-01-04-00-48-08 +.. nonce: dX-unJ +.. section: macOS + +Update macOS installer build to use OpenSSL 1.1.1i. + +.. + +.. bpo: 42584 +.. date: 2020-12-07-11-37-35 +.. nonce: LygmqQ +.. section: macOS + +Update macOS installer to use SQLite 3.34.0. + +.. + +.. bpo: 42726 +.. date: 2020-12-23-19-42-11 +.. nonce: a5EkTv +.. section: Tools/Demos + +Fixed Python 3 compatibility issue with gdb/libpython.py handling of +attribute dictionaries. + +.. + +.. bpo: 42613 +.. date: 2020-12-16-09-10-32 +.. nonce: J-jnm5 +.. section: Tools/Demos + +Fix ``freeze.py`` tool to use the prope config and library directories. +Patch by Victor Stinner. + +.. + +.. bpo: 42591 +.. date: 2020-12-10-10-43-03 +.. nonce: CXNY8G +.. section: C API + +Export the :c:func:`Py_FrozenMain` function: fix a Python 3.9.0 regression. +Python 3.9 uses ``-fvisibility=hidden`` and the function was not exported +explicitly and so not exported. + +.. + +.. bpo: 32381 +.. date: 2020-12-09-00-35-25 +.. nonce: Je08Ny +.. section: C API + +Remove the private :c:func:`_Py_fopen` function which is no longer needed. +Use :c:func:`_Py_wfopen` or :c:func:`_Py_fopen_obj` instead. Patch by Victor +Stinner. + +.. + +.. bpo: 1635741 +.. date: 2020-11-22-13-46-06 +.. nonce: -fJLzA +.. section: C API + +Port :mod:`resource` extension module to module state + +.. + +.. bpo: 42111 +.. date: 2020-10-21-18-43-06 +.. nonce: 9pvtrc +.. section: C API + +Update the ``xxlimited`` module to be a better example of how to use the +limited C API. + +.. + +.. bpo: 40052 +.. date: 2020-03-24-09-27-10 +.. nonce: 27P2KG +.. section: C API + +Fix an alignment build warning/error in function +``PyVectorcall_Function()``. Patch by Andreas Schneider, Antoine Pitrou and +Petr Viktorin. diff --git a/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst b/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst deleted file mode 100644 index b38beb0586951..0000000000000 --- a/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst +++ /dev/null @@ -1 +0,0 @@ -Add fish shell support to macOS installer. diff --git a/Misc/NEWS.d/next/Build/2020-12-11-18-04-38.bpo-31904.j3j6d8.rst b/Misc/NEWS.d/next/Build/2020-12-11-18-04-38.bpo-31904.j3j6d8.rst deleted file mode 100644 index d2da711448ada..0000000000000 --- a/Misc/NEWS.d/next/Build/2020-12-11-18-04-38.bpo-31904.j3j6d8.rst +++ /dev/null @@ -1 +0,0 @@ -Enable libpython3.so for VxWorks. diff --git a/Misc/NEWS.d/next/Build/2020-12-13-14-43-10.bpo-42598.7ipr5H.rst b/Misc/NEWS.d/next/Build/2020-12-13-14-43-10.bpo-42598.7ipr5H.rst deleted file mode 100644 index 7dafc105c45ea..0000000000000 --- a/Misc/NEWS.d/next/Build/2020-12-13-14-43-10.bpo-42598.7ipr5H.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix implicit function declarations in configure which could have resulted in -incorrect configuration checks. Patch contributed by Joshua Root. diff --git a/Misc/NEWS.d/next/Build/2020-12-20-02-35-28.bpo-42604.gRd89w.rst b/Misc/NEWS.d/next/Build/2020-12-20-02-35-28.bpo-42604.gRd89w.rst deleted file mode 100644 index caaada41cf9ba..0000000000000 --- a/Misc/NEWS.d/next/Build/2020-12-20-02-35-28.bpo-42604.gRd89w.rst +++ /dev/null @@ -1,4 +0,0 @@ -Now all platforms use a value for the "EXT_SUFFIX" build variable derived -from SOABI (for instance in freeBSD, "EXT_SUFFIX" is now ".cpython-310d.so" -instead of ".so"). Previosuly only Linux, Mac and VxWorks were using a value -for "EXT_SUFFIX" that included "SOABI". diff --git a/Misc/NEWS.d/next/Build/2020-12-22-17-57-04.bpo-27640.j3a8r0.rst b/Misc/NEWS.d/next/Build/2020-12-22-17-57-04.bpo-27640.j3a8r0.rst deleted file mode 100644 index 142590d05ef85..0000000000000 --- a/Misc/NEWS.d/next/Build/2020-12-22-17-57-04.bpo-27640.j3a8r0.rst +++ /dev/null @@ -1,3 +0,0 @@ -Added ``--disable-test-modules`` option to the ``configure`` script: -don't build nor install test modules. -Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin. diff --git a/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst b/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst deleted file mode 100644 index 91582b945b803..0000000000000 --- a/Misc/NEWS.d/next/Build/2021-01-04-05-07-30.bpo-42692.OO11SN.rst +++ /dev/null @@ -1 +0,0 @@ -Fix __builtin_available check on older compilers. Patch by Joshua Root. diff --git a/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst b/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst deleted file mode 100644 index 538488e2fbacc..0000000000000 --- a/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix an alignment build warning/error in function ``PyVectorcall_Function()``. -Patch by Andreas Schneider, Antoine Pitrou and Petr Viktorin. diff --git a/Misc/NEWS.d/next/C API/2020-10-21-18-43-06.bpo-42111.9pvtrc.rst b/Misc/NEWS.d/next/C API/2020-10-21-18-43-06.bpo-42111.9pvtrc.rst deleted file mode 100644 index 3fb718cc45d42..0000000000000 --- a/Misc/NEWS.d/next/C API/2020-10-21-18-43-06.bpo-42111.9pvtrc.rst +++ /dev/null @@ -1,2 +0,0 @@ -Update the ``xxlimited`` module to be a better example of how to use the -limited C API. diff --git a/Misc/NEWS.d/next/C API/2020-11-22-13-46-06.bpo-1635741.-fJLzA.rst b/Misc/NEWS.d/next/C API/2020-11-22-13-46-06.bpo-1635741.-fJLzA.rst deleted file mode 100644 index da1e4cb9ef17e..0000000000000 --- a/Misc/NEWS.d/next/C API/2020-11-22-13-46-06.bpo-1635741.-fJLzA.rst +++ /dev/null @@ -1 +0,0 @@ -Port :mod:`resource` extension module to module state diff --git a/Misc/NEWS.d/next/C API/2020-12-09-00-35-25.bpo-32381.Je08Ny.rst b/Misc/NEWS.d/next/C API/2020-12-09-00-35-25.bpo-32381.Je08Ny.rst deleted file mode 100644 index ded75fa54a42f..0000000000000 --- a/Misc/NEWS.d/next/C API/2020-12-09-00-35-25.bpo-32381.Je08Ny.rst +++ /dev/null @@ -1,3 +0,0 @@ -Remove the private :c:func:`_Py_fopen` function which is no longer needed. -Use :c:func:`_Py_wfopen` or :c:func:`_Py_fopen_obj` instead. Patch by Victor -Stinner. diff --git a/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst b/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst deleted file mode 100644 index 3519859f7be89..0000000000000 --- a/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst +++ /dev/null @@ -1,3 +0,0 @@ -Export the :c:func:`Py_FrozenMain` function: fix a Python 3.9.0 regression. -Python 3.9 uses ``-fvisibility=hidden`` and the function was not exported -explicitly and so not exported. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-05-13-18-50-27.bpo-39465.j7nl6A.rst b/Misc/NEWS.d/next/Core and Builtins/2020-05-13-18-50-27.bpo-39465.j7nl6A.rst deleted file mode 100644 index c29b5e1757f0c..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-05-13-18-50-27.bpo-39465.j7nl6A.rst +++ /dev/null @@ -1,3 +0,0 @@ -Make :c:func:`_PyUnicode_FromId` function compatible with subinterpreters. -Each interpreter now has an array of identifier objects (interned strings -decoded from UTF-8). Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst b/Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst deleted file mode 100644 index 654757a5f90cb..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst +++ /dev/null @@ -1,2 +0,0 @@ -Make the Unicode dictionary of interned strings compatible with -subinterpreters. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst b/Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst deleted file mode 100644 index cdf0e792cee81..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-09-12-19-21-52.bpo-1635741.F2kDrU.rst +++ /dev/null @@ -1,2 +0,0 @@ -Port the :mod:`pyexpat` extension module to multi-phase initialization -(:pep:`489`). diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-10-12-14-51-59.bpo-42008.ijWw2I.rst b/Misc/NEWS.d/next/Core and Builtins/2020-10-12-14-51-59.bpo-42008.ijWw2I.rst deleted file mode 100644 index 1b50a0ef3b02d..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-10-12-14-51-59.bpo-42008.ijWw2I.rst +++ /dev/null @@ -1 +0,0 @@ -Fix _random.Random() seeding. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst deleted file mode 100644 index 40c5511e32133..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-03-13-46-10.bpo-40077.NfAIdj.rst +++ /dev/null @@ -1 +0,0 @@ -Convert :mod:`array` to use heap types, and establish module state for these. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-19-23-12-57.bpo-40137.bihl9O.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-19-23-12-57.bpo-40137.bihl9O.rst deleted file mode 100644 index 607fa0ecccf51..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-19-23-12-57.bpo-40137.bihl9O.rst +++ /dev/null @@ -1 +0,0 @@ -Convert functools module to use :c:func:`PyType_FromModuleAndSpec`. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-20-00-57-47.bpo-42195.HeqcpS.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-20-00-57-47.bpo-42195.HeqcpS.rst deleted file mode 100644 index 87e8c0e89b3b8..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-11-20-00-57-47.bpo-42195.HeqcpS.rst +++ /dev/null @@ -1,10 +0,0 @@ -The ``__args__`` of the parameterized generics for :data:`typing.Callable` -and :class:`collections.abc.Callable` are now consistent. The ``__args__`` -for :class:`collections.abc.Callable` are now flattened while -:data:`typing.Callable`'s have not changed. To allow this change, -:class:`types.GenericAlias` can now be subclassed and -``collections.abc.Callable``'s ``__class_getitem__`` will now return a subclass -of ``types.GenericAlias``. Tests for typing were also updated to not subclass -things like ``Callable[..., T]`` as that is not a valid base class. Finally, -both ``Callable``\ s no longer validate their ``argtypes``, in -``Callable[[argtypes], resulttype]`` to prepare for :pep:`612`. Patch by Ken Jin. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst deleted file mode 100644 index f4d84f9d848d4..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-04-17-17-44.bpo-32381.NY5t2S.rst +++ /dev/null @@ -1,3 +0,0 @@ -Fix encoding name when running a ``.pyc`` file on Windows: -:c:func:`PyRun_SimpleFileExFlags()` now uses the correct encoding to decode -the filename. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst deleted file mode 100644 index 7999ee976f3c0..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-09-01-55-10.bpo-42639.5pI5HG.rst +++ /dev/null @@ -1,3 +0,0 @@ -Make the :mod:`atexit` module state per-interpreter. It is now safe have more -than one :mod:`atexit` module instance. -Patch by Dong-hee Na and Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-10-17-06-52.bpo-42615.Je6Q-r.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-10-17-06-52.bpo-42615.Je6Q-r.rst deleted file mode 100644 index 2d919a8192d5a..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-10-17-06-52.bpo-42615.Je6Q-r.rst +++ /dev/null @@ -1,2 +0,0 @@ -Remove jump commands made redundant by the deletion of unreachable bytecode -blocks diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-13-15-23-09.bpo-30858.-f9G4z.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-13-15-23-09.bpo-30858.-f9G4z.rst deleted file mode 100644 index f2d06c3009ca5..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-13-15-23-09.bpo-30858.-f9G4z.rst +++ /dev/null @@ -1,2 +0,0 @@ -Improve error location in expressions that contain assignments. Patch by -Pablo Galindo and Lysandros Nikolaou. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst deleted file mode 100644 index fc8ea82fb084b..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-15-18-43-43.bpo-32381.3tIofL.rst +++ /dev/null @@ -1,2 +0,0 @@ -The coding cookie (ex: ``# coding: latin1``) is now ignored in the command -passed to the :option:`-c` command line option. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-16-14-44-21.bpo-42246.RtIEY7.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-16-14-44-21.bpo-42246.RtIEY7.rst deleted file mode 100644 index a3814b6419e4c..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-16-14-44-21.bpo-42246.RtIEY7.rst +++ /dev/null @@ -1,3 +0,0 @@ -Make sure that the ``f_lasti`` and ``f_lineno`` attributes of a frame are -set correctly when an exception is raised or re-raised. Required for PEP -626. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-22-20-30-11.bpo-42246.7BrPLg.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-22-20-30-11.bpo-42246.7BrPLg.rst deleted file mode 100644 index 33564f6b56b9f..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-22-20-30-11.bpo-42246.7BrPLg.rst +++ /dev/null @@ -1 +0,0 @@ -Jumps to jumps are not eliminated when it would break PEP 626. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-25-23-30-58.bpo-42745.XsFoHS.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-25-23-30-58.bpo-42745.XsFoHS.rst deleted file mode 100644 index fb7de9c215024..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-25-23-30-58.bpo-42745.XsFoHS.rst +++ /dev/null @@ -1 +0,0 @@ -Make the type attribute lookup cache per-interpreter. Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-27-18-07-43.bpo-27794.sxgfGi.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-27-18-07-43.bpo-27794.sxgfGi.rst deleted file mode 100644 index 0f66b4effc5df..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-27-18-07-43.bpo-27794.sxgfGi.rst +++ /dev/null @@ -1,3 +0,0 @@ -Improve the error message for failed writes/deletes to property objects. -When possible, the attribute name is now shown. Patch provided by -Yurii Karabas. diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst deleted file mode 100644 index ac2db2938237f..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-12-31-20-58-22.bpo-40631.deRMCx.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix regression where a single parenthesized starred expression was a valid -assignment target. diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst deleted file mode 100644 index 10314fd650fa6..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2021-01-03-00-20-38.bpo-42806.mLAobJ.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix the column offsets for f-strings :mod:`ast` nodes surrounded by -parentheses and for nodes that spawn multiple lines. Patch by Pablo Galindo. diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst deleted file mode 100644 index 6978c36f98c96..0000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2021-01-03-04-41-25.bpo-42814.sDvVbb.rst +++ /dev/null @@ -1 +0,0 @@ -Fix undefined behavior in ``Objects/genericaliasobject.c``. diff --git a/Misc/NEWS.d/next/Documentation/2019-03-04-18-51-21.bpo-34398.YedUqW.rst b/Misc/NEWS.d/next/Documentation/2019-03-04-18-51-21.bpo-34398.YedUqW.rst deleted file mode 100644 index 4693cecdb7b39..0000000000000 --- a/Misc/NEWS.d/next/Documentation/2019-03-04-18-51-21.bpo-34398.YedUqW.rst +++ /dev/null @@ -1,2 +0,0 @@ -Prominently feature listings from the glossary in documentation search -results. Patch by Ammar Askar. diff --git a/Misc/NEWS.d/next/Documentation/2020-12-16-21-06-16.bpo-17140.1leSEg.rst b/Misc/NEWS.d/next/Documentation/2020-12-16-21-06-16.bpo-17140.1leSEg.rst deleted file mode 100644 index cb1fd23a56e63..0000000000000 --- a/Misc/NEWS.d/next/Documentation/2020-12-16-21-06-16.bpo-17140.1leSEg.rst +++ /dev/null @@ -1 +0,0 @@ -Add documentation for the :class:`multiprocessing.pool.ThreadPool` class. diff --git a/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst b/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst deleted file mode 100644 index fe6503fdce6b6..0000000000000 --- a/Misc/NEWS.d/next/Library/2019-12-16-17-55-31.bpo-39068.Ti3f9P.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix initialization race condition in :func:`a85encode` and :func:`b85encode` -in :mod:`base64`. Patch by Brandon Stansbury. diff --git a/Misc/NEWS.d/next/Library/2020-06-12-21-23-20.bpo-37193.wJximU.rst b/Misc/NEWS.d/next/Library/2020-06-12-21-23-20.bpo-37193.wJximU.rst deleted file mode 100644 index fbf56d3194cd2..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-06-12-21-23-20.bpo-37193.wJximU.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed memory leak in ``socketserver.ThreadingMixIn`` introduced in Python -3.7. diff --git a/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst b/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst deleted file mode 100644 index aedc5c49b4087..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-07-13-19-43-11.bpo-40219.MUoJEP.rst +++ /dev/null @@ -1 +0,0 @@ -Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to prevent hiding part of the content label. diff --git a/Misc/NEWS.d/next/Library/2020-08-03-17-54-32.bpo-41462.ek38d_.rst b/Misc/NEWS.d/next/Library/2020-08-03-17-54-32.bpo-41462.ek38d_.rst deleted file mode 100644 index ca5da1b17b436..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-08-03-17-54-32.bpo-41462.ek38d_.rst +++ /dev/null @@ -1 +0,0 @@ -Add :func:`os.set_blocking()` support for VxWorks RTOS. diff --git a/Misc/NEWS.d/next/Library/2020-08-11-17-44-07.bpo-31904.cb13ea.rst b/Misc/NEWS.d/next/Library/2020-08-11-17-44-07.bpo-31904.cb13ea.rst deleted file mode 100644 index a7164b7a5a26d..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-08-11-17-44-07.bpo-31904.cb13ea.rst +++ /dev/null @@ -1 +0,0 @@ -Fix site and sysconfig modules for VxWorks RTOS which has no home directories. diff --git a/Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst b/Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst deleted file mode 100644 index 4f1f18a558408..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-09-11-16-07-00.bpo-24792.Z-ARra.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed bug where :mod:`zipimporter` sometimes reports an incorrect cause of import errors. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-09-30-13-35-29.bpo-41891.pNAeYI.rst b/Misc/NEWS.d/next/Library/2020-09-30-13-35-29.bpo-41891.pNAeYI.rst deleted file mode 100644 index 75c2512780315..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-09-30-13-35-29.bpo-41891.pNAeYI.rst +++ /dev/null @@ -1 +0,0 @@ -Ensure asyncio.wait_for waits for task completion diff --git a/Misc/NEWS.d/next/Library/2020-10-02-10-19-49.bpo-41907.wiIEsz.rst b/Misc/NEWS.d/next/Library/2020-10-02-10-19-49.bpo-41907.wiIEsz.rst deleted file mode 100644 index 2c7b70d589d83..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-10-02-10-19-49.bpo-41907.wiIEsz.rst +++ /dev/null @@ -1 +0,0 @@ -fix ``format()`` behavior for ``IntFlag`` diff --git a/Misc/NEWS.d/next/Library/2020-10-06-23-59-20.bpo-41960.icQ7Xd.rst b/Misc/NEWS.d/next/Library/2020-10-06-23-59-20.bpo-41960.icQ7Xd.rst deleted file mode 100644 index f7e71998dab9b..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-10-06-23-59-20.bpo-41960.icQ7Xd.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add ``globalns`` and ``localns`` parameters to the :func:`inspect.signature` -and :meth:`inspect.Signature.from_callable`. diff --git a/Misc/NEWS.d/next/Library/2020-10-17-12-42-08.bpo-42059.ZGMZ3D.rst b/Misc/NEWS.d/next/Library/2020-10-17-12-42-08.bpo-42059.ZGMZ3D.rst deleted file mode 100644 index 3f18824fe6598..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-10-17-12-42-08.bpo-42059.ZGMZ3D.rst +++ /dev/null @@ -1 +0,0 @@ -:class:`typing.TypedDict` types created using the alternative call-style syntax now correctly respect the ``total`` keyword argument when setting their ``__required_keys__`` and ``__optional_keys__`` class attributes. diff --git a/Misc/NEWS.d/next/Library/2020-10-20-23-28-55.bpo-1635741.Iyka3r.rst b/Misc/NEWS.d/next/Library/2020-10-20-23-28-55.bpo-1635741.Iyka3r.rst deleted file mode 100644 index e14e9a12c275d..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-10-20-23-28-55.bpo-1635741.Iyka3r.rst +++ /dev/null @@ -1 +0,0 @@ -Port the _csv module to the multi-phase initialization API (:pep:`489`). diff --git a/Misc/NEWS.d/next/Library/2020-10-25-14-48-57.bpo-42090.Ubuc0j.rst b/Misc/NEWS.d/next/Library/2020-10-25-14-48-57.bpo-42090.Ubuc0j.rst deleted file mode 100644 index 72f6853b50504..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-10-25-14-48-57.bpo-42090.Ubuc0j.rst +++ /dev/null @@ -1,2 +0,0 @@ -``zipfile.Path.joinpath`` now accepts arbitrary arguments, same as -``pathlib.Path.joinpath``. diff --git a/Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst b/Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst deleted file mode 100644 index 0c357eb4ac1da..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst +++ /dev/null @@ -1 +0,0 @@ -Restore compatibility for ``uname_result`` around deepcopy and _replace. diff --git a/Misc/NEWS.d/next/Library/2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst b/Misc/NEWS.d/next/Library/2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst deleted file mode 100644 index 2f570bb9824d0..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-10-31-10-28-32.bpo-42222.Cfl1eR.rst +++ /dev/null @@ -1,9 +0,0 @@ -Harmonized random.randrange() argument handling to match range(). - -* The integer test and conversion in randrange() now uses - operator.index(). -* Non-integer arguments to randrange() are deprecated. -* The *ValueError* is deprecated in favor of a *TypeError*. -* It now runs a little faster than before. - -(Contributed by Raymond Hettinger and Serhiy Storchaka.) diff --git a/Misc/NEWS.d/next/Library/2020-11-17-22-06-15.bpo-42393.BB0oXc.rst b/Misc/NEWS.d/next/Library/2020-11-17-22-06-15.bpo-42393.BB0oXc.rst deleted file mode 100644 index f291123d6dea9..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-11-17-22-06-15.bpo-42393.BB0oXc.rst +++ /dev/null @@ -1,3 +0,0 @@ -Raise :exc:`OverflowError` instead of silent truncation in :meth:`socket.ntohs` -and :meth:`socket.htons`. Silent truncation was deprecated in Python 3.7. -Patch by Erlend E. Aasland diff --git a/Misc/NEWS.d/next/Library/2020-11-20-19-00-27.bpo-34463.aJcm56.rst b/Misc/NEWS.d/next/Library/2020-11-20-19-00-27.bpo-34463.aJcm56.rst deleted file mode 100644 index df183548236af..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-11-20-19-00-27.bpo-34463.aJcm56.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed discrepancy between :mod:`traceback` and the interpreter in formatting of SyntaxError with lineno not set (:mod:`traceback` was changed to match interpreter). diff --git a/Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst b/Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst deleted file mode 100644 index 1b19247e84148..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-11-22-11-22-28.bpo-42388.LMgM6B.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix subprocess.check_output(..., input=None) behavior when text=True to be -consistent with that of the documentation and universal_newlines=True. diff --git a/Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst b/Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst deleted file mode 100644 index 5a687d1eb32de..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-11-27-18-09-59.bpo-31904.g8k43d.rst +++ /dev/null @@ -1,2 +0,0 @@ -:func:`posixpath.expanduser` returns the input *path* unchanged if -user home directory is None on VxWorks. diff --git a/Misc/NEWS.d/next/Library/2020-12-06-12-00-00.bpo-42470.iqtC4L.rst b/Misc/NEWS.d/next/Library/2020-12-06-12-00-00.bpo-42470.iqtC4L.rst deleted file mode 100644 index cd2edb65d7a6c..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-06-12-00-00.bpo-42470.iqtC4L.rst +++ /dev/null @@ -1 +0,0 @@ -:func:`random.sample` no longer warns on a sequence which is also a set. diff --git a/Misc/NEWS.d/next/Library/2020-12-07-13-21-00.bpo-28964.UTQikc.rst b/Misc/NEWS.d/next/Library/2020-12-07-13-21-00.bpo-28964.UTQikc.rst deleted file mode 100644 index b1be0de3b223a..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-07-13-21-00.bpo-28964.UTQikc.rst +++ /dev/null @@ -1 +0,0 @@ -:func:`ast.literal_eval` adds line number information (if available) in error message for malformed nodes. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-08-22-43-35.bpo-42678.ba9ktU.rst b/Misc/NEWS.d/next/Library/2020-12-08-22-43-35.bpo-42678.ba9ktU.rst deleted file mode 100644 index 4b2ced5c148af..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-08-22-43-35.bpo-42678.ba9ktU.rst +++ /dev/null @@ -1 +0,0 @@ -``Enum``: call ``__init_subclass__`` after members have been added diff --git a/Misc/NEWS.d/next/Library/2020-12-09-10-59-16.bpo-42517.FKEVcZ.rst b/Misc/NEWS.d/next/Library/2020-12-09-10-59-16.bpo-42517.FKEVcZ.rst deleted file mode 100644 index 813139dfe5d00..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-09-10-59-16.bpo-42517.FKEVcZ.rst +++ /dev/null @@ -1,2 +0,0 @@ -Enum: private names do not become members / do not generate errors -- they -remain normal attributes diff --git a/Misc/NEWS.d/next/Library/2020-12-09-14-15-48.bpo-34750.x8TASR.rst b/Misc/NEWS.d/next/Library/2020-12-09-14-15-48.bpo-34750.x8TASR.rst deleted file mode 100644 index c98ba14797af9..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-09-14-15-48.bpo-34750.x8TASR.rst +++ /dev/null @@ -1 +0,0 @@ -[Enum] `_EnumDict.update()` is now supported diff --git a/Misc/NEWS.d/next/Library/2020-12-09-15-23-28.bpo-31904.g3k5k3.rst b/Misc/NEWS.d/next/Library/2020-12-09-15-23-28.bpo-31904.g3k5k3.rst deleted file mode 100644 index 7bca3ed845b02..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-09-15-23-28.bpo-31904.g3k5k3.rst +++ /dev/null @@ -1 +0,0 @@ -Define THREAD_STACK_SIZE for VxWorks. diff --git a/Misc/NEWS.d/next/Library/2020-12-09-19-45-32.bpo-42385.boGbjo.rst b/Misc/NEWS.d/next/Library/2020-12-09-19-45-32.bpo-42385.boGbjo.rst deleted file mode 100644 index f95da859b0388..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-09-19-45-32.bpo-42385.boGbjo.rst +++ /dev/null @@ -1 +0,0 @@ -StrEnum: fix _generate_next_value_ to return a str diff --git a/Misc/NEWS.d/next/Library/2020-12-10-00-09-40.bpo-41559.1l4yjP.rst b/Misc/NEWS.d/next/Library/2020-12-10-00-09-40.bpo-41559.1l4yjP.rst deleted file mode 100644 index 539fdeccd14b3..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-10-00-09-40.bpo-41559.1l4yjP.rst +++ /dev/null @@ -1,2 +0,0 @@ -Implemented :pep:`612`: added ``ParamSpec`` and ``Concatenate`` to -:mod:`typing`. Patch by Ken Jin. diff --git a/Misc/NEWS.d/next/Library/2020-12-10-09-24-44.bpo-41877.iJSCvM.rst b/Misc/NEWS.d/next/Library/2020-12-10-09-24-44.bpo-41877.iJSCvM.rst deleted file mode 100644 index df43cc5d0c9fa..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-10-09-24-44.bpo-41877.iJSCvM.rst +++ /dev/null @@ -1 +0,0 @@ -AttributeError for suspected misspellings of assertions on mocks are now pointing out that the cause are misspelled assertions and also what to do if the misspelling is actually an intended attribute name. The unittest.mock document is also updated to reflect the current set of recognised misspellings. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-10-18-36-52.bpo-39717.sK2u0w.rst b/Misc/NEWS.d/next/Library/2020-12-10-18-36-52.bpo-39717.sK2u0w.rst deleted file mode 100644 index 6f3691f591f2b..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-10-18-36-52.bpo-39717.sK2u0w.rst +++ /dev/null @@ -1 +0,0 @@ -[tarfile] update nested exception raising to use ``from None`` or ``from e`` diff --git a/Misc/NEWS.d/next/Library/2020-12-10-19-49-52.bpo-41877.wiVlPc.rst b/Misc/NEWS.d/next/Library/2020-12-10-19-49-52.bpo-41877.wiVlPc.rst deleted file mode 100644 index d42200ecd03de..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-10-19-49-52.bpo-41877.wiVlPc.rst +++ /dev/null @@ -1 +0,0 @@ -A check is added against misspellings of autospect, auto_spec and set_spec being passed as arguments to patch, patch.object and create_autospec. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-13-22-05-35.bpo-42382.2YtKo5.rst b/Misc/NEWS.d/next/Library/2020-12-13-22-05-35.bpo-42382.2YtKo5.rst deleted file mode 100644 index 5ccd5bbf5e91f..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-13-22-05-35.bpo-42382.2YtKo5.rst +++ /dev/null @@ -1,6 +0,0 @@ -In ``importlib.metadata``: - ``EntryPoint`` objects now expose a ``.dist`` -object referencing the ``Distribution`` when constructed from a -``Distribution``. - Add support for package discovery under package -normalization rules. - The object returned by ``metadata()`` now has a -formally-defined protocol called ``PackageMetadata`` with declared support -for the ``.get_all()`` method. - Synced with importlib_metadata 3.3. diff --git a/Misc/NEWS.d/next/Library/2020-12-14-08-23-57.bpo-36541.qdEtZv.rst b/Misc/NEWS.d/next/Library/2020-12-14-08-23-57.bpo-36541.qdEtZv.rst deleted file mode 100644 index 5678d8c595ca0..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-14-08-23-57.bpo-36541.qdEtZv.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed lib2to3.pgen2 to be able to parse PEP-570 positional only argument -syntax. diff --git a/Misc/NEWS.d/next/Library/2020-12-14-22-31-22.bpo-42639.5Z3iWX.rst b/Misc/NEWS.d/next/Library/2020-12-14-22-31-22.bpo-42639.5Z3iWX.rst deleted file mode 100644 index bdb2edd7adc2f..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-14-22-31-22.bpo-42639.5Z3iWX.rst +++ /dev/null @@ -1,3 +0,0 @@ -At Python exit, if a callback registered with :func:`atexit.register` fails, -its exception is now logged. Previously, only some exceptions were logged, and -the last exception was always silently ignored. diff --git a/Misc/NEWS.d/next/Library/2020-12-15-10-00-04.bpo-42644.XgLCNx.rst b/Misc/NEWS.d/next/Library/2020-12-15-10-00-04.bpo-42644.XgLCNx.rst deleted file mode 100644 index ee4d111dc349a..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-15-10-00-04.bpo-42644.XgLCNx.rst +++ /dev/null @@ -1,3 +0,0 @@ -``logging.disable`` will now validate the types and value of its parameter. It -also now accepts strings representing the levels (as does ``loging.setLevel``) -instead of only the numerical values. diff --git a/Misc/NEWS.d/next/Library/2020-12-15-15-14-29.bpo-42639.uJ3h8I.rst b/Misc/NEWS.d/next/Library/2020-12-15-15-14-29.bpo-42639.uJ3h8I.rst deleted file mode 100644 index 847c24112f9a8..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-15-15-14-29.bpo-42639.uJ3h8I.rst +++ /dev/null @@ -1,3 +0,0 @@ -:func:`atexit._run_exitfuncs` now logs callback exceptions using -:data:`sys.unraisablehook`, rather than logging them directly into -:data:`sys.stderr` and raise the last exception. diff --git a/Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst b/Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst deleted file mode 100644 index 4b4a520931fda..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst +++ /dev/null @@ -1,4 +0,0 @@ -:mod:`tkinter` functions and constructors which need a default root window -raise now :exc:`RuntimeError` with descriptive message instead of obscure -:exc:`AttributeError` or :exc:`NameError` if it is not created yet or cannot -be created automatically. diff --git a/Misc/NEWS.d/next/Library/2020-12-16-16-16-33.bpo-37961.jrESEq.rst b/Misc/NEWS.d/next/Library/2020-12-16-16-16-33.bpo-37961.jrESEq.rst deleted file mode 100644 index 5b363ad22d6e3..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-16-16-16-33.bpo-37961.jrESEq.rst +++ /dev/null @@ -1 +0,0 @@ -Fix crash in :func:`tracemalloc.Traceback.__repr__` (regressed in Python 3.9). \ No newline at end of file diff --git a/Misc/NEWS.d/next/Library/2020-12-16-23-28-52.bpo-1635741.Quy3zn.rst b/Misc/NEWS.d/next/Library/2020-12-16-23-28-52.bpo-1635741.Quy3zn.rst deleted file mode 100644 index 3412c204b05ca..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-16-23-28-52.bpo-1635741.Quy3zn.rst +++ /dev/null @@ -1,2 +0,0 @@ -Port the :mod:`_thread` extension module to the multiphase initialization -API (:pep:`489`) and convert its static types to heap types. diff --git a/Misc/NEWS.d/next/Library/2020-12-19-12-33-38.bpo-9694.CkKK9V.rst b/Misc/NEWS.d/next/Library/2020-12-19-12-33-38.bpo-9694.CkKK9V.rst deleted file mode 100644 index 723955270d02c..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-19-12-33-38.bpo-9694.CkKK9V.rst +++ /dev/null @@ -1,2 +0,0 @@ -Argparse help no longer uses the confusing phrase, "optional arguments". -It uses "options" instead. diff --git a/Misc/NEWS.d/next/Library/2020-12-19-17-32-43.bpo-42685.kwZlwp.rst b/Misc/NEWS.d/next/Library/2020-12-19-17-32-43.bpo-42685.kwZlwp.rst deleted file mode 100644 index 068546a34c57a..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-19-17-32-43.bpo-42685.kwZlwp.rst +++ /dev/null @@ -1,4 +0,0 @@ -Improved placing of simple query windows in Tkinter (such as -:func:`tkinter.simpledialog.askinteger`). They are now centered at the -center of the parent window if it is specified and shown, otherwise at the -center of the screen. diff --git a/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst b/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst deleted file mode 100644 index 34ea74a5a323d..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-20-22-50-15.bpo-42681.lDO6jb.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed range checks for color and pair numbers in :mod:`curses`. diff --git a/Misc/NEWS.d/next/Library/2020-12-21-22-59-26.bpo-15303.zozVrq.rst b/Misc/NEWS.d/next/Library/2020-12-21-22-59-26.bpo-15303.zozVrq.rst deleted file mode 100644 index 5a7900aa909ac..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-21-22-59-26.bpo-15303.zozVrq.rst +++ /dev/null @@ -1 +0,0 @@ -:mod:`tkinter` supports now widgets with boolean value False. diff --git a/Misc/NEWS.d/next/Library/2020-12-21-23-34-57.bpo-35728.9m-azF.rst b/Misc/NEWS.d/next/Library/2020-12-21-23-34-57.bpo-35728.9m-azF.rst deleted file mode 100644 index aa57e274ce5c0..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-21-23-34-57.bpo-35728.9m-azF.rst +++ /dev/null @@ -1 +0,0 @@ -Added a root parameter to :func:`tkinter.font.nametofont`. diff --git a/Misc/NEWS.d/next/Library/2020-12-22-13-16-43.bpo-25246.GhhCTl.rst b/Misc/NEWS.d/next/Library/2020-12-22-13-16-43.bpo-25246.GhhCTl.rst deleted file mode 100644 index 258bb12ff8beb..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-22-13-16-43.bpo-25246.GhhCTl.rst +++ /dev/null @@ -1 +0,0 @@ -Optimized :meth:`collections.deque.remove`. diff --git a/Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst b/Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst deleted file mode 100644 index 58ab180d3bfa3..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst +++ /dev/null @@ -1,9 +0,0 @@ -When simple query dialogs (:mod:`tkinter.simpledialog`), message boxes -(:mod:`tkinter.messagebox`) or color choose dialog -(:mod:`tkinter.colorchooser`) are created without arguments *master* and -*parent*, and the default root window is not yet created, and -:func:`~tkinter.NoDefaultRoot` was not called, a new temporal -hidden root window will be created automatically. It will not be set as the -default root window and will be destroyed right after closing the dialog -window. It will help to use these simple dialog windows in programs which -do not need other GUI. diff --git a/Misc/NEWS.d/next/Library/2020-12-23-15-16-12.bpo-38308.lB4Sv0.rst b/Misc/NEWS.d/next/Library/2020-12-23-15-16-12.bpo-38308.lB4Sv0.rst deleted file mode 100644 index cf3807d9dc48a..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-23-15-16-12.bpo-38308.lB4Sv0.rst +++ /dev/null @@ -1 +0,0 @@ -Add optional *weights* to *statistics.harmonic_mean()*. diff --git a/Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst b/Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst deleted file mode 100644 index c2ef8eecb85e1..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-23-19-43-06.bpo-42727.WH3ODh.rst +++ /dev/null @@ -1,2 +0,0 @@ -``EnumMeta.__prepare__`` now accepts ``**kwds`` to properly support -``__init_subclass__`` diff --git a/Misc/NEWS.d/next/Library/2020-12-25-12-32-47.bpo-42655.W5ytpV.rst b/Misc/NEWS.d/next/Library/2020-12-25-12-32-47.bpo-42655.W5ytpV.rst deleted file mode 100644 index 57c9a666e395a..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-25-12-32-47.bpo-42655.W5ytpV.rst +++ /dev/null @@ -1,2 +0,0 @@ -:mod:`subprocess` *extra_groups* is now correctly passed into setgroups() -system call. diff --git a/Misc/NEWS.d/next/Library/2020-12-25-23-23-11.bpo-42740.F0rQ_E.rst b/Misc/NEWS.d/next/Library/2020-12-25-23-23-11.bpo-42740.F0rQ_E.rst deleted file mode 100644 index 588d90f623306..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-25-23-23-11.bpo-42740.F0rQ_E.rst +++ /dev/null @@ -1,2 +0,0 @@ -:func:`typing.get_args` and :func:`typing.get_origin` now support :pep:`604` -union types and :pep:`612` additions to ``Callable``. diff --git a/Misc/NEWS.d/next/Library/2020-12-27-18-47-01.bpo-23328._xqepZ.rst b/Misc/NEWS.d/next/Library/2020-12-27-18-47-01.bpo-23328._xqepZ.rst deleted file mode 100644 index 07b15d34e8d56..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-27-18-47-01.bpo-23328._xqepZ.rst +++ /dev/null @@ -1 +0,0 @@ -Allow / character in username, password fields on _PROXY envars. diff --git a/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst b/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst deleted file mode 100644 index 93a0bb010df2b..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-27-21-22-01.bpo-42756.dHMPJ9.rst +++ /dev/null @@ -1,2 +0,0 @@ -Configure LMTP Unix-domain socket to use socket global default timeout when -a timeout is not explicitly provided. diff --git a/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst b/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst deleted file mode 100644 index a5ec7d5820336..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-27-22-19-26.bpo-42759.lGi_03.rst +++ /dev/null @@ -1,3 +0,0 @@ -Fixed equality comparison of :class:`tkinter.Variable` and -:class:`tkinter.font.Font`. Objects which belong to different Tcl -interpreters are now always different, even if they have the same name. diff --git a/Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst b/Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst deleted file mode 100644 index 7f4ae7af0b9eb..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-30-17-16-43.bpo-42772.Xe7WFV.rst +++ /dev/null @@ -1,2 +0,0 @@ -randrange() now raises a TypeError when step is specified without a stop -argument. Formerly, it silently ignored the step argument. diff --git a/Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst b/Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst deleted file mode 100644 index 9a026d5cdda27..0000000000000 --- a/Misc/NEWS.d/next/Library/2020-12-31-23-05-53.bpo-42257.ALQy7B.rst +++ /dev/null @@ -1 +0,0 @@ -Handle empty string in variable executable in platform.libc_ver() diff --git a/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst b/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst deleted file mode 100644 index 0451503a52e93..0000000000000 --- a/Misc/NEWS.d/next/Tests/2020-07-30-14-08-58.bpo-41439.yhteoi.rst +++ /dev/null @@ -1 +0,0 @@ -Port test_ssl and test_uuid to VxWorks RTOS. diff --git a/Misc/NEWS.d/next/Tests/2020-07-30-18-06-15.bpo-31904.y3d8dk.rst b/Misc/NEWS.d/next/Tests/2020-07-30-18-06-15.bpo-31904.y3d8dk.rst deleted file mode 100644 index fa2974963bf01..0000000000000 --- a/Misc/NEWS.d/next/Tests/2020-07-30-18-06-15.bpo-31904.y3d8dk.rst +++ /dev/null @@ -1 +0,0 @@ -Disable os.popen and impacted tests on VxWorks diff --git a/Misc/NEWS.d/next/Tests/2020-07-30-18-43-05.bpo-41443.834gyg.rst b/Misc/NEWS.d/next/Tests/2020-07-30-18-43-05.bpo-41443.834gyg.rst deleted file mode 100644 index 439f3e3647015..0000000000000 --- a/Misc/NEWS.d/next/Tests/2020-07-30-18-43-05.bpo-41443.834gyg.rst +++ /dev/null @@ -1 +0,0 @@ -Add more attribute checking in test_posix.py diff --git a/Misc/NEWS.d/next/Tests/2020-10-29-21-26-46.bpo-42199.KksGCV.rst b/Misc/NEWS.d/next/Tests/2020-10-29-21-26-46.bpo-42199.KksGCV.rst deleted file mode 100644 index 4426f336368bf..0000000000000 --- a/Misc/NEWS.d/next/Tests/2020-10-29-21-26-46.bpo-42199.KksGCV.rst +++ /dev/null @@ -1 +0,0 @@ -Fix bytecode helper assertNotInBytecode. \ No newline at end of file diff --git a/Misc/NEWS.d/next/Tests/2020-12-09-15-23-28.bpo-31904.ghj38d.rst b/Misc/NEWS.d/next/Tests/2020-12-09-15-23-28.bpo-31904.ghj38d.rst deleted file mode 100644 index 654562bf407b1..0000000000000 --- a/Misc/NEWS.d/next/Tests/2020-12-09-15-23-28.bpo-31904.ghj38d.rst +++ /dev/null @@ -1 +0,0 @@ -Skip some tests in _test_all_chown_common() on VxWorks. diff --git a/Misc/NEWS.d/next/Tests/2020-12-15-17-38-04.bpo-42641.uzwlF_.rst b/Misc/NEWS.d/next/Tests/2020-12-15-17-38-04.bpo-42641.uzwlF_.rst deleted file mode 100644 index bf890b73ee720..0000000000000 --- a/Misc/NEWS.d/next/Tests/2020-12-15-17-38-04.bpo-42641.uzwlF_.rst +++ /dev/null @@ -1,2 +0,0 @@ -Enhance ``test_select.test_select()``: it now takes 500 ms rather than 10 -seconds. Use Python rather than a shell to make the test more portable. diff --git a/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst b/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst deleted file mode 100644 index d74e4666853b5..0000000000000 --- a/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst +++ /dev/null @@ -1 +0,0 @@ -Skip some asyncio tests on VxWorks. diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst deleted file mode 100644 index 577f2259e1f00..0000000000000 --- a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst +++ /dev/null @@ -1,2 +0,0 @@ -Update test_nntplib to use offical group name of news.aioe.org for testing. -Patch by Dong-hee Na. diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-12-16-09-10-32.bpo-42613.J-jnm5.rst b/Misc/NEWS.d/next/Tools-Demos/2020-12-16-09-10-32.bpo-42613.J-jnm5.rst deleted file mode 100644 index 140ff8255b96b..0000000000000 --- a/Misc/NEWS.d/next/Tools-Demos/2020-12-16-09-10-32.bpo-42613.J-jnm5.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix ``freeze.py`` tool to use the prope config and library directories. -Patch by Victor Stinner. diff --git a/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst b/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst deleted file mode 100644 index 01a6e7fe55f5b..0000000000000 --- a/Misc/NEWS.d/next/Tools-Demos/2020-12-23-19-42-11.bpo-42726.a5EkTv.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed Python 3 compatibility issue with gdb/libpython.py handling of attribute -dictionaries. diff --git a/Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst b/Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst deleted file mode 100644 index 2a625f98e9078..0000000000000 --- a/Misc/NEWS.d/next/macOS/2020-12-07-11-37-35.bpo-42584.LygmqQ.rst +++ /dev/null @@ -1 +0,0 @@ -Update macOS installer to use SQLite 3.34.0. diff --git a/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst b/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst deleted file mode 100644 index 3f9415f4a3606..0000000000000 --- a/Misc/NEWS.d/next/macOS/2021-01-04-00-48-08.bpo-41837.dX-unJ.rst +++ /dev/null @@ -1 +0,0 @@ -Update macOS installer build to use OpenSSL 1.1.1i. diff --git a/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst b/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst deleted file mode 100644 index 39526b32935b8..0000000000000 --- a/Misc/NEWS.d/next/macOS/2021-01-04-01-17-17.bpo-42361.eolZAi.rst +++ /dev/null @@ -1,2 +0,0 @@ -Update macOS installer build to use Tcl/Tk 8.6.11 (rc2, expected to be final -release). diff --git a/README.rst b/README.rst index c09ed1afbfb4c..3eae020b037b3 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -This is Python version 3.10.0 alpha 3 +This is Python version 3.10.0 alpha 4 ===================================== .. image:: https://travis-ci.com/python/cpython.svg?branch=master From webhook-mailer at python.org Mon Jan 4 16:33:54 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 04 Jan 2021 21:33:54 -0000 Subject: [Python-checkins] bpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095) Message-ID: https://github.com/python/cpython/commit/0b858cdd5d114f0890b11b6c4d6559d0ceb468ab commit: 0b858cdd5d114f0890b11b6c4d6559d0ceb468ab branch: master author: Erlend Egeberg Aasland committer: vstinner date: 2021-01-04T22:33:45+01:00 summary: bpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095) Convert the _multibytecodec extension module (CJK codecs) to multi-phase initialization (PEP 489). files: A Misc/NEWS.d/next/Library/2021-01-04-15-05-40.bpo-1635741.EOCfZY.rst M Modules/cjkcodecs/multibytecodec.c M Modules/cjkcodecs/multibytecodec.h diff --git a/Misc/NEWS.d/next/Library/2021-01-04-15-05-40.bpo-1635741.EOCfZY.rst b/Misc/NEWS.d/next/Library/2021-01-04-15-05-40.bpo-1635741.EOCfZY.rst new file mode 100644 index 0000000000000..7ba9a53ddf900 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-04-15-05-40.bpo-1635741.EOCfZY.rst @@ -0,0 +1,2 @@ +Convert the _multibytecodec extension module (CJK codecs) to multi-phase +initialization (:pep:`489`). Patch by Erlend E. Aasland. diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 9208b86b0c905..4f34b8a82fb94 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -10,11 +10,44 @@ #include "multibytecodec.h" #include "clinic/multibytecodec.c.h" +#define MODULE_NAME "_multibytecodec" + +typedef struct { + PyTypeObject *encoder_type; + PyTypeObject *decoder_type; + PyTypeObject *reader_type; + PyTypeObject *writer_type; + PyTypeObject *multibytecodec_type; +} _multibytecodec_state; + +static _multibytecodec_state * +_multibytecodec_get_state(PyObject *module) +{ + _multibytecodec_state *state = PyModule_GetState(module); + assert(state != NULL); + return state; +} + +static struct PyModuleDef _multibytecodecmodule; +static _multibytecodec_state * +_multibyte_codec_find_state_by_type(PyTypeObject *type) +{ + PyObject *module = _PyType_GetModuleByDef(type, &_multibytecodecmodule); + assert(module != NULL); + return _multibytecodec_get_state(module); +} + +#define clinic_get_state() _multibyte_codec_find_state_by_type(type) /*[clinic input] module _multibytecodec -class _multibytecodec.MultibyteCodec "MultibyteCodecObject *" "&MultibyteCodec_Type" +class _multibytecodec.MultibyteCodec "MultibyteCodecObject *" "clinic_get_state()->multibytecodec_type" +class _multibytecodec.MultibyteIncrementalEncoder "MultibyteIncrementalEncoderObject *" "clinic_get_state()->encoder_type" +class _multibytecodec.MultibyteIncrementalDecoder "MultibyteIncrementalDecoderObject *" "clinic_get_state()->decoder_type" +class _multibytecodec.MultibyteStreamReader "MultibyteStreamReaderObject *" "clinic_get_state()->reader_type" +class _multibytecodec.MultibyteStreamWriter "MultibyteStreamWriterObject *" "clinic_get_state()->writer_type" [clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6ad689546cbb5450]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=305a76dfdd24b99c]*/ +#undef clinic_get_state typedef struct { PyObject *inobj; @@ -691,39 +724,23 @@ static struct PyMethodDef multibytecodec_methods[] = { static void multibytecodec_dealloc(MultibyteCodecObject *self) { + PyTypeObject *tp = Py_TYPE(self); PyObject_Free(self); + Py_DECREF(tp); } -static PyTypeObject MultibyteCodec_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "MultibyteCodec", /* tp_name */ - sizeof(MultibyteCodecObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)multibytecodec_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - 0, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iterext */ - multibytecodec_methods, /* tp_methods */ +static PyType_Slot multibytecodec_slots[] = { + {Py_tp_dealloc, multibytecodec_dealloc}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_methods, multibytecodec_methods}, + {0, NULL}, +}; + +static PyType_Spec multibytecodec_spec = { + .name = MODULE_NAME ".MultibyteCodec", + .basicsize = sizeof(MultibyteCodecObject), + .flags = Py_TPFLAGS_DEFAULT, + .slots = multibytecodec_slots, }; @@ -868,11 +885,6 @@ decoder_feed_buffer(MultibyteStatefulDecoderContext *ctx, } -/*[clinic input] - class _multibytecodec.MultibyteIncrementalEncoder "MultibyteIncrementalEncoderObject *" "&MultibyteIncrementalEncoder_Type" -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=3be82909cd08924d]*/ - /*[clinic input] _multibytecodec.MultibyteIncrementalEncoder.encode @@ -1024,7 +1036,9 @@ mbiencoder_new(PyTypeObject *type, PyObject *args, PyObject *kwds) codec = PyObject_GetAttrString((PyObject *)type, "codec"); if (codec == NULL) goto errorexit; - if (!MultibyteCodec_Check(codec)) { + + _multibytecodec_state *state = _multibyte_codec_find_state_by_type(type); + if (!MultibyteCodec_Check(state, codec)) { PyErr_SetString(PyExc_TypeError, "codec is unexpected type"); goto errorexit; } @@ -1065,60 +1079,32 @@ mbiencoder_traverse(MultibyteIncrementalEncoderObject *self, static void mbiencoder_dealloc(MultibyteIncrementalEncoderObject *self) { + PyTypeObject *tp = Py_TYPE(self); PyObject_GC_UnTrack(self); ERROR_DECREF(self->errors); Py_CLEAR(self->pending); - Py_TYPE(self)->tp_free(self); + tp->tp_free(self); + Py_DECREF(tp); } -static PyTypeObject MultibyteIncrementalEncoder_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "MultibyteIncrementalEncoder", /* tp_name */ - sizeof(MultibyteIncrementalEncoderObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)mbiencoder_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC - | Py_TPFLAGS_BASETYPE, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)mbiencoder_traverse, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iterext */ - mbiencoder_methods, /* tp_methods */ - 0, /* tp_members */ - codecctx_getsets, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - mbiencoder_init, /* tp_init */ - 0, /* tp_alloc */ - mbiencoder_new, /* tp_new */ +static PyType_Slot encoder_slots[] = { + {Py_tp_dealloc, mbiencoder_dealloc}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_traverse, mbiencoder_traverse}, + {Py_tp_methods, mbiencoder_methods}, + {Py_tp_getset, codecctx_getsets}, + {Py_tp_init, mbiencoder_init}, + {Py_tp_new, mbiencoder_new}, + {0, NULL}, }; +static PyType_Spec encoder_spec = { + .name = MODULE_NAME ".MultibyteIncrementalEncoder", + .basicsize = sizeof(MultibyteIncrementalEncoderObject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + .slots = encoder_slots, +}; -/*[clinic input] - class _multibytecodec.MultibyteIncrementalDecoder "MultibyteIncrementalDecoderObject *" "&MultibyteIncrementalDecoder_Type" -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=f6003faaf2cea692]*/ /*[clinic input] _multibytecodec.MultibyteIncrementalDecoder.decode @@ -1324,7 +1310,9 @@ mbidecoder_new(PyTypeObject *type, PyObject *args, PyObject *kwds) codec = PyObject_GetAttrString((PyObject *)type, "codec"); if (codec == NULL) goto errorexit; - if (!MultibyteCodec_Check(codec)) { + + _multibytecodec_state *state = _multibyte_codec_find_state_by_type(type); + if (!MultibyteCodec_Check(state, codec)) { PyErr_SetString(PyExc_TypeError, "codec is unexpected type"); goto errorexit; } @@ -1365,59 +1353,30 @@ mbidecoder_traverse(MultibyteIncrementalDecoderObject *self, static void mbidecoder_dealloc(MultibyteIncrementalDecoderObject *self) { + PyTypeObject *tp = Py_TYPE(self); PyObject_GC_UnTrack(self); ERROR_DECREF(self->errors); - Py_TYPE(self)->tp_free(self); + tp->tp_free(self); + Py_DECREF(tp); } -static PyTypeObject MultibyteIncrementalDecoder_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "MultibyteIncrementalDecoder", /* tp_name */ - sizeof(MultibyteIncrementalDecoderObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)mbidecoder_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC - | Py_TPFLAGS_BASETYPE, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)mbidecoder_traverse, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iterext */ - mbidecoder_methods, /* tp_methods */ - 0, /* tp_members */ - codecctx_getsets, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - mbidecoder_init, /* tp_init */ - 0, /* tp_alloc */ - mbidecoder_new, /* tp_new */ +static PyType_Slot decoder_slots[] = { + {Py_tp_dealloc, mbidecoder_dealloc}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_traverse, mbidecoder_traverse}, + {Py_tp_methods, mbidecoder_methods}, + {Py_tp_getset, codecctx_getsets}, + {Py_tp_init, mbidecoder_init}, + {Py_tp_new, mbidecoder_new}, + {0, NULL}, }; - -/*[clinic input] - class _multibytecodec.MultibyteStreamReader "MultibyteStreamReaderObject *" "MultibyteStreamReader_Type" -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=d323634b74976f09]*/ +static PyType_Spec decoder_spec = { + .name = MODULE_NAME ".MultibyteIncrementalDecoder", + .basicsize = sizeof(MultibyteIncrementalDecoderObject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + .slots = decoder_slots, +}; static PyObject * mbstreamreader_iread(MultibyteStreamReaderObject *self, @@ -1667,7 +1626,9 @@ mbstreamreader_new(PyTypeObject *type, PyObject *args, PyObject *kwds) codec = PyObject_GetAttrString((PyObject *)type, "codec"); if (codec == NULL) goto errorexit; - if (!MultibyteCodec_Check(codec)) { + + _multibytecodec_state *state = _multibyte_codec_find_state_by_type(type); + if (!MultibyteCodec_Check(state, codec)) { PyErr_SetString(PyExc_TypeError, "codec is unexpected type"); goto errorexit; } @@ -1711,60 +1672,32 @@ mbstreamreader_traverse(MultibyteStreamReaderObject *self, static void mbstreamreader_dealloc(MultibyteStreamReaderObject *self) { + PyTypeObject *tp = Py_TYPE(self); PyObject_GC_UnTrack(self); ERROR_DECREF(self->errors); Py_XDECREF(self->stream); - Py_TYPE(self)->tp_free(self); + tp->tp_free(self); + Py_DECREF(tp); } -static PyTypeObject MultibyteStreamReader_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "MultibyteStreamReader", /* tp_name */ - sizeof(MultibyteStreamReaderObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)mbstreamreader_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC - | Py_TPFLAGS_BASETYPE, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)mbstreamreader_traverse, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iterext */ - mbstreamreader_methods, /* tp_methods */ - mbstreamreader_members, /* tp_members */ - codecctx_getsets, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - mbstreamreader_init, /* tp_init */ - 0, /* tp_alloc */ - mbstreamreader_new, /* tp_new */ +static PyType_Slot reader_slots[] = { + {Py_tp_dealloc, mbstreamreader_dealloc}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_traverse, mbstreamreader_traverse}, + {Py_tp_methods, mbstreamreader_methods}, + {Py_tp_members, mbstreamreader_members}, + {Py_tp_getset, codecctx_getsets}, + {Py_tp_init, mbstreamreader_init}, + {Py_tp_new, mbstreamreader_new}, + {0, NULL}, }; - -/*[clinic input] - class _multibytecodec.MultibyteStreamWriter "MultibyteStreamWriterObject *" "&MultibyteStreamWriter_Type" -[clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=cde22780a215d6ac]*/ +static PyType_Spec reader_spec = { + .name = MODULE_NAME ".MultibyteStreamReader", + .basicsize = sizeof(MultibyteStreamReaderObject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + .slots = reader_slots, +}; static int mbstreamwriter_iwrite(MultibyteStreamWriterObject *self, @@ -1899,7 +1832,9 @@ mbstreamwriter_new(PyTypeObject *type, PyObject *args, PyObject *kwds) codec = PyObject_GetAttrString((PyObject *)type, "codec"); if (codec == NULL) goto errorexit; - if (!MultibyteCodec_Check(codec)) { + + _multibytecodec_state *state = _multibyte_codec_find_state_by_type(type); + if (!MultibyteCodec_Check(state, codec)) { PyErr_SetString(PyExc_TypeError, "codec is unexpected type"); goto errorexit; } @@ -1943,10 +1878,12 @@ mbstreamwriter_traverse(MultibyteStreamWriterObject *self, static void mbstreamwriter_dealloc(MultibyteStreamWriterObject *self) { + PyTypeObject *tp = Py_TYPE(self); PyObject_GC_UnTrack(self); ERROR_DECREF(self->errors); Py_XDECREF(self->stream); - Py_TYPE(self)->tp_free(self); + tp->tp_free(self); + Py_DECREF(tp); } static struct PyMethodDef mbstreamwriter_methods[] = { @@ -1963,47 +1900,23 @@ static PyMemberDef mbstreamwriter_members[] = { {NULL,} }; -static PyTypeObject MultibyteStreamWriter_Type = { - PyVarObject_HEAD_INIT(NULL, 0) - "MultibyteStreamWriter", /* tp_name */ - sizeof(MultibyteStreamWriterObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)mbstreamwriter_dealloc, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC - | Py_TPFLAGS_BASETYPE, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)mbstreamwriter_traverse, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iterext */ - mbstreamwriter_methods, /* tp_methods */ - mbstreamwriter_members, /* tp_members */ - codecctx_getsets, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - mbstreamwriter_init, /* tp_init */ - 0, /* tp_alloc */ - mbstreamwriter_new, /* tp_new */ +static PyType_Slot writer_slots[] = { + {Py_tp_dealloc, mbstreamwriter_dealloc}, + {Py_tp_getattro, PyObject_GenericGetAttr}, + {Py_tp_traverse, mbstreamwriter_traverse}, + {Py_tp_methods, mbstreamwriter_methods}, + {Py_tp_members, mbstreamwriter_members}, + {Py_tp_getset, codecctx_getsets}, + {Py_tp_init, mbstreamwriter_init}, + {Py_tp_new, mbstreamwriter_new}, + {0, NULL}, +}; + +static PyType_Spec writer_spec = { + .name = MODULE_NAME ".MultibyteStreamWriter", + .basicsize = sizeof(MultibyteStreamWriterObject), + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + .slots = writer_slots, }; @@ -2030,7 +1943,8 @@ _multibytecodec___create_codec(PyObject *module, PyObject *arg) if (codec->codecinit != NULL && codec->codecinit(codec->config) != 0) return NULL; - self = PyObject_New(MultibyteCodecObject, &MultibyteCodec_Type); + _multibytecodec_state *state = _multibytecodec_get_state(module); + self = PyObject_New(MultibyteCodecObject, state->multibytecodec_type); if (self == NULL) return NULL; self->codec = codec; @@ -2038,51 +1952,94 @@ _multibytecodec___create_codec(PyObject *module, PyObject *arg) return (PyObject *)self; } -static struct PyMethodDef __methods[] = { +static int +_multibytecodec_traverse(PyObject *mod, visitproc visit, void *arg) +{ + _multibytecodec_state *state = _multibytecodec_get_state(mod); + Py_VISIT(state->multibytecodec_type); + Py_VISIT(state->encoder_type); + Py_VISIT(state->decoder_type); + Py_VISIT(state->reader_type); + Py_VISIT(state->writer_type); + return 0; +} + +static int +_multibytecodec_clear(PyObject *mod) +{ + _multibytecodec_state *state = _multibytecodec_get_state(mod); + Py_CLEAR(state->multibytecodec_type); + Py_CLEAR(state->encoder_type); + Py_CLEAR(state->decoder_type); + Py_CLEAR(state->reader_type); + Py_CLEAR(state->writer_type); + return 0; +} + +static void +_multibytecodec_free(void *mod) +{ + _multibytecodec_clear((PyObject *)mod); +} + +#define CREATE_TYPE(module, type, spec) \ + do { \ + type = (PyTypeObject *)PyType_FromModuleAndSpec(module, spec, NULL); \ + if (!type) { \ + return -1; \ + } \ + } while (0) + +#define ADD_TYPE(module, type) \ + do { \ + if (PyModule_AddType(module, type) < 0) { \ + return -1; \ + } \ + } while (0) + +static int +_multibytecodec_exec(PyObject *mod) +{ + _multibytecodec_state *state = _multibytecodec_get_state(mod); + CREATE_TYPE(mod, state->multibytecodec_type, &multibytecodec_spec); + CREATE_TYPE(mod, state->encoder_type, &encoder_spec); + CREATE_TYPE(mod, state->decoder_type, &decoder_spec); + CREATE_TYPE(mod, state->reader_type, &reader_spec); + CREATE_TYPE(mod, state->writer_type, &writer_spec); + + ADD_TYPE(mod, state->encoder_type); + ADD_TYPE(mod, state->decoder_type); + ADD_TYPE(mod, state->reader_type); + ADD_TYPE(mod, state->writer_type); + return 0; +} + +#undef CREATE_TYPE +#undef ADD_TYPE + +static struct PyMethodDef _multibytecodec_methods[] = { _MULTIBYTECODEC___CREATE_CODEC_METHODDEF {NULL, NULL}, }; +static PyModuleDef_Slot _multibytecodec_slots[] = { + {Py_mod_exec, _multibytecodec_exec}, + {0, NULL} +}; static struct PyModuleDef _multibytecodecmodule = { - PyModuleDef_HEAD_INIT, - "_multibytecodec", - NULL, - -1, - __methods, - NULL, - NULL, - NULL, - NULL + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "_multibytecodec", + .m_size = sizeof(_multibytecodec_state), + .m_methods = _multibytecodec_methods, + .m_slots = _multibytecodec_slots, + .m_traverse = _multibytecodec_traverse, + .m_clear = _multibytecodec_clear, + .m_free = _multibytecodec_free, }; PyMODINIT_FUNC PyInit__multibytecodec(void) { - PyObject *m; - PyTypeObject *typelist[] = { - &MultibyteIncrementalEncoder_Type, - &MultibyteIncrementalDecoder_Type, - &MultibyteStreamReader_Type, - &MultibyteStreamWriter_Type - }; - - if (PyType_Ready(&MultibyteCodec_Type) < 0) - return NULL; - - m = PyModule_Create(&_multibytecodecmodule); - if (m == NULL) - return NULL; - - for (size_t i = 0; i < Py_ARRAY_LENGTH(typelist); i++) { - if (PyModule_AddType(m, typelist[i]) < 0) { - return NULL; - } - } - - if (PyErr_Occurred()) { - Py_DECREF(m); - m = NULL; - } - return m; + return PyModuleDef_Init(&_multibytecodecmodule); } diff --git a/Modules/cjkcodecs/multibytecodec.h b/Modules/cjkcodecs/multibytecodec.h index 59468210b970c..69404ba96aa1f 100644 --- a/Modules/cjkcodecs/multibytecodec.h +++ b/Modules/cjkcodecs/multibytecodec.h @@ -65,7 +65,7 @@ typedef struct { MultibyteCodec *codec; } MultibyteCodecObject; -#define MultibyteCodec_Check(op) Py_IS_TYPE((op), &MultibyteCodec_Type) +#define MultibyteCodec_Check(state, op) Py_IS_TYPE((op), state->multibytecodec_type) #define _MultibyteStatefulCodec_HEAD \ PyObject_HEAD \ From webhook-mailer at python.org Mon Jan 4 18:16:48 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 04 Jan 2021 23:16:48 -0000 Subject: [Python-checkins] bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530) Message-ID: https://github.com/python/cpython/commit/f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4 commit: f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4 branch: master author: Erlend Egeberg Aasland committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-04T15:16:43-08:00 summary: bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530) Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.html#version_3_7_15): _"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_ files: A Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst M Lib/sqlite3/test/hooks.py diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index 2e620ecdf864c..6c1aaa2d60161 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -260,6 +260,14 @@ def trace(statement): cur.execute(queries[0]) con2.execute("create table bar(x)") cur.execute(queries[1]) + + # Extract from SQLite 3.7.15 changelog: + # Avoid invoking the sqlite3_trace() callback multiple times when a + # statement is automatically reprepared due to SQLITE_SCHEMA errors. + # + # See bpo-40810 + if sqlite.sqlite_version_info < (3, 7, 15): + queries.append(queries[-1]) self.assertEqual(traced_statements, queries) diff --git a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst new file mode 100644 index 0000000000000..1965ecd6ef511 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst @@ -0,0 +1 @@ +In :mod:`sqlite3`, fix `CheckTraceCallbackContent` for SQLite pre 3.7.15. From webhook-mailer at python.org Mon Jan 4 18:36:46 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 04 Jan 2021 23:36:46 -0000 Subject: [Python-checkins] bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530) Message-ID: https://github.com/python/cpython/commit/0ccac5ff587d7637854e5d3e75f0f9a8f5528e59 commit: 0ccac5ff587d7637854e5d3e75f0f9a8f5528e59 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-04T15:36:37-08:00 summary: bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530) Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.htmlGH-version_3_7_15): _"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_ (cherry picked from commit f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4) Co-authored-by: Erlend Egeberg Aasland files: A Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst M Lib/sqlite3/test/hooks.py diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index d74e74bf27227..214205c1167a4 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -265,6 +265,14 @@ def trace(statement): cur.execute(queries[0]) con2.execute("create table bar(x)") cur.execute(queries[1]) + + # Extract from SQLite 3.7.15 changelog: + # Avoid invoking the sqlite3_trace() callback multiple times when a + # statement is automatically reprepared due to SQLITE_SCHEMA errors. + # + # See bpo-40810 + if sqlite.sqlite_version_info < (3, 7, 15): + queries.append(queries[-1]) self.assertEqual(traced_statements, queries) diff --git a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst new file mode 100644 index 0000000000000..1965ecd6ef511 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst @@ -0,0 +1 @@ +In :mod:`sqlite3`, fix `CheckTraceCallbackContent` for SQLite pre 3.7.15. From webhook-mailer at python.org Mon Jan 4 18:41:19 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 04 Jan 2021 23:41:19 -0000 Subject: [Python-checkins] bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530) Message-ID: https://github.com/python/cpython/commit/80e5732d31bb7362c7b647acc618df701b3ae951 commit: 80e5732d31bb7362c7b647acc618df701b3ae951 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-04T15:41:03-08:00 summary: bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530) Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.htmlGH-version_3_7_15): _"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_ (cherry picked from commit f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4) Co-authored-by: Erlend Egeberg Aasland files: A Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst M Lib/sqlite3/test/hooks.py diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index d74e74bf27227..214205c1167a4 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -265,6 +265,14 @@ def trace(statement): cur.execute(queries[0]) con2.execute("create table bar(x)") cur.execute(queries[1]) + + # Extract from SQLite 3.7.15 changelog: + # Avoid invoking the sqlite3_trace() callback multiple times when a + # statement is automatically reprepared due to SQLITE_SCHEMA errors. + # + # See bpo-40810 + if sqlite.sqlite_version_info < (3, 7, 15): + queries.append(queries[-1]) self.assertEqual(traced_statements, queries) diff --git a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst new file mode 100644 index 0000000000000..1965ecd6ef511 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst @@ -0,0 +1 @@ +In :mod:`sqlite3`, fix `CheckTraceCallbackContent` for SQLite pre 3.7.15. From webhook-mailer at python.org Tue Jan 5 01:55:22 2021 From: webhook-mailer at python.org (brandtbucher) Date: Tue, 05 Jan 2021 06:55:22 -0000 Subject: [Python-checkins] Fix broken NEWS markup (GH-24110) Message-ID: https://github.com/python/cpython/commit/cde988e893793f58bf87e7a8c014926fd2e32904 commit: cde988e893793f58bf87e7a8c014926fd2e32904 branch: master author: Brandt Bucher committer: brandtbucher date: 2021-01-04T22:55:14-08:00 summary: Fix broken NEWS markup (GH-24110) files: M Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst diff --git a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst index 1965ecd6ef511..eafd94cabede9 100644 --- a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst +++ b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst @@ -1 +1 @@ -In :mod:`sqlite3`, fix `CheckTraceCallbackContent` for SQLite pre 3.7.15. +In :mod:`sqlite3`, fix ``CheckTraceCallbackContent`` for SQLite pre 3.7.15. From webhook-mailer at python.org Tue Jan 5 02:05:38 2021 From: webhook-mailer at python.org (brandtbucher) Date: Tue, 05 Jan 2021 07:05:38 -0000 Subject: [Python-checkins] bpo-40636: Remove overly-strict zip pickling tests (GH-24109) Message-ID: https://github.com/python/cpython/commit/27f9dafc2ba51864a9bc2fe5d6293eb4fd887bce commit: 27f9dafc2ba51864a9bc2fe5d6293eb4fd887bce branch: master author: Brandt Bucher committer: brandtbucher date: 2021-01-04T23:05:29-08:00 summary: bpo-40636: Remove overly-strict zip pickling tests (GH-24109) files: M Lib/test/test_builtin.py diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 8c9573731ae2e..295f0713bfd59 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1621,48 +1621,6 @@ def test_zip_pickle_strict_fail(self): self.assertEqual(self.iter_error(z1, ValueError), t) self.assertEqual(self.iter_error(z2, ValueError), t) - def test_zip_pickle_stability(self): - # Pickles of zip((1, 2, 3), (4, 5, 6)) dumped from 3.9: - pickles = [ - b'citertools\nizip\np0\n(c__builtin__\niter\np1\n((I1\nI2\nI3\ntp2\ntp3\nRp4\nI0\nbg1\n((I4\nI5\nI6\ntp5\ntp6\nRp7\nI0\nbtp8\nRp9\n.', - b'citertools\nizip\nq\x00(c__builtin__\niter\nq\x01((K\x01K\x02K\x03tq\x02tq\x03Rq\x04K\x00bh\x01((K\x04K\x05K\x06tq\x05tq\x06Rq\x07K\x00btq\x08Rq\t.', - b'\x80\x02citertools\nizip\nq\x00c__builtin__\niter\nq\x01K\x01K\x02K\x03\x87q\x02\x85q\x03Rq\x04K\x00bh\x01K\x04K\x05K\x06\x87q\x05\x85q\x06Rq\x07K\x00b\x86q\x08Rq\t.', - b'\x80\x03cbuiltins\nzip\nq\x00cbuiltins\niter\nq\x01K\x01K\x02K\x03\x87q\x02\x85q\x03Rq\x04K\x00bh\x01K\x04K\x05K\x06\x87q\x05\x85q\x06Rq\x07K\x00b\x86q\x08Rq\t.', - b'\x80\x04\x95L\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x03zip\x94\x93\x94\x8c\x08builtins\x94\x8c\x04iter\x94\x93\x94K\x01K\x02K\x03\x87\x94\x85\x94R\x94K\x00bh\x05K\x04K\x05K\x06\x87\x94\x85\x94R\x94K\x00b\x86\x94R\x94.', - b'\x80\x05\x95L\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x03zip\x94\x93\x94\x8c\x08builtins\x94\x8c\x04iter\x94\x93\x94K\x01K\x02K\x03\x87\x94\x85\x94R\x94K\x00bh\x05K\x04K\x05K\x06\x87\x94\x85\x94R\x94K\x00b\x86\x94R\x94.', - ] - for protocol, dump in enumerate(pickles): - z1 = zip((1, 2, 3), (4, 5, 6)) - z2 = zip((1, 2, 3), (4, 5, 6), strict=False) - z3 = pickle.loads(dump) - l3 = list(z3) - self.assertEqual(type(z3), zip) - self.assertEqual(pickle.dumps(z1, protocol), dump) - self.assertEqual(pickle.dumps(z2, protocol), dump) - self.assertEqual(list(z1), l3) - self.assertEqual(list(z2), l3) - - def test_zip_pickle_strict_stability(self): - # Pickles of zip((1, 2, 3), (4, 5), strict=True) dumped from 3.10: - pickles = [ - b'citertools\nizip\np0\n(c__builtin__\niter\np1\n((I1\nI2\nI3\ntp2\ntp3\nRp4\nI0\nbg1\n((I4\nI5\ntp5\ntp6\nRp7\nI0\nbtp8\nRp9\nI01\nb.', - b'citertools\nizip\nq\x00(c__builtin__\niter\nq\x01((K\x01K\x02K\x03tq\x02tq\x03Rq\x04K\x00bh\x01((K\x04K\x05tq\x05tq\x06Rq\x07K\x00btq\x08Rq\tI01\nb.', - b'\x80\x02citertools\nizip\nq\x00c__builtin__\niter\nq\x01K\x01K\x02K\x03\x87q\x02\x85q\x03Rq\x04K\x00bh\x01K\x04K\x05\x86q\x05\x85q\x06Rq\x07K\x00b\x86q\x08Rq\t\x88b.', - b'\x80\x03cbuiltins\nzip\nq\x00cbuiltins\niter\nq\x01K\x01K\x02K\x03\x87q\x02\x85q\x03Rq\x04K\x00bh\x01K\x04K\x05\x86q\x05\x85q\x06Rq\x07K\x00b\x86q\x08Rq\t\x88b.', - b'\x80\x04\x95L\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x03zip\x94\x93\x94\x8c\x08builtins\x94\x8c\x04iter\x94\x93\x94K\x01K\x02K\x03\x87\x94\x85\x94R\x94K\x00bh\x05K\x04K\x05\x86\x94\x85\x94R\x94K\x00b\x86\x94R\x94\x88b.', - b'\x80\x05\x95L\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x03zip\x94\x93\x94\x8c\x08builtins\x94\x8c\x04iter\x94\x93\x94K\x01K\x02K\x03\x87\x94\x85\x94R\x94K\x00bh\x05K\x04K\x05\x86\x94\x85\x94R\x94K\x00b\x86\x94R\x94\x88b.', - ] - a = (1, 2, 3) - b = (4, 5) - t = [(1, 4), (2, 5)] - for protocol, dump in enumerate(pickles): - z1 = zip(a, b, strict=True) - z2 = pickle.loads(dump) - self.assertEqual(pickle.dumps(z1, protocol), dump) - self.assertEqual(type(z2), zip) - self.assertEqual(self.iter_error(z1, ValueError), t) - self.assertEqual(self.iter_error(z2, ValueError), t) - def test_zip_bad_iterable(self): exception = TypeError() From webhook-mailer at python.org Tue Jan 5 02:13:23 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Tue, 05 Jan 2021 07:13:23 -0000 Subject: [Python-checkins] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) Message-ID: https://github.com/python/cpython/commit/59f9b4e4509be67494f3d45489fa55523175ff69 commit: 59f9b4e4509be67494f3d45489fa55523175ff69 branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-05T09:13:15+02:00 summary: bpo-42681: Fix test_curses failures related to color pairs (GH-24089) On ncurses 6.1 pair numbers are limited by SHORT_MAX-1, even with extended color support. Improve error reporting and tests for color functions. files: M Lib/test/test_curses.py M Modules/_cursesmodule.c diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 7b40d71474210..f2cad05b2c92e 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -47,6 +47,7 @@ def wrapped(self, *args, **kwargs): return wrapped term = os.environ.get('TERM') +SHORT_MAX = 0x7fff # If newterm was supported we could use it instead of initscr and not exit @unittest.skipIf(not term or term == 'unknown', @@ -327,11 +328,20 @@ def bad_colors2(self): def bad_pairs(self): return (-1, -2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + def test_start_color(self): + if not curses.has_colors(): + self.skipTest('requires colors support') + curses.start_color() + if verbose: + print(f'COLORS = {curses.COLORS}', file=sys.stderr) + print(f'COLOR_PAIRS = {curses.COLOR_PAIRS}', file=sys.stderr) + @requires_colors def test_color_content(self): self.assertEqual(curses.color_content(curses.COLOR_BLACK), (0, 0, 0)) curses.color_content(0) - curses.color_content(curses.COLORS - 1) + maxcolor = curses.COLORS - 1 + curses.color_content(maxcolor) for color in self.bad_colors(): self.assertRaises(ValueError, curses.color_content, color) @@ -352,11 +362,12 @@ def test_init_color(self): curses.init_color(0, 1000, 1000, 1000) self.assertEqual(curses.color_content(0), (1000, 1000, 1000)) - old = curses.color_content(curses.COLORS - 1) - curses.init_color(curses.COLORS - 1, *old) - self.addCleanup(curses.init_color, curses.COLORS - 1, *old) - curses.init_color(curses.COLORS - 1, 0, 500, 1000) - self.assertEqual(curses.color_content(curses.COLORS - 1), (0, 500, 1000)) + maxcolor = curses.COLORS - 1 + old = curses.color_content(maxcolor) + curses.init_color(maxcolor, *old) + self.addCleanup(curses.init_color, maxcolor, *old) + curses.init_color(maxcolor, 0, 500, 1000) + self.assertEqual(curses.color_content(maxcolor), (0, 500, 1000)) for color in self.bad_colors(): self.assertRaises(ValueError, curses.init_color, color, 0, 0, 0) @@ -365,13 +376,25 @@ def test_init_color(self): self.assertRaises(ValueError, curses.init_color, 0, 0, comp, 0) self.assertRaises(ValueError, curses.init_color, 0, 0, 0, comp) + def get_pair_limit(self): + pair_limit = curses.COLOR_PAIRS + if hasattr(curses, 'ncurses_version'): + if curses.has_extended_color_support(): + pair_limit += 2*curses.COLORS + 1 + if (not curses.has_extended_color_support() + or (6, 1) <= curses.ncurses_version < (6, 2)): + pair_limit = min(pair_limit, SHORT_MAX) + return pair_limit + @requires_colors def test_pair_content(self): if not hasattr(curses, 'use_default_colors'): self.assertEqual(curses.pair_content(0), (curses.COLOR_WHITE, curses.COLOR_BLACK)) curses.pair_content(0) - curses.pair_content(curses.COLOR_PAIRS - 1) + maxpair = self.get_pair_limit() - 1 + if maxpair > 0: + curses.pair_content(maxpair) for pair in self.bad_pairs(): self.assertRaises(ValueError, curses.pair_content, pair) @@ -384,11 +407,15 @@ def test_init_pair(self): curses.init_pair(1, 0, 0) self.assertEqual(curses.pair_content(1), (0, 0)) - curses.init_pair(1, curses.COLORS - 1, curses.COLORS - 1) - self.assertEqual(curses.pair_content(1), - (curses.COLORS - 1, curses.COLORS - 1)) - curses.init_pair(curses.COLOR_PAIRS - 1, 2, 3) - self.assertEqual(curses.pair_content(curses.COLOR_PAIRS - 1), (2, 3)) + maxcolor = curses.COLORS - 1 + curses.init_pair(1, maxcolor, 0) + self.assertEqual(curses.pair_content(1), (maxcolor, 0)) + curses.init_pair(1, 0, maxcolor) + self.assertEqual(curses.pair_content(1), (0, maxcolor)) + maxpair = self.get_pair_limit() - 1 + if maxpair > 1: + curses.init_pair(maxpair, 0, 0) + self.assertEqual(curses.pair_content(maxpair), (0, 0)) for pair in self.bad_pairs(): self.assertRaises(ValueError, curses.init_pair, pair, 0, 0) @@ -582,6 +609,8 @@ def test_update_lines_cols(self): @requires_curses_func('ncurses_version') def test_ncurses_version(self): v = curses.ncurses_version + if verbose: + print(f'ncurses_version = {curses.ncurses_version}', flush=True) self.assertIsInstance(v[:], tuple) self.assertEqual(len(v), 3) self.assertIsInstance(v[0], int) diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 23f6d96f5144e..7175c72296579 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -135,29 +135,28 @@ typedef chtype attr_t; /* No attr_t type is available */ #define STRICT_SYSV_CURSES #endif -#if defined(NCURSES_EXT_COLORS) && defined(NCURSES_EXT_FUNCS) +#if NCURSES_EXT_COLORS+0 && NCURSES_EXT_FUNCS+0 #define _NCURSES_EXTENDED_COLOR_FUNCS 1 #else #define _NCURSES_EXTENDED_COLOR_FUNCS 0 #endif /* defined(NCURSES_EXT_COLORS) && defined(NCURSES_EXT_FUNCS) */ #if _NCURSES_EXTENDED_COLOR_FUNCS -#define _NCURSES_COLOR_VAL_TYPE int +#define _CURSES_COLOR_VAL_TYPE int +#define _CURSES_COLOR_NUM_TYPE int #define _CURSES_INIT_COLOR_FUNC init_extended_color #define _CURSES_INIT_PAIR_FUNC init_extended_pair #define _COLOR_CONTENT_FUNC extended_color_content -#define _CURSES_PAIR_NUMBER_FUNC extended_pair_content +#define _CURSES_PAIR_CONTENT_FUNC extended_pair_content #else -#define _NCURSES_COLOR_VAL_TYPE short +#define _CURSES_COLOR_VAL_TYPE short +#define _CURSES_COLOR_NUM_TYPE short #define _CURSES_INIT_COLOR_FUNC init_color #define _CURSES_INIT_PAIR_FUNC init_pair #define _COLOR_CONTENT_FUNC color_content -#define _CURSES_PAIR_NUMBER_FUNC pair_content +#define _CURSES_PAIR_CONTENT_FUNC pair_content #endif /* _NCURSES_EXTENDED_COLOR_FUNCS */ -#define _CURSES_INIT_COLOR_FUNC_NAME Py_STRINGIFY(_CURSES_INIT_COLOR_FUNC) -#define _CURSES_INIT_PAIR_FUNC_NAME Py_STRINGIFY(_CURSES_INIT_PAIR_FUNC) - /*[clinic input] module _curses class _curses.window "PyCursesWindowObject *" "&PyCursesWindow_Type" @@ -2737,18 +2736,18 @@ static PyObject * _curses_color_content_impl(PyObject *module, int color_number) /*[clinic end generated code: output=17b466df7054e0de input=03b5ed0472662aea]*/ { - _NCURSES_COLOR_VAL_TYPE r,g,b; + _CURSES_COLOR_VAL_TYPE r,g,b; PyCursesInitialised; PyCursesInitialisedColor; - if (_COLOR_CONTENT_FUNC(color_number, &r, &g, &b) != ERR) - return Py_BuildValue("(iii)", r, g, b); - else { - PyErr_SetString(PyCursesError, - "Argument 1 was out of range. Check value of COLORS."); + if (_COLOR_CONTENT_FUNC(color_number, &r, &g, &b) == ERR) { + PyErr_Format(PyCursesError, "%s() returned ERR", + Py_STRINGIFY(_COLOR_CONTENT_FUNC)); return NULL; } + + return Py_BuildValue("(iii)", r, g, b); } /*[clinic input] @@ -3190,7 +3189,8 @@ _curses_init_color_impl(PyObject *module, int color_number, short r, short g, PyCursesInitialised; PyCursesInitialisedColor; - return PyCursesCheckERR(_CURSES_INIT_COLOR_FUNC(color_number, r, g, b), _CURSES_INIT_COLOR_FUNC_NAME); + return PyCursesCheckERR(_CURSES_INIT_COLOR_FUNC(color_number, r, g, b), + Py_STRINGIFY(_CURSES_INIT_COLOR_FUNC)); } /*[clinic input] @@ -3217,7 +3217,20 @@ _curses_init_pair_impl(PyObject *module, int pair_number, int fg, int bg) PyCursesInitialised; PyCursesInitialisedColor; - return PyCursesCheckERR(_CURSES_INIT_PAIR_FUNC(pair_number, fg, bg), _CURSES_INIT_PAIR_FUNC_NAME); + if (_CURSES_INIT_PAIR_FUNC(pair_number, fg, bg) == ERR) { + if (pair_number >= COLOR_PAIRS) { + PyErr_Format(PyExc_ValueError, + "Color pair is greater than COLOR_PAIRS-1 (%d).", + COLOR_PAIRS - 1); + } + else { + PyErr_Format(PyCursesError, "%s() returned ERR", + Py_STRINGIFY(_CURSES_INIT_PAIR_FUNC)); + } + return NULL; + } + + Py_RETURN_NONE; } static PyObject *ModDict; @@ -3845,14 +3858,21 @@ static PyObject * _curses_pair_content_impl(PyObject *module, int pair_number) /*[clinic end generated code: output=4a726dd0e6885f3f input=03970f840fc7b739]*/ { - _NCURSES_COLOR_VAL_TYPE f, b; + _CURSES_COLOR_NUM_TYPE f, b; PyCursesInitialised; PyCursesInitialisedColor; - if (_CURSES_PAIR_NUMBER_FUNC(pair_number, &f, &b)==ERR) { - PyErr_SetString(PyCursesError, - "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); + if (_CURSES_PAIR_CONTENT_FUNC(pair_number, &f, &b) == ERR) { + if (pair_number >= COLOR_PAIRS) { + PyErr_Format(PyExc_ValueError, + "Color pair is greater than COLOR_PAIRS-1 (%d).", + COLOR_PAIRS - 1); + } + else { + PyErr_Format(PyCursesError, "%s() returned ERR", + Py_STRINGIFY(_CURSES_PAIR_CONTENT_FUNC)); + } return NULL; } From webhook-mailer at python.org Tue Jan 5 02:26:51 2021 From: webhook-mailer at python.org (terryjreedy) Date: Tue, 05 Jan 2021 07:26:51 -0000 Subject: [Python-checkins] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491) Message-ID: https://github.com/python/cpython/commit/e40e2a2cc94c554e7e245a8ca5a7432d31a95766 commit: e40e2a2cc94c554e7e245a8ca5a7432d31a95766 branch: master author: Cheryl Sabella committer: terryjreedy date: 2021-01-05T02:26:43-05:00 summary: bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491) Make menu items work with formatter, add docstrings, add 100% tests. Co-authored-by: Terry Jan Reedy files: A Lib/idlelib/idle_test/test_zzdummy.py A Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/configdialog.py M Lib/idlelib/extend.txt M Lib/idlelib/zzdummy.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 7167314ca7e59..b04ea7493477e 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2021-10-04? ====================================== +bpo-32631: Finish zzdummy example extension module: make menu entries +work; add docstrings and tests with 100% coverage. + bpo-42508: Keep IDLE running on macOS. Remove obsolete workaround that prevented running files with shortcuts when using new universal2 installers built on macOS 11. diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index a84e1c5668f99..73e64852c69df 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -2316,7 +2316,15 @@ def detach(self): Shell Preferences: Auto-Squeeze Min. Lines is the minimum number of lines of output to automatically "squeeze". -''' +''', + 'Extensions': ''' +ZzDummy: This extension is provided as an example for how to create and +use an extension. Enable indicates whether the extension is active or +not; likewise enable_editor and enable_shell indicate which windows it +will be active on. For this extension, z-text is the text that will be +inserted at or removed from the beginning of the lines of selected text, +or the current line if no selection. +''', } diff --git a/Lib/idlelib/extend.txt b/Lib/idlelib/extend.txt index c9cb2e8297eb3..b482f76c4fb0f 100644 --- a/Lib/idlelib/extend.txt +++ b/Lib/idlelib/extend.txt @@ -28,8 +28,8 @@ variables: (There are a few more, but they are rarely useful.) The extension class must not directly bind Window Manager (e.g. X) events. -Rather, it must define one or more virtual events, e.g. <>, and -corresponding methods, e.g. zoom_height_event(). The virtual events will be +Rather, it must define one or more virtual events, e.g. <>, and +corresponding methods, e.g. z_in_event(). The virtual events will be bound to the corresponding methods, and Window Manager events can then be bound to the virtual events. (This indirection is done so that the key bindings can easily be changed, and so that other sources of virtual events can exist, such @@ -54,21 +54,21 @@ Extensions are not required to define menu entries for all the events they implement. (They are also not required to create keybindings, but in that case there must be empty bindings in cofig-extensions.def) -Here is a complete example: +Here is a partial example from zzdummy.py: -class ZoomHeight: +class ZzDummy: menudefs = [ - ('edit', [ - None, # Separator - ('_Zoom Height', '<>'), - ]) + ('format', [ + ('Z in', '<>'), + ('Z out', '<>'), + ] ) ] def __init__(self, editwin): self.editwin = editwin - def zoom_height_event(self, event): + def z_in_event(self, event=None): "...Do what you want here..." The final piece of the puzzle is the file "config-extensions.def", which is diff --git a/Lib/idlelib/idle_test/test_zzdummy.py b/Lib/idlelib/idle_test/test_zzdummy.py new file mode 100644 index 0000000000000..1013cdc3c46f4 --- /dev/null +++ b/Lib/idlelib/idle_test/test_zzdummy.py @@ -0,0 +1,152 @@ +"Test zzdummy, coverage 100%." + +from idlelib import zzdummy +import unittest +from test.support import requires +from tkinter import Tk, Text +from unittest import mock +from idlelib import config +from idlelib import editor +from idlelib import format + + +usercfg = zzdummy.idleConf.userCfg +testcfg = { + 'main': config.IdleUserConfParser(''), + 'highlight': config.IdleUserConfParser(''), + 'keys': config.IdleUserConfParser(''), + 'extensions': config.IdleUserConfParser(''), +} +code_sample = """\ + +class C1(): + # Class comment. + def __init__(self, a, b): + self.a = a + self.b = b +""" + + +class DummyEditwin: + get_selection_indices = editor.EditorWindow.get_selection_indices + def __init__(self, root, text): + self.root = root + self.top = root + self.text = text + self.fregion = format.FormatRegion(self) + self.text.undo_block_start = mock.Mock() + self.text.undo_block_stop = mock.Mock() + + +class ZZDummyTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + requires('gui') + root = cls.root = Tk() + root.withdraw() + text = cls.text = Text(cls.root) + cls.editor = DummyEditwin(root, text) + zzdummy.idleConf.userCfg = testcfg + + @classmethod + def tearDownClass(cls): + zzdummy.idleConf.userCfg = usercfg + del cls.editor, cls.text + cls.root.update_idletasks() + for id in cls.root.tk.call('after', 'info'): + cls.root.after_cancel(id) # Need for EditorWindow. + cls.root.destroy() + del cls.root + + def setUp(self): + text = self.text + text.insert('1.0', code_sample) + text.undo_block_start.reset_mock() + text.undo_block_stop.reset_mock() + zz = self.zz = zzdummy.ZzDummy(self.editor) + zzdummy.ZzDummy.ztext = '# ignore #' + + def tearDown(self): + self.text.delete('1.0', 'end') + del self.zz + + def checklines(self, text, value): + # Verify that there are lines being checked. + end_line = int(float(text.index('end'))) + + # Check each line for the starting text. + actual = [] + for line in range(1, end_line): + txt = text.get(f'{line}.0', f'{line}.end') + actual.append(txt.startswith(value)) + return actual + + def test_init(self): + zz = self.zz + self.assertEqual(zz.editwin, self.editor) + self.assertEqual(zz.text, self.editor.text) + + def test_reload(self): + self.assertEqual(self.zz.ztext, '# ignore #') + testcfg['extensions'].SetOption('ZzDummy', 'z-text', 'spam') + zzdummy.ZzDummy.reload() + self.assertEqual(self.zz.ztext, 'spam') + + def test_z_in_event(self): + eq = self.assertEqual + zz = self.zz + text = zz.text + eq(self.zz.ztext, '# ignore #') + + # No lines have the leading text. + expected = [False, False, False, False, False, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.tag_add('sel', '2.0', '4.end') + eq(zz.z_in_event(), 'break') + expected = [False, True, True, True, False, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.undo_block_start.assert_called_once() + text.undo_block_stop.assert_called_once() + + def test_z_out_event(self): + eq = self.assertEqual + zz = self.zz + text = zz.text + eq(self.zz.ztext, '# ignore #') + + # Prepend text. + text.tag_add('sel', '2.0', '5.end') + zz.z_in_event() + text.undo_block_start.reset_mock() + text.undo_block_stop.reset_mock() + + # Select a few lines to remove text. + text.tag_remove('sel', '1.0', 'end') + text.tag_add('sel', '3.0', '4.end') + eq(zz.z_out_event(), 'break') + expected = [False, True, False, False, True, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.undo_block_start.assert_called_once() + text.undo_block_stop.assert_called_once() + + def test_roundtrip(self): + # Insert and remove to all code should give back original text. + zz = self.zz + text = zz.text + + text.tag_add('sel', '1.0', 'end-1c') + zz.z_in_event() + zz.z_out_event() + + self.assertEqual(text.get('1.0', 'end-1c'), code_sample) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/Lib/idlelib/zzdummy.py b/Lib/idlelib/zzdummy.py index 3c4b1d23b0d37..1247e8f1cc052 100644 --- a/Lib/idlelib/zzdummy.py +++ b/Lib/idlelib/zzdummy.py @@ -1,42 +1,73 @@ -"Example extension, also used for testing." +"""Example extension, also used for testing. + +See extend.txt for more details on creating an extension. +See config-extension.def for configuring an extension. +""" from idlelib.config import idleConf +from functools import wraps + + +def format_selection(format_line): + "Apply a formatting function to all of the selected lines." + + @wraps(format_line) + def apply(self, event=None): + head, tail, chars, lines = self.formatter.get_region() + for pos in range(len(lines) - 1): + line = lines[pos] + lines[pos] = format_line(self, line) + self.formatter.set_region(head, tail, chars, lines) + return 'break' -ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') + return apply class ZzDummy: + """Prepend or remove initial text from selected lines.""" -## menudefs = [ -## ('format', [ -## ('Z in', '<>'), -## ('Z out', '<>'), -## ] ) -## ] + # Extend the format menu. + menudefs = [ + ('format', [ + ('Z in', '<>'), + ('Z out', '<>'), + ] ) + ] def __init__(self, editwin): + "Initialize the settings for this extension." + self.editwin = editwin self.text = editwin.text - z_in = False + self.formatter = editwin.fregion @classmethod def reload(cls): + "Load class variables from config." cls.ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') - def z_in_event(self, event): + @format_selection + def z_in_event(self, line): + """Insert text at the beginning of each selected line. + + This is bound to the <> virtual event when the extensions + are loaded. """ + return f'{self.ztext}{line}' + + @format_selection + def z_out_event(self, line): + """Remove specific text from the beginning of each selected line. + + This is bound to the <> virtual event when the extensions + are loaded. """ - text = self.text - text.undo_block_start() - for line in range(1, text.index('end')): - text.insert('%d.0', ztext) - text.undo_block_stop() - return "break" + zlength = 0 if not line.startswith(self.ztext) else len(self.ztext) + return line[zlength:] - def z_out_event(self, event): pass ZzDummy.reload() -##if __name__ == "__main__": -## import unittest -## unittest.main('idlelib.idle_test.test_zzdummy', -## verbosity=2, exit=False) + +if __name__ == "__main__": + import unittest + unittest.main('idlelib.idle_test.test_zzdummy', verbosity=2, exit=False) diff --git a/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst b/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst new file mode 100644 index 0000000000000..c422f43b6d6dd --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst @@ -0,0 +1,2 @@ +Finish zzdummy example extension module: make menu entries work; +add docstrings and tests with 100% coverage. From webhook-mailer at python.org Tue Jan 5 03:09:39 2021 From: webhook-mailer at python.org (terryjreedy) Date: Tue, 05 Jan 2021 08:09:39 -0000 Subject: [Python-checkins] bpo-42508: Keep IDLE running on macOS (GH-23577) (#23670) Message-ID: https://github.com/python/cpython/commit/d05b470d6ad6dfe0d4933ffc3c5c1e2c03b390bd commit: d05b470d6ad6dfe0d4933ffc3c5c1e2c03b390bd branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: terryjreedy date: 2021-01-05T03:09:30-05:00 summary: bpo-42508: Keep IDLE running on macOS (GH-23577) (#23670) Remove obsolete workaround that prevented running files with shortcuts when using new universal2 installers built on macOS 11. Ignore buggy 2nd run_module_event call. (cherry picked from commit 57e511361047895231f5ee7abfdfbbc60e11d2db) Co-authored-by: Terry Jan Reedy files: A Misc/NEWS.d/next/IDLE/2020-11-30-19-46-05.bpo-42508.fE7w4M.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/runscript.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 4107ff7f7e924..27faa70bf72e7 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,10 @@ Released on 2020-12-?? ====================================== +bpo-42508: Keep IDLE running on macOS. Remove obsolete workaround +that prevented running files with shortcuts when using new universal2 +installers built on macOS 11. + bpo-42426: Fix reporting offset of the RE error in searchengine. bpo-42416: Get docstrings for IDLE calltips more often diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py index a54108794ab59..028b0dbd21dfe 100644 --- a/Lib/idlelib/runscript.py +++ b/Lib/idlelib/runscript.py @@ -11,6 +11,7 @@ """ import os import tabnanny +import time import tokenize import tkinter.messagebox as tkMessageBox @@ -42,9 +43,7 @@ def __init__(self, editwin): self.root = self.editwin.root # cli_args is list of strings that extends sys.argv self.cli_args = [] - - if macosx.isCocoaTk(): - self.editwin.text_frame.bind('<>', self._run_module_event) + self.perf = 0.0 # Workaround for macOS 11 Uni2; see bpo-42508. def check_module_event(self, event): if isinstance(self.editwin, outwin.OutputWindow): @@ -107,24 +106,10 @@ def checksyntax(self, filename): finally: shell.set_warning_stream(saved_stream) - def run_module_event(self, event): - if macosx.isCocoaTk(): - # Tk-Cocoa in MacOSX is broken until at least - # Tk 8.5.9, and without this rather - # crude workaround IDLE would hang when a user - # tries to run a module using the keyboard shortcut - # (the menu item works fine). - self.editwin.text_frame.after(200, - lambda: self.editwin.text_frame.event_generate( - '<>')) - return 'break' - else: - return self._run_module_event(event) - def run_custom_event(self, event): - return self._run_module_event(event, customize=True) + return self.run_module_event(event, customize=True) - def _run_module_event(self, event, *, customize=False): + def run_module_event(self, event, *, customize=False): """Run the module after setting up the environment. First check the syntax. Next get customization. If OK, make @@ -133,6 +118,8 @@ def _run_module_event(self, event, *, customize=False): module being executed and also add that directory to its sys.path if not already included. """ + if macosx.isCocoaTk() and (time.perf_counter() - self.perf < .05): + return 'break' if isinstance(self.editwin, outwin.OutputWindow): self.editwin.text.bell() return 'break' @@ -218,6 +205,7 @@ def errorbox(self, title, message): # XXX This should really be a function of EditorWindow... tkMessageBox.showerror(title, message, parent=self.editwin.text) self.editwin.text.focus_set() + self.perf = time.perf_counter() if __name__ == "__main__": diff --git a/Misc/NEWS.d/next/IDLE/2020-11-30-19-46-05.bpo-42508.fE7w4M.rst b/Misc/NEWS.d/next/IDLE/2020-11-30-19-46-05.bpo-42508.fE7w4M.rst new file mode 100644 index 0000000000000..b449351f7f458 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2020-11-30-19-46-05.bpo-42508.fE7w4M.rst @@ -0,0 +1,3 @@ +Keep IDLE running on macOS. Remove obsolete workaround that prevented +running files with shortcuts when using new universal2 installers built +on macOS 11. From webhook-mailer at python.org Tue Jan 5 03:18:26 2021 From: webhook-mailer at python.org (miss-islington) Date: Tue, 05 Jan 2021 08:18:26 -0000 Subject: [Python-checkins] Fix broken NEWS markup (GH-24110) Message-ID: https://github.com/python/cpython/commit/30e9ee3f438e1fcd2d26c89881228886de06afd6 commit: 30e9ee3f438e1fcd2d26c89881228886de06afd6 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-05T00:18:17-08:00 summary: Fix broken NEWS markup (GH-24110) (cherry picked from commit cde988e893793f58bf87e7a8c014926fd2e32904) Co-authored-by: Brandt Bucher files: M Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst diff --git a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst index 1965ecd6ef511..eafd94cabede9 100644 --- a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst +++ b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst @@ -1 +1 @@ -In :mod:`sqlite3`, fix `CheckTraceCallbackContent` for SQLite pre 3.7.15. +In :mod:`sqlite3`, fix ``CheckTraceCallbackContent`` for SQLite pre 3.7.15. From webhook-mailer at python.org Tue Jan 5 03:18:52 2021 From: webhook-mailer at python.org (miss-islington) Date: Tue, 05 Jan 2021 08:18:52 -0000 Subject: [Python-checkins] Fix broken NEWS markup (GH-24110) Message-ID: https://github.com/python/cpython/commit/3b6dcb86302ddbf48f57f7bd2ffc63a801b11e64 commit: 3b6dcb86302ddbf48f57f7bd2ffc63a801b11e64 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-05T00:18:43-08:00 summary: Fix broken NEWS markup (GH-24110) (cherry picked from commit cde988e893793f58bf87e7a8c014926fd2e32904) Co-authored-by: Brandt Bucher files: M Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst diff --git a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst index 1965ecd6ef511..eafd94cabede9 100644 --- a/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst +++ b/Misc/NEWS.d/next/Tests/2020-05-30-10-56-38.bpo-40810.LPqDLQ.rst @@ -1 +1 @@ -In :mod:`sqlite3`, fix `CheckTraceCallbackContent` for SQLite pre 3.7.15. +In :mod:`sqlite3`, fix ``CheckTraceCallbackContent`` for SQLite pre 3.7.15. From webhook-mailer at python.org Tue Jan 5 03:26:07 2021 From: webhook-mailer at python.org (terryjreedy) Date: Tue, 05 Jan 2021 08:26:07 -0000 Subject: [Python-checkins] [3.9] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491) Message-ID: https://github.com/python/cpython/commit/d82392facefe0564dd55aa2adf04bf21c704858d commit: d82392facefe0564dd55aa2adf04bf21c704858d branch: 3.9 author: Terry Jan Reedy committer: terryjreedy date: 2021-01-05T03:25:57-05:00 summary: [3.9] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491) Make menu items work with formatter, add docstrings, add 100% tests. Co-authored-by: Terry Jan Reedy (cherry picked from commit e40e2a2cc94c554e7e245a8ca5a7432d31a95766) Co-authored-by: Cheryl Sabella files: A Lib/idlelib/idle_test/test_zzdummy.py A Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/configdialog.py M Lib/idlelib/extend.txt M Lib/idlelib/zzdummy.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 869be0a62b7db..c466fe9cc7776 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2020-12-07? ====================================== +bpo-32631: Finish zzdummy example extension module: make menu entries +work; add docstrings and tests with 100% coverage. + bpo-42508: Keep IDLE running on macOS. Remove obsolete workaround that prevented running files with shortcuts when using new universal2 installers built on macOS 11. diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index a84e1c5668f99..73e64852c69df 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -2316,7 +2316,15 @@ def detach(self): Shell Preferences: Auto-Squeeze Min. Lines is the minimum number of lines of output to automatically "squeeze". -''' +''', + 'Extensions': ''' +ZzDummy: This extension is provided as an example for how to create and +use an extension. Enable indicates whether the extension is active or +not; likewise enable_editor and enable_shell indicate which windows it +will be active on. For this extension, z-text is the text that will be +inserted at or removed from the beginning of the lines of selected text, +or the current line if no selection. +''', } diff --git a/Lib/idlelib/extend.txt b/Lib/idlelib/extend.txt index c9cb2e8297eb3..b482f76c4fb0f 100644 --- a/Lib/idlelib/extend.txt +++ b/Lib/idlelib/extend.txt @@ -28,8 +28,8 @@ variables: (There are a few more, but they are rarely useful.) The extension class must not directly bind Window Manager (e.g. X) events. -Rather, it must define one or more virtual events, e.g. <>, and -corresponding methods, e.g. zoom_height_event(). The virtual events will be +Rather, it must define one or more virtual events, e.g. <>, and +corresponding methods, e.g. z_in_event(). The virtual events will be bound to the corresponding methods, and Window Manager events can then be bound to the virtual events. (This indirection is done so that the key bindings can easily be changed, and so that other sources of virtual events can exist, such @@ -54,21 +54,21 @@ Extensions are not required to define menu entries for all the events they implement. (They are also not required to create keybindings, but in that case there must be empty bindings in cofig-extensions.def) -Here is a complete example: +Here is a partial example from zzdummy.py: -class ZoomHeight: +class ZzDummy: menudefs = [ - ('edit', [ - None, # Separator - ('_Zoom Height', '<>'), - ]) + ('format', [ + ('Z in', '<>'), + ('Z out', '<>'), + ] ) ] def __init__(self, editwin): self.editwin = editwin - def zoom_height_event(self, event): + def z_in_event(self, event=None): "...Do what you want here..." The final piece of the puzzle is the file "config-extensions.def", which is diff --git a/Lib/idlelib/idle_test/test_zzdummy.py b/Lib/idlelib/idle_test/test_zzdummy.py new file mode 100644 index 0000000000000..1013cdc3c46f4 --- /dev/null +++ b/Lib/idlelib/idle_test/test_zzdummy.py @@ -0,0 +1,152 @@ +"Test zzdummy, coverage 100%." + +from idlelib import zzdummy +import unittest +from test.support import requires +from tkinter import Tk, Text +from unittest import mock +from idlelib import config +from idlelib import editor +from idlelib import format + + +usercfg = zzdummy.idleConf.userCfg +testcfg = { + 'main': config.IdleUserConfParser(''), + 'highlight': config.IdleUserConfParser(''), + 'keys': config.IdleUserConfParser(''), + 'extensions': config.IdleUserConfParser(''), +} +code_sample = """\ + +class C1(): + # Class comment. + def __init__(self, a, b): + self.a = a + self.b = b +""" + + +class DummyEditwin: + get_selection_indices = editor.EditorWindow.get_selection_indices + def __init__(self, root, text): + self.root = root + self.top = root + self.text = text + self.fregion = format.FormatRegion(self) + self.text.undo_block_start = mock.Mock() + self.text.undo_block_stop = mock.Mock() + + +class ZZDummyTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + requires('gui') + root = cls.root = Tk() + root.withdraw() + text = cls.text = Text(cls.root) + cls.editor = DummyEditwin(root, text) + zzdummy.idleConf.userCfg = testcfg + + @classmethod + def tearDownClass(cls): + zzdummy.idleConf.userCfg = usercfg + del cls.editor, cls.text + cls.root.update_idletasks() + for id in cls.root.tk.call('after', 'info'): + cls.root.after_cancel(id) # Need for EditorWindow. + cls.root.destroy() + del cls.root + + def setUp(self): + text = self.text + text.insert('1.0', code_sample) + text.undo_block_start.reset_mock() + text.undo_block_stop.reset_mock() + zz = self.zz = zzdummy.ZzDummy(self.editor) + zzdummy.ZzDummy.ztext = '# ignore #' + + def tearDown(self): + self.text.delete('1.0', 'end') + del self.zz + + def checklines(self, text, value): + # Verify that there are lines being checked. + end_line = int(float(text.index('end'))) + + # Check each line for the starting text. + actual = [] + for line in range(1, end_line): + txt = text.get(f'{line}.0', f'{line}.end') + actual.append(txt.startswith(value)) + return actual + + def test_init(self): + zz = self.zz + self.assertEqual(zz.editwin, self.editor) + self.assertEqual(zz.text, self.editor.text) + + def test_reload(self): + self.assertEqual(self.zz.ztext, '# ignore #') + testcfg['extensions'].SetOption('ZzDummy', 'z-text', 'spam') + zzdummy.ZzDummy.reload() + self.assertEqual(self.zz.ztext, 'spam') + + def test_z_in_event(self): + eq = self.assertEqual + zz = self.zz + text = zz.text + eq(self.zz.ztext, '# ignore #') + + # No lines have the leading text. + expected = [False, False, False, False, False, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.tag_add('sel', '2.0', '4.end') + eq(zz.z_in_event(), 'break') + expected = [False, True, True, True, False, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.undo_block_start.assert_called_once() + text.undo_block_stop.assert_called_once() + + def test_z_out_event(self): + eq = self.assertEqual + zz = self.zz + text = zz.text + eq(self.zz.ztext, '# ignore #') + + # Prepend text. + text.tag_add('sel', '2.0', '5.end') + zz.z_in_event() + text.undo_block_start.reset_mock() + text.undo_block_stop.reset_mock() + + # Select a few lines to remove text. + text.tag_remove('sel', '1.0', 'end') + text.tag_add('sel', '3.0', '4.end') + eq(zz.z_out_event(), 'break') + expected = [False, True, False, False, True, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.undo_block_start.assert_called_once() + text.undo_block_stop.assert_called_once() + + def test_roundtrip(self): + # Insert and remove to all code should give back original text. + zz = self.zz + text = zz.text + + text.tag_add('sel', '1.0', 'end-1c') + zz.z_in_event() + zz.z_out_event() + + self.assertEqual(text.get('1.0', 'end-1c'), code_sample) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/Lib/idlelib/zzdummy.py b/Lib/idlelib/zzdummy.py index 3c4b1d23b0d37..1247e8f1cc052 100644 --- a/Lib/idlelib/zzdummy.py +++ b/Lib/idlelib/zzdummy.py @@ -1,42 +1,73 @@ -"Example extension, also used for testing." +"""Example extension, also used for testing. + +See extend.txt for more details on creating an extension. +See config-extension.def for configuring an extension. +""" from idlelib.config import idleConf +from functools import wraps + + +def format_selection(format_line): + "Apply a formatting function to all of the selected lines." + + @wraps(format_line) + def apply(self, event=None): + head, tail, chars, lines = self.formatter.get_region() + for pos in range(len(lines) - 1): + line = lines[pos] + lines[pos] = format_line(self, line) + self.formatter.set_region(head, tail, chars, lines) + return 'break' -ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') + return apply class ZzDummy: + """Prepend or remove initial text from selected lines.""" -## menudefs = [ -## ('format', [ -## ('Z in', '<>'), -## ('Z out', '<>'), -## ] ) -## ] + # Extend the format menu. + menudefs = [ + ('format', [ + ('Z in', '<>'), + ('Z out', '<>'), + ] ) + ] def __init__(self, editwin): + "Initialize the settings for this extension." + self.editwin = editwin self.text = editwin.text - z_in = False + self.formatter = editwin.fregion @classmethod def reload(cls): + "Load class variables from config." cls.ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') - def z_in_event(self, event): + @format_selection + def z_in_event(self, line): + """Insert text at the beginning of each selected line. + + This is bound to the <> virtual event when the extensions + are loaded. """ + return f'{self.ztext}{line}' + + @format_selection + def z_out_event(self, line): + """Remove specific text from the beginning of each selected line. + + This is bound to the <> virtual event when the extensions + are loaded. """ - text = self.text - text.undo_block_start() - for line in range(1, text.index('end')): - text.insert('%d.0', ztext) - text.undo_block_stop() - return "break" + zlength = 0 if not line.startswith(self.ztext) else len(self.ztext) + return line[zlength:] - def z_out_event(self, event): pass ZzDummy.reload() -##if __name__ == "__main__": -## import unittest -## unittest.main('idlelib.idle_test.test_zzdummy', -## verbosity=2, exit=False) + +if __name__ == "__main__": + import unittest + unittest.main('idlelib.idle_test.test_zzdummy', verbosity=2, exit=False) diff --git a/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst b/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst new file mode 100644 index 0000000000000..c422f43b6d6dd --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst @@ -0,0 +1,2 @@ +Finish zzdummy example extension module: make menu entries work; +add docstrings and tests with 100% coverage. From webhook-mailer at python.org Tue Jan 5 04:18:12 2021 From: webhook-mailer at python.org (terryjreedy) Date: Tue, 05 Jan 2021 09:18:12 -0000 Subject: [Python-checkins] [3.8] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491) Message-ID: https://github.com/python/cpython/commit/a087a97438e922fcace357ff4c29806ff65838d8 commit: a087a97438e922fcace357ff4c29806ff65838d8 branch: 3.8 author: Terry Jan Reedy committer: terryjreedy date: 2021-01-05T04:18:02-05:00 summary: [3.8] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491) Make menu items work with formatter, add docstrings, add 100% tests. Co-authored-by: Cheryl Sabella Co-authored-by: Terry Jan Reedy (cherry picked from commit e40e2a2cc94c554e7e245a8ca5a7432d31a95766) files: A Lib/idlelib/idle_test/test_zzdummy.py A Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/configdialog.py M Lib/idlelib/extend.txt M Lib/idlelib/zzdummy.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 27faa70bf72e7..bc15501a7b062 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2020-12-?? ====================================== +bpo-32631: Finish zzdummy example extension module: make menu entries +work; add docstrings and tests with 100% coverage. + bpo-42508: Keep IDLE running on macOS. Remove obsolete workaround that prevented running files with shortcuts when using new universal2 installers built on macOS 11. diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index a84e1c5668f99..73e64852c69df 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -2316,7 +2316,15 @@ def detach(self): Shell Preferences: Auto-Squeeze Min. Lines is the minimum number of lines of output to automatically "squeeze". -''' +''', + 'Extensions': ''' +ZzDummy: This extension is provided as an example for how to create and +use an extension. Enable indicates whether the extension is active or +not; likewise enable_editor and enable_shell indicate which windows it +will be active on. For this extension, z-text is the text that will be +inserted at or removed from the beginning of the lines of selected text, +or the current line if no selection. +''', } diff --git a/Lib/idlelib/extend.txt b/Lib/idlelib/extend.txt index c9cb2e8297eb3..b482f76c4fb0f 100644 --- a/Lib/idlelib/extend.txt +++ b/Lib/idlelib/extend.txt @@ -28,8 +28,8 @@ variables: (There are a few more, but they are rarely useful.) The extension class must not directly bind Window Manager (e.g. X) events. -Rather, it must define one or more virtual events, e.g. <>, and -corresponding methods, e.g. zoom_height_event(). The virtual events will be +Rather, it must define one or more virtual events, e.g. <>, and +corresponding methods, e.g. z_in_event(). The virtual events will be bound to the corresponding methods, and Window Manager events can then be bound to the virtual events. (This indirection is done so that the key bindings can easily be changed, and so that other sources of virtual events can exist, such @@ -54,21 +54,21 @@ Extensions are not required to define menu entries for all the events they implement. (They are also not required to create keybindings, but in that case there must be empty bindings in cofig-extensions.def) -Here is a complete example: +Here is a partial example from zzdummy.py: -class ZoomHeight: +class ZzDummy: menudefs = [ - ('edit', [ - None, # Separator - ('_Zoom Height', '<>'), - ]) + ('format', [ + ('Z in', '<>'), + ('Z out', '<>'), + ] ) ] def __init__(self, editwin): self.editwin = editwin - def zoom_height_event(self, event): + def z_in_event(self, event=None): "...Do what you want here..." The final piece of the puzzle is the file "config-extensions.def", which is diff --git a/Lib/idlelib/idle_test/test_zzdummy.py b/Lib/idlelib/idle_test/test_zzdummy.py new file mode 100644 index 0000000000000..1013cdc3c46f4 --- /dev/null +++ b/Lib/idlelib/idle_test/test_zzdummy.py @@ -0,0 +1,152 @@ +"Test zzdummy, coverage 100%." + +from idlelib import zzdummy +import unittest +from test.support import requires +from tkinter import Tk, Text +from unittest import mock +from idlelib import config +from idlelib import editor +from idlelib import format + + +usercfg = zzdummy.idleConf.userCfg +testcfg = { + 'main': config.IdleUserConfParser(''), + 'highlight': config.IdleUserConfParser(''), + 'keys': config.IdleUserConfParser(''), + 'extensions': config.IdleUserConfParser(''), +} +code_sample = """\ + +class C1(): + # Class comment. + def __init__(self, a, b): + self.a = a + self.b = b +""" + + +class DummyEditwin: + get_selection_indices = editor.EditorWindow.get_selection_indices + def __init__(self, root, text): + self.root = root + self.top = root + self.text = text + self.fregion = format.FormatRegion(self) + self.text.undo_block_start = mock.Mock() + self.text.undo_block_stop = mock.Mock() + + +class ZZDummyTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + requires('gui') + root = cls.root = Tk() + root.withdraw() + text = cls.text = Text(cls.root) + cls.editor = DummyEditwin(root, text) + zzdummy.idleConf.userCfg = testcfg + + @classmethod + def tearDownClass(cls): + zzdummy.idleConf.userCfg = usercfg + del cls.editor, cls.text + cls.root.update_idletasks() + for id in cls.root.tk.call('after', 'info'): + cls.root.after_cancel(id) # Need for EditorWindow. + cls.root.destroy() + del cls.root + + def setUp(self): + text = self.text + text.insert('1.0', code_sample) + text.undo_block_start.reset_mock() + text.undo_block_stop.reset_mock() + zz = self.zz = zzdummy.ZzDummy(self.editor) + zzdummy.ZzDummy.ztext = '# ignore #' + + def tearDown(self): + self.text.delete('1.0', 'end') + del self.zz + + def checklines(self, text, value): + # Verify that there are lines being checked. + end_line = int(float(text.index('end'))) + + # Check each line for the starting text. + actual = [] + for line in range(1, end_line): + txt = text.get(f'{line}.0', f'{line}.end') + actual.append(txt.startswith(value)) + return actual + + def test_init(self): + zz = self.zz + self.assertEqual(zz.editwin, self.editor) + self.assertEqual(zz.text, self.editor.text) + + def test_reload(self): + self.assertEqual(self.zz.ztext, '# ignore #') + testcfg['extensions'].SetOption('ZzDummy', 'z-text', 'spam') + zzdummy.ZzDummy.reload() + self.assertEqual(self.zz.ztext, 'spam') + + def test_z_in_event(self): + eq = self.assertEqual + zz = self.zz + text = zz.text + eq(self.zz.ztext, '# ignore #') + + # No lines have the leading text. + expected = [False, False, False, False, False, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.tag_add('sel', '2.0', '4.end') + eq(zz.z_in_event(), 'break') + expected = [False, True, True, True, False, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.undo_block_start.assert_called_once() + text.undo_block_stop.assert_called_once() + + def test_z_out_event(self): + eq = self.assertEqual + zz = self.zz + text = zz.text + eq(self.zz.ztext, '# ignore #') + + # Prepend text. + text.tag_add('sel', '2.0', '5.end') + zz.z_in_event() + text.undo_block_start.reset_mock() + text.undo_block_stop.reset_mock() + + # Select a few lines to remove text. + text.tag_remove('sel', '1.0', 'end') + text.tag_add('sel', '3.0', '4.end') + eq(zz.z_out_event(), 'break') + expected = [False, True, False, False, True, False, False] + actual = self.checklines(text, zz.ztext) + eq(expected, actual) + + text.undo_block_start.assert_called_once() + text.undo_block_stop.assert_called_once() + + def test_roundtrip(self): + # Insert and remove to all code should give back original text. + zz = self.zz + text = zz.text + + text.tag_add('sel', '1.0', 'end-1c') + zz.z_in_event() + zz.z_out_event() + + self.assertEqual(text.get('1.0', 'end-1c'), code_sample) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/Lib/idlelib/zzdummy.py b/Lib/idlelib/zzdummy.py index 8084499646653..1247e8f1cc052 100644 --- a/Lib/idlelib/zzdummy.py +++ b/Lib/idlelib/zzdummy.py @@ -1,42 +1,73 @@ -"Example extension, also used for testing." +"""Example extension, also used for testing. + +See extend.txt for more details on creating an extension. +See config-extension.def for configuring an extension. +""" from idlelib.config import idleConf +from functools import wraps + + +def format_selection(format_line): + "Apply a formatting function to all of the selected lines." + + @wraps(format_line) + def apply(self, event=None): + head, tail, chars, lines = self.formatter.get_region() + for pos in range(len(lines) - 1): + line = lines[pos] + lines[pos] = format_line(self, line) + self.formatter.set_region(head, tail, chars, lines) + return 'break' -ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') + return apply class ZzDummy: + """Prepend or remove initial text from selected lines.""" -## menudefs = [ -## ('format', [ -## ('Z in', '<>'), -## ('Z out', '<>'), -## ] ) -## ] + # Extend the format menu. + menudefs = [ + ('format', [ + ('Z in', '<>'), + ('Z out', '<>'), + ] ) + ] def __init__(self, editwin): + "Initialize the settings for this extension." + self.editwin = editwin self.text = editwin.text - z_in = False + self.formatter = editwin.fregion @classmethod def reload(cls): + "Load class variables from config." cls.ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') - def z_in_event(self, event): + @format_selection + def z_in_event(self, line): + """Insert text at the beginning of each selected line. + + This is bound to the <> virtual event when the extensions + are loaded. """ + return f'{self.ztext}{line}' + + @format_selection + def z_out_event(self, line): + """Remove specific text from the beginning of each selected line. + + This is bound to the <> virtual event when the extensions + are loaded. """ - text = self.text - text.undo_block_start() - for line in range(1, text.index('end')): - text.insert('%d.0', ztest) - text.undo_block_stop() - return "break" + zlength = 0 if not line.startswith(self.ztext) else len(self.ztext) + return line[zlength:] - def z_out_event(self, event): pass ZzDummy.reload() -##if __name__ == "__main__": -## import unittest -## unittest.main('idlelib.idle_test.test_zzdummy', -## verbosity=2, exit=False) + +if __name__ == "__main__": + import unittest + unittest.main('idlelib.idle_test.test_zzdummy', verbosity=2, exit=False) diff --git a/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst b/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst new file mode 100644 index 0000000000000..c422f43b6d6dd --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2019-06-30-20-31-09.bpo-32631.e7_4BG.rst @@ -0,0 +1,2 @@ +Finish zzdummy example extension module: make menu entries work; +add docstrings and tests with 100% coverage. From webhook-mailer at python.org Tue Jan 5 07:04:21 2021 From: webhook-mailer at python.org (markshannon) Date: Tue, 05 Jan 2021 12:04:21 -0000 Subject: [Python-checkins] bpo-42823: Fix frame lineno when frame.f_trace is set (GH-24099) Message-ID: https://github.com/python/cpython/commit/ee9f98d9f4b881ee15868a836a2b99271df1bc0e commit: ee9f98d9f4b881ee15868a836a2b99271df1bc0e branch: master author: Mark Shannon committer: markshannon date: 2021-01-05T12:04:10Z summary: bpo-42823: Fix frame lineno when frame.f_trace is set (GH-24099) * Add test for frame.f_lineno with/without tracing. * Make sure that frame.f_lineno is correct regardless of whether frame.f_trace is set. * Update importlib * Add NEWS files: A Misc/NEWS.d/next/Core and Builtins/2021-01-04-18-17-07.bpo-42823.dcSynu.rst M Include/cpython/frameobject.h M Lib/test/test_frame.py M Objects/codeobject.c M Objects/frameobject.c M Python/ceval.c M Python/compile.c M Python/importlib_external.h diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h index 63240b5b6d5cc..28170615a0433 100644 --- a/Include/cpython/frameobject.h +++ b/Include/cpython/frameobject.h @@ -42,12 +42,7 @@ struct _frame { PyObject *f_gen; int f_lasti; /* Last instruction if called */ - /* Call PyFrame_GetLineNumber() instead of reading this field - directly. As of 2.3 f_lineno is only valid when tracing is - active (i.e. when f_trace is set). At other times we use - PyCode_Addr2Line to calculate the line from the current - bytecode index. */ - int f_lineno; /* Current line number */ + int f_lineno; /* Current line number. Only valid if non-zero */ int f_iblock; /* index in f_blockstack */ PyFrameState f_state; /* What state the frame is in */ PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ diff --git a/Lib/test/test_frame.py b/Lib/test/test_frame.py index a8696f011f945..7ac37b6937502 100644 --- a/Lib/test/test_frame.py +++ b/Lib/test/test_frame.py @@ -1,4 +1,5 @@ import re +import sys import types import unittest import weakref @@ -94,6 +95,26 @@ def g(): f.clear() self.assertTrue(endly) + def test_lineno_with_tracing(self): + def record_line(): + f = sys._getframe(1) + lines.append(f.f_lineno-f.f_code.co_firstlineno) + + def test(trace): + record_line() + if trace: + sys._getframe(0).f_trace = True + record_line() + record_line() + + expected_lines = [1, 4, 5] + lines = [] + test(False) + self.assertEqual(lines, expected_lines) + lines = [] + test(True) + self.assertEqual(lines, expected_lines) + @support.cpython_only def test_clear_refcycles(self): # .clear() doesn't leave any refcycle behind diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-04-18-17-07.bpo-42823.dcSynu.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-04-18-17-07.bpo-42823.dcSynu.rst new file mode 100644 index 0000000000000..77dbc0262f46f --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-04-18-17-07.bpo-42823.dcSynu.rst @@ -0,0 +1 @@ +frame.f_lineno is correct even if frame.f_trace is set to True diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 0b0b8f98ae4f3..f7613e8fd21b1 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -1261,7 +1261,8 @@ PyLineTable_InitAddressRange(char *linetable, int firstlineno, PyCodeAddressRang range->lo_next = linetable; range->ar_start = -1; range->ar_end = 0; - range->ar_computed_line = range->ar_line = firstlineno; + range->ar_computed_line = firstlineno; + range->ar_line = -1; } int diff --git a/Objects/frameobject.c b/Objects/fra