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/frameobject.c index 787cd8b272bb1..4c5eaa23d345b 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -44,7 +44,7 @@ int PyFrame_GetLineNumber(PyFrameObject *f) { assert(f != NULL); - if (f->f_trace) { + if (f->f_lineno != 0) { return f->f_lineno; } else { @@ -476,8 +476,8 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno, void *Py_UNUSED(ignore start_block_stack = pop_block(start_block_stack); } - /* Finally set the new f_lineno and f_lasti and return OK. */ - f->f_lineno = new_lineno; + /* Finally set the new f_lasti and return OK. */ + f->f_lineno = 0; f->f_lasti = best_addr; return 0; } @@ -498,11 +498,9 @@ frame_gettrace(PyFrameObject *f, void *closure) static int frame_settrace(PyFrameObject *f, PyObject* v, void *closure) { - /* We rely on f_lineno being accurate when f_trace is set. */ - f->f_lineno = PyFrame_GetLineNumber(f); - - if (v == Py_None) + if (v == Py_None) { v = NULL; + } Py_XINCREF(v); Py_XSETREF(f->f_trace, v); diff --git a/Python/ceval.c b/Python/ceval.c index f0f39539c97bb..609215623b948 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4993,27 +4993,28 @@ maybe_call_line_trace(Py_tracefunc func, PyObject *obj, PyCodeAddressRange *bounds, int *instr_prev) { int result = 0; - int line = frame->f_lineno; - /* If the last instruction executed isn't in the current - instruction window, reset the window. - */ - line = _PyCode_CheckLineNumber(frame->f_lasti, bounds); /* If the last instruction falls at the start of a line or if it represents a jump backwards, update the frame's line number and then call the trace function if we're tracing source lines. */ - if ((line != frame->f_lineno || frame->f_lasti < *instr_prev)) { - if (line != -1) { + int lastline = bounds->ar_line; + int line = _PyCode_CheckLineNumber(frame->f_lasti, bounds); + if (line != -1 && frame->f_trace_lines) { + /* Trace backward edges or first instruction of a new line */ + if (frame->f_lasti < *instr_prev || + (line != lastline && frame->f_lasti == bounds->ar_start)) + { frame->f_lineno = line; - if (frame->f_trace_lines) { - result = call_trace(func, obj, tstate, frame, PyTrace_LINE, Py_None); - } + result = call_trace(func, obj, tstate, frame, PyTrace_LINE, Py_None); + frame->f_lineno = 0; } } /* Always emit an opcode event if we're tracing all opcodes. */ if (frame->f_trace_opcodes) { + frame->f_lineno = _PyCode_CheckLineNumber(frame->f_lasti, bounds); result = call_trace(func, obj, tstate, frame, PyTrace_OPCODE, Py_None); + frame->f_lineno = 0; } *instr_prev = frame->f_lasti; return result; diff --git a/Python/compile.c b/Python/compile.c index ddeb666322570..cf5c639feab7f 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -6558,6 +6558,12 @@ ensure_exits_have_lineno(struct compiler *c) if (is_exit_without_lineno(entry)) { entry->b_instr[0].i_lineno = c->u->u_firstlineno; } + /* Eliminate empty blocks */ + for (basicblock *b = c->u->u_blocks; b != NULL; b = b->b_list) { + while (b->b_next && b->b_next->b_iused == 0) { + b->b_next = b->b_next->b_next; + } + } /* Any remaining reachable exit blocks without line number can only be reached by * fall through, and thus can only have a single predecessor */ for (basicblock *b = c->u->u_blocks; b != NULL; b = b->b_list) { diff --git a/Python/importlib_external.h b/Python/importlib_external.h index 4b5d086e84c18..7ae4d1e7e9808 100644 --- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -1525,1150 +1525,1150 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 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, + 3,0,0,115,14,0,0,0,14,2,16,1,38,1,4,128, + 14,2,42,1,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,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,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,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,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,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,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,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,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, - 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, + 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,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, + 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,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,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,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,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,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,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,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,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, - 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, + 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,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, + 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, - 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, + 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,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, - 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, + 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, - 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, + 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, }; From webhook-mailer at python.org Tue Jan 5 07:23:48 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Tue, 05 Jan 2021 12:23:48 -0000 Subject: [Python-checkins] [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113) Message-ID: https://github.com/python/cpython/commit/9b3a53a8264d4c469a3f3d8c037e74c010be3e5c commit: 9b3a53a8264d4c469a3f3d8c037e74c010be3e5c branch: 3.9 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-05T14:23:19+02:00 summary: [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113) On ncurses 6.1 pair numbers are limited by SHORT_MAX-1. Improve error reporting and tests for color functions. (cherry picked from commit 59f9b4e4509be67494f3d45489fa55523175ff69) 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 e310d191f97e9..de9f301737d8c 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -323,11 +323,20 @@ def bad_colors(self): def bad_pairs(self): return (-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(min(curses.COLORS - 1, SHORT_MAX)) + maxcolor = min(curses.COLORS - 1, SHORT_MAX) + curses.color_content(maxcolor) for color in self.bad_colors(): self.assertRaises(OverflowError, curses.color_content, color) @@ -368,13 +377,18 @@ def test_init_color(self): self.assertRaises(curses.error, curses.init_color, 0, 0, comp, 0) self.assertRaises(curses.error, curses.init_color, 0, 0, 0, comp) + def get_pair_limit(self): + return min(curses.COLOR_PAIRS, SHORT_MAX) + @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)) + maxpair = self.get_pair_limit() - 1 + if maxpair > 0: + curses.pair_content(maxpair) for pair in self.bad_pairs(): self.assertRaises(OverflowError, curses.pair_content, pair) @@ -389,11 +403,14 @@ def test_init_pair(self): 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)) + 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(OverflowError, curses.init_pair, pair, 0, 0) @@ -591,6 +608,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 0914e20466fab..d129248e36347 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2592,13 +2592,18 @@ _curses_color_content_impl(PyObject *module, short color_number) PyCursesInitialised; PyCursesInitialisedColor; - if (color_content(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(color_number, &r, &g, &b) == ERR) { + if (color_number >= COLORS) { + PyErr_SetString(PyCursesError, + "Argument 1 was out of range. Check value of COLORS."); + } + else { + PyErr_SetString(PyCursesError, "color_content() returned ERR"); + } return NULL; } + + return Py_BuildValue("(iii)", r, g, b); } /*[clinic input] @@ -3701,9 +3706,14 @@ _curses_pair_content_impl(PyObject *module, short pair_number) PyCursesInitialised; PyCursesInitialisedColor; - if (pair_content(pair_number, &f, &b)==ERR) { - PyErr_SetString(PyCursesError, - "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); + if (pair_content(pair_number, &f, &b) == ERR) { + if (pair_number >= COLOR_PAIRS) { + PyErr_SetString(PyCursesError, + "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); + } + else { + PyErr_SetString(PyCursesError, "pair_content() returned ERR"); + } return NULL; } From webhook-mailer at python.org Tue Jan 5 09:04:33 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Tue, 05 Jan 2021 14:04:33 -0000 Subject: [Python-checkins] [3.8] [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113) (GH-24116) Message-ID: https://github.com/python/cpython/commit/e2c847e0c518dd6c63a898b8265ba54b71548bd6 commit: e2c847e0c518dd6c63a898b8265ba54b71548bd6 branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-05T16:04:25+02:00 summary: [3.8] [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113) (GH-24116) On ncurses 6.1 pair numbers are limited by SHORT_MAX-1. Improve error reporting and tests for color functions. (cherry picked from commit 59f9b4e4509be67494f3d45489fa55523175ff69) (cherry picked from commit 9b3a53a8264d4c469a3f3d8c037e74c010be3e5c) 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 e39161fde311d..8991134e08063 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -319,11 +319,20 @@ def bad_colors(self): def bad_pairs(self): return (-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(min(curses.COLORS - 1, SHORT_MAX)) + maxcolor = min(curses.COLORS - 1, SHORT_MAX) + curses.color_content(maxcolor) for color in self.bad_colors(): self.assertRaises(OverflowError, curses.color_content, color) @@ -364,13 +373,18 @@ def test_init_color(self): self.assertRaises(curses.error, curses.init_color, 0, 0, comp, 0) self.assertRaises(curses.error, curses.init_color, 0, 0, 0, comp) + def get_pair_limit(self): + return min(curses.COLOR_PAIRS, SHORT_MAX) + @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)) + maxpair = self.get_pair_limit() - 1 + if maxpair > 0: + curses.pair_content(maxpair) for pair in self.bad_pairs(): self.assertRaises(OverflowError, curses.pair_content, pair) @@ -385,11 +399,14 @@ def test_init_pair(self): 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)) + 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(OverflowError, curses.init_pair, pair, 0, 0) @@ -587,6 +604,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 47459d65ff6e4..0f35cdd286121 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2592,13 +2592,18 @@ _curses_color_content_impl(PyObject *module, short color_number) PyCursesInitialised; PyCursesInitialisedColor; - if (color_content(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(color_number, &r, &g, &b) == ERR) { + if (color_number >= COLORS) { + PyErr_SetString(PyCursesError, + "Argument 1 was out of range. Check value of COLORS."); + } + else { + PyErr_SetString(PyCursesError, "color_content() returned ERR"); + } return NULL; } + + return Py_BuildValue("(iii)", r, g, b); } /*[clinic input] @@ -3617,9 +3622,14 @@ _curses_pair_content_impl(PyObject *module, short pair_number) PyCursesInitialised; PyCursesInitialisedColor; - if (pair_content(pair_number, &f, &b)==ERR) { - PyErr_SetString(PyCursesError, - "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); + if (pair_content(pair_number, &f, &b) == ERR) { + if (pair_number >= COLOR_PAIRS) { + PyErr_SetString(PyCursesError, + "Argument 1 was out of range. (0..COLOR_PAIRS-1)"); + } + else { + PyErr_SetString(PyCursesError, "pair_content() returned ERR"); + } return NULL; } From webhook-mailer at python.org Tue Jan 5 10:47:23 2021 From: webhook-mailer at python.org (encukou) Date: Tue, 05 Jan 2021 15:47:23 -0000 Subject: [Python-checkins] [3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24005) Message-ID: https://github.com/python/cpython/commit/6e72ab909de58e89b5a7cd6899587e203cf129a3 commit: 6e72ab909de58e89b5a7cd6899587e203cf129a3 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: encukou date: 2021-01-05T16:46:58+01:00 summary: [3.9] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24005) ``` In file included from /usr/include/python3.8/Python.h:147: In file included from /usr/include/python3.8/abstract.h:837: /usr/include/python3.8/cpython/abstract.h:91:11: error: cast from 'char *' to 'vectorcallfunc *' (aka 'struct _object *(**)(struct _object *, struct _object *const *, unsigned long, struct _object *)') increases required alignment from 1 to 8 [-Werror,-Wcast-align] ptr = (vectorcallfunc*)(((char *)callable) + offset); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` Co-authored-by: Petr Viktorin Co-Authored-By: Andreas Schneider Co-Authored-By: Antoine Pitrou (cherry picked from commit 056c08211b402b4dbc1530a9de9d00ad5309909f) files: A Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst M Include/cpython/abstract.h M Objects/call.c diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index 7bc80833a746e..0f1304d26af33 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -67,7 +67,7 @@ PyVectorcall_Function(PyObject *callable) { PyTypeObject *tp; Py_ssize_t offset; - vectorcallfunc *ptr; + vectorcallfunc ptr; assert(callable != NULL); tp = Py_TYPE(callable); @@ -77,8 +77,8 @@ PyVectorcall_Function(PyObject *callable) assert(PyCallable_Check(callable)); offset = tp->tp_vectorcall_offset; assert(offset > 0); - ptr = (vectorcallfunc *)(((char *)callable) + offset); - return *ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; } /* Call the callable object 'callable' with the "vectorcall" calling 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 new file mode 100644 index 0000000000000..538488e2fbacc --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst @@ -0,0 +1,2 @@ +Fix an alignment build warning/error in function ``PyVectorcall_Function()``. +Patch by Andreas Schneider, Antoine Pitrou and Petr Viktorin. diff --git a/Objects/call.c b/Objects/call.c index 61426c7e09e4e..87dc0dbbdb504 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -205,6 +205,7 @@ PyObject * PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs) { PyThreadState *tstate = _PyThreadState_GET(); + vectorcallfunc func; /* get vectorcallfunc as in PyVectorcall_Function, but without * the Py_TPFLAGS_HAVE_VECTORCALL check */ @@ -215,7 +216,7 @@ PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs) Py_TYPE(callable)->tp_name); return NULL; } - vectorcallfunc func = *(vectorcallfunc *)(((char *)callable) + offset); + memcpy(&func, (char *) callable + offset, sizeof(func)); if (func == NULL) { _PyErr_Format(tstate, PyExc_TypeError, "'%.200s' object does not support vectorcall", From webhook-mailer at python.org Tue Jan 5 16:35:12 2021 From: webhook-mailer at python.org (zooba) Date: Tue, 05 Jan 2021 21:35:12 -0000 Subject: [Python-checkins] bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125) Message-ID: https://github.com/python/cpython/commit/afb71443788a7b20f9104243b3d8d37e3d12cfe2 commit: afb71443788a7b20f9104243b3d8d37e3d12cfe2 branch: master author: Steve Dower committer: zooba date: 2021-01-05T21:35:01Z summary: bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125) files: A Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst M PCbuild/get_externals.bat M PCbuild/python.props M PCbuild/readme.txt diff --git a/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst b/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst new file mode 100644 index 0000000000000..8d4bb34ff909c --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst @@ -0,0 +1 @@ +Updated Windows installer to include OpenSSL 1.1.1i diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 799c46641f5ac..222efe20f9ee2 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -53,7 +53,7 @@ echo.Fetching external libraries... set libraries= set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi -if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1g +if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1i set libraries=%libraries% sqlite-3.33.0.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.10.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.10.0 @@ -77,7 +77,7 @@ echo.Fetching external binaries... set binaries= if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi -if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1g +if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1i if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.10.0 if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 diff --git a/PCbuild/python.props b/PCbuild/python.props index acc41a2c01768..769dabc5641ca 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -62,8 +62,8 @@ $(ExternalsDir)libffi\ $(ExternalsDir)libffi\$(ArchName)\ $(libffiOutDir)include - $(ExternalsDir)openssl-1.1.1g\ - $(ExternalsDir)openssl-bin-1.1.1g\$(ArchName)\ + $(ExternalsDir)openssl-1.1.1i\ + $(ExternalsDir)openssl-bin-1.1.1i\$(ArchName)\ $(opensslOutDir)include $(ExternalsDir)\nasm-2.11.06\ $(ExternalsDir)\zlib-1.2.11\ diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index 4335c9f71d0d2..cfd570126aa97 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -169,7 +169,7 @@ _lzma Homepage: http://tukaani.org/xz/ _ssl - Python wrapper for version 1.1.1c of the OpenSSL secure sockets + Python wrapper for version 1.1.1i of the OpenSSL secure sockets library, which is downloaded from our binaries repository at https://github.com/python/cpython-bin-deps. From webhook-mailer at python.org Tue Jan 5 17:02:13 2021 From: webhook-mailer at python.org (zooba) Date: Tue, 05 Jan 2021 22:02:13 -0000 Subject: [Python-checkins] bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675) Message-ID: https://github.com/python/cpython/commit/dd74c01d3bd2833f72ffe400a1d10b8583c0ba6a commit: dd74c01d3bd2833f72ffe400a1d10b8583c0ba6a branch: master author: Erlend Egeberg Aasland committer: zooba date: 2021-01-05T22:01:56Z summary: bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675) files: A Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst M PCbuild/get_externals.bat M PCbuild/python.props M PCbuild/readme.txt diff --git a/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst b/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst new file mode 100644 index 0000000000000..afb6530c8f66d --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst @@ -0,0 +1 @@ +Upgrade Windows installer to use SQLite 3.34.0. diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 222efe20f9ee2..213fa66908c49 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -54,7 +54,7 @@ set libraries= set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1i -set libraries=%libraries% sqlite-3.33.0.0 +set libraries=%libraries% sqlite-3.34.0.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.10.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.10.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tix-8.4.3.6 diff --git a/PCbuild/python.props b/PCbuild/python.props index 769dabc5641ca..3fa774816a753 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -56,7 +56,7 @@ $(EXTERNALS_DIR) $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`)) $(ExternalsDir)\ - $(ExternalsDir)sqlite-3.33.0.0\ + $(ExternalsDir)sqlite-3.34.0.0\ $(ExternalsDir)bzip2-1.0.6\ $(ExternalsDir)xz-5.2.2\ $(ExternalsDir)libffi\ diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index cfd570126aa97..af2f1bfe0d41b 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -188,7 +188,7 @@ _ssl again when building. _sqlite3 - Wraps SQLite 3.33.0, which is itself built by sqlite3.vcxproj + Wraps SQLite 3.34.0, which is itself built by sqlite3.vcxproj Homepage: http://www.sqlite.org/ _tkinter From webhook-mailer at python.org Tue Jan 5 17:46:45 2021 From: webhook-mailer at python.org (miss-islington) Date: Tue, 05 Jan 2021 22:46:45 -0000 Subject: [Python-checkins] [3.8] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674). (GH-24129) Message-ID: https://github.com/python/cpython/commit/f27451dc35f1c69be0c26e8aeafee7ba6771039a commit: f27451dc35f1c69be0c26e8aeafee7ba6771039a branch: 3.8 author: Erlend Egeberg Aasland committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-05T14:46:31-08:00 summary: [3.8] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674). (GH-24129) (cherry picked from commit c94ee13ad596d26d1859078bc09806aa59bb0000) Co-authored-by: Erlend Egeberg Aasland Automerge-Triggered-By: GH:ned-deily 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 7ef3753ad5757..d25c86bf7b453 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -307,9 +307,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 ' 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 Tue Jan 5 17:53:13 2021 From: webhook-mailer at python.org (miss-islington) Date: Tue, 05 Jan 2021 22:53:13 -0000 Subject: [Python-checkins] [3.9] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) (GH-24130) Message-ID: https://github.com/python/cpython/commit/e9a71dab094c0467f07d13cce4324c8a93727863 commit: e9a71dab094c0467f07d13cce4324c8a93727863 branch: 3.9 author: Erlend Egeberg Aasland committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-05T14:52:55-08:00 summary: [3.9] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) (GH-24130) (cherry picked from commit c94ee13ad596d26d1859078bc09806aa59bb0000) Co-authored-by: Erlend Egeberg Aasland Automerge-Triggered-By: GH:ned-deily 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 b51859823a4a0..ef64502ab780c 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -354,9 +354,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 ' @@ -1611,7 +1611,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 Tue Jan 5 18:37:39 2021 From: webhook-mailer at python.org (zooba) Date: Tue, 05 Jan 2021 23:37:39 -0000 Subject: [Python-checkins] bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125) Message-ID: https://github.com/python/cpython/commit/c8333931434389ae72da9eb0471054f4393249db commit: c8333931434389ae72da9eb0471054f4393249db branch: 3.9 author: Steve Dower committer: zooba date: 2021-01-05T23:37:29Z summary: bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125) files: A Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst M PCbuild/get_externals.bat M PCbuild/python.props M PCbuild/readme.txt diff --git a/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst b/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst new file mode 100644 index 0000000000000..8d4bb34ff909c --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst @@ -0,0 +1 @@ +Updated Windows installer to include OpenSSL 1.1.1i diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 3bb281904f6a6..3e9cb0299fca6 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -53,7 +53,7 @@ echo.Fetching external libraries... set libraries= set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi -if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1g +if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1i set libraries=%libraries% sqlite-3.33.0.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.9.0 @@ -77,7 +77,7 @@ echo.Fetching external binaries... set binaries= if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi -if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1g +if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1i if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.9.0 if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 diff --git a/PCbuild/python.props b/PCbuild/python.props index acc41a2c01768..769dabc5641ca 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -62,8 +62,8 @@ $(ExternalsDir)libffi\ $(ExternalsDir)libffi\$(ArchName)\ $(libffiOutDir)include - $(ExternalsDir)openssl-1.1.1g\ - $(ExternalsDir)openssl-bin-1.1.1g\$(ArchName)\ + $(ExternalsDir)openssl-1.1.1i\ + $(ExternalsDir)openssl-bin-1.1.1i\$(ArchName)\ $(opensslOutDir)include $(ExternalsDir)\nasm-2.11.06\ $(ExternalsDir)\zlib-1.2.11\ diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index bafd91248a587..c00ee8e329277 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -166,7 +166,7 @@ _lzma Homepage: http://tukaani.org/xz/ _ssl - Python wrapper for version 1.1.1c of the OpenSSL secure sockets + Python wrapper for version 1.1.1i of the OpenSSL secure sockets library, which is downloaded from our binaries repository at https://github.com/python/cpython-bin-deps. From webhook-mailer at python.org Tue Jan 5 18:57:52 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Tue, 05 Jan 2021 23:57:52 -0000 Subject: [Python-checkins] bpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007) Message-ID: https://github.com/python/cpython/commit/c7f8d3caf0b10c19cd46b1b334a98628eac15672 commit: c7f8d3caf0b10c19cd46b1b334a98628eac15672 branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-06T01:57:25+02:00 summary: bpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007) files: A Modules/_sqlite/clinic/cursor.c.h M Modules/_sqlite/cursor.c M Modules/_sqlite/cursor.h diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h new file mode 100644 index 0000000000000..d5cf0a5eaadae --- /dev/null +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -0,0 +1,259 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +static int +pysqlite_cursor_init_impl(pysqlite_Cursor *self, + pysqlite_Connection *connection); + +static int +pysqlite_cursor_init(PyObject *self, PyObject *args, PyObject *kwargs) +{ + int return_value = -1; + pysqlite_Connection *connection; + + if (Py_IS_TYPE(self, pysqlite_CursorType) && + !_PyArg_NoKeywords("Cursor", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("Cursor", PyTuple_GET_SIZE(args), 1, 1)) { + goto exit; + } + if (!PyObject_TypeCheck(PyTuple_GET_ITEM(args, 0), pysqlite_ConnectionType)) { + _PyArg_BadArgument("Cursor", "argument 1", (pysqlite_ConnectionType)->tp_name, PyTuple_GET_ITEM(args, 0)); + goto exit; + } + connection = (pysqlite_Connection *)PyTuple_GET_ITEM(args, 0); + return_value = pysqlite_cursor_init_impl((pysqlite_Cursor *)self, connection); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_cursor_execute__doc__, +"execute($self, sql, parameters=(), /)\n" +"--\n" +"\n" +"Executes a SQL statement."); + +#define PYSQLITE_CURSOR_EXECUTE_METHODDEF \ + {"execute", (PyCFunction)(void(*)(void))pysqlite_cursor_execute, METH_FASTCALL, pysqlite_cursor_execute__doc__}, + +static PyObject * +pysqlite_cursor_execute_impl(pysqlite_Cursor *self, PyObject *sql, + PyObject *parameters); + +static PyObject * +pysqlite_cursor_execute(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *sql; + PyObject *parameters = NULL; + + if (!_PyArg_CheckPositional("execute", nargs, 1, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("execute", "argument 1", "str", args[0]); + goto exit; + } + if (PyUnicode_READY(args[0]) == -1) { + goto exit; + } + sql = args[0]; + if (nargs < 2) { + goto skip_optional; + } + parameters = args[1]; +skip_optional: + return_value = pysqlite_cursor_execute_impl(self, sql, parameters); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_cursor_executemany__doc__, +"executemany($self, sql, seq_of_parameters, /)\n" +"--\n" +"\n" +"Repeatedly executes a SQL statement."); + +#define PYSQLITE_CURSOR_EXECUTEMANY_METHODDEF \ + {"executemany", (PyCFunction)(void(*)(void))pysqlite_cursor_executemany, METH_FASTCALL, pysqlite_cursor_executemany__doc__}, + +static PyObject * +pysqlite_cursor_executemany_impl(pysqlite_Cursor *self, PyObject *sql, + PyObject *seq_of_parameters); + +static PyObject * +pysqlite_cursor_executemany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *sql; + PyObject *seq_of_parameters; + + if (!_PyArg_CheckPositional("executemany", nargs, 2, 2)) { + goto exit; + } + if (!PyUnicode_Check(args[0])) { + _PyArg_BadArgument("executemany", "argument 1", "str", args[0]); + goto exit; + } + if (PyUnicode_READY(args[0]) == -1) { + goto exit; + } + sql = args[0]; + seq_of_parameters = args[1]; + return_value = pysqlite_cursor_executemany_impl(self, sql, seq_of_parameters); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_cursor_executescript__doc__, +"executescript($self, sql_script, /)\n" +"--\n" +"\n" +"Executes a multiple SQL statements at once. Non-standard."); + +#define PYSQLITE_CURSOR_EXECUTESCRIPT_METHODDEF \ + {"executescript", (PyCFunction)pysqlite_cursor_executescript, METH_O, pysqlite_cursor_executescript__doc__}, + +PyDoc_STRVAR(pysqlite_cursor_fetchone__doc__, +"fetchone($self, /)\n" +"--\n" +"\n" +"Fetches one row from the resultset."); + +#define PYSQLITE_CURSOR_FETCHONE_METHODDEF \ + {"fetchone", (PyCFunction)pysqlite_cursor_fetchone, METH_NOARGS, pysqlite_cursor_fetchone__doc__}, + +static PyObject * +pysqlite_cursor_fetchone_impl(pysqlite_Cursor *self); + +static PyObject * +pysqlite_cursor_fetchone(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_cursor_fetchone_impl(self); +} + +PyDoc_STRVAR(pysqlite_cursor_fetchmany__doc__, +"fetchmany($self, /, size=cursor.arraysize)\n" +"--\n" +"\n" +"Fetches several rows from the resultset."); + +#define PYSQLITE_CURSOR_FETCHMANY_METHODDEF \ + {"fetchmany", (PyCFunction)(void(*)(void))pysqlite_cursor_fetchmany, METH_FASTCALL|METH_KEYWORDS, pysqlite_cursor_fetchmany__doc__}, + +static PyObject * +pysqlite_cursor_fetchmany_impl(pysqlite_Cursor *self, int maxrows); + +static PyObject * +pysqlite_cursor_fetchmany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + static const char * const _keywords[] = {"size", NULL}; + static _PyArg_Parser _parser = {NULL, _keywords, "fetchmany", 0}; + PyObject *argsbuf[1]; + Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; + int maxrows = self->arraysize; + + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + if (!args) { + goto exit; + } + if (!noptargs) { + goto skip_optional_pos; + } + maxrows = _PyLong_AsInt(args[0]); + if (maxrows == -1 && PyErr_Occurred()) { + goto exit; + } +skip_optional_pos: + return_value = pysqlite_cursor_fetchmany_impl(self, maxrows); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_cursor_fetchall__doc__, +"fetchall($self, /)\n" +"--\n" +"\n" +"Fetches all rows from the resultset."); + +#define PYSQLITE_CURSOR_FETCHALL_METHODDEF \ + {"fetchall", (PyCFunction)pysqlite_cursor_fetchall, METH_NOARGS, pysqlite_cursor_fetchall__doc__}, + +static PyObject * +pysqlite_cursor_fetchall_impl(pysqlite_Cursor *self); + +static PyObject * +pysqlite_cursor_fetchall(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_cursor_fetchall_impl(self); +} + +PyDoc_STRVAR(pysqlite_cursor_setinputsizes__doc__, +"setinputsizes($self, sizes, /)\n" +"--\n" +"\n" +"Required by DB-API. Does nothing in pysqlite."); + +#define PYSQLITE_CURSOR_SETINPUTSIZES_METHODDEF \ + {"setinputsizes", (PyCFunction)pysqlite_cursor_setinputsizes, METH_O, pysqlite_cursor_setinputsizes__doc__}, + +PyDoc_STRVAR(pysqlite_cursor_setoutputsize__doc__, +"setoutputsize($self, size, column=None, /)\n" +"--\n" +"\n" +"Required by DB-API. Does nothing in pysqlite."); + +#define PYSQLITE_CURSOR_SETOUTPUTSIZE_METHODDEF \ + {"setoutputsize", (PyCFunction)(void(*)(void))pysqlite_cursor_setoutputsize, METH_FASTCALL, pysqlite_cursor_setoutputsize__doc__}, + +static PyObject * +pysqlite_cursor_setoutputsize_impl(pysqlite_Cursor *self, PyObject *size, + PyObject *column); + +static PyObject * +pysqlite_cursor_setoutputsize(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *size; + PyObject *column = Py_None; + + if (!_PyArg_CheckPositional("setoutputsize", nargs, 1, 2)) { + goto exit; + } + size = args[0]; + if (nargs < 2) { + goto skip_optional; + } + column = args[1]; +skip_optional: + return_value = pysqlite_cursor_setoutputsize_impl(self, size, column); + +exit: + return return_value; +} + +PyDoc_STRVAR(pysqlite_cursor_close__doc__, +"close($self, /)\n" +"--\n" +"\n" +"Closes the cursor."); + +#define PYSQLITE_CURSOR_CLOSE_METHODDEF \ + {"close", (PyCFunction)pysqlite_cursor_close, METH_NOARGS, pysqlite_cursor_close__doc__}, + +static PyObject * +pysqlite_cursor_close_impl(pysqlite_Cursor *self); + +static PyObject * +pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) +{ + return pysqlite_cursor_close_impl(self); +} +/*[clinic end generated code: output=11db0de4fb1951a9 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 13385f6d5005c..296d569148f8a 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -24,20 +24,31 @@ #include "cursor.h" #include "module.h" #include "util.h" +#include "clinic/cursor.c.h" + +/*[clinic input] +module _sqlite3 +class _sqlite3.Cursor "pysqlite_Cursor *" "pysqlite_CursorType" +[clinic start generated code]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b2072d8db95411d5]*/ PyObject* pysqlite_cursor_iternext(pysqlite_Cursor* self); static const char errmsg_fetch_across_rollback[] = "Cursor needed to be reset because of commit/rollback and can no longer be fetched from."; -static int pysqlite_cursor_init(pysqlite_Cursor* self, PyObject* args, PyObject* kwargs) -{ - pysqlite_Connection* connection; +/*[clinic input] +_sqlite3.Cursor.__init__ as pysqlite_cursor_init - if (!PyArg_ParseTuple(args, "O!", pysqlite_ConnectionType, &connection)) - { - return -1; - } + connection: object(type='pysqlite_Connection *', subclass_of='pysqlite_ConnectionType') + / +[clinic start generated code]*/ + +static int +pysqlite_cursor_init_impl(pysqlite_Cursor *self, + pysqlite_Connection *connection) +/*[clinic end generated code: output=ac59dce49a809ca8 input=a8a4f75ac90999b2]*/ +{ Py_INCREF(connection); Py_XSETREF(self->connection, connection); Py_CLEAR(self->statement); @@ -367,9 +378,8 @@ static int check_cursor(pysqlite_Cursor* cur) } static PyObject * -_pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) +_pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation, PyObject* second_argument) { - PyObject* operation; PyObject* parameters_list = NULL; PyObject* parameters_iter = NULL; PyObject* parameters = NULL; @@ -380,7 +390,6 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) int numcols; PyObject* descriptor; PyObject* column_name; - PyObject* second_argument = NULL; sqlite_int64 lastrowid; if (!check_cursor(self)) { @@ -393,11 +402,6 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) Py_CLEAR(self->next_row); if (multiple) { - /* executemany() */ - if (!PyArg_ParseTuple(args, "UO", &operation, &second_argument)) { - goto error; - } - if (PyIter_Check(second_argument)) { /* iterator */ parameters_iter = Py_NewRef(second_argument); @@ -409,11 +413,6 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) } } } else { - /* execute() */ - if (!PyArg_ParseTuple(args, "U|O", &operation, &second_argument)) { - goto error; - } - parameters_list = PyList_New(0); if (!parameters_list) { goto error; @@ -610,30 +609,61 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) } } -PyObject* pysqlite_cursor_execute(pysqlite_Cursor* self, PyObject* args) +/*[clinic input] +_sqlite3.Cursor.execute as pysqlite_cursor_execute + + sql: unicode + parameters: object(c_default = 'NULL') = () + / + +Executes a SQL statement. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_execute_impl(pysqlite_Cursor *self, PyObject *sql, + PyObject *parameters) +/*[clinic end generated code: output=d81b4655c7c0bbad input=91d7bb36f127f597]*/ { - return _pysqlite_query_execute(self, 0, args); + return _pysqlite_query_execute(self, 0, sql, parameters); } -PyObject* pysqlite_cursor_executemany(pysqlite_Cursor* self, PyObject* args) +/*[clinic input] +_sqlite3.Cursor.executemany as pysqlite_cursor_executemany + + sql: unicode + seq_of_parameters: object + / + +Repeatedly executes a SQL statement. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_executemany_impl(pysqlite_Cursor *self, PyObject *sql, + PyObject *seq_of_parameters) +/*[clinic end generated code: output=2c65a3c4733fb5d8 input=440707b7af87fba8]*/ { - return _pysqlite_query_execute(self, 1, args); + return _pysqlite_query_execute(self, 1, sql, seq_of_parameters); } +/*[clinic input] +_sqlite3.Cursor.executescript as pysqlite_cursor_executescript + + sql_script as script_obj: object + / + +Executes a multiple SQL statements at once. Non-standard. +[clinic start generated code]*/ + static PyObject * -pysqlite_cursor_executescript(pysqlite_Cursor* self, PyObject* args) +pysqlite_cursor_executescript(pysqlite_Cursor *self, PyObject *script_obj) +/*[clinic end generated code: output=115a8132b0f200fe input=38c6fa6de570bb9b]*/ { _Py_IDENTIFIER(commit); - PyObject* script_obj; const char* script_cstr; sqlite3_stmt* statement; int rc; PyObject* result; - if (!PyArg_ParseTuple(args, "O", &script_obj)) { - return NULL; - } - if (!check_cursor(self)) { return NULL; } @@ -769,7 +799,15 @@ PyObject* pysqlite_cursor_iternext(pysqlite_Cursor *self) return next_row; } -PyObject* pysqlite_cursor_fetchone(pysqlite_Cursor* self, PyObject* args) +/*[clinic input] +_sqlite3.Cursor.fetchone as pysqlite_cursor_fetchone + +Fetches one row from the resultset. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_fetchone_impl(pysqlite_Cursor *self) +/*[clinic end generated code: output=4bd2eabf5baaddb0 input=e78294ec5980fdba]*/ { PyObject* row; @@ -781,19 +819,22 @@ PyObject* pysqlite_cursor_fetchone(pysqlite_Cursor* self, PyObject* args) return row; } -PyObject* pysqlite_cursor_fetchmany(pysqlite_Cursor* self, PyObject* args, PyObject* kwargs) -{ - static char *kwlist[] = {"size", NULL}; +/*[clinic input] +_sqlite3.Cursor.fetchmany as pysqlite_cursor_fetchmany + + size as maxrows: int(c_default='self->arraysize') = cursor.arraysize +Fetches several rows from the resultset. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_fetchmany_impl(pysqlite_Cursor *self, int maxrows) +/*[clinic end generated code: output=a8ef31fea64d0906 input=d80ff999a7701ffb]*/ +{ PyObject* row; PyObject* list; - int maxrows = self->arraysize; int counter = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:fetchmany", kwlist, &maxrows)) { - return NULL; - } - list = PyList_New(0); if (!list) { return NULL; @@ -816,7 +857,15 @@ PyObject* pysqlite_cursor_fetchmany(pysqlite_Cursor* self, PyObject* args, PyObj } } -PyObject* pysqlite_cursor_fetchall(pysqlite_Cursor* self, PyObject* args) +/*[clinic input] +_sqlite3.Cursor.fetchall as pysqlite_cursor_fetchall + +Fetches all rows from the resultset. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_fetchall_impl(pysqlite_Cursor *self) +/*[clinic end generated code: output=d5da12aca2da4b27 input=f5d401086a8df25a]*/ { PyObject* row; PyObject* list; @@ -839,13 +888,49 @@ PyObject* pysqlite_cursor_fetchall(pysqlite_Cursor* self, PyObject* args) } } -PyObject* pysqlite_noop(pysqlite_Connection* self, PyObject* args) +/*[clinic input] +_sqlite3.Cursor.setinputsizes as pysqlite_cursor_setinputsizes + + sizes: object + / + +Required by DB-API. Does nothing in pysqlite. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_setinputsizes(pysqlite_Cursor *self, PyObject *sizes) +/*[clinic end generated code: output=893c817afe9d08ad input=7cffbb168663bc69]*/ +{ + Py_RETURN_NONE; +} + +/*[clinic input] +_sqlite3.Cursor.setoutputsize as pysqlite_cursor_setoutputsize + + size: object + column: object = None + / + +Required by DB-API. Does nothing in pysqlite. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_setoutputsize_impl(pysqlite_Cursor *self, PyObject *size, + PyObject *column) +/*[clinic end generated code: output=018d7e9129d45efe input=077b017da58b9389]*/ { - /* don't care, return None */ Py_RETURN_NONE; } -PyObject* pysqlite_cursor_close(pysqlite_Cursor* self, PyObject* args) +/*[clinic input] +_sqlite3.Cursor.close as pysqlite_cursor_close + +Closes the cursor. +[clinic start generated code]*/ + +static PyObject * +pysqlite_cursor_close_impl(pysqlite_Cursor *self) +/*[clinic end generated code: output=b6055e4ec6fe63b6 input=08b36552dbb9a986]*/ { if (!self->connection) { PyErr_SetString(pysqlite_ProgrammingError, @@ -867,24 +952,15 @@ PyObject* pysqlite_cursor_close(pysqlite_Cursor* self, PyObject* args) } static PyMethodDef cursor_methods[] = { - {"execute", (PyCFunction)pysqlite_cursor_execute, METH_VARARGS, - PyDoc_STR("Executes a SQL statement.")}, - {"executemany", (PyCFunction)pysqlite_cursor_executemany, METH_VARARGS, - PyDoc_STR("Repeatedly executes a SQL statement.")}, - {"executescript", (PyCFunction)pysqlite_cursor_executescript, METH_VARARGS, - PyDoc_STR("Executes a multiple SQL statements at once. Non-standard.")}, - {"fetchone", (PyCFunction)pysqlite_cursor_fetchone, METH_NOARGS, - PyDoc_STR("Fetches one row from the resultset.")}, - {"fetchmany", (PyCFunction)(void(*)(void))pysqlite_cursor_fetchmany, METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("Fetches several rows from the resultset.")}, - {"fetchall", (PyCFunction)pysqlite_cursor_fetchall, METH_NOARGS, - PyDoc_STR("Fetches all rows from the resultset.")}, - {"close", (PyCFunction)pysqlite_cursor_close, METH_NOARGS, - PyDoc_STR("Closes the cursor.")}, - {"setinputsizes", (PyCFunction)pysqlite_noop, METH_VARARGS, - PyDoc_STR("Required by DB-API. Does nothing in pysqlite.")}, - {"setoutputsize", (PyCFunction)pysqlite_noop, METH_VARARGS, - PyDoc_STR("Required by DB-API. Does nothing in pysqlite.")}, + PYSQLITE_CURSOR_CLOSE_METHODDEF + PYSQLITE_CURSOR_EXECUTEMANY_METHODDEF + PYSQLITE_CURSOR_EXECUTESCRIPT_METHODDEF + PYSQLITE_CURSOR_EXECUTE_METHODDEF + PYSQLITE_CURSOR_FETCHALL_METHODDEF + PYSQLITE_CURSOR_FETCHMANY_METHODDEF + PYSQLITE_CURSOR_FETCHONE_METHODDEF + PYSQLITE_CURSOR_SETINPUTSIZES_METHODDEF + PYSQLITE_CURSOR_SETOUTPUTSIZE_METHODDEF {NULL, NULL} }; diff --git a/Modules/_sqlite/cursor.h b/Modules/_sqlite/cursor.h index 3e6cde167f94c..c79e3554c9fb2 100644 --- a/Modules/_sqlite/cursor.h +++ b/Modules/_sqlite/cursor.h @@ -54,15 +54,8 @@ typedef struct extern PyTypeObject *pysqlite_CursorType; -PyObject* pysqlite_cursor_execute(pysqlite_Cursor* self, PyObject* args); -PyObject* pysqlite_cursor_executemany(pysqlite_Cursor* self, PyObject* args); PyObject* pysqlite_cursor_getiter(pysqlite_Cursor *self); PyObject* pysqlite_cursor_iternext(pysqlite_Cursor *self); -PyObject* pysqlite_cursor_fetchone(pysqlite_Cursor* self, PyObject* args); -PyObject* pysqlite_cursor_fetchmany(pysqlite_Cursor* self, PyObject* args, PyObject* kwargs); -PyObject* pysqlite_cursor_fetchall(pysqlite_Cursor* self, PyObject* args); -PyObject* pysqlite_noop(pysqlite_Connection* self, PyObject* args); -PyObject* pysqlite_cursor_close(pysqlite_Cursor* self, PyObject* args); int pysqlite_cursor_setup_types(PyObject *module); From webhook-mailer at python.org Tue Jan 5 19:02:50 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 00:02:50 -0000 Subject: [Python-checkins] bpo-40810: Require SQLite 3.7.15 (GH-24106) Message-ID: https://github.com/python/cpython/commit/cf0b23908cc902ac38cd83dd7ca5afdf89e1543b commit: cf0b23908cc902ac38cd83dd7ca5afdf89e1543b branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-06T02:02:43+02:00 summary: bpo-40810: Require SQLite 3.7.15 (GH-24106) files: A Misc/NEWS.d/next/Library/2021-01-05-00-52-30.bpo-40810.JxQqPe.rst M Doc/library/sqlite3.rst M Doc/whatsnew/3.10.rst M Lib/sqlite3/test/dbapi.py M Lib/sqlite3/test/hooks.py M Modules/_sqlite/connection.c M Modules/_sqlite/module.c M Modules/_sqlite/util.h M setup.py diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 950df60b2027d..5f9a26a7bb16c 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -19,7 +19,7 @@ PostgreSQL or Oracle. The sqlite3 module was written by Gerhard H?ring. It provides a SQL interface compliant with the DB-API 2.0 specification described by :pep:`249`, and -requires SQLite 3.7.3 or newer. +requires SQLite 3.7.15 or newer. To use the module, you must first create a :class:`Connection` object that represents the database. Here the data will be stored in the diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 4181eba81cf13..444f1326e5bd2 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -577,13 +577,12 @@ CPython bytecode changes Build Changes ============= - * The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now required to build Python. (Contributed by Victor Stinner in :issue:`36020`.) -* :mod:`sqlite3` requires SQLite 3.7.3 or higher. - (Contributed by Sergey Fedoseev and Erlend E. Aasland :issue:`40744`.) +* :mod:`sqlite3` requires SQLite 3.7.15 or higher. (Contributed by Sergey Fedoseev + and Erlend E. Aasland :issue:`40744` and :issue:`40810`.) * The :mod:`atexit` module must now always be built as a built-in module. (Contributed by Victor Stinner in :issue:`42639`.) diff --git a/Lib/sqlite3/test/dbapi.py b/Lib/sqlite3/test/dbapi.py index 7867bf361e5ac..2b85ef99f0233 100644 --- a/Lib/sqlite3/test/dbapi.py +++ b/Lib/sqlite3/test/dbapi.py @@ -172,10 +172,6 @@ def __fspath__(self): cx.execute('create table test(id integer)') def CheckOpenUri(self): - if sqlite.sqlite_version_info < (3, 7, 7): - with self.assertRaises(sqlite.NotSupportedError): - sqlite.connect(':memory:', uri=True) - return self.addCleanup(unlink, TESTFN) with sqlite.connect(TESTFN) as cx: cx.execute('create table test(id integer)') diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index 6c1aaa2d60161..2e620ecdf864c 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -260,14 +260,6 @@ 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/Library/2021-01-05-00-52-30.bpo-40810.JxQqPe.rst b/Misc/NEWS.d/next/Library/2021-01-05-00-52-30.bpo-40810.JxQqPe.rst new file mode 100644 index 0000000000000..61d8780bb85dd --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-05-00-52-30.bpo-40810.JxQqPe.rst @@ -0,0 +1 @@ +Require SQLite 3.7.15 or newer. Patch by Erlend E. Aasland. diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 1e23daca44558..dbe5dd1ec13fa 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -233,7 +233,7 @@ void pysqlite_connection_dealloc(pysqlite_Connection* self) /* Clean up if user has not called .close() explicitly. */ if (self->db) { - SQLITE3_CLOSE(self->db); + sqlite3_close_v2(self->db); } Py_XDECREF(self->isolation_level); @@ -338,7 +338,7 @@ pysqlite_connection_close_impl(pysqlite_Connection *self) pysqlite_do_all_statements(self, ACTION_FINALIZE, 1); if (self->db) { - rc = SQLITE3_CLOSE(self->db); + rc = sqlite3_close_v2(self->db); if (rc != SQLITE_OK) { _pysqlite_seterror(self->db, NULL); @@ -1687,33 +1687,7 @@ pysqlite_connection_backup_impl(pysqlite_Connection *self, if (rc == SQLITE_NOMEM) { (void)PyErr_NoMemory(); } else { -#if SQLITE_VERSION_NUMBER > 3007015 PyErr_SetString(pysqlite_OperationalError, sqlite3_errstr(rc)); -#else - switch (rc) { - case SQLITE_ERROR: - /* Description of SQLITE_ERROR in SQLite 3.7.14 and older - releases. */ - PyErr_SetString(pysqlite_OperationalError, - "SQL logic error or missing database"); - break; - case SQLITE_READONLY: - PyErr_SetString(pysqlite_OperationalError, - "attempt to write a readonly database"); - break; - case SQLITE_BUSY: - PyErr_SetString(pysqlite_OperationalError, "database is locked"); - break; - case SQLITE_LOCKED: - PyErr_SetString(pysqlite_OperationalError, - "database table is locked"); - break; - default: - PyErr_Format(pysqlite_OperationalError, - "unrecognized error code: %d", rc); - break; - } -#endif } } diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index cd2eb576c7b21..6bfb1b73f8239 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -29,8 +29,8 @@ #include "microprotocols.h" #include "row.h" -#if SQLITE_VERSION_NUMBER < 3007003 -#error "SQLite 3.7.3 or higher required" +#if SQLITE_VERSION_NUMBER < 3007015 +#error "SQLite 3.7.15 or higher required" #endif #include "clinic/module.c.h" @@ -365,8 +365,8 @@ PyMODINIT_FUNC PyInit__sqlite3(void) { PyObject *module; - if (sqlite3_libversion_number() < 3007003) { - PyErr_SetString(PyExc_ImportError, MODULE_NAME ": SQLite 3.7.3 or higher required"); + if (sqlite3_libversion_number() < 3007015) { + PyErr_SetString(PyExc_ImportError, MODULE_NAME ": SQLite 3.7.15 or higher required"); return NULL; } diff --git a/Modules/_sqlite/util.h b/Modules/_sqlite/util.h index c5a220e9b0aa7..cff31cda9578a 100644 --- a/Modules/_sqlite/util.h +++ b/Modules/_sqlite/util.h @@ -39,10 +39,4 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st); sqlite_int64 _pysqlite_long_as_int64(PyObject * value); -#if SQLITE_VERSION_NUMBER >= 3007014 -#define SQLITE3_CLOSE sqlite3_close_v2 -#else -#define SQLITE3_CLOSE sqlite3_close -#endif - #endif diff --git a/setup.py b/setup.py index 8598d2aa5dbce..ddc0bd067d4e4 100644 --- a/setup.py +++ b/setup.py @@ -1444,8 +1444,7 @@ def detect_sqlite(self): ] if CROSS_COMPILING: sqlite_inc_paths = [] - # We need to find >= sqlite version 3.7.3, for sqlite3_create_function_v2() - MIN_SQLITE_VERSION_NUMBER = (3, 7, 3) + MIN_SQLITE_VERSION_NUMBER = (3, 7, 15) # Issue 40810 MIN_SQLITE_VERSION = ".".join([str(x) for x in MIN_SQLITE_VERSION_NUMBER]) From webhook-mailer at python.org Tue Jan 5 19:07:59 2021 From: webhook-mailer at python.org (zooba) Date: Wed, 06 Jan 2021 00:07:59 -0000 Subject: [Python-checkins] bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125) Message-ID: https://github.com/python/cpython/commit/86b1207dbb9201d1259d1ec7603e720e29ba9042 commit: 86b1207dbb9201d1259d1ec7603e720e29ba9042 branch: 3.8 author: Steve Dower committer: zooba date: 2021-01-06T00:07:51Z summary: bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125) files: A Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst M PCbuild/get_externals.bat M PCbuild/python.props M PCbuild/readme.txt diff --git a/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst b/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst new file mode 100644 index 0000000000000..8d4bb34ff909c --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2021-01-05-20-36-40.bpo-41837.bmS7vB.rst @@ -0,0 +1 @@ +Updated Windows installer to include OpenSSL 1.1.1i diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 24d430a004d3a..a15277b30b219 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -53,7 +53,7 @@ echo.Fetching external libraries... set libraries= set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.3.0-rc0-r1 -if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1g +if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1i set libraries=%libraries% sqlite-3.33.0.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.9.0 @@ -77,7 +77,7 @@ echo.Fetching external binaries... set binaries= if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi -if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1g +if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1i if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.9.0 if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 diff --git a/PCbuild/python.props b/PCbuild/python.props index acc41a2c01768..769dabc5641ca 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -62,8 +62,8 @@ $(ExternalsDir)libffi\ $(ExternalsDir)libffi\$(ArchName)\ $(libffiOutDir)include - $(ExternalsDir)openssl-1.1.1g\ - $(ExternalsDir)openssl-bin-1.1.1g\$(ArchName)\ + $(ExternalsDir)openssl-1.1.1i\ + $(ExternalsDir)openssl-bin-1.1.1i\$(ArchName)\ $(opensslOutDir)include $(ExternalsDir)\nasm-2.11.06\ $(ExternalsDir)\zlib-1.2.11\ diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index 6e304eae553cd..dc247c8bcd706 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -165,7 +165,7 @@ _lzma Homepage: http://tukaani.org/xz/ _ssl - Python wrapper for version 1.1.1c of the OpenSSL secure sockets + Python wrapper for version 1.1.1i of the OpenSSL secure sockets library, which is downloaded from our binaries repository at https://github.com/python/cpython-bin-deps. From webhook-mailer at python.org Tue Jan 5 19:09:16 2021 From: webhook-mailer at python.org (zooba) Date: Wed, 06 Jan 2021 00:09:16 -0000 Subject: [Python-checkins] bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675) Message-ID: https://github.com/python/cpython/commit/77d54710506b67e48b50bb1758fb31fc33a33c83 commit: 77d54710506b67e48b50bb1758fb31fc33a33c83 branch: 3.9 author: Steve Dower committer: zooba date: 2021-01-06T00:09:08Z summary: bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675) Co-authored-by: Erlend Egeberg Aasland files: A Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst M PCbuild/get_externals.bat M PCbuild/python.props M PCbuild/readme.txt diff --git a/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst b/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst new file mode 100644 index 0000000000000..afb6530c8f66d --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst @@ -0,0 +1 @@ +Upgrade Windows installer to use SQLite 3.34.0. diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index 3e9cb0299fca6..1e783846a2b90 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -54,7 +54,7 @@ set libraries= set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1i -set libraries=%libraries% sqlite-3.33.0.0 +set libraries=%libraries% sqlite-3.34.0.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tix-8.4.3.6 diff --git a/PCbuild/python.props b/PCbuild/python.props index 769dabc5641ca..3fa774816a753 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -56,7 +56,7 @@ $(EXTERNALS_DIR) $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`)) $(ExternalsDir)\ - $(ExternalsDir)sqlite-3.33.0.0\ + $(ExternalsDir)sqlite-3.34.0.0\ $(ExternalsDir)bzip2-1.0.6\ $(ExternalsDir)xz-5.2.2\ $(ExternalsDir)libffi\ diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index c00ee8e329277..5a21c30af9487 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -185,7 +185,7 @@ _ssl again when building. _sqlite3 - Wraps SQLite 3.33.0, which is itself built by sqlite3.vcxproj + Wraps SQLite 3.34.0, which is itself built by sqlite3.vcxproj Homepage: http://www.sqlite.org/ _tkinter From webhook-mailer at python.org Tue Jan 5 19:18:55 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 00:18:55 -0000 Subject: [Python-checkins] bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159) Message-ID: https://github.com/python/cpython/commit/f9949f82e17c88609adb53eff3a7d5cd63a645bd commit: f9949f82e17c88609adb53eff3a7d5cd63a645bd branch: master author: Vladimir committer: berkerpeksag date: 2021-01-06T02:18:46+02:00 summary: bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159) files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 5f9a26a7bb16c..d80e952ce9924 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1089,19 +1089,6 @@ committed: .. literalinclude:: ../includes/sqlite3/ctx_manager.py -Common issues -------------- - -Multithreading -^^^^^^^^^^^^^^ - -Older SQLite versions had issues with sharing connections between threads. -That's why the Python module disallows sharing connections and cursors between -threads. If you still try to do so, you will get an exception at runtime. - -The only exception is calling the :meth:`~Connection.interrupt` method, which -only makes sense to call from a different thread. - .. rubric:: Footnotes .. [#f1] The sqlite3 module is not built with loadable extension support by From webhook-mailer at python.org Tue Jan 5 19:22:06 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 00:22:06 -0000 Subject: [Python-checkins] bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159) Message-ID: https://github.com/python/cpython/commit/03a079f7cf8eacc29ea616060916e8a63ba6e5ba commit: 03a079f7cf8eacc29ea616060916e8a63ba6e5ba branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: berkerpeksag date: 2021-01-06T02:21:57+02:00 summary: bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159) (cherry picked from commit f9949f82e17c88609adb53eff3a7d5cd63a645bd) Co-authored-by: Vladimir files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index e493324495890..9459f9175827b 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1093,19 +1093,6 @@ committed: .. literalinclude:: ../includes/sqlite3/ctx_manager.py -Common issues -------------- - -Multithreading -^^^^^^^^^^^^^^ - -Older SQLite versions had issues with sharing connections between threads. -That's why the Python module disallows sharing connections and cursors between -threads. If you still try to do so, you will get an exception at runtime. - -The only exception is calling the :meth:`~Connection.interrupt` method, which -only makes sense to call from a different thread. - .. rubric:: Footnotes .. [#f1] The sqlite3 module is not built with loadable extension support by From webhook-mailer at python.org Tue Jan 5 19:23:47 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 00:23:47 -0000 Subject: [Python-checkins] bpo-42755: Fix sqlite3.Connection.backup docs (GH-23965) Message-ID: https://github.com/python/cpython/commit/28611c28474a7fafdcf7ea2712f2670dda940eef commit: 28611c28474a7fafdcf7ea2712f2670dda940eef branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: berkerpeksag date: 2021-01-06T02:23:37+02:00 summary: bpo-42755: Fix sqlite3.Connection.backup docs (GH-23965) The `pages` argument default value now reflects the implementation. (cherry picked from commit abba83b4b91f78dc556dc0b7700ecb46cba22c01) Co-authored-by: Erlend Egeberg Aasland files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 9459f9175827b..e2e7312c27735 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -545,7 +545,7 @@ Connection Objects con.close() - .. method:: backup(target, *, pages=0, progress=None, name="main", sleep=0.250) + .. method:: backup(target, *, pages=-1, progress=None, name="main", sleep=0.250) This method makes a backup of a SQLite database even while it's being accessed by other clients, or concurrently by the same connection. The copy will be From webhook-mailer at python.org Tue Jan 5 19:31:19 2021 From: webhook-mailer at python.org (zooba) Date: Wed, 06 Jan 2021 00:31:19 -0000 Subject: [Python-checkins] bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675) Message-ID: https://github.com/python/cpython/commit/db91714faa6d3ede59003cdcc719a758160f3970 commit: db91714faa6d3ede59003cdcc719a758160f3970 branch: 3.8 author: Steve Dower committer: zooba date: 2021-01-06T00:31:10Z summary: bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675) Co-authored-by: Erlend Egeberg Aasland files: A Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst M PCbuild/get_externals.bat M PCbuild/python.props M PCbuild/readme.txt diff --git a/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst b/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst new file mode 100644 index 0000000000000..afb6530c8f66d --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-12-07-11-40-52.bpo-42584.AsYnVX.rst @@ -0,0 +1 @@ +Upgrade Windows installer to use SQLite 3.34.0. diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index a15277b30b219..a1d9a12a362e1 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -54,7 +54,7 @@ set libraries= set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.3.0-rc0-r1 if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1i -set libraries=%libraries% sqlite-3.33.0.0 +set libraries=%libraries% sqlite-3.34.0.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.9.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tix-8.4.3.6 diff --git a/PCbuild/python.props b/PCbuild/python.props index 769dabc5641ca..3fa774816a753 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -56,7 +56,7 @@ $(EXTERNALS_DIR) $([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`)) $(ExternalsDir)\ - $(ExternalsDir)sqlite-3.33.0.0\ + $(ExternalsDir)sqlite-3.34.0.0\ $(ExternalsDir)bzip2-1.0.6\ $(ExternalsDir)xz-5.2.2\ $(ExternalsDir)libffi\ diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt index dc247c8bcd706..0b2aa59ecefab 100644 --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -184,7 +184,7 @@ _ssl again when building. _sqlite3 - Wraps SQLite 3.33.0, which is itself built by sqlite3.vcxproj + Wraps SQLite 3.34.0, which is itself built by sqlite3.vcxproj Homepage: http://www.sqlite.org/ _tkinter From webhook-mailer at python.org Tue Jan 5 19:36:13 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 00:36:13 -0000 Subject: [Python-checkins] bpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008) Message-ID: https://github.com/python/cpython/commit/ddb5e11683c8db9d2095f2f9406701443c4dc9b3 commit: ddb5e11683c8db9d2095f2f9406701443c4dc9b3 branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-06T02:36:04+02:00 summary: bpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008) files: A Misc/NEWS.d/next/Library/2020-12-30-14-56-25.bpo-24464.vbNVHe.rst M Doc/whatsnew/3.10.rst M Lib/sqlite3/dbapi2.py M Lib/sqlite3/test/dbapi.py diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 444f1326e5bd2..e615574fb2fab 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -486,6 +486,14 @@ Deprecated scheduled for removal in Python 3.12. (Contributed by Erlend E. Aasland in :issue:`42264`.) +* The undocumented built-in function ``sqlite3.enable_shared_cache`` is now + deprecated, scheduled for removal in Python 3.12. Its use is strongly + discouraged by the SQLite3 documentation. See `the SQLite3 docs + `_ for more details. + If shared cache must be used, open the database in URI mode using the + ``cache=shared`` query parameter. + (Contributed by Erlend E. Aasland in :issue:`24464`.) + Removed ======= diff --git a/Lib/sqlite3/dbapi2.py b/Lib/sqlite3/dbapi2.py index 991682ce9ef3b..6475f98a646f9 100644 --- a/Lib/sqlite3/dbapi2.py +++ b/Lib/sqlite3/dbapi2.py @@ -84,6 +84,20 @@ def convert_timestamp(val): register_adapters_and_converters() +# bpo-24464: enable_shared_cache was deprecated in Python 3.10. It's +# scheduled for removal in Python 3.12. +def enable_shared_cache(enable): + from _sqlite3 import enable_shared_cache as _old_enable_shared_cache + import warnings + msg = ( + "enable_shared_cache is deprecated and will be removed in Python 3.12. " + "Shared cache is strongly discouraged by the SQLite 3 documentation. " + "If shared cache must be used, open the database in URI mode using" + "the cache=shared query parameter." + ) + warnings.warn(msg, DeprecationWarning, stacklevel=2) + return _old_enable_shared_cache + # Clean up namespace del(register_adapters_and_converters) diff --git a/Lib/sqlite3/test/dbapi.py b/Lib/sqlite3/test/dbapi.py index 2b85ef99f0233..3131c1ec2ab14 100644 --- a/Lib/sqlite3/test/dbapi.py +++ b/Lib/sqlite3/test/dbapi.py @@ -83,6 +83,13 @@ def CheckNotSupportedError(self): sqlite.DatabaseError), "NotSupportedError is not a subclass of DatabaseError") + def CheckSharedCacheDeprecated(self): + for enable in (True, False): + with self.assertWarns(DeprecationWarning) as cm: + sqlite.enable_shared_cache(enable) + self.assertIn("dbapi.py", cm.filename) + + class ConnectionTests(unittest.TestCase): def setUp(self): diff --git a/Misc/NEWS.d/next/Library/2020-12-30-14-56-25.bpo-24464.vbNVHe.rst b/Misc/NEWS.d/next/Library/2020-12-30-14-56-25.bpo-24464.vbNVHe.rst new file mode 100644 index 0000000000000..2039c1ca9c0c4 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-30-14-56-25.bpo-24464.vbNVHe.rst @@ -0,0 +1,3 @@ +The undocumented built-in function ``sqlite3.enable_shared_cache`` is now +deprecated, scheduled for removal in Python 3.12. Its use is strongly +discouraged by the SQLite3 documentation. Patch by Erlend E. Aasland. From webhook-mailer at python.org Tue Jan 5 19:56:09 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 00:56:09 -0000 Subject: [Python-checkins] bpo-40959: Remove unused declarations from sqlite3 headers (GH-20828) Message-ID: https://github.com/python/cpython/commit/203b2493ae6fd7c1f039f3f906f087d67d9100d5 commit: 203b2493ae6fd7c1f039f3f906f087d67d9100d5 branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-06T02:56:05+02:00 summary: bpo-40959: Remove unused declarations from sqlite3 headers (GH-20828) files: M Modules/_sqlite/cache.h M Modules/_sqlite/connection.h M Modules/_sqlite/cursor.h M Modules/_sqlite/prepare_protocol.h M Modules/_sqlite/statement.h diff --git a/Modules/_sqlite/cache.h b/Modules/_sqlite/cache.h index 0afdf7f09b65c..4a1977fcd2cd2 100644 --- a/Modules/_sqlite/cache.h +++ b/Modules/_sqlite/cache.h @@ -62,11 +62,6 @@ typedef struct extern PyTypeObject *pysqlite_NodeType; extern PyTypeObject *pysqlite_CacheType; -int pysqlite_node_init(pysqlite_Node* self, PyObject* args, PyObject* kwargs); -void pysqlite_node_dealloc(pysqlite_Node* self); - -int pysqlite_cache_init(pysqlite_Cache* self, PyObject* args, PyObject* kwargs); -void pysqlite_cache_dealloc(pysqlite_Cache* self); PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* args); int pysqlite_cache_setup_types(PyObject *module); diff --git a/Modules/_sqlite/connection.h b/Modules/_sqlite/connection.h index 1d1a8ad5ae04d..82f6baf6eef3d 100644 --- a/Modules/_sqlite/connection.h +++ b/Modules/_sqlite/connection.h @@ -108,11 +108,7 @@ typedef struct extern PyTypeObject *pysqlite_ConnectionType; -PyObject* pysqlite_connection_alloc(PyTypeObject* type, int aware); -void pysqlite_connection_dealloc(pysqlite_Connection* self); PyObject* _pysqlite_connection_begin(pysqlite_Connection* self); -PyObject* pysqlite_connection_new(PyTypeObject* type, PyObject* args, PyObject* kw); -int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject* kwargs); int pysqlite_connection_register_cursor(pysqlite_Connection* connection, PyObject* cursor); int pysqlite_check_thread(pysqlite_Connection* self); diff --git a/Modules/_sqlite/cursor.h b/Modules/_sqlite/cursor.h index c79e3554c9fb2..b26b2886746c2 100644 --- a/Modules/_sqlite/cursor.h +++ b/Modules/_sqlite/cursor.h @@ -54,9 +54,6 @@ typedef struct extern PyTypeObject *pysqlite_CursorType; -PyObject* pysqlite_cursor_getiter(pysqlite_Cursor *self); -PyObject* pysqlite_cursor_iternext(pysqlite_Cursor *self); - int pysqlite_cursor_setup_types(PyObject *module); #define UNKNOWN (-1) diff --git a/Modules/_sqlite/prepare_protocol.h b/Modules/_sqlite/prepare_protocol.h index d0f717c754c1d..42d07cbe9f16f 100644 --- a/Modules/_sqlite/prepare_protocol.h +++ b/Modules/_sqlite/prepare_protocol.h @@ -33,9 +33,6 @@ typedef struct extern PyTypeObject *pysqlite_PrepareProtocolType; -int pysqlite_prepare_protocol_init(pysqlite_PrepareProtocol* self, PyObject* args, PyObject* kwargs); -void pysqlite_prepare_protocol_dealloc(pysqlite_PrepareProtocol* self); - int pysqlite_prepare_protocol_setup_types(PyObject *module); #define UNKNOWN (-1) diff --git a/Modules/_sqlite/statement.h b/Modules/_sqlite/statement.h index b426036002815..56ff7271448d1 100644 --- a/Modules/_sqlite/statement.h +++ b/Modules/_sqlite/statement.h @@ -46,7 +46,6 @@ typedef struct extern PyTypeObject *pysqlite_StatementType; int pysqlite_statement_create(pysqlite_Statement* self, pysqlite_Connection* connection, PyObject* sql); -void pysqlite_statement_dealloc(pysqlite_Statement* self); int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObject* parameter); void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* parameters); From webhook-mailer at python.org Tue Jan 5 21:14:49 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 02:14:49 -0000 Subject: [Python-checkins] bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716) Message-ID: https://github.com/python/cpython/commit/1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e commit: 1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e branch: master author: Berker Peksag committer: berkerpeksag date: 2021-01-06T04:14:42+02:00 summary: bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716) files: M Doc/library/codecs.rst M Lib/codecs.py diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index a026513520590..3169ae517b750 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -697,7 +697,7 @@ compatible with the Python codec registry. .. method:: reset() - Flushes and resets the codec buffers used for keeping state. + Resets the codec buffers used for keeping internal state. Calling this method should ensure that the data on the output is put into a clean state that allows appending of new fresh data without having to @@ -792,7 +792,7 @@ compatible with the Python codec registry. .. method:: reset() - Resets the codec buffers used for keeping state. + Resets the codec buffers used for keeping internal state. Note that no stream repositioning should take place. This method is primarily intended to be able to recover from decoding errors. diff --git a/Lib/codecs.py b/Lib/codecs.py index 3935490d88c8d..e6ad6e3a05236 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -386,7 +386,7 @@ def writelines(self, list): def reset(self): - """ Flushes and resets the codec buffers used for keeping state. + """ Resets the codec buffers used for keeping internal state. Calling this method should ensure that the data on the output is put into a clean state, that allows appending @@ -620,7 +620,7 @@ def readlines(self, sizehint=None, keepends=True): def reset(self): - """ Resets the codec buffers used for keeping state. + """ Resets the codec buffers used for keeping internal state. Note that no stream repositioning should take place. This method is primarily intended to be able to recover From webhook-mailer at python.org Tue Jan 5 21:27:39 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 02:27:39 -0000 Subject: [Python-checkins] bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716) Message-ID: https://github.com/python/cpython/commit/a3ca6747f50efa2fe59caf516a26b0fd1912b8e8 commit: a3ca6747f50efa2fe59caf516a26b0fd1912b8e8 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: berkerpeksag date: 2021-01-06T04:27:30+02:00 summary: bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716) (cherry picked from commit 1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e) Co-authored-by: Berker Peksag files: M Doc/library/codecs.rst M Lib/codecs.py diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index f071057293eec..6eb907afce3c6 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -694,7 +694,7 @@ compatible with the Python codec registry. .. method:: reset() - Flushes and resets the codec buffers used for keeping state. + Resets the codec buffers used for keeping internal state. Calling this method should ensure that the data on the output is put into a clean state that allows appending of new fresh data without having to @@ -789,7 +789,7 @@ compatible with the Python codec registry. .. method:: reset() - Resets the codec buffers used for keeping state. + Resets the codec buffers used for keeping internal state. Note that no stream repositioning should take place. This method is primarily intended to be able to recover from decoding errors. diff --git a/Lib/codecs.py b/Lib/codecs.py index 7f23e9775df80..d2edd148a290a 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -386,7 +386,7 @@ def writelines(self, list): def reset(self): - """ Flushes and resets the codec buffers used for keeping state. + """ Resets the codec buffers used for keeping internal state. Calling this method should ensure that the data on the output is put into a clean state, that allows appending @@ -620,7 +620,7 @@ def readlines(self, sizehint=None, keepends=True): def reset(self): - """ Resets the codec buffers used for keeping state. + """ Resets the codec buffers used for keeping internal state. Note that no stream repositioning should take place. This method is primarily intended to be able to recover From webhook-mailer at python.org Wed Jan 6 06:38:56 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 06 Jan 2021 11:38:56 -0000 Subject: [Python-checkins] bpo-42528: Improve the docs of most Py*_Check{, Exact} API calls (GH-23602) Message-ID: https://github.com/python/cpython/commit/315fc52db17b19fe30aa9193f26adf69e18d8844 commit: 315fc52db17b19fe30aa9193f26adf69e18d8844 branch: master author: Antonio Cuni committer: vstinner date: 2021-01-06T12:38:26+01:00 summary: bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) I think that none of these API calls can fail, but only few of them are documented as such. Add the sentence "This function always succeeds" (which is the same already used e.g. by PyNumber_Check) to all of them. files: M Doc/c-api/bool.rst M Doc/c-api/bytearray.rst M Doc/c-api/bytes.rst M Doc/c-api/capsule.rst M Doc/c-api/cell.rst M Doc/c-api/code.rst M Doc/c-api/complex.rst M Doc/c-api/coro.rst M Doc/c-api/datetime.rst M Doc/c-api/dict.rst M Doc/c-api/float.rst M Doc/c-api/function.rst M Doc/c-api/gen.rst M Doc/c-api/iter.rst M Doc/c-api/iterator.rst M Doc/c-api/list.rst M Doc/c-api/long.rst M Doc/c-api/memoryview.rst M Doc/c-api/method.rst M Doc/c-api/module.rst M Doc/c-api/set.rst M Doc/c-api/slice.rst M Doc/c-api/tuple.rst M Doc/c-api/type.rst M Doc/c-api/unicode.rst M Doc/c-api/weakref.rst diff --git a/Doc/c-api/bool.rst b/Doc/c-api/bool.rst index ce8de6e22f44c..c197d447e9618 100644 --- a/Doc/c-api/bool.rst +++ b/Doc/c-api/bool.rst @@ -13,7 +13,8 @@ are available, however. .. c:function:: int PyBool_Check(PyObject *o) - Return true if *o* is of type :c:data:`PyBool_Type`. + Return true if *o* is of type :c:data:`PyBool_Type`. This function always + succeeds. .. c:var:: PyObject* Py_False diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst index b2f409c15abb7..30bcfc7cf9f50 100644 --- a/Doc/c-api/bytearray.rst +++ b/Doc/c-api/bytearray.rst @@ -25,13 +25,13 @@ Type check macros .. c:function:: int PyByteArray_Check(PyObject *o) Return true if the object *o* is a bytearray object or an instance of a - subtype of the bytearray type. + subtype of the bytearray type. This function always succeeds. .. c:function:: int PyByteArray_CheckExact(PyObject *o) Return true if the object *o* is a bytearray object, but not an instance of a - subtype of the bytearray type. + subtype of the bytearray type. This function always succeeds. Direct API functions diff --git a/Doc/c-api/bytes.rst b/Doc/c-api/bytes.rst index 0e33ed2c7c940..de65701037a7c 100644 --- a/Doc/c-api/bytes.rst +++ b/Doc/c-api/bytes.rst @@ -25,13 +25,13 @@ called with a non-bytes parameter. .. c:function:: int PyBytes_Check(PyObject *o) Return true if the object *o* is a bytes object or an instance of a subtype - of the bytes type. + of the bytes type. This function always succeeds. .. c:function:: int PyBytes_CheckExact(PyObject *o) Return true if the object *o* is a bytes object, but not an instance of a - subtype of the bytes type. + subtype of the bytes type. This function always succeeds. .. c:function:: PyObject* PyBytes_FromString(const char *v) diff --git a/Doc/c-api/capsule.rst b/Doc/c-api/capsule.rst index 5eb313c89bfd5..908e92653dd48 100644 --- a/Doc/c-api/capsule.rst +++ b/Doc/c-api/capsule.rst @@ -34,7 +34,8 @@ Refer to :ref:`using-capsules` for more information on using these objects. .. c:function:: int PyCapsule_CheckExact(PyObject *p) - Return true if its argument is a :c:type:`PyCapsule`. + Return true if its argument is a :c:type:`PyCapsule`. This function always + succeeds. .. c:function:: PyObject* PyCapsule_New(void *pointer, const char *name, PyCapsule_Destructor destructor) diff --git a/Doc/c-api/cell.rst b/Doc/c-api/cell.rst index 8408f7e398db7..ac4ef5adc5cc2 100644 --- a/Doc/c-api/cell.rst +++ b/Doc/c-api/cell.rst @@ -27,7 +27,8 @@ Cell objects are not likely to be useful elsewhere. .. c:function:: int PyCell_Check(ob) - Return true if *ob* is a cell object; *ob* must not be ``NULL``. + Return true if *ob* is a cell object; *ob* must not be ``NULL``. This + function always succeeds. .. c:function:: PyObject* PyCell_New(PyObject *ob) diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index 6f8c41ccbf6e8..b3a17f1898e8e 100644 --- a/Doc/c-api/code.rst +++ b/Doc/c-api/code.rst @@ -27,7 +27,7 @@ bound into a function. .. c:function:: int PyCode_Check(PyObject *co) - Return true if *co* is a :class:`code` object. + Return true if *co* is a :class:`code` object. This function always succeeds. .. c:function:: int PyCode_GetNumFree(PyCodeObject *co) diff --git a/Doc/c-api/complex.rst b/Doc/c-api/complex.rst index 06dbb2572725e..e2ea766b3a32a 100644 --- a/Doc/c-api/complex.rst +++ b/Doc/c-api/complex.rst @@ -94,13 +94,13 @@ Complex Numbers as Python Objects .. c:function:: int PyComplex_Check(PyObject *p) Return true if its argument is a :c:type:`PyComplexObject` or a subtype of - :c:type:`PyComplexObject`. + :c:type:`PyComplexObject`. This function always succeeds. .. c:function:: int PyComplex_CheckExact(PyObject *p) Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of - :c:type:`PyComplexObject`. + :c:type:`PyComplexObject`. This function always succeeds. .. c:function:: PyObject* PyComplex_FromCComplex(Py_complex v) diff --git a/Doc/c-api/coro.rst b/Doc/c-api/coro.rst index 2260944a9a93a..caa855a10d20c 100644 --- a/Doc/c-api/coro.rst +++ b/Doc/c-api/coro.rst @@ -24,6 +24,7 @@ return. .. c:function:: int PyCoro_CheckExact(PyObject *ob) Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be ``NULL``. + This function always succeeds. .. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname) diff --git a/Doc/c-api/datetime.rst b/Doc/c-api/datetime.rst index 415ce4cac67f1..4c4e4bcfa6333 100644 --- a/Doc/c-api/datetime.rst +++ b/Doc/c-api/datetime.rst @@ -28,61 +28,66 @@ Type-check macros: .. c:function:: int PyDate_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype of - :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyDate_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. .. c:function:: int PyDateTime_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a subtype of - :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyDateTime_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must not - be ``NULL``. + be ``NULL``. This function always succeeds. .. c:function:: int PyTime_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype of - :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyTime_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. .. c:function:: int PyDelta_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype of - :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyDelta_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. .. c:function:: int PyTZInfo_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype of - :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyTZInfo_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. Macros to create objects: diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst index 8e0d684546349..d257c9b5f763d 100644 --- a/Doc/c-api/dict.rst +++ b/Doc/c-api/dict.rst @@ -22,13 +22,13 @@ Dictionary Objects .. c:function:: int PyDict_Check(PyObject *p) Return true if *p* is a dict object or an instance of a subtype of the dict - type. + type. This function always succeeds. .. c:function:: int PyDict_CheckExact(PyObject *p) Return true if *p* is a dict object, but not an instance of a subtype of - the dict type. + the dict type. This function always succeeds. .. c:function:: PyObject* PyDict_New() diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst index b29937dbecdcf..c107243a88dfc 100644 --- a/Doc/c-api/float.rst +++ b/Doc/c-api/float.rst @@ -22,13 +22,13 @@ Floating Point Objects .. c:function:: int PyFloat_Check(PyObject *p) Return true if its argument is a :c:type:`PyFloatObject` or a subtype of - :c:type:`PyFloatObject`. + :c:type:`PyFloatObject`. This function always succeeds. .. c:function:: int PyFloat_CheckExact(PyObject *p) Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype of - :c:type:`PyFloatObject`. + :c:type:`PyFloatObject`. This function always succeeds. .. c:function:: PyObject* PyFloat_FromString(PyObject *str) diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst index bb416f4bb63aa..20968828e0bb3 100644 --- a/Doc/c-api/function.rst +++ b/Doc/c-api/function.rst @@ -26,7 +26,7 @@ There are a few functions specific to Python functions. .. c:function:: int PyFunction_Check(PyObject *o) Return true if *o* is a function object (has type :c:data:`PyFunction_Type`). - The parameter must not be ``NULL``. + The parameter must not be ``NULL``. This function always succeeds. .. c:function:: PyObject* PyFunction_New(PyObject *code, PyObject *globals) diff --git a/Doc/c-api/gen.rst b/Doc/c-api/gen.rst index 74410927bfde1..0eb5922f6da75 100644 --- a/Doc/c-api/gen.rst +++ b/Doc/c-api/gen.rst @@ -22,12 +22,14 @@ than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`. .. c:function:: int PyGen_Check(PyObject *ob) - Return true if *ob* is a generator object; *ob* must not be ``NULL``. + Return true if *ob* is a generator object; *ob* must not be ``NULL``. This + function always succeeds. .. c:function:: int PyGen_CheckExact(PyObject *ob) - Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be ``NULL``. + Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be + ``NULL``. This function always succeeds. .. c:function:: PyObject* PyGen_New(PyFrameObject *frame) diff --git a/Doc/c-api/iter.rst b/Doc/c-api/iter.rst index 68df6f6e89f51..74fb5578abd6e 100644 --- a/Doc/c-api/iter.rst +++ b/Doc/c-api/iter.rst @@ -9,7 +9,8 @@ There are two functions specifically for working with iterators. .. c:function:: int PyIter_Check(PyObject *o) - Return true if the object *o* supports the iterator protocol. + Return true if the object *o* supports the iterator protocol. This + function always succeeds. .. c:function:: PyObject* PyIter_Next(PyObject *o) diff --git a/Doc/c-api/iterator.rst b/Doc/c-api/iterator.rst index 4d91e4a224fe8..3fcf099134d4d 100644 --- a/Doc/c-api/iterator.rst +++ b/Doc/c-api/iterator.rst @@ -21,7 +21,8 @@ sentinel value is returned. .. c:function:: int PySeqIter_Check(op) - Return true if the type of *op* is :c:data:`PySeqIter_Type`. + Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function + always succeeds. .. c:function:: PyObject* PySeqIter_New(PyObject *seq) @@ -39,7 +40,8 @@ sentinel value is returned. .. c:function:: int PyCallIter_Check(op) - Return true if the type of *op* is :c:data:`PyCallIter_Type`. + Return true if the type of *op* is :c:data:`PyCallIter_Type`. This + function always succeeds. .. c:function:: PyObject* PyCallIter_New(PyObject *callable, PyObject *sentinel) diff --git a/Doc/c-api/list.rst b/Doc/c-api/list.rst index 0bc0785f200d4..f338e2ae06689 100644 --- a/Doc/c-api/list.rst +++ b/Doc/c-api/list.rst @@ -22,13 +22,13 @@ List Objects .. c:function:: int PyList_Check(PyObject *p) Return true if *p* is a list object or an instance of a subtype of the list - type. + type. This function always succeeds. .. c:function:: int PyList_CheckExact(PyObject *p) Return true if *p* is a list object, but not an instance of a subtype of - the list type. + the list type. This function always succeeds. .. c:function:: PyObject* PyList_New(Py_ssize_t len) diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst index 4d859fb641df3..4201490286b82 100644 --- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -27,13 +27,13 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. .. c:function:: int PyLong_Check(PyObject *p) Return true if its argument is a :c:type:`PyLongObject` or a subtype of - :c:type:`PyLongObject`. + :c:type:`PyLongObject`. This function always succeeds. .. c:function:: int PyLong_CheckExact(PyObject *p) Return true if its argument is a :c:type:`PyLongObject`, but not a subtype of - :c:type:`PyLongObject`. + :c:type:`PyLongObject`. This function always succeeds. .. c:function:: PyObject* PyLong_FromLong(long v) diff --git a/Doc/c-api/memoryview.rst b/Doc/c-api/memoryview.rst index de429e5c11dc7..24f8c935302e8 100644 --- a/Doc/c-api/memoryview.rst +++ b/Doc/c-api/memoryview.rst @@ -45,7 +45,8 @@ any other object. .. c:function:: int PyMemoryView_Check(PyObject *obj) Return true if the object *obj* is a memoryview object. It is not - currently allowed to create subclasses of :class:`memoryview`. + currently allowed to create subclasses of :class:`memoryview`. This + function always succeeds. .. c:function:: Py_buffer *PyMemoryView_GET_BUFFER(PyObject *mview) diff --git a/Doc/c-api/method.rst b/Doc/c-api/method.rst index 0a5341cbbdf15..23852251dfe02 100644 --- a/Doc/c-api/method.rst +++ b/Doc/c-api/method.rst @@ -22,6 +22,7 @@ to bind a :c:data:`PyCFunction` to a class object. It replaces the former call Return true if *o* is an instance method object (has type :c:data:`PyInstanceMethod_Type`). The parameter must not be ``NULL``. + This function always succeeds. .. c:function:: PyObject* PyInstanceMethod_New(PyObject *func) @@ -64,7 +65,7 @@ no longer available. .. c:function:: int PyMethod_Check(PyObject *o) Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). The - parameter must not be ``NULL``. + parameter must not be ``NULL``. This function always succeeds. .. c:function:: PyObject* PyMethod_New(PyObject *func, PyObject *self) diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 41a705d9e9915..a2541afb685c3 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -19,12 +19,13 @@ Module Objects .. c:function:: int PyModule_Check(PyObject *p) Return true if *p* is a module object, or a subtype of a module object. + This function always succeeds. .. c:function:: int PyModule_CheckExact(PyObject *p) Return true if *p* is a module object, but not a subtype of - :c:data:`PyModule_Type`. + :c:data:`PyModule_Type`. This function always succeeds. .. c:function:: PyObject* PyModule_NewObject(PyObject *name) diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst index 879f394d966cd..84f34e7dae80b 100644 --- a/Doc/c-api/set.rst +++ b/Doc/c-api/set.rst @@ -53,28 +53,29 @@ the constructor functions work with any iterable Python object. .. c:function:: int PySet_Check(PyObject *p) Return true if *p* is a :class:`set` object or an instance of a subtype. + This function always succeeds. .. c:function:: int PyFrozenSet_Check(PyObject *p) Return true if *p* is a :class:`frozenset` object or an instance of a - subtype. + subtype. This function always succeeds. .. c:function:: int PyAnySet_Check(PyObject *p) Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or an - instance of a subtype. + instance of a subtype. This function always succeeds. .. c:function:: int PyAnySet_CheckExact(PyObject *p) Return true if *p* is a :class:`set` object or a :class:`frozenset` object but - not an instance of a subtype. + not an instance of a subtype. This function always succeeds. .. c:function:: int PyFrozenSet_CheckExact(PyObject *p) Return true if *p* is a :class:`frozenset` object but not an instance of a - subtype. + subtype. This function always succeeds. .. c:function:: PyObject* PySet_New(PyObject *iterable) diff --git a/Doc/c-api/slice.rst b/Doc/c-api/slice.rst index 48a58c6c6f7e3..8271d9acfb645 100644 --- a/Doc/c-api/slice.rst +++ b/Doc/c-api/slice.rst @@ -14,7 +14,8 @@ Slice Objects .. c:function:: int PySlice_Check(PyObject *ob) - Return true if *ob* is a slice object; *ob* must not be ``NULL``. + Return true if *ob* is a slice object; *ob* must not be ``NULL``. This + function always succeeds. .. c:function:: PyObject* PySlice_New(PyObject *start, PyObject *stop, PyObject *step) diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst index c0c14f480d39b..6919e61022788 100644 --- a/Doc/c-api/tuple.rst +++ b/Doc/c-api/tuple.rst @@ -21,14 +21,14 @@ Tuple Objects .. c:function:: int PyTuple_Check(PyObject *p) - Return true if *p* is a tuple object or an instance of a subtype of the tuple - type. + Return true if *p* is a tuple object or an instance of a subtype of the + tuple type. This function always succeeds. .. c:function:: int PyTuple_CheckExact(PyObject *p) Return true if *p* is a tuple object, but not an instance of a subtype of the - tuple type. + tuple type. This function always succeeds. .. c:function:: PyObject* PyTuple_New(Py_ssize_t len) diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index a869859dd421d..b9bfa554e8143 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -23,12 +23,14 @@ Type Objects Return non-zero if the object *o* is a type object, including instances of types derived from the standard type object. Return 0 in all other cases. + This function always succeeds. .. c:function:: int PyType_CheckExact(PyObject *o) - Return non-zero if the object *o* is a type object, but not a subtype of the - standard type object. Return 0 in all other cases. + Return non-zero if the object *o* is a type object, but not a subtype of + the standard type object. Return 0 in all other cases. This function + always succeeds. .. c:function:: unsigned int PyType_ClearCache() diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index b7f99d32558b8..1851c645f41d8 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -91,13 +91,13 @@ access internal read-only data of Unicode objects: .. c:function:: int PyUnicode_Check(PyObject *o) Return true if the object *o* is a Unicode object or an instance of a Unicode - subtype. + subtype. This function always succeeds. .. c:function:: int PyUnicode_CheckExact(PyObject *o) Return true if the object *o* is a Unicode object, but not an instance of a - subtype. + subtype. This function always succeeds. .. c:function:: int PyUnicode_READY(PyObject *o) diff --git a/Doc/c-api/weakref.rst b/Doc/c-api/weakref.rst index 9205ca620a6ad..98ebe711adaeb 100644 --- a/Doc/c-api/weakref.rst +++ b/Doc/c-api/weakref.rst @@ -13,17 +13,18 @@ as much as it can. .. c:function:: int PyWeakref_Check(ob) - Return true if *ob* is either a reference or proxy object. + Return true if *ob* is either a reference or proxy object. This function + always succeeds. .. c:function:: int PyWeakref_CheckRef(ob) - Return true if *ob* is a reference object. + Return true if *ob* is a reference object. This function always succeeds. .. c:function:: int PyWeakref_CheckProxy(ob) - Return true if *ob* is a proxy object. + Return true if *ob* is a proxy object. This function always succeeds. .. c:function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback) From webhook-mailer at python.org Wed Jan 6 06:47:32 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 06 Jan 2021 11:47:32 -0000 Subject: [Python-checkins] bpo-41798: Allocate _decimal extension module C API on the heap (GH-24117) Message-ID: https://github.com/python/cpython/commit/fe9f446afe46bd716592eda9fa2af8d9f46bbce4 commit: fe9f446afe46bd716592eda9fa2af8d9f46bbce4 branch: master author: Erlend Egeberg Aasland committer: vstinner date: 2021-01-06T12:47:28+01:00 summary: bpo-41798: Allocate _decimal extension module C API on the heap (GH-24117) files: M Include/pydecimal.h M Modules/_decimal/_decimal.c diff --git a/Include/pydecimal.h b/Include/pydecimal.h index 9b6440e1c2ab1..f82e41f0aac05 100644 --- a/Include/pydecimal.h +++ b/Include/pydecimal.h @@ -66,6 +66,8 @@ typedef struct { /* Capsule API */ /****************************************************************************/ +#define PyDec_CAPSULE_NAME "_decimal._API" + /* Simple API */ #define PyDec_TypeCheck_INDEX 0 #define PyDec_TypeCheck_RETURN int @@ -164,7 +166,7 @@ static void **_decimal_api; static int import_decimal(void) { - _decimal_api = (void **)PyCapsule_Import("_decimal._API", 0); + _decimal_api = (void **)PyCapsule_Import(PyDec_CAPSULE_NAME, 0); if (_decimal_api == NULL) { return -1; } diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 9c85d76c6b5b8..664d45a90481d 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -5574,8 +5574,6 @@ static PyTypeObject PyDecContext_Type = /* C-API */ /****************************************************************************/ -static void *_decimal_api[CPYTHON_DECIMAL_MAX_API]; - /* Simple API */ static int PyDec_TypeCheck(const PyObject *v) @@ -5699,9 +5697,22 @@ PyDec_GetConst(const PyObject *v) return MPD(v); } +static void +destroy_api(PyObject *capsule) +{ + void *capi = PyCapsule_GetPointer(capsule, PyDec_CAPSULE_NAME); + PyMem_Free(capi); +} + static PyObject * init_api(void) { + void **_decimal_api = PyMem_Calloc(CPYTHON_DECIMAL_MAX_API, sizeof(void *)); + if (_decimal_api == NULL) { + PyErr_NoMemory(); + return NULL; + } + /* Simple API */ _decimal_api[PyDec_TypeCheck_INDEX] = (void *)PyDec_TypeCheck; _decimal_api[PyDec_IsSpecial_INDEX] = (void *)PyDec_IsSpecial; @@ -5716,7 +5727,11 @@ init_api(void) _decimal_api[PyDec_Get_INDEX] = (void *)PyDec_Get; _decimal_api[PyDec_GetConst_INDEX] = (void *)PyDec_GetConst; - return PyCapsule_New(_decimal_api, "_decimal._API", NULL); + PyObject *capsule = PyCapsule_New(_decimal_api, PyDec_CAPSULE_NAME, destroy_api); + if (!capsule) { + PyMem_Free(_decimal_api); + } + return capsule; } @@ -6080,8 +6095,7 @@ PyInit__decimal(void) CHECK_INT(PyModule_AddStringConstant(m, "__libmpdec_version__", mpd_version())); /* Add capsule API */ - Py_INCREF(capsule); - if (PyModule_AddObject(m, "_API", capsule) < 0) { + if (PyModule_AddObjectRef(m, "_API", capsule) < 0) { goto error; } @@ -6107,6 +6121,7 @@ PyInit__decimal(void) Py_CLEAR(basic_context_template); /* GCOV_NOT_REACHED */ Py_CLEAR(extended_context_template); /* GCOV_NOT_REACHED */ Py_CLEAR(m); /* GCOV_NOT_REACHED */ + Py_CLEAR(capsule); /* GCOV_NOT_REACHED */ return NULL; /* GCOV_NOT_REACHED */ } From webhook-mailer at python.org Wed Jan 6 07:54:27 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 06 Jan 2021 12:54:27 -0000 Subject: [Python-checkins] bpo-42528: Improve the docs of most Py*_Check{, Exact} API calls (GH-23602) (GH-24139) Message-ID: https://github.com/python/cpython/commit/faf49573963921033c608b4d2f398309d9f0d2b5 commit: faf49573963921033c608b4d2f398309d9f0d2b5 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: vstinner date: 2021-01-06T13:54:18+01:00 summary: bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602) (GH-24139) I think that none of these API calls can fail, but only few of them are documented as such. Add the sentence "This function always succeeds" (which is the same already used e.g. by PyNumber_Check) to all of them. (cherry picked from commit 315fc52db17b19fe30aa9193f26adf69e18d8844) Co-authored-by: Antonio Cuni Co-authored-by: Antonio Cuni files: M Doc/c-api/bool.rst M Doc/c-api/bytearray.rst M Doc/c-api/bytes.rst M Doc/c-api/capsule.rst M Doc/c-api/cell.rst M Doc/c-api/code.rst M Doc/c-api/complex.rst M Doc/c-api/coro.rst M Doc/c-api/datetime.rst M Doc/c-api/dict.rst M Doc/c-api/float.rst M Doc/c-api/function.rst M Doc/c-api/gen.rst M Doc/c-api/iter.rst M Doc/c-api/iterator.rst M Doc/c-api/list.rst M Doc/c-api/long.rst M Doc/c-api/memoryview.rst M Doc/c-api/method.rst M Doc/c-api/module.rst M Doc/c-api/set.rst M Doc/c-api/slice.rst M Doc/c-api/tuple.rst M Doc/c-api/type.rst M Doc/c-api/unicode.rst M Doc/c-api/weakref.rst diff --git a/Doc/c-api/bool.rst b/Doc/c-api/bool.rst index ce8de6e22f44c..c197d447e9618 100644 --- a/Doc/c-api/bool.rst +++ b/Doc/c-api/bool.rst @@ -13,7 +13,8 @@ are available, however. .. c:function:: int PyBool_Check(PyObject *o) - Return true if *o* is of type :c:data:`PyBool_Type`. + Return true if *o* is of type :c:data:`PyBool_Type`. This function always + succeeds. .. c:var:: PyObject* Py_False diff --git a/Doc/c-api/bytearray.rst b/Doc/c-api/bytearray.rst index b2f409c15abb7..30bcfc7cf9f50 100644 --- a/Doc/c-api/bytearray.rst +++ b/Doc/c-api/bytearray.rst @@ -25,13 +25,13 @@ Type check macros .. c:function:: int PyByteArray_Check(PyObject *o) Return true if the object *o* is a bytearray object or an instance of a - subtype of the bytearray type. + subtype of the bytearray type. This function always succeeds. .. c:function:: int PyByteArray_CheckExact(PyObject *o) Return true if the object *o* is a bytearray object, but not an instance of a - subtype of the bytearray type. + subtype of the bytearray type. This function always succeeds. Direct API functions diff --git a/Doc/c-api/bytes.rst b/Doc/c-api/bytes.rst index 0e33ed2c7c940..de65701037a7c 100644 --- a/Doc/c-api/bytes.rst +++ b/Doc/c-api/bytes.rst @@ -25,13 +25,13 @@ called with a non-bytes parameter. .. c:function:: int PyBytes_Check(PyObject *o) Return true if the object *o* is a bytes object or an instance of a subtype - of the bytes type. + of the bytes type. This function always succeeds. .. c:function:: int PyBytes_CheckExact(PyObject *o) Return true if the object *o* is a bytes object, but not an instance of a - subtype of the bytes type. + subtype of the bytes type. This function always succeeds. .. c:function:: PyObject* PyBytes_FromString(const char *v) diff --git a/Doc/c-api/capsule.rst b/Doc/c-api/capsule.rst index 5eb313c89bfd5..908e92653dd48 100644 --- a/Doc/c-api/capsule.rst +++ b/Doc/c-api/capsule.rst @@ -34,7 +34,8 @@ Refer to :ref:`using-capsules` for more information on using these objects. .. c:function:: int PyCapsule_CheckExact(PyObject *p) - Return true if its argument is a :c:type:`PyCapsule`. + Return true if its argument is a :c:type:`PyCapsule`. This function always + succeeds. .. c:function:: PyObject* PyCapsule_New(void *pointer, const char *name, PyCapsule_Destructor destructor) diff --git a/Doc/c-api/cell.rst b/Doc/c-api/cell.rst index 8408f7e398db7..ac4ef5adc5cc2 100644 --- a/Doc/c-api/cell.rst +++ b/Doc/c-api/cell.rst @@ -27,7 +27,8 @@ Cell objects are not likely to be useful elsewhere. .. c:function:: int PyCell_Check(ob) - Return true if *ob* is a cell object; *ob* must not be ``NULL``. + Return true if *ob* is a cell object; *ob* must not be ``NULL``. This + function always succeeds. .. c:function:: PyObject* PyCell_New(PyObject *ob) diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index 6f8c41ccbf6e8..b3a17f1898e8e 100644 --- a/Doc/c-api/code.rst +++ b/Doc/c-api/code.rst @@ -27,7 +27,7 @@ bound into a function. .. c:function:: int PyCode_Check(PyObject *co) - Return true if *co* is a :class:`code` object. + Return true if *co* is a :class:`code` object. This function always succeeds. .. c:function:: int PyCode_GetNumFree(PyCodeObject *co) diff --git a/Doc/c-api/complex.rst b/Doc/c-api/complex.rst index 06dbb2572725e..e2ea766b3a32a 100644 --- a/Doc/c-api/complex.rst +++ b/Doc/c-api/complex.rst @@ -94,13 +94,13 @@ Complex Numbers as Python Objects .. c:function:: int PyComplex_Check(PyObject *p) Return true if its argument is a :c:type:`PyComplexObject` or a subtype of - :c:type:`PyComplexObject`. + :c:type:`PyComplexObject`. This function always succeeds. .. c:function:: int PyComplex_CheckExact(PyObject *p) Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of - :c:type:`PyComplexObject`. + :c:type:`PyComplexObject`. This function always succeeds. .. c:function:: PyObject* PyComplex_FromCComplex(Py_complex v) diff --git a/Doc/c-api/coro.rst b/Doc/c-api/coro.rst index 2260944a9a93a..caa855a10d20c 100644 --- a/Doc/c-api/coro.rst +++ b/Doc/c-api/coro.rst @@ -24,6 +24,7 @@ return. .. c:function:: int PyCoro_CheckExact(PyObject *ob) Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be ``NULL``. + This function always succeeds. .. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname) diff --git a/Doc/c-api/datetime.rst b/Doc/c-api/datetime.rst index bd4f1ff446bcf..66f148df28680 100644 --- a/Doc/c-api/datetime.rst +++ b/Doc/c-api/datetime.rst @@ -28,61 +28,66 @@ Type-check macros: .. c:function:: int PyDate_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype of - :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_DateType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyDate_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. .. c:function:: int PyDateTime_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a subtype of - :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_DateTimeType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyDateTime_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must not - be ``NULL``. + be ``NULL``. This function always succeeds. .. c:function:: int PyTime_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype of - :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_TimeType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyTime_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. .. c:function:: int PyDelta_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype of - :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_DeltaType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyDelta_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. .. c:function:: int PyTZInfo_Check(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype of - :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. + :c:data:`PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This function always + succeeds. .. c:function:: int PyTZInfo_CheckExact(PyObject *ob) Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must not be - ``NULL``. + ``NULL``. This function always succeeds. Macros to create objects: diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst index 8c626c7d4a940..5803ac2ad97ad 100644 --- a/Doc/c-api/dict.rst +++ b/Doc/c-api/dict.rst @@ -22,13 +22,13 @@ Dictionary Objects .. c:function:: int PyDict_Check(PyObject *p) Return true if *p* is a dict object or an instance of a subtype of the dict - type. + type. This function always succeeds. .. c:function:: int PyDict_CheckExact(PyObject *p) Return true if *p* is a dict object, but not an instance of a subtype of - the dict type. + the dict type. This function always succeeds. .. c:function:: PyObject* PyDict_New() diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst index b29937dbecdcf..c107243a88dfc 100644 --- a/Doc/c-api/float.rst +++ b/Doc/c-api/float.rst @@ -22,13 +22,13 @@ Floating Point Objects .. c:function:: int PyFloat_Check(PyObject *p) Return true if its argument is a :c:type:`PyFloatObject` or a subtype of - :c:type:`PyFloatObject`. + :c:type:`PyFloatObject`. This function always succeeds. .. c:function:: int PyFloat_CheckExact(PyObject *p) Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype of - :c:type:`PyFloatObject`. + :c:type:`PyFloatObject`. This function always succeeds. .. c:function:: PyObject* PyFloat_FromString(PyObject *str) diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst index bb416f4bb63aa..20968828e0bb3 100644 --- a/Doc/c-api/function.rst +++ b/Doc/c-api/function.rst @@ -26,7 +26,7 @@ There are a few functions specific to Python functions. .. c:function:: int PyFunction_Check(PyObject *o) Return true if *o* is a function object (has type :c:data:`PyFunction_Type`). - The parameter must not be ``NULL``. + The parameter must not be ``NULL``. This function always succeeds. .. c:function:: PyObject* PyFunction_New(PyObject *code, PyObject *globals) diff --git a/Doc/c-api/gen.rst b/Doc/c-api/gen.rst index 74410927bfde1..0eb5922f6da75 100644 --- a/Doc/c-api/gen.rst +++ b/Doc/c-api/gen.rst @@ -22,12 +22,14 @@ than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`. .. c:function:: int PyGen_Check(PyObject *ob) - Return true if *ob* is a generator object; *ob* must not be ``NULL``. + Return true if *ob* is a generator object; *ob* must not be ``NULL``. This + function always succeeds. .. c:function:: int PyGen_CheckExact(PyObject *ob) - Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be ``NULL``. + Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be + ``NULL``. This function always succeeds. .. c:function:: PyObject* PyGen_New(PyFrameObject *frame) diff --git a/Doc/c-api/iter.rst b/Doc/c-api/iter.rst index a2992b3452f91..189f80b9b8193 100644 --- a/Doc/c-api/iter.rst +++ b/Doc/c-api/iter.rst @@ -9,7 +9,8 @@ There are two functions specifically for working with iterators. .. c:function:: int PyIter_Check(PyObject *o) - Return true if the object *o* supports the iterator protocol. + Return true if the object *o* supports the iterator protocol. This + function always succeeds. .. c:function:: PyObject* PyIter_Next(PyObject *o) diff --git a/Doc/c-api/iterator.rst b/Doc/c-api/iterator.rst index 4d91e4a224fe8..3fcf099134d4d 100644 --- a/Doc/c-api/iterator.rst +++ b/Doc/c-api/iterator.rst @@ -21,7 +21,8 @@ sentinel value is returned. .. c:function:: int PySeqIter_Check(op) - Return true if the type of *op* is :c:data:`PySeqIter_Type`. + Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function + always succeeds. .. c:function:: PyObject* PySeqIter_New(PyObject *seq) @@ -39,7 +40,8 @@ sentinel value is returned. .. c:function:: int PyCallIter_Check(op) - Return true if the type of *op* is :c:data:`PyCallIter_Type`. + Return true if the type of *op* is :c:data:`PyCallIter_Type`. This + function always succeeds. .. c:function:: PyObject* PyCallIter_New(PyObject *callable, PyObject *sentinel) diff --git a/Doc/c-api/list.rst b/Doc/c-api/list.rst index 0bc0785f200d4..f338e2ae06689 100644 --- a/Doc/c-api/list.rst +++ b/Doc/c-api/list.rst @@ -22,13 +22,13 @@ List Objects .. c:function:: int PyList_Check(PyObject *p) Return true if *p* is a list object or an instance of a subtype of the list - type. + type. This function always succeeds. .. c:function:: int PyList_CheckExact(PyObject *p) Return true if *p* is a list object, but not an instance of a subtype of - the list type. + the list type. This function always succeeds. .. c:function:: PyObject* PyList_New(Py_ssize_t len) diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst index 22e59ce1e5357..60e1791df9a45 100644 --- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -27,13 +27,13 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. .. c:function:: int PyLong_Check(PyObject *p) Return true if its argument is a :c:type:`PyLongObject` or a subtype of - :c:type:`PyLongObject`. + :c:type:`PyLongObject`. This function always succeeds. .. c:function:: int PyLong_CheckExact(PyObject *p) Return true if its argument is a :c:type:`PyLongObject`, but not a subtype of - :c:type:`PyLongObject`. + :c:type:`PyLongObject`. This function always succeeds. .. c:function:: PyObject* PyLong_FromLong(long v) diff --git a/Doc/c-api/memoryview.rst b/Doc/c-api/memoryview.rst index de429e5c11dc7..24f8c935302e8 100644 --- a/Doc/c-api/memoryview.rst +++ b/Doc/c-api/memoryview.rst @@ -45,7 +45,8 @@ any other object. .. c:function:: int PyMemoryView_Check(PyObject *obj) Return true if the object *obj* is a memoryview object. It is not - currently allowed to create subclasses of :class:`memoryview`. + currently allowed to create subclasses of :class:`memoryview`. This + function always succeeds. .. c:function:: Py_buffer *PyMemoryView_GET_BUFFER(PyObject *mview) diff --git a/Doc/c-api/method.rst b/Doc/c-api/method.rst index 0a5341cbbdf15..23852251dfe02 100644 --- a/Doc/c-api/method.rst +++ b/Doc/c-api/method.rst @@ -22,6 +22,7 @@ to bind a :c:data:`PyCFunction` to a class object. It replaces the former call Return true if *o* is an instance method object (has type :c:data:`PyInstanceMethod_Type`). The parameter must not be ``NULL``. + This function always succeeds. .. c:function:: PyObject* PyInstanceMethod_New(PyObject *func) @@ -64,7 +65,7 @@ no longer available. .. c:function:: int PyMethod_Check(PyObject *o) Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). The - parameter must not be ``NULL``. + parameter must not be ``NULL``. This function always succeeds. .. c:function:: PyObject* PyMethod_New(PyObject *func, PyObject *self) diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 6e9474bfa40eb..90766dca78bfa 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -19,12 +19,13 @@ Module Objects .. c:function:: int PyModule_Check(PyObject *p) Return true if *p* is a module object, or a subtype of a module object. + This function always succeeds. .. c:function:: int PyModule_CheckExact(PyObject *p) Return true if *p* is a module object, but not a subtype of - :c:data:`PyModule_Type`. + :c:data:`PyModule_Type`. This function always succeeds. .. c:function:: PyObject* PyModule_NewObject(PyObject *name) diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst index 879f394d966cd..84f34e7dae80b 100644 --- a/Doc/c-api/set.rst +++ b/Doc/c-api/set.rst @@ -53,28 +53,29 @@ the constructor functions work with any iterable Python object. .. c:function:: int PySet_Check(PyObject *p) Return true if *p* is a :class:`set` object or an instance of a subtype. + This function always succeeds. .. c:function:: int PyFrozenSet_Check(PyObject *p) Return true if *p* is a :class:`frozenset` object or an instance of a - subtype. + subtype. This function always succeeds. .. c:function:: int PyAnySet_Check(PyObject *p) Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or an - instance of a subtype. + instance of a subtype. This function always succeeds. .. c:function:: int PyAnySet_CheckExact(PyObject *p) Return true if *p* is a :class:`set` object or a :class:`frozenset` object but - not an instance of a subtype. + not an instance of a subtype. This function always succeeds. .. c:function:: int PyFrozenSet_CheckExact(PyObject *p) Return true if *p* is a :class:`frozenset` object but not an instance of a - subtype. + subtype. This function always succeeds. .. c:function:: PyObject* PySet_New(PyObject *iterable) diff --git a/Doc/c-api/slice.rst b/Doc/c-api/slice.rst index 48a58c6c6f7e3..8271d9acfb645 100644 --- a/Doc/c-api/slice.rst +++ b/Doc/c-api/slice.rst @@ -14,7 +14,8 @@ Slice Objects .. c:function:: int PySlice_Check(PyObject *ob) - Return true if *ob* is a slice object; *ob* must not be ``NULL``. + Return true if *ob* is a slice object; *ob* must not be ``NULL``. This + function always succeeds. .. c:function:: PyObject* PySlice_New(PyObject *start, PyObject *stop, PyObject *step) diff --git a/Doc/c-api/tuple.rst b/Doc/c-api/tuple.rst index bf751e44acde0..1dbf7dbb67ccd 100644 --- a/Doc/c-api/tuple.rst +++ b/Doc/c-api/tuple.rst @@ -21,14 +21,14 @@ Tuple Objects .. c:function:: int PyTuple_Check(PyObject *p) - Return true if *p* is a tuple object or an instance of a subtype of the tuple - type. + Return true if *p* is a tuple object or an instance of a subtype of the + tuple type. This function always succeeds. .. c:function:: int PyTuple_CheckExact(PyObject *p) Return true if *p* is a tuple object, but not an instance of a subtype of the - tuple type. + tuple type. This function always succeeds. .. c:function:: PyObject* PyTuple_New(Py_ssize_t len) diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index 822360e06170d..ee76f52289387 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -23,12 +23,14 @@ Type Objects Return non-zero if the object *o* is a type object, including instances of types derived from the standard type object. Return 0 in all other cases. + This function always succeeds. .. c:function:: int PyType_CheckExact(PyObject *o) - Return non-zero if the object *o* is a type object, but not a subtype of the - standard type object. Return 0 in all other cases. + Return non-zero if the object *o* is a type object, but not a subtype of + the standard type object. Return 0 in all other cases. This function + always succeeds. .. c:function:: unsigned int PyType_ClearCache() diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index 8a312ae90ed64..62295b4c52934 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -91,13 +91,13 @@ access internal read-only data of Unicode objects: .. c:function:: int PyUnicode_Check(PyObject *o) Return true if the object *o* is a Unicode object or an instance of a Unicode - subtype. + subtype. This function always succeeds. .. c:function:: int PyUnicode_CheckExact(PyObject *o) Return true if the object *o* is a Unicode object, but not an instance of a - subtype. + subtype. This function always succeeds. .. c:function:: int PyUnicode_READY(PyObject *o) diff --git a/Doc/c-api/weakref.rst b/Doc/c-api/weakref.rst index e3a9bda54d671..67698de77fef1 100644 --- a/Doc/c-api/weakref.rst +++ b/Doc/c-api/weakref.rst @@ -13,17 +13,18 @@ as much as it can. .. c:function:: int PyWeakref_Check(ob) - Return true if *ob* is either a reference or proxy object. + Return true if *ob* is either a reference or proxy object. This function + always succeeds. .. c:function:: int PyWeakref_CheckRef(ob) - Return true if *ob* is a reference object. + Return true if *ob* is a reference object. This function always succeeds. .. c:function:: int PyWeakref_CheckProxy(ob) - Return true if *ob* is a proxy object. + Return true if *ob* is a proxy object. This function always succeeds. .. c:function:: PyObject* PyWeakref_NewRef(PyObject *ob, PyObject *callback) From webhook-mailer at python.org Wed Jan 6 12:42:34 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 06 Jan 2021 17:42:34 -0000 Subject: [Python-checkins] bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) Message-ID: https://github.com/python/cpython/commit/ff8458b918050168acda1ad6d079f52b8effa821 commit: ff8458b918050168acda1ad6d079f52b8effa821 branch: master author: Yair Frid committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-06T09:42:10-08:00 summary: bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) Automerge-Triggered-By: GH:brettcannon files: A Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst M Doc/library/importlib.rst diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index f1c444fe8232c..fee5df84dffcb 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1476,7 +1476,7 @@ an :term:`importer`. If **name** has no leading dots, then **name** is simply returned. This allows for usage such as - ``importlib.util.resolve_name('sys', __package__)`` without doing a + ``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a check to see if the **package** argument is needed. :exc:`ImportError` is raised if **name** is a relative module name but diff --git a/Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst b/Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst new file mode 100644 index 0000000000000..768508e0ce1c1 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst @@ -0,0 +1,2 @@ +Updated importlib.utils.resolve_name() doc to use __spec__.parent +instead of __package__. (Thanks Yair Frid.) From webhook-mailer at python.org Wed Jan 6 14:43:15 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 06 Jan 2021 19:43:15 -0000 Subject: [Python-checkins] bpo-41798: Allocate _socket module C API on the heap (GH-24126) Message-ID: https://github.com/python/cpython/commit/f22b7ca1afd98a7381a9fe9e53bd6dfa2a5eba16 commit: f22b7ca1afd98a7381a9fe9e53bd6dfa2a5eba16 branch: master author: Erlend Egeberg Aasland committer: vstinner date: 2021-01-06T20:43:06+01:00 summary: bpo-41798: Allocate _socket module C API on the heap (GH-24126) files: M Modules/socketmodule.c M Modules/socketmodule.h diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index c686286d779dc..0f56d94229fba 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -7033,16 +7033,36 @@ os_init(void) } #endif +static void +sock_free_api(PySocketModule_APIObject *capi) +{ + Py_DECREF(capi->Sock_Type); + Py_DECREF(capi->error); + Py_DECREF(capi->timeout_error); + PyMem_Free(capi); +} -/* C API table - always add new things to the end for binary - compatibility. */ -static -PySocketModule_APIObject PySocketModuleAPI = +static void +sock_destroy_api(PyObject *capsule) { - &sock_type, - NULL, - NULL -}; + void *capi = PyCapsule_GetPointer(capsule, PySocket_CAPSULE_NAME); + sock_free_api(capi); +} + +static PySocketModule_APIObject * +sock_get_api(void) +{ + PySocketModule_APIObject *capi = PyMem_Malloc(sizeof(PySocketModule_APIObject)); + if (capi == NULL) { + PyErr_NoMemory(); + return NULL; + } + + capi->Sock_Type = (PyTypeObject *)Py_NewRef(&sock_type); + capi->error = Py_NewRef(PyExc_OSError); + capi->timeout_error = Py_NewRef(PyExc_TimeoutError); + return capi; +} /* Initialize the _socket module. @@ -7091,8 +7111,6 @@ PyInit__socket(void) if (m == NULL) return NULL; - Py_INCREF(PyExc_OSError); - PySocketModuleAPI.error = PyExc_OSError; Py_INCREF(PyExc_OSError); PyModule_AddObject(m, "error", PyExc_OSError); socket_herror = PyErr_NewException("socket.herror", @@ -7107,8 +7125,6 @@ PyInit__socket(void) return NULL; Py_INCREF(socket_gaierror); PyModule_AddObject(m, "gaierror", socket_gaierror); - - PySocketModuleAPI.timeout_error = PyExc_TimeoutError; PyModule_AddObjectRef(m, "timeout", PyExc_TimeoutError); Py_INCREF((PyObject *)&sock_type); @@ -7129,10 +7145,24 @@ PyInit__socket(void) PyModule_AddObject(m, "has_ipv6", has_ipv6); /* Export C API */ - if (PyModule_AddObject(m, PySocket_CAPI_NAME, - PyCapsule_New(&PySocketModuleAPI, PySocket_CAPSULE_NAME, NULL) - ) != 0) + PySocketModule_APIObject *capi = sock_get_api(); + if (capi == NULL) { + Py_DECREF(m); + return NULL; + } + PyObject *capsule = PyCapsule_New(capi, + PySocket_CAPSULE_NAME, + sock_destroy_api); + if (capsule == NULL) { + sock_free_api(capi); + Py_DECREF(m); + return NULL; + } + if (PyModule_AddObject(m, PySocket_CAPI_NAME, capsule) < 0) { + Py_DECREF(capsule); + Py_DECREF(m); return NULL; + } /* Address families (we only support AF_INET and AF_UNIX) */ #ifdef AF_UNSPEC diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index ba2c9f5c31c3b..e4f375d5e8100 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -342,7 +342,8 @@ typedef struct { */ -/* C API for usage by other Python modules */ +/* C API for usage by other Python modules. + * Always add new things to the end for binary compatibility. */ typedef struct { PyTypeObject *Sock_Type; PyObject *error; From webhook-mailer at python.org Wed Jan 6 14:47:28 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 06 Jan 2021 19:47:28 -0000 Subject: [Python-checkins] bpo-41798: Allocate the _datetime.datetime_CAPI on the heap memory (GH-24096) Message-ID: https://github.com/python/cpython/commit/1ab045933b90d1954af983cc08d1bf0bc46b6240 commit: 1ab045933b90d1954af983cc08d1bf0bc46b6240 branch: master author: Hai Shi committer: vstinner date: 2021-01-06T20:47:19+01:00 summary: bpo-41798: Allocate the _datetime.datetime_CAPI on the heap memory (GH-24096) files: M Modules/_datetimemodule.c diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index c3e0b52baa6fa..8ef2dad37a3a0 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -6473,26 +6473,44 @@ static PyMethodDef module_methods[] = { {NULL, NULL} }; -/* C API. Clients get at this via PyDateTime_IMPORT, defined in - * datetime.h. +/* Get a new C API by calling this function. + * Clients get at C API via PyDateTime_IMPORT, defined in datetime.h. */ -static PyDateTime_CAPI CAPI = { - &PyDateTime_DateType, - &PyDateTime_DateTimeType, - &PyDateTime_TimeType, - &PyDateTime_DeltaType, - &PyDateTime_TZInfoType, - NULL, // PyDatetime_TimeZone_UTC not initialized yet - new_date_ex, - new_datetime_ex, - new_time_ex, - new_delta_ex, - new_timezone, - datetime_fromtimestamp, - datetime_date_fromtimestamp_capi, - new_datetime_ex2, - new_time_ex2 -}; +static inline PyDateTime_CAPI * +get_datetime_capi(void) +{ + PyDateTime_CAPI *capi = PyMem_Malloc(sizeof(PyDateTime_CAPI)); + if (capi == NULL) { + PyErr_NoMemory(); + return NULL; + } + capi->DateType = &PyDateTime_DateType; + capi->DateTimeType = &PyDateTime_DateTimeType; + capi->TimeType = &PyDateTime_TimeType; + capi->DeltaType = &PyDateTime_DeltaType; + capi->TZInfoType = &PyDateTime_TZInfoType; + capi->Date_FromDate = new_date_ex; + capi->DateTime_FromDateAndTime = new_datetime_ex; + capi->Time_FromTime = new_time_ex; + capi->Delta_FromDelta = new_delta_ex; + capi->TimeZone_FromTimeZone = new_timezone; + capi->DateTime_FromTimestamp = datetime_fromtimestamp; + capi->Date_FromTimestamp = datetime_date_fromtimestamp_capi; + capi->DateTime_FromDateAndTimeAndFold = new_datetime_ex2; + capi->Time_FromTimeAndFold = new_time_ex2; + // Make sure this function is called after PyDateTime_TimeZone_UTC has + // been initialized. + assert(PyDateTime_TimeZone_UTC != NULL); + capi->TimeZone_UTC = PyDateTime_TimeZone_UTC; // borrowed ref + return capi; +} + +static void +datetime_destructor(PyObject *op) +{ + void *ptr = PyCapsule_GetPointer(op, PyDateTime_CAPSULE_NAME); + PyMem_Free(ptr); +} static int _datetime_exec(PyObject *module) @@ -6581,7 +6599,6 @@ _datetime_exec(PyObject *module) } PyDateTime_TimeZone_UTC = x; - CAPI.TimeZone_UTC = PyDateTime_TimeZone_UTC; /* bpo-37642: These attributes are rounded to the nearest minute for backwards * compatibility, even though the constructor will accept a wider range of @@ -6619,8 +6636,13 @@ _datetime_exec(PyObject *module) return -1; } - x = PyCapsule_New(&CAPI, PyDateTime_CAPSULE_NAME, NULL); + PyDateTime_CAPI *capi = get_datetime_capi(); + if (capi == NULL) { + return -1; + } + x = PyCapsule_New(capi, PyDateTime_CAPSULE_NAME, datetime_destructor); if (x == NULL) { + PyMem_Free(capi); return -1; } From webhook-mailer at python.org Wed Jan 6 15:57:44 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 06 Jan 2021 20:57:44 -0000 Subject: [Python-checkins] bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159) Message-ID: https://github.com/python/cpython/commit/49c150f1f16398a4e77e051244f27adc5ac7b47b commit: 49c150f1f16398a4e77e051244f27adc5ac7b47b branch: 3.9 author: Vladimir committer: berkerpeksag date: 2021-01-06T22:57:24+02:00 summary: bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159) (cherry picked from commit f9949f82e17c88609adb53eff3a7d5cd63a645bd) files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index fc9ad2e113e11..7dc2cc48c4753 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1093,19 +1093,6 @@ committed: .. literalinclude:: ../includes/sqlite3/ctx_manager.py -Common issues -------------- - -Multithreading -^^^^^^^^^^^^^^ - -Older SQLite versions had issues with sharing connections between threads. -That's why the Python module disallows sharing connections and cursors between -threads. If you still try to do so, you will get an exception at runtime. - -The only exception is calling the :meth:`~Connection.interrupt` method, which -only makes sense to call from a different thread. - .. rubric:: Footnotes .. [#f1] The sqlite3 module is not built with loadable extension support by From webhook-mailer at python.org Wed Jan 6 19:05:16 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Thu, 07 Jan 2021 00:05:16 -0000 Subject: [Python-checkins] bpo-40823: Use loadTestsFromTestCase() iso. makeSuite() in sqlite3 tests (GH-20538) Message-ID: https://github.com/python/cpython/commit/849e339a925fb398be31e566c31b99ce6cdb6006 commit: 849e339a925fb398be31e566c31b99ce6cdb6006 branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-07T02:05:07+02:00 summary: bpo-40823: Use loadTestsFromTestCase() iso. makeSuite() in sqlite3 tests (GH-20538) files: A Misc/NEWS.d/next/Tests/2020-05-30-13-39-22.bpo-40823.yB7K5w.rst M Lib/sqlite3/test/backup.py M Lib/sqlite3/test/dbapi.py M Lib/sqlite3/test/dump.py M Lib/sqlite3/test/factory.py M Lib/sqlite3/test/hooks.py M Lib/sqlite3/test/regression.py M Lib/sqlite3/test/transactions.py M Lib/sqlite3/test/types.py M Lib/sqlite3/test/userfunctions.py diff --git a/Lib/sqlite3/test/backup.py b/Lib/sqlite3/test/backup.py index 3637c4bb21b6d..ddff78c7607b2 100644 --- a/Lib/sqlite3/test/backup.py +++ b/Lib/sqlite3/test/backup.py @@ -162,7 +162,7 @@ def test_database_source_name(self): def suite(): - return unittest.makeSuite(BackupTests) + return unittest.TestLoader().loadTestsFromTestCase(BackupTests) if __name__ == "__main__": unittest.main() diff --git a/Lib/sqlite3/test/dbapi.py b/Lib/sqlite3/test/dbapi.py index 3131c1ec2ab14..7985cd3fcf914 100644 --- a/Lib/sqlite3/test/dbapi.py +++ b/Lib/sqlite3/test/dbapi.py @@ -29,61 +29,61 @@ class ModuleTests(unittest.TestCase): - def CheckAPILevel(self): + def test_api_level(self): self.assertEqual(sqlite.apilevel, "2.0", "apilevel is %s, should be 2.0" % sqlite.apilevel) - def CheckThreadSafety(self): + def test_thread_safety(self): self.assertEqual(sqlite.threadsafety, 1, "threadsafety is %d, should be 1" % sqlite.threadsafety) - def CheckParamStyle(self): + def test_param_style(self): self.assertEqual(sqlite.paramstyle, "qmark", "paramstyle is '%s', should be 'qmark'" % sqlite.paramstyle) - def CheckWarning(self): + def test_warning(self): self.assertTrue(issubclass(sqlite.Warning, Exception), "Warning is not a subclass of Exception") - def CheckError(self): + def test_error(self): self.assertTrue(issubclass(sqlite.Error, Exception), "Error is not a subclass of Exception") - def CheckInterfaceError(self): + def test_interface_error(self): self.assertTrue(issubclass(sqlite.InterfaceError, sqlite.Error), "InterfaceError is not a subclass of Error") - def CheckDatabaseError(self): + def test_database_error(self): self.assertTrue(issubclass(sqlite.DatabaseError, sqlite.Error), "DatabaseError is not a subclass of Error") - def CheckDataError(self): + def test_data_error(self): self.assertTrue(issubclass(sqlite.DataError, sqlite.DatabaseError), "DataError is not a subclass of DatabaseError") - def CheckOperationalError(self): + def test_operational_error(self): self.assertTrue(issubclass(sqlite.OperationalError, sqlite.DatabaseError), "OperationalError is not a subclass of DatabaseError") - def CheckIntegrityError(self): + def test_integrity_error(self): self.assertTrue(issubclass(sqlite.IntegrityError, sqlite.DatabaseError), "IntegrityError is not a subclass of DatabaseError") - def CheckInternalError(self): + def test_internal_error(self): self.assertTrue(issubclass(sqlite.InternalError, sqlite.DatabaseError), "InternalError is not a subclass of DatabaseError") - def CheckProgrammingError(self): + def test_programming_error(self): self.assertTrue(issubclass(sqlite.ProgrammingError, sqlite.DatabaseError), "ProgrammingError is not a subclass of DatabaseError") - def CheckNotSupportedError(self): + def test_not_supported_error(self): self.assertTrue(issubclass(sqlite.NotSupportedError, sqlite.DatabaseError), "NotSupportedError is not a subclass of DatabaseError") - def CheckSharedCacheDeprecated(self): + def test_shared_cache_deprecated(self): for enable in (True, False): with self.assertWarns(DeprecationWarning) as cm: sqlite.enable_shared_cache(enable) @@ -101,38 +101,38 @@ def setUp(self): def tearDown(self): self.cx.close() - def CheckCommit(self): + def test_commit(self): self.cx.commit() - def CheckCommitAfterNoChanges(self): + def test_commit_after_no_changes(self): """ A commit should also work when no changes were made to the database. """ self.cx.commit() self.cx.commit() - def CheckRollback(self): + def test_rollback(self): self.cx.rollback() - def CheckRollbackAfterNoChanges(self): + def test_rollback_after_no_changes(self): """ A rollback should also work when no changes were made to the database. """ self.cx.rollback() self.cx.rollback() - def CheckCursor(self): + def test_cursor(self): cu = self.cx.cursor() - def CheckFailedOpen(self): + def test_failed_open(self): YOU_CANNOT_OPEN_THIS = "/foo/bar/bla/23534/mydb.db" with self.assertRaises(sqlite.OperationalError): con = sqlite.connect(YOU_CANNOT_OPEN_THIS) - def CheckClose(self): + def test_close(self): self.cx.close() - def CheckExceptions(self): + def test_exceptions(self): # Optional DB-API extension. self.assertEqual(self.cx.Warning, sqlite.Warning) self.assertEqual(self.cx.Error, sqlite.Error) @@ -145,7 +145,7 @@ def CheckExceptions(self): self.assertEqual(self.cx.ProgrammingError, sqlite.ProgrammingError) self.assertEqual(self.cx.NotSupportedError, sqlite.NotSupportedError) - def CheckInTransaction(self): + def test_in_transaction(self): # Can't use db from setUp because we want to test initial state. cx = sqlite.connect(":memory:") cu = cx.cursor() @@ -163,11 +163,11 @@ def CheckInTransaction(self): row = cu.fetchone() self.assertEqual(cx.in_transaction, False) - def CheckInTransactionRO(self): + def test_in_transaction_ro(self): with self.assertRaises(AttributeError): self.cx.in_transaction = True - def CheckOpenWithPathLikeObject(self): + def test_open_with_path_like_object(self): """ Checks that we can successfully connect to a database using an object that is PathLike, i.e. has __fspath__(). """ self.addCleanup(unlink, TESTFN) @@ -178,7 +178,7 @@ def __fspath__(self): with sqlite.connect(path) as cx: cx.execute('create table test(id integer)') - def CheckOpenUri(self): + def test_open_uri(self): self.addCleanup(unlink, TESTFN) with sqlite.connect(TESTFN) as cx: cx.execute('create table test(id integer)') @@ -203,21 +203,21 @@ def tearDown(self): self.cu.close() self.cx.close() - def CheckExecuteNoArgs(self): + def test_execute_no_args(self): self.cu.execute("delete from test") - def CheckExecuteIllegalSql(self): + def test_execute_illegal_sql(self): with self.assertRaises(sqlite.OperationalError): self.cu.execute("select asdf") - def CheckExecuteTooMuchSql(self): + def test_execute_too_much_sql(self): with self.assertRaises(sqlite.Warning): self.cu.execute("select 5+4; select 4+5") - def CheckExecuteTooMuchSql2(self): + def test_execute_too_much_sql2(self): self.cu.execute("select 5+4; -- foo bar") - def CheckExecuteTooMuchSql3(self): + def test_execute_too_much_sql3(self): self.cu.execute(""" select 5+4; @@ -226,53 +226,53 @@ def CheckExecuteTooMuchSql3(self): */ """) - def CheckExecuteWrongSqlArg(self): + def test_execute_wrong_sql_arg(self): with self.assertRaises(TypeError): self.cu.execute(42) - def CheckExecuteArgInt(self): + def test_execute_arg_int(self): self.cu.execute("insert into test(id) values (?)", (42,)) - def CheckExecuteArgFloat(self): + def test_execute_arg_float(self): self.cu.execute("insert into test(income) values (?)", (2500.32,)) - def CheckExecuteArgString(self): + def test_execute_arg_string(self): self.cu.execute("insert into test(name) values (?)", ("Hugo",)) - def CheckExecuteArgStringWithZeroByte(self): + def test_execute_arg_string_with_zero_byte(self): self.cu.execute("insert into test(name) values (?)", ("Hu\x00go",)) self.cu.execute("select name from test where id=?", (self.cu.lastrowid,)) row = self.cu.fetchone() self.assertEqual(row[0], "Hu\x00go") - def CheckExecuteNonIterable(self): + def test_execute_non_iterable(self): with self.assertRaises(ValueError) as cm: self.cu.execute("insert into test(id) values (?)", 42) self.assertEqual(str(cm.exception), 'parameters are of unsupported type') - def CheckExecuteWrongNoOfArgs1(self): + def test_execute_wrong_no_of_args1(self): # too many parameters with self.assertRaises(sqlite.ProgrammingError): self.cu.execute("insert into test(id) values (?)", (17, "Egon")) - def CheckExecuteWrongNoOfArgs2(self): + def test_execute_wrong_no_of_args2(self): # too little parameters with self.assertRaises(sqlite.ProgrammingError): self.cu.execute("insert into test(id) values (?)") - def CheckExecuteWrongNoOfArgs3(self): + def test_execute_wrong_no_of_args3(self): # no parameters, parameters are needed with self.assertRaises(sqlite.ProgrammingError): self.cu.execute("insert into test(id) values (?)") - def CheckExecuteParamList(self): + def test_execute_param_list(self): self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=?", ["foo"]) row = self.cu.fetchone() self.assertEqual(row[0], "foo") - def CheckExecuteParamSequence(self): + def test_execute_param_sequence(self): class L: def __len__(self): return 1 @@ -285,7 +285,7 @@ def __getitem__(self, x): row = self.cu.fetchone() self.assertEqual(row[0], "foo") - def CheckExecuteParamSequenceBadLen(self): + def test_execute_param_sequence_bad_len(self): # Issue41662: Error in __len__() was overridden with ProgrammingError. class L: def __len__(self): @@ -297,13 +297,13 @@ def __getitem__(slf, x): with self.assertRaises(ZeroDivisionError): self.cu.execute("select name from test where name=?", L()) - def CheckExecuteDictMapping(self): + def test_execute_dict_mapping(self): self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("select name from test where name=:name", {"name": "foo"}) row = self.cu.fetchone() self.assertEqual(row[0], "foo") - def CheckExecuteDictMapping_Mapping(self): + def test_execute_dict_mapping_mapping(self): class D(dict): def __missing__(self, key): return "foo" @@ -313,32 +313,32 @@ def __missing__(self, key): row = self.cu.fetchone() self.assertEqual(row[0], "foo") - def CheckExecuteDictMappingTooLittleArgs(self): + def test_execute_dict_mapping_too_little_args(self): self.cu.execute("insert into test(name) values ('foo')") with self.assertRaises(sqlite.ProgrammingError): self.cu.execute("select name from test where name=:name and id=:id", {"name": "foo"}) - def CheckExecuteDictMappingNoArgs(self): + def test_execute_dict_mapping_no_args(self): self.cu.execute("insert into test(name) values ('foo')") with self.assertRaises(sqlite.ProgrammingError): self.cu.execute("select name from test where name=:name") - def CheckExecuteDictMappingUnnamed(self): + def test_execute_dict_mapping_unnamed(self): self.cu.execute("insert into test(name) values ('foo')") with self.assertRaises(sqlite.ProgrammingError): self.cu.execute("select name from test where name=?", {"name": "foo"}) - def CheckClose(self): + def test_close(self): self.cu.close() - def CheckRowcountExecute(self): + def test_rowcount_execute(self): self.cu.execute("delete from test") self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("update test set name='bar'") self.assertEqual(self.cu.rowcount, 2) - def CheckRowcountSelect(self): + def test_rowcount_select(self): """ pysqlite does not know the rowcount of SELECT statements, because we don't fetch all rows after executing the select statement. The rowcount @@ -347,12 +347,12 @@ def CheckRowcountSelect(self): self.cu.execute("select 5 union select 6") self.assertEqual(self.cu.rowcount, -1) - def CheckRowcountExecutemany(self): + def test_rowcount_executemany(self): self.cu.execute("delete from test") self.cu.executemany("insert into test(name) values (?)", [(1,), (2,), (3,)]) self.assertEqual(self.cu.rowcount, 3) - def CheckTotalChanges(self): + def test_total_changes(self): self.cu.execute("insert into test(name) values ('foo')") self.cu.execute("insert into test(name) values ('foo')") self.assertLess(2, self.cx.total_changes, msg='total changes reported wrong value') @@ -361,10 +361,10 @@ def CheckTotalChanges(self): # Sequences are required by the DB-API, iterators # enhancements in pysqlite. - def CheckExecuteManySequence(self): + def test_execute_many_sequence(self): self.cu.executemany("insert into test(income) values (?)", [(x,) for x in range(100, 110)]) - def CheckExecuteManyIterator(self): + def test_execute_many_iterator(self): class MyIter: def __init__(self): self.value = 5 @@ -378,26 +378,26 @@ def __next__(self): self.cu.executemany("insert into test(income) values (?)", MyIter()) - def CheckExecuteManyGenerator(self): + def test_execute_many_generator(self): def mygen(): for i in range(5): yield (i,) self.cu.executemany("insert into test(income) values (?)", mygen()) - def CheckExecuteManyWrongSqlArg(self): + def test_execute_many_wrong_sql_arg(self): with self.assertRaises(TypeError): self.cu.executemany(42, [(3,)]) - def CheckExecuteManySelect(self): + def test_execute_many_select(self): with self.assertRaises(sqlite.ProgrammingError): self.cu.executemany("select ?", [(3,)]) - def CheckExecuteManyNotIterable(self): + def test_execute_many_not_iterable(self): with self.assertRaises(TypeError): self.cu.executemany("insert into test(income) values (?)", 42) - def CheckFetchIter(self): + def test_fetch_iter(self): # Optional DB-API extension. self.cu.execute("delete from test") self.cu.execute("insert into test(id) values (?)", (5,)) @@ -409,19 +409,19 @@ def CheckFetchIter(self): self.assertEqual(lst[0], 5) self.assertEqual(lst[1], 6) - def CheckFetchone(self): + def test_fetchone(self): self.cu.execute("select name from test") row = self.cu.fetchone() self.assertEqual(row[0], "foo") row = self.cu.fetchone() self.assertEqual(row, None) - def CheckFetchoneNoStatement(self): + def test_fetchone_no_statement(self): cur = self.cx.cursor() row = cur.fetchone() self.assertEqual(row, None) - def CheckArraySize(self): + def test_array_size(self): # must default ot 1 self.assertEqual(self.cu.arraysize, 1) @@ -438,51 +438,51 @@ def CheckArraySize(self): self.assertEqual(len(res), 2) - def CheckFetchmany(self): + def test_fetchmany(self): self.cu.execute("select name from test") res = self.cu.fetchmany(100) self.assertEqual(len(res), 1) res = self.cu.fetchmany(100) self.assertEqual(res, []) - def CheckFetchmanyKwArg(self): + def test_fetchmany_kw_arg(self): """Checks if fetchmany works with keyword arguments""" self.cu.execute("select name from test") res = self.cu.fetchmany(size=100) self.assertEqual(len(res), 1) - def CheckFetchall(self): + def test_fetchall(self): self.cu.execute("select name from test") res = self.cu.fetchall() self.assertEqual(len(res), 1) res = self.cu.fetchall() self.assertEqual(res, []) - def CheckSetinputsizes(self): + def test_setinputsizes(self): self.cu.setinputsizes([3, 4, 5]) - def CheckSetoutputsize(self): + def test_setoutputsize(self): self.cu.setoutputsize(5, 0) - def CheckSetoutputsizeNoColumn(self): + def test_setoutputsize_no_column(self): self.cu.setoutputsize(42) - def CheckCursorConnection(self): + def test_cursor_connection(self): # Optional DB-API extension. self.assertEqual(self.cu.connection, self.cx) - def CheckWrongCursorCallable(self): + def test_wrong_cursor_callable(self): with self.assertRaises(TypeError): def f(): pass cur = self.cx.cursor(f) - def CheckCursorWrongClass(self): + def test_cursor_wrong_class(self): class Foo: pass foo = Foo() with self.assertRaises(TypeError): cur = sqlite.Cursor(foo) - def CheckLastRowIDOnReplace(self): + def test_last_row_id_on_replace(self): """ INSERT OR REPLACE and REPLACE INTO should produce the same behavior. """ @@ -492,7 +492,7 @@ def CheckLastRowIDOnReplace(self): self.cu.execute(sql.format(statement), (1, 'foo')) self.assertEqual(self.cu.lastrowid, 1) - def CheckLastRowIDOnIgnore(self): + def test_last_row_id_on_ignore(self): self.cu.execute( "insert or ignore into test(unique_test) values (?)", ('test',)) @@ -502,7 +502,7 @@ def CheckLastRowIDOnIgnore(self): ('test',)) self.assertEqual(self.cu.lastrowid, 2) - def CheckLastRowIDInsertOR(self): + def test_last_row_id_insert_o_r(self): results = [] for statement in ('FAIL', 'ABORT', 'ROLLBACK'): sql = 'INSERT OR {} INTO test(unique_test) VALUES (?)' @@ -530,7 +530,7 @@ def tearDown(self): self.cur.close() self.con.close() - def CheckConCursor(self): + def test_con_cursor(self): def run(con, errors): try: cur = con.cursor() @@ -548,7 +548,7 @@ def run(con, errors): if len(errors) > 0: self.fail("\n".join(errors)) - def CheckConCommit(self): + def test_con_commit(self): def run(con, errors): try: con.commit() @@ -566,7 +566,7 @@ def run(con, errors): if len(errors) > 0: self.fail("\n".join(errors)) - def CheckConRollback(self): + def test_con_rollback(self): def run(con, errors): try: con.rollback() @@ -584,7 +584,7 @@ def run(con, errors): if len(errors) > 0: self.fail("\n".join(errors)) - def CheckConClose(self): + def test_con_close(self): def run(con, errors): try: con.close() @@ -602,7 +602,7 @@ def run(con, errors): if len(errors) > 0: self.fail("\n".join(errors)) - def CheckCurImplicitBegin(self): + def test_cur_implicit_begin(self): def run(cur, errors): try: cur.execute("insert into test(name) values ('a')") @@ -620,7 +620,7 @@ def run(cur, errors): if len(errors) > 0: self.fail("\n".join(errors)) - def CheckCurClose(self): + def test_cur_close(self): def run(cur, errors): try: cur.close() @@ -638,7 +638,7 @@ def run(cur, errors): if len(errors) > 0: self.fail("\n".join(errors)) - def CheckCurExecute(self): + def test_cur_execute(self): def run(cur, errors): try: cur.execute("select name from test") @@ -657,7 +657,7 @@ def run(cur, errors): if len(errors) > 0: self.fail("\n".join(errors)) - def CheckCurIterNext(self): + def test_cur_iter_next(self): def run(cur, errors): try: row = cur.fetchone() @@ -678,29 +678,29 @@ def run(cur, errors): self.fail("\n".join(errors)) class ConstructorTests(unittest.TestCase): - def CheckDate(self): + def test_date(self): d = sqlite.Date(2004, 10, 28) - def CheckTime(self): + def test_time(self): t = sqlite.Time(12, 39, 35) - def CheckTimestamp(self): + def test_timestamp(self): ts = sqlite.Timestamp(2004, 10, 28, 12, 39, 35) - def CheckDateFromTicks(self): + def test_date_from_ticks(self): d = sqlite.DateFromTicks(42) - def CheckTimeFromTicks(self): + def test_time_from_ticks(self): t = sqlite.TimeFromTicks(42) - def CheckTimestampFromTicks(self): + def test_timestamp_from_ticks(self): ts = sqlite.TimestampFromTicks(42) - def CheckBinary(self): + def test_binary(self): b = sqlite.Binary(b"\0'") class ExtensionTests(unittest.TestCase): - def CheckScriptStringSql(self): + def test_script_string_sql(self): con = sqlite.connect(":memory:") cur = con.cursor() cur.executescript(""" @@ -713,31 +713,31 @@ def CheckScriptStringSql(self): res = cur.fetchone()[0] self.assertEqual(res, 5) - def CheckScriptSyntaxError(self): + def test_script_syntax_error(self): con = sqlite.connect(":memory:") cur = con.cursor() with self.assertRaises(sqlite.OperationalError): cur.executescript("create table test(x); asdf; create table test2(x)") - def CheckScriptErrorNormal(self): + def test_script_error_normal(self): con = sqlite.connect(":memory:") cur = con.cursor() with self.assertRaises(sqlite.OperationalError): cur.executescript("create table test(sadfsadfdsa); select foo from hurz;") - def CheckCursorExecutescriptAsBytes(self): + def test_cursor_executescript_as_bytes(self): con = sqlite.connect(":memory:") cur = con.cursor() with self.assertRaises(ValueError) as cm: cur.executescript(b"create table test(foo); insert into test(foo) values (5);") self.assertEqual(str(cm.exception), 'script argument must be unicode.') - def CheckConnectionExecute(self): + def test_connection_execute(self): con = sqlite.connect(":memory:") result = con.execute("select 5").fetchone()[0] self.assertEqual(result, 5, "Basic test of Connection.execute") - def CheckConnectionExecutemany(self): + def test_connection_executemany(self): con = sqlite.connect(":memory:") con.execute("create table test(foo)") con.executemany("insert into test(foo) values (?)", [(3,), (4,)]) @@ -745,46 +745,46 @@ def CheckConnectionExecutemany(self): self.assertEqual(result[0][0], 3, "Basic test of Connection.executemany") self.assertEqual(result[1][0], 4, "Basic test of Connection.executemany") - def CheckConnectionExecutescript(self): + def test_connection_executescript(self): con = sqlite.connect(":memory:") con.executescript("create table test(foo); insert into test(foo) values (5);") result = con.execute("select foo from test").fetchone()[0] self.assertEqual(result, 5, "Basic test of Connection.executescript") class ClosedConTests(unittest.TestCase): - def CheckClosedConCursor(self): + def test_closed_con_cursor(self): con = sqlite.connect(":memory:") con.close() with self.assertRaises(sqlite.ProgrammingError): cur = con.cursor() - def CheckClosedConCommit(self): + def test_closed_con_commit(self): con = sqlite.connect(":memory:") con.close() with self.assertRaises(sqlite.ProgrammingError): con.commit() - def CheckClosedConRollback(self): + def test_closed_con_rollback(self): con = sqlite.connect(":memory:") con.close() with self.assertRaises(sqlite.ProgrammingError): con.rollback() - def CheckClosedCurExecute(self): + def test_closed_cur_execute(self): con = sqlite.connect(":memory:") cur = con.cursor() con.close() with self.assertRaises(sqlite.ProgrammingError): cur.execute("select 4") - def CheckClosedCreateFunction(self): + def test_closed_create_function(self): con = sqlite.connect(":memory:") con.close() def f(x): return 17 with self.assertRaises(sqlite.ProgrammingError): con.create_function("foo", 1, f) - def CheckClosedCreateAggregate(self): + def test_closed_create_aggregate(self): con = sqlite.connect(":memory:") con.close() class Agg: @@ -797,7 +797,7 @@ def finalize(self): with self.assertRaises(sqlite.ProgrammingError): con.create_aggregate("foo", 1, Agg) - def CheckClosedSetAuthorizer(self): + def test_closed_set_authorizer(self): con = sqlite.connect(":memory:") con.close() def authorizer(*args): @@ -805,21 +805,21 @@ def authorizer(*args): with self.assertRaises(sqlite.ProgrammingError): con.set_authorizer(authorizer) - def CheckClosedSetProgressCallback(self): + def test_closed_set_progress_callback(self): con = sqlite.connect(":memory:") con.close() def progress(): pass with self.assertRaises(sqlite.ProgrammingError): con.set_progress_handler(progress, 100) - def CheckClosedCall(self): + def test_closed_call(self): con = sqlite.connect(":memory:") con.close() with self.assertRaises(sqlite.ProgrammingError): con() class ClosedCurTests(unittest.TestCase): - def CheckClosed(self): + def test_closed(self): con = sqlite.connect(":memory:") cur = con.cursor() cur.close() @@ -857,7 +857,7 @@ def tearDown(self): self.cu.close() self.cx.close() - def CheckOnConflictRollbackWithExplicitTransaction(self): + def test_on_conflict_rollback_with_explicit_transaction(self): self.cx.isolation_level = None # autocommit mode self.cu = self.cx.cursor() # Start an explicit transaction. @@ -872,7 +872,7 @@ def CheckOnConflictRollbackWithExplicitTransaction(self): # Transaction should have rolled back and nothing should be in table. self.assertEqual(self.cu.fetchall(), []) - def CheckOnConflictAbortRaisesWithExplicitTransactions(self): + def test_on_conflict_abort_raises_with_explicit_transactions(self): # Abort cancels the current sql statement but doesn't change anything # about the current transaction. self.cx.isolation_level = None # autocommit mode @@ -888,7 +888,7 @@ def CheckOnConflictAbortRaisesWithExplicitTransactions(self): # Expect the first two inserts to work, third to do nothing. self.assertEqual(self.cu.fetchall(), [('abort_test', None), (None, 'foo',)]) - def CheckOnConflictRollbackWithoutTransaction(self): + def test_on_conflict_rollback_without_transaction(self): # Start of implicit transaction self.cu.execute("INSERT INTO test(name) VALUES ('abort_test')") self.cu.execute("INSERT OR ROLLBACK INTO test(unique_name) VALUES ('foo')") @@ -898,7 +898,7 @@ def CheckOnConflictRollbackWithoutTransaction(self): # Implicit transaction is rolled back on error. self.assertEqual(self.cu.fetchall(), []) - def CheckOnConflictAbortRaisesWithoutTransactions(self): + def test_on_conflict_abort_raises_without_transactions(self): # Abort cancels the current sql statement but doesn't change anything # about the current transaction. self.cu.execute("INSERT INTO test(name) VALUES ('abort_test')") @@ -909,20 +909,20 @@ def CheckOnConflictAbortRaisesWithoutTransactions(self): self.cu.execute("SELECT name, unique_name FROM test") self.assertEqual(self.cu.fetchall(), [('abort_test', None), (None, 'foo',)]) - def CheckOnConflictFail(self): + def test_on_conflict_fail(self): self.cu.execute("INSERT OR FAIL INTO test(unique_name) VALUES ('foo')") with self.assertRaises(sqlite.IntegrityError): self.cu.execute("INSERT OR FAIL INTO test(unique_name) VALUES ('foo')") self.assertEqual(self.cu.fetchall(), []) - def CheckOnConflictIgnore(self): + def test_on_conflict_ignore(self): self.cu.execute("INSERT OR IGNORE INTO test(unique_name) VALUES ('foo')") # Nothing should happen. self.cu.execute("INSERT OR IGNORE INTO test(unique_name) VALUES ('foo')") self.cu.execute("SELECT unique_name FROM test") self.assertEqual(self.cu.fetchall(), [('foo',)]) - def CheckOnConflictReplace(self): + def test_on_conflict_replace(self): self.cu.execute("INSERT OR REPLACE INTO test(name, unique_name) VALUES ('Data!', 'foo')") # There shouldn't be an IntegrityError exception. self.cu.execute("INSERT OR REPLACE INTO test(name, unique_name) VALUES ('Very different data!', 'foo')") @@ -931,20 +931,20 @@ def CheckOnConflictReplace(self): def suite(): - module_suite = unittest.makeSuite(ModuleTests, "Check") - connection_suite = unittest.makeSuite(ConnectionTests, "Check") - cursor_suite = unittest.makeSuite(CursorTests, "Check") - thread_suite = unittest.makeSuite(ThreadTests, "Check") - constructor_suite = unittest.makeSuite(ConstructorTests, "Check") - ext_suite = unittest.makeSuite(ExtensionTests, "Check") - closed_con_suite = unittest.makeSuite(ClosedConTests, "Check") - closed_cur_suite = unittest.makeSuite(ClosedCurTests, "Check") - on_conflict_suite = unittest.makeSuite(SqliteOnConflictTests, "Check") - return unittest.TestSuite(( - module_suite, connection_suite, cursor_suite, thread_suite, - constructor_suite, ext_suite, closed_con_suite, closed_cur_suite, - on_conflict_suite, - )) + tests = [ + ClosedConTests, + ClosedCurTests, + ConnectionTests, + ConstructorTests, + CursorTests, + ExtensionTests, + ModuleTests, + SqliteOnConflictTests, + ThreadTests, + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Lib/sqlite3/test/dump.py b/Lib/sqlite3/test/dump.py index a1f45a46dc474..618a7fd31c154 100644 --- a/Lib/sqlite3/test/dump.py +++ b/Lib/sqlite3/test/dump.py @@ -11,7 +11,7 @@ def setUp(self): def tearDown(self): self.cx.close() - def CheckTableDump(self): + def test_table_dump(self): expected_sqls = [ """CREATE TABLE "index"("index" blob);""" , @@ -49,7 +49,7 @@ def CheckTableDump(self): [self.assertEqual(expected_sqls[i], actual_sqls[i]) for i in range(len(expected_sqls))] - def CheckUnorderableRow(self): + def test_unorderable_row(self): # iterdump() should be able to cope with unorderable row types (issue #15545) class UnorderableRow: def __init__(self, cursor, row): @@ -71,7 +71,12 @@ def __getitem__(self, index): self.assertEqual(expected, got) def suite(): - return unittest.TestSuite(unittest.makeSuite(DumpTests, "Check")) + tests = [ + DumpTests, + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Lib/sqlite3/test/factory.py b/Lib/sqlite3/test/factory.py index d91997333b11c..9eebb7beef18a 100644 --- a/Lib/sqlite3/test/factory.py +++ b/Lib/sqlite3/test/factory.py @@ -47,7 +47,7 @@ def setUp(self): def tearDown(self): self.con.close() - def CheckIsInstance(self): + def test_is_instance(self): self.assertIsInstance(self.con, MyConnection) class CursorFactoryTests(unittest.TestCase): @@ -57,7 +57,7 @@ def setUp(self): def tearDown(self): self.con.close() - def CheckIsInstance(self): + def test_is_instance(self): cur = self.con.cursor() self.assertIsInstance(cur, sqlite.Cursor) cur = self.con.cursor(MyCursor) @@ -65,7 +65,7 @@ def CheckIsInstance(self): cur = self.con.cursor(factory=lambda con: MyCursor(con)) self.assertIsInstance(cur, MyCursor) - def CheckInvalidFactory(self): + def test_invalid_factory(self): # not a callable at all self.assertRaises(TypeError, self.con.cursor, None) # invalid callable with not exact one argument @@ -77,7 +77,7 @@ class RowFactoryTestsBackwardsCompat(unittest.TestCase): def setUp(self): self.con = sqlite.connect(":memory:") - def CheckIsProducedByFactory(self): + def test_is_produced_by_factory(self): cur = self.con.cursor(factory=MyCursor) cur.execute("select 4+5 as foo") row = cur.fetchone() @@ -91,12 +91,12 @@ class RowFactoryTests(unittest.TestCase): def setUp(self): self.con = sqlite.connect(":memory:") - def CheckCustomFactory(self): + def test_custom_factory(self): self.con.row_factory = lambda cur, row: list(row) row = self.con.execute("select 1, 2").fetchone() self.assertIsInstance(row, list) - def CheckSqliteRowIndex(self): + def test_sqlite_row_index(self): self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a_1, 2 as b").fetchone() self.assertIsInstance(row, sqlite.Row) @@ -125,7 +125,7 @@ def CheckSqliteRowIndex(self): with self.assertRaises(IndexError): row[2**1000] - def CheckSqliteRowIndexUnicode(self): + def test_sqlite_row_index_unicode(self): self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as \xff").fetchone() self.assertEqual(row["\xff"], 1) @@ -134,7 +134,7 @@ def CheckSqliteRowIndexUnicode(self): with self.assertRaises(IndexError): row['\xdf'] - def CheckSqliteRowSlice(self): + def test_sqlite_row_slice(self): # A sqlite.Row can be sliced like a list. self.con.row_factory = sqlite.Row row = self.con.execute("select 1, 2, 3, 4").fetchone() @@ -152,21 +152,21 @@ def CheckSqliteRowSlice(self): self.assertEqual(row[0:4:2], (1, 3)) self.assertEqual(row[3:0:-2], (4, 2)) - def CheckSqliteRowIter(self): + def test_sqlite_row_iter(self): """Checks if the row object is iterable""" self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() for col in row: pass - def CheckSqliteRowAsTuple(self): + def test_sqlite_row_as_tuple(self): """Checks if the row object can be converted to a tuple""" self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() t = tuple(row) self.assertEqual(t, (row['a'], row['b'])) - def CheckSqliteRowAsDict(self): + def test_sqlite_row_as_dict(self): """Checks if the row object can be correctly converted to a dictionary""" self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() @@ -174,7 +174,7 @@ def CheckSqliteRowAsDict(self): self.assertEqual(d["a"], row["a"]) self.assertEqual(d["b"], row["b"]) - def CheckSqliteRowHashCmp(self): + def test_sqlite_row_hash_cmp(self): """Checks if the row object compares and hashes correctly""" self.con.row_factory = sqlite.Row row_1 = self.con.execute("select 1 as a, 2 as b").fetchone() @@ -208,7 +208,7 @@ def CheckSqliteRowHashCmp(self): self.assertEqual(hash(row_1), hash(row_2)) - def CheckSqliteRowAsSequence(self): + def test_sqlite_row_as_sequence(self): """ Checks if the row object can act like a sequence """ self.con.row_factory = sqlite.Row row = self.con.execute("select 1 as a, 2 as b").fetchone() @@ -217,7 +217,7 @@ def CheckSqliteRowAsSequence(self): self.assertEqual(list(reversed(row)), list(reversed(as_tuple))) self.assertIsInstance(row, Sequence) - def CheckFakeCursorClass(self): + def test_fake_cursor_class(self): # Issue #24257: Incorrect use of PyObject_IsInstance() caused # segmentation fault. # Issue #27861: Also applies for cursor factory. @@ -234,26 +234,26 @@ class TextFactoryTests(unittest.TestCase): def setUp(self): self.con = sqlite.connect(":memory:") - def CheckUnicode(self): + def test_unicode(self): austria = "?sterreich" row = self.con.execute("select ?", (austria,)).fetchone() self.assertEqual(type(row[0]), str, "type of row[0] must be unicode") - def CheckString(self): + def test_string(self): self.con.text_factory = bytes austria = "?sterreich" row = self.con.execute("select ?", (austria,)).fetchone() self.assertEqual(type(row[0]), bytes, "type of row[0] must be bytes") self.assertEqual(row[0], austria.encode("utf-8"), "column must equal original data in UTF-8") - def CheckCustom(self): + def test_custom(self): self.con.text_factory = lambda x: str(x, "utf-8", "ignore") austria = "?sterreich" row = self.con.execute("select ?", (austria,)).fetchone() self.assertEqual(type(row[0]), str, "type of row[0] must be unicode") self.assertTrue(row[0].endswith("reich"), "column must contain original data") - def CheckOptimizedUnicode(self): + def test_optimized_unicode(self): # OptimizedUnicode is deprecated as of Python 3.10 with self.assertWarns(DeprecationWarning) as cm: self.con.text_factory = sqlite.OptimizedUnicode @@ -274,25 +274,25 @@ def setUp(self): self.con.execute("create table test (value text)") self.con.execute("insert into test (value) values (?)", ("a\x00b",)) - def CheckString(self): + def test_string(self): # text_factory defaults to str row = self.con.execute("select value from test").fetchone() self.assertIs(type(row[0]), str) self.assertEqual(row[0], "a\x00b") - def CheckBytes(self): + def test_bytes(self): self.con.text_factory = bytes row = self.con.execute("select value from test").fetchone() self.assertIs(type(row[0]), bytes) self.assertEqual(row[0], b"a\x00b") - def CheckBytearray(self): + def test_bytearray(self): self.con.text_factory = bytearray row = self.con.execute("select value from test").fetchone() self.assertIs(type(row[0]), bytearray) self.assertEqual(row[0], b"a\x00b") - def CheckCustom(self): + def test_custom(self): # A custom factory should receive a bytes argument self.con.text_factory = lambda x: x row = self.con.execute("select value from test").fetchone() @@ -303,13 +303,17 @@ def tearDown(self): self.con.close() def suite(): - connection_suite = unittest.makeSuite(ConnectionFactoryTests, "Check") - cursor_suite = unittest.makeSuite(CursorFactoryTests, "Check") - row_suite_compat = unittest.makeSuite(RowFactoryTestsBackwardsCompat, "Check") - row_suite = unittest.makeSuite(RowFactoryTests, "Check") - text_suite = unittest.makeSuite(TextFactoryTests, "Check") - text_zero_bytes_suite = unittest.makeSuite(TextFactoryTestsWithEmbeddedZeroBytes, "Check") - return unittest.TestSuite((connection_suite, cursor_suite, row_suite_compat, row_suite, text_suite, text_zero_bytes_suite)) + tests = [ + ConnectionFactoryTests, + CursorFactoryTests, + RowFactoryTests, + RowFactoryTestsBackwardsCompat, + TextFactoryTests, + TextFactoryTestsWithEmbeddedZeroBytes, + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index 2e620ecdf864c..4250888377c83 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -28,23 +28,23 @@ class CollationTests(unittest.TestCase): - def CheckCreateCollationNotString(self): + def test_create_collation_not_string(self): con = sqlite.connect(":memory:") with self.assertRaises(TypeError): con.create_collation(None, lambda x, y: (x > y) - (x < y)) - def CheckCreateCollationNotCallable(self): + def test_create_collation_not_callable(self): con = sqlite.connect(":memory:") with self.assertRaises(TypeError) as cm: con.create_collation("X", 42) self.assertEqual(str(cm.exception), 'parameter must be callable') - def CheckCreateCollationNotAscii(self): + def test_create_collation_not_ascii(self): con = sqlite.connect(":memory:") with self.assertRaises(sqlite.ProgrammingError): con.create_collation("coll?", lambda x, y: (x > y) - (x < y)) - def CheckCreateCollationBadUpper(self): + def test_create_collation_bad_upper(self): class BadUpperStr(str): def upper(self): return None @@ -61,7 +61,7 @@ def upper(self): self.assertEqual(result[0][0], 'b') self.assertEqual(result[1][0], 'a') - def CheckCollationIsUsed(self): + def test_collation_is_used(self): def mycoll(x, y): # reverse order return -((x > y) - (x < y)) @@ -86,7 +86,7 @@ def mycoll(x, y): result = con.execute(sql).fetchall() self.assertEqual(str(cm.exception), 'no such collation sequence: mycoll') - def CheckCollationReturnsLargeInteger(self): + def test_collation_returns_large_integer(self): def mycoll(x, y): # reverse order return -((x > y) - (x < y)) * 2**32 @@ -105,7 +105,7 @@ def mycoll(x, y): self.assertEqual(result, [('c',), ('b',), ('a',)], msg="the expected order was not returned") - def CheckCollationRegisterTwice(self): + def test_collation_register_twice(self): """ Register two different collation functions under the same name. Verify that the last one is actually used. @@ -119,7 +119,7 @@ def CheckCollationRegisterTwice(self): self.assertEqual(result[0][0], 'b') self.assertEqual(result[1][0], 'a') - def CheckDeregisterCollation(self): + def test_deregister_collation(self): """ Register a collation, then deregister it. Make sure an error is raised if we try to use it. @@ -132,7 +132,7 @@ def CheckDeregisterCollation(self): self.assertEqual(str(cm.exception), 'no such collation sequence: mycoll') class ProgressTests(unittest.TestCase): - def CheckProgressHandlerUsed(self): + def test_progress_handler_used(self): """ Test that the progress handler is invoked once it is set. """ @@ -148,7 +148,7 @@ def progress(): self.assertTrue(progress_calls) - def CheckOpcodeCount(self): + def test_opcode_count(self): """ Test that the opcode argument is respected. """ @@ -171,7 +171,7 @@ def progress(): second_count = len(progress_calls) self.assertGreaterEqual(first_count, second_count) - def CheckCancelOperation(self): + def test_cancel_operation(self): """ Test that returning a non-zero value stops the operation in progress. """ @@ -185,7 +185,7 @@ def progress(): curs.execute, "create table bar (a, b)") - def CheckClearHandler(self): + def test_clear_handler(self): """ Test that setting the progress handler to None clears the previously set handler. """ @@ -201,7 +201,7 @@ def progress(): self.assertEqual(action, 0, "progress handler was not cleared") class TraceCallbackTests(unittest.TestCase): - def CheckTraceCallbackUsed(self): + def test_trace_callback_used(self): """ Test that the trace callback is invoked once it is set. """ @@ -214,7 +214,7 @@ def trace(statement): self.assertTrue(traced_statements) self.assertTrue(any("create table foo" in stmt for stmt in traced_statements)) - def CheckClearTraceCallback(self): + def test_clear_trace_callback(self): """ Test that setting the trace callback to None clears the previously set callback. """ @@ -227,7 +227,7 @@ def trace(statement): con.execute("create table foo(a, b)") self.assertFalse(traced_statements, "trace callback was not cleared") - def CheckUnicodeContent(self): + def test_unicode_content(self): """ Test that the statement can contain unicode literals. """ @@ -244,7 +244,7 @@ def trace(statement): "Unicode data %s garbled in trace callback: %s" % (ascii(unicode_value), ', '.join(map(ascii, traced_statements)))) - def CheckTraceCallbackContent(self): + def test_trace_callback_content(self): # set_trace_callback() shouldn't produce duplicate content (bpo-26187) traced_statements = [] def trace(statement): @@ -264,10 +264,14 @@ def trace(statement): def suite(): - collation_suite = unittest.makeSuite(CollationTests, "Check") - progress_suite = unittest.makeSuite(ProgressTests, "Check") - trace_suite = unittest.makeSuite(TraceCallbackTests, "Check") - return unittest.TestSuite((collation_suite, progress_suite, trace_suite)) + tests = [ + CollationTests, + ProgressTests, + TraceCallbackTests, + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py index 67557e19c796b..1312424cfab96 100644 --- a/Lib/sqlite3/test/regression.py +++ b/Lib/sqlite3/test/regression.py @@ -35,12 +35,12 @@ def setUp(self): def tearDown(self): self.con.close() - def CheckPragmaUserVersion(self): + def test_pragma_user_version(self): # This used to crash pysqlite because this pragma command returns NULL for the column name cur = self.con.cursor() cur.execute("pragma user_version") - def CheckPragmaSchemaVersion(self): + def test_pragma_schema_version(self): # This still crashed pysqlite <= 2.2.1 con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES) try: @@ -50,7 +50,7 @@ def CheckPragmaSchemaVersion(self): cur.close() con.close() - def CheckStatementReset(self): + def test_statement_reset(self): # pysqlite 2.1.0 to 2.2.0 have the problem that not all statements are # reset before a rollback, but only those that are still in the # statement cache. The others are not accessible from the connection object. @@ -65,7 +65,7 @@ def CheckStatementReset(self): con.rollback() - def CheckColumnNameWithSpaces(self): + def test_column_name_with_spaces(self): cur = self.con.cursor() cur.execute('select 1 as "foo bar [datetime]"') self.assertEqual(cur.description[0][0], "foo bar [datetime]") @@ -73,7 +73,7 @@ def CheckColumnNameWithSpaces(self): cur.execute('select 1 as "foo baz"') self.assertEqual(cur.description[0][0], "foo baz") - def CheckStatementFinalizationOnCloseDb(self): + def test_statement_finalization_on_close_db(self): # pysqlite versions <= 2.3.3 only finalized statements in the statement # cache when closing the database. statements that were still # referenced in cursors weren't closed and could provoke " @@ -87,7 +87,7 @@ def CheckStatementFinalizationOnCloseDb(self): cur.execute("select 1 x union select " + str(i)) con.close() - def CheckOnConflictRollback(self): + def test_on_conflict_rollback(self): con = sqlite.connect(":memory:") con.execute("create table foo(x, unique(x) on conflict rollback)") con.execute("insert into foo(x) values (1)") @@ -101,7 +101,7 @@ def CheckOnConflictRollback(self): except sqlite.OperationalError: self.fail("pysqlite knew nothing about the implicit ROLLBACK") - def CheckWorkaroundForBuggySqliteTransferBindings(self): + def test_workaround_for_buggy_sqlite_transfer_bindings(self): """ pysqlite would crash with older SQLite versions unless a workaround is implemented. @@ -110,14 +110,14 @@ def CheckWorkaroundForBuggySqliteTransferBindings(self): self.con.execute("drop table foo") self.con.execute("create table foo(bar)") - def CheckEmptyStatement(self): + def test_empty_statement(self): """ pysqlite used to segfault with SQLite versions 3.5.x. These return NULL for "no-operation" statements """ self.con.execute("") - def CheckTypeMapUsage(self): + def test_type_map_usage(self): """ pysqlite until 2.4.1 did not rebuild the row_cast_map when recompiling a statement. This test exhibits the problem. @@ -132,7 +132,7 @@ def CheckTypeMapUsage(self): con.execute("insert into foo(bar) values (5)") con.execute(SELECT) - def CheckBindMutatingList(self): + def test_bind_mutating_list(self): # Issue41662: Crash when mutate a list of parameters during iteration. class X: def __conform__(self, protocol): @@ -145,7 +145,7 @@ def __conform__(self, protocol): with self.assertRaises(IndexError): con.execute("insert into foo(bar, baz) values (?, ?)", parameters) - def CheckErrorMsgDecodeError(self): + def test_error_msg_decode_error(self): # When porting the module to Python 3.0, the error message about # decoding errors disappeared. This verifies they're back again. with self.assertRaises(sqlite.OperationalError) as cm: @@ -154,13 +154,13 @@ def CheckErrorMsgDecodeError(self): msg = "Could not decode to UTF-8 column 'colname' with text 'xxx" self.assertIn(msg, str(cm.exception)) - def CheckRegisterAdapter(self): + def test_register_adapter(self): """ See issue 3312. """ self.assertRaises(TypeError, sqlite.register_adapter, {}, None) - def CheckSetIsolationLevel(self): + def test_set_isolation_level(self): # See issue 27881. class CustomStr(str): def upper(self): @@ -190,7 +190,7 @@ def __del__(self): con.isolation_level = value self.assertEqual(con.isolation_level, "DEFERRED") - def CheckCursorConstructorCallCheck(self): + def test_cursor_constructor_call_check(self): """ Verifies that cursor methods check whether base class __init__ was called. @@ -207,14 +207,14 @@ def __init__(self, con): r'^Base Cursor\.__init__ not called\.$'): cur.close() - def CheckStrSubclass(self): + def test_str_subclass(self): """ The Python 3.0 port of the module didn't cope with values of subclasses of str. """ class MyStr(str): pass self.con.execute("select ?", (MyStr("abc"),)) - def CheckConnectionConstructorCallCheck(self): + def test_connection_constructor_call_check(self): """ Verifies that connection methods check whether base class __init__ was called. @@ -227,7 +227,7 @@ def __init__(self, name): with self.assertRaises(sqlite.ProgrammingError): cur = con.cursor() - def CheckCursorRegistration(self): + def test_cursor_registration(self): """ Verifies that subclassed cursor classes are correctly registered with the connection object, too. (fetch-across-rollback problem) @@ -249,7 +249,7 @@ def __init__(self, con): with self.assertRaises(sqlite.InterfaceError): cur.fetchall() - def CheckAutoCommit(self): + def test_auto_commit(self): """ Verifies that creating a connection in autocommit mode works. 2.5.3 introduced a regression so that these could no longer @@ -257,7 +257,7 @@ def CheckAutoCommit(self): """ con = sqlite.connect(":memory:", isolation_level=None) - def CheckPragmaAutocommit(self): + def test_pragma_autocommit(self): """ Verifies that running a PRAGMA statement that does an autocommit does work. This did not work in 2.5.3/2.5.4. @@ -269,21 +269,21 @@ def CheckPragmaAutocommit(self): cur.execute("pragma page_size") row = cur.fetchone() - def CheckConnectionCall(self): + def test_connection_call(self): """ Call a connection with a non-string SQL request: check error handling of the statement constructor. """ self.assertRaises(TypeError, self.con, 1) - def CheckCollation(self): + def test_collation(self): def collation_cb(a, b): return 1 self.assertRaises(sqlite.ProgrammingError, self.con.create_collation, # Lone surrogate cannot be encoded to the default encoding (utf8) "\uDC80", collation_cb) - def CheckRecursiveCursorUse(self): + def test_recursive_cursor_use(self): """ http://bugs.python.org/issue10811 @@ -304,7 +304,7 @@ def foo(): cur.executemany("insert into b (baz) values (?)", ((i,) for i in foo())) - def CheckConvertTimestampMicrosecondPadding(self): + def test_convert_timestamp_microsecond_padding(self): """ http://bugs.python.org/issue14720 @@ -330,13 +330,13 @@ def CheckConvertTimestampMicrosecondPadding(self): datetime.datetime(2012, 4, 4, 15, 6, 0, 123456), ]) - def CheckInvalidIsolationLevelType(self): + def test_invalid_isolation_level_type(self): # isolation level is a string, not an integer self.assertRaises(TypeError, sqlite.connect, ":memory:", isolation_level=123) - def CheckNullCharacter(self): + def test_null_character(self): # Issue #21147 con = sqlite.connect(":memory:") self.assertRaises(ValueError, con, "\0select 1") @@ -345,7 +345,7 @@ def CheckNullCharacter(self): self.assertRaises(ValueError, cur.execute, " \0select 2") self.assertRaises(ValueError, cur.execute, "select 2\0") - def CheckCommitCursorReset(self): + def test_commit_cursor_reset(self): """ Connection.commit() did reset cursors, which made sqlite3 to return rows multiple times when fetched from cursors @@ -376,7 +376,7 @@ def CheckCommitCursorReset(self): counter += 1 self.assertEqual(counter, 3, "should have returned exactly three rows") - def CheckBpo31770(self): + def test_bpo31770(self): """ The interpreter shouldn't crash in case Cursor.__init__() is called more than once. @@ -392,11 +392,11 @@ def callback(*args): del ref support.gc_collect() - def CheckDelIsolation_levelSegfault(self): + def test_del_isolation_level_segfault(self): with self.assertRaises(AttributeError): del self.con.isolation_level - def CheckBpo37347(self): + def test_bpo37347(self): class Printer: def log(self, *args): return sqlite.SQLITE_OK @@ -413,10 +413,12 @@ def log(self, *args): def suite(): - regression_suite = unittest.makeSuite(RegressionTests, "Check") - return unittest.TestSuite(( - regression_suite, - )) + tests = [ + RegressionTests + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Lib/sqlite3/test/transactions.py b/Lib/sqlite3/test/transactions.py index c463f7490da57..3b47ff174a0ad 100644 --- a/Lib/sqlite3/test/transactions.py +++ b/Lib/sqlite3/test/transactions.py @@ -52,7 +52,7 @@ def tearDown(self): except OSError: pass - def CheckDMLDoesNotAutoCommitBefore(self): + def test_dml_does_not_auto_commit_before(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.cur1.execute("create table test2(j)") @@ -60,14 +60,14 @@ def CheckDMLDoesNotAutoCommitBefore(self): res = self.cur2.fetchall() self.assertEqual(len(res), 0) - def CheckInsertStartsTransaction(self): + def test_insert_starts_transaction(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.cur2.execute("select i from test") res = self.cur2.fetchall() self.assertEqual(len(res), 0) - def CheckUpdateStartsTransaction(self): + def test_update_starts_transaction(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.con1.commit() @@ -76,7 +76,7 @@ def CheckUpdateStartsTransaction(self): res = self.cur2.fetchone()[0] self.assertEqual(res, 5) - def CheckDeleteStartsTransaction(self): + def test_delete_starts_transaction(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.con1.commit() @@ -85,7 +85,7 @@ def CheckDeleteStartsTransaction(self): res = self.cur2.fetchall() self.assertEqual(len(res), 1) - def CheckReplaceStartsTransaction(self): + def test_replace_starts_transaction(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.con1.commit() @@ -95,7 +95,7 @@ def CheckReplaceStartsTransaction(self): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], 5) - def CheckToggleAutoCommit(self): + def test_toggle_auto_commit(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") self.con1.isolation_level = None @@ -111,13 +111,13 @@ def CheckToggleAutoCommit(self): res = self.cur2.fetchall() self.assertEqual(len(res), 1) - def CheckRaiseTimeout(self): + def test_raise_timeout(self): self.cur1.execute("create table test(i)") self.cur1.execute("insert into test(i) values (5)") with self.assertRaises(sqlite.OperationalError): self.cur2.execute("insert into test(i) values (5)") - def CheckLocking(self): + def test_locking(self): """ This tests the improved concurrency with pysqlite 2.3.4. You needed to roll back con2 before you could commit con1. @@ -129,7 +129,7 @@ def CheckLocking(self): # NO self.con2.rollback() HERE!!! self.con1.commit() - def CheckRollbackCursorConsistency(self): + def test_rollback_cursor_consistency(self): """ Checks if cursors on the connection are set into a "reset" state when a rollback is done on the connection. @@ -149,12 +149,12 @@ def setUp(self): self.con = sqlite.connect(":memory:") self.cur = self.con.cursor() - def CheckDropTable(self): + def test_drop_table(self): self.cur.execute("create table test(i)") self.cur.execute("insert into test(i) values (5)") self.cur.execute("drop table test") - def CheckPragma(self): + def test_pragma(self): self.cur.execute("create table test(i)") self.cur.execute("insert into test(i) values (5)") self.cur.execute("pragma count_changes=1") @@ -167,7 +167,7 @@ class TransactionalDDL(unittest.TestCase): def setUp(self): self.con = sqlite.connect(":memory:") - def CheckDdlDoesNotAutostartTransaction(self): + def test_ddl_does_not_autostart_transaction(self): # For backwards compatibility reasons, DDL statements should not # implicitly start a transaction. self.con.execute("create table test(i)") @@ -175,7 +175,7 @@ def CheckDdlDoesNotAutostartTransaction(self): result = self.con.execute("select * from test").fetchall() self.assertEqual(result, []) - def CheckImmediateTransactionalDDL(self): + def test_immediate_transactional_ddl(self): # You can achieve transactional DDL by issuing a BEGIN # statement manually. self.con.execute("begin immediate") @@ -184,7 +184,7 @@ def CheckImmediateTransactionalDDL(self): with self.assertRaises(sqlite.OperationalError): self.con.execute("select * from test") - def CheckTransactionalDDL(self): + def test_transactional_ddl(self): # You can achieve transactional DDL by issuing a BEGIN # statement manually. self.con.execute("begin") @@ -197,10 +197,14 @@ def tearDown(self): self.con.close() def suite(): - default_suite = unittest.makeSuite(TransactionTests, "Check") - special_command_suite = unittest.makeSuite(SpecialCommandTests, "Check") - ddl_suite = unittest.makeSuite(TransactionalDDL, "Check") - return unittest.TestSuite((default_suite, special_command_suite, ddl_suite)) + tests = [ + SpecialCommandTests, + TransactionTests, + TransactionalDDL, + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Lib/sqlite3/test/types.py b/Lib/sqlite3/test/types.py index 75a9d5601d580..df8aad989a804 100644 --- a/Lib/sqlite3/test/types.py +++ b/Lib/sqlite3/test/types.py @@ -40,33 +40,33 @@ def tearDown(self): self.cur.close() self.con.close() - def CheckString(self): + def test_string(self): self.cur.execute("insert into test(s) values (?)", ("?sterreich",)) self.cur.execute("select s from test") row = self.cur.fetchone() self.assertEqual(row[0], "?sterreich") - def CheckSmallInt(self): + def test_small_int(self): self.cur.execute("insert into test(i) values (?)", (42,)) self.cur.execute("select i from test") row = self.cur.fetchone() self.assertEqual(row[0], 42) - def CheckLargeInt(self): + def test_large_int(self): num = 2**40 self.cur.execute("insert into test(i) values (?)", (num,)) self.cur.execute("select i from test") row = self.cur.fetchone() self.assertEqual(row[0], num) - def CheckFloat(self): + def test_float(self): val = 3.14 self.cur.execute("insert into test(f) values (?)", (val,)) self.cur.execute("select f from test") row = self.cur.fetchone() self.assertEqual(row[0], val) - def CheckBlob(self): + def test_blob(self): sample = b"Guglhupf" val = memoryview(sample) self.cur.execute("insert into test(b) values (?)", (val,)) @@ -74,7 +74,7 @@ def CheckBlob(self): row = self.cur.fetchone() self.assertEqual(row[0], sample) - def CheckUnicodeExecute(self): + def test_unicode_execute(self): self.cur.execute("select '?sterreich'") row = self.cur.fetchone() self.assertEqual(row[0], "?sterreich") @@ -133,21 +133,21 @@ def tearDown(self): self.cur.close() self.con.close() - def CheckString(self): + def test_string(self): # default self.cur.execute("insert into test(s) values (?)", ("foo",)) self.cur.execute('select s as "s [WRONG]" from test') row = self.cur.fetchone() self.assertEqual(row[0], "foo") - def CheckSmallInt(self): + def test_small_int(self): # default self.cur.execute("insert into test(i) values (?)", (42,)) self.cur.execute("select i from test") row = self.cur.fetchone() self.assertEqual(row[0], 42) - def CheckLargeInt(self): + def test_large_int(self): # default num = 2**40 self.cur.execute("insert into test(i) values (?)", (num,)) @@ -155,7 +155,7 @@ def CheckLargeInt(self): row = self.cur.fetchone() self.assertEqual(row[0], num) - def CheckFloat(self): + def test_float(self): # custom val = 3.14 self.cur.execute("insert into test(f) values (?)", (val,)) @@ -163,7 +163,7 @@ def CheckFloat(self): row = self.cur.fetchone() self.assertEqual(row[0], 47.2) - def CheckBool(self): + def test_bool(self): # custom self.cur.execute("insert into test(b) values (?)", (False,)) self.cur.execute("select b from test") @@ -176,7 +176,7 @@ def CheckBool(self): row = self.cur.fetchone() self.assertIs(row[0], True) - def CheckUnicode(self): + def test_unicode(self): # default val = "\xd6sterreich" self.cur.execute("insert into test(u) values (?)", (val,)) @@ -184,14 +184,14 @@ def CheckUnicode(self): row = self.cur.fetchone() self.assertEqual(row[0], val) - def CheckFoo(self): + def test_foo(self): val = DeclTypesTests.Foo("bla") self.cur.execute("insert into test(foo) values (?)", (val,)) self.cur.execute("select foo from test") row = self.cur.fetchone() self.assertEqual(row[0], val) - def CheckErrorInConform(self): + def test_error_in_conform(self): val = DeclTypesTests.BadConform(TypeError) with self.assertRaises(sqlite.InterfaceError): self.cur.execute("insert into test(bad) values (?)", (val,)) @@ -204,19 +204,19 @@ def CheckErrorInConform(self): with self.assertRaises(KeyboardInterrupt): self.cur.execute("insert into test(bad) values (:val)", {"val": val}) - def CheckUnsupportedSeq(self): + def test_unsupported_seq(self): class Bar: pass val = Bar() with self.assertRaises(sqlite.InterfaceError): self.cur.execute("insert into test(f) values (?)", (val,)) - def CheckUnsupportedDict(self): + def test_unsupported_dict(self): class Bar: pass val = Bar() with self.assertRaises(sqlite.InterfaceError): self.cur.execute("insert into test(f) values (:val)", {"val": val}) - def CheckBlob(self): + def test_blob(self): # default sample = b"Guglhupf" val = memoryview(sample) @@ -225,13 +225,13 @@ def CheckBlob(self): row = self.cur.fetchone() self.assertEqual(row[0], sample) - def CheckNumber1(self): + def test_number1(self): self.cur.execute("insert into test(n1) values (5)") value = self.cur.execute("select n1 from test").fetchone()[0] # if the converter is not used, it's an int instead of a float self.assertEqual(type(value), float) - def CheckNumber2(self): + def test_number2(self): """Checks whether converter names are cut off at '(' characters""" self.cur.execute("insert into test(n2) values (5)") value = self.cur.execute("select n2 from test").fetchone()[0] @@ -257,7 +257,7 @@ def tearDown(self): self.cur.close() self.con.close() - def CheckDeclTypeNotUsed(self): + def test_decl_type_not_used(self): """ Assures that the declared type is not used when PARSE_DECLTYPES is not set. @@ -267,13 +267,13 @@ def CheckDeclTypeNotUsed(self): val = self.cur.fetchone()[0] self.assertEqual(val, "xxx") - def CheckNone(self): + def test_none(self): self.cur.execute("insert into test(x) values (?)", (None,)) self.cur.execute("select x from test") val = self.cur.fetchone()[0] self.assertEqual(val, None) - def CheckColName(self): + def test_col_name(self): self.cur.execute("insert into test(x) values (?)", ("xxx",)) self.cur.execute('select x as "x y [bar]" from test') val = self.cur.fetchone()[0] @@ -283,12 +283,12 @@ def CheckColName(self): # '[' (and the preceeding space) should be stripped. self.assertEqual(self.cur.description[0][0], "x y") - def CheckCaseInConverterName(self): + def test_case_in_converter_name(self): self.cur.execute("select 'other' as \"x [b1b1]\"") val = self.cur.fetchone()[0] self.assertEqual(val, "MARKER") - def CheckCursorDescriptionNoRow(self): + def test_cursor_description_no_row(self): """ cursor.description should at least provide the column name(s), even if no row returned. @@ -296,7 +296,7 @@ def CheckCursorDescriptionNoRow(self): self.cur.execute("select * from test where 0 = 1") self.assertEqual(self.cur.description[0][0], "x") - def CheckCursorDescriptionInsert(self): + def test_cursor_description_insert(self): self.cur.execute("insert into test values (1)") self.assertIsNone(self.cur.description) @@ -313,19 +313,19 @@ def tearDown(self): self.cur.close() self.con.close() - def CheckCursorDescriptionCTESimple(self): + def test_cursor_description_cte_simple(self): self.cur.execute("with one as (select 1) select * from one") self.assertIsNotNone(self.cur.description) self.assertEqual(self.cur.description[0][0], "1") - def CheckCursorDescriptionCTESMultipleColumns(self): + def test_cursor_description_cte_multiple_columns(self): self.cur.execute("insert into test values(1)") self.cur.execute("insert into test values(2)") self.cur.execute("with testCTE as (select * from test) select * from testCTE") self.assertIsNotNone(self.cur.description) self.assertEqual(self.cur.description[0][0], "x") - def CheckCursorDescriptionCTE(self): + def test_cursor_description_cte(self): self.cur.execute("insert into test values (1)") self.cur.execute("with bar as (select * from test) select * from test where x = 1") self.assertIsNotNone(self.cur.description) @@ -354,7 +354,7 @@ def tearDown(self): self.cur.close() self.con.close() - def CheckCasterIsUsed(self): + def test_caster_is_used(self): self.cur.execute("select ?", (4,)) val = self.cur.fetchone()[0] self.assertEqual(type(val), float) @@ -372,7 +372,7 @@ def setUp(self): def tearDown(self): self.con.close() - def CheckBinaryInputForConverter(self): + def test_binary_input_for_converter(self): testdata = b"abcdefg" * 10 result = self.con.execute('select ? as "x [bin]"', (memoryview(zlib.compress(testdata)),)).fetchone()[0] self.assertEqual(testdata, result) @@ -387,21 +387,21 @@ def tearDown(self): self.cur.close() self.con.close() - def CheckSqliteDate(self): + def test_sqlite_date(self): d = sqlite.Date(2004, 2, 14) self.cur.execute("insert into test(d) values (?)", (d,)) self.cur.execute("select d from test") d2 = self.cur.fetchone()[0] self.assertEqual(d, d2) - def CheckSqliteTimestamp(self): + def test_sqlite_timestamp(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] self.assertEqual(ts, ts2) - def CheckSqlTimestamp(self): + def test_sql_timestamp(self): now = datetime.datetime.utcnow() self.cur.execute("insert into test(ts) values (current_timestamp)") self.cur.execute("select ts from test") @@ -409,14 +409,14 @@ def CheckSqlTimestamp(self): self.assertEqual(type(ts), datetime.datetime) self.assertEqual(ts.year, now.year) - def CheckDateTimeSubSeconds(self): + def test_date_time_sub_seconds(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 500000) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") ts2 = self.cur.fetchone()[0] self.assertEqual(ts, ts2) - def CheckDateTimeSubSecondsFloatingPoint(self): + def test_date_time_sub_seconds_floating_point(self): ts = sqlite.Timestamp(2004, 2, 14, 7, 15, 0, 510241) self.cur.execute("insert into test(ts) values (?)", (ts,)) self.cur.execute("select ts from test") @@ -424,14 +424,18 @@ def CheckDateTimeSubSecondsFloatingPoint(self): self.assertEqual(ts, ts2) def suite(): - sqlite_type_suite = unittest.makeSuite(SqliteTypeTests, "Check") - decltypes_type_suite = unittest.makeSuite(DeclTypesTests, "Check") - colnames_type_suite = unittest.makeSuite(ColNamesTests, "Check") - adaptation_suite = unittest.makeSuite(ObjectAdaptationTests, "Check") - bin_suite = unittest.makeSuite(BinaryConverterTests, "Check") - date_suite = unittest.makeSuite(DateTimeTests, "Check") - cte_suite = unittest.makeSuite(CommonTableExpressionTests, "Check") - return unittest.TestSuite((sqlite_type_suite, decltypes_type_suite, colnames_type_suite, adaptation_suite, bin_suite, date_suite, cte_suite)) + tests = [ + BinaryConverterTests, + ColNamesTests, + CommonTableExpressionTests, + DateTimeTests, + DeclTypesTests, + ObjectAdaptationTests, + SqliteTypeTests, + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Lib/sqlite3/test/userfunctions.py b/Lib/sqlite3/test/userfunctions.py index c11c82e127577..2285abd4fd8a5 100644 --- a/Lib/sqlite3/test/userfunctions.py +++ b/Lib/sqlite3/test/userfunctions.py @@ -162,11 +162,11 @@ def setUp(self): def tearDown(self): self.con.close() - def CheckFuncErrorOnCreate(self): + def test_func_error_on_create(self): with self.assertRaises(sqlite.OperationalError): self.con.create_function("bla", -100, lambda x: 2*x) - def CheckFuncRefCount(self): + def test_func_ref_count(self): def getfunc(): def f(): return 1 @@ -178,28 +178,28 @@ def f(): cur = self.con.cursor() cur.execute("select reftest()") - def CheckFuncReturnText(self): + def test_func_return_text(self): cur = self.con.cursor() cur.execute("select returntext()") val = cur.fetchone()[0] self.assertEqual(type(val), str) self.assertEqual(val, "foo") - def CheckFuncReturnUnicode(self): + def test_func_return_unicode(self): cur = self.con.cursor() cur.execute("select returnunicode()") val = cur.fetchone()[0] self.assertEqual(type(val), str) self.assertEqual(val, "bar") - def CheckFuncReturnInt(self): + def test_func_return_int(self): cur = self.con.cursor() cur.execute("select returnint()") val = cur.fetchone()[0] self.assertEqual(type(val), int) self.assertEqual(val, 42) - def CheckFuncReturnFloat(self): + def test_func_return_float(self): cur = self.con.cursor() cur.execute("select returnfloat()") val = cur.fetchone()[0] @@ -207,70 +207,70 @@ def CheckFuncReturnFloat(self): if val < 3.139 or val > 3.141: self.fail("wrong value") - def CheckFuncReturnNull(self): + def test_func_return_null(self): cur = self.con.cursor() cur.execute("select returnnull()") val = cur.fetchone()[0] self.assertEqual(type(val), type(None)) self.assertEqual(val, None) - def CheckFuncReturnBlob(self): + def test_func_return_blob(self): cur = self.con.cursor() cur.execute("select returnblob()") val = cur.fetchone()[0] self.assertEqual(type(val), bytes) self.assertEqual(val, b"blob") - def CheckFuncReturnLongLong(self): + def test_func_return_long_long(self): cur = self.con.cursor() cur.execute("select returnlonglong()") val = cur.fetchone()[0] self.assertEqual(val, 1<<31) - def CheckFuncException(self): + def test_func_exception(self): cur = self.con.cursor() with self.assertRaises(sqlite.OperationalError) as cm: cur.execute("select raiseexception()") cur.fetchone() self.assertEqual(str(cm.exception), 'user-defined function raised exception') - def CheckParamString(self): + def test_param_string(self): cur = self.con.cursor() cur.execute("select isstring(?)", ("foo",)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckParamInt(self): + def test_param_int(self): cur = self.con.cursor() cur.execute("select isint(?)", (42,)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckParamFloat(self): + def test_param_float(self): cur = self.con.cursor() cur.execute("select isfloat(?)", (3.14,)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckParamNone(self): + def test_param_none(self): cur = self.con.cursor() cur.execute("select isnone(?)", (None,)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckParamBlob(self): + def test_param_blob(self): cur = self.con.cursor() cur.execute("select isblob(?)", (memoryview(b"blob"),)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckParamLongLong(self): + def test_param_long_long(self): cur = self.con.cursor() cur.execute("select islonglong(?)", (1<<42,)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckAnyArguments(self): + def test_any_arguments(self): cur = self.con.cursor() cur.execute("select spam(?, ?)", (1, 2)) val = cur.fetchone()[0] @@ -284,7 +284,7 @@ def CheckAnyArguments(self): # deterministic functions were permitted in WHERE clauses of partial # indices, which allows testing based on syntax, iso. the query optimizer. @unittest.skipIf(sqlite.sqlite_version_info < (3, 8, 3), "Requires SQLite 3.8.3 or higher") - def CheckFuncNonDeterministic(self): + def test_func_non_deterministic(self): mock = unittest.mock.Mock(return_value=None) self.con.create_function("nondeterministic", 0, mock, deterministic=False) if sqlite.sqlite_version_info < (3, 15, 0): @@ -295,7 +295,7 @@ def CheckFuncNonDeterministic(self): self.con.execute("create index t on test(t) where nondeterministic() is not null") @unittest.skipIf(sqlite.sqlite_version_info < (3, 8, 3), "Requires SQLite 3.8.3 or higher") - def CheckFuncDeterministic(self): + def test_func_deterministic(self): mock = unittest.mock.Mock(return_value=None) self.con.create_function("deterministic", 0, mock, deterministic=True) if sqlite.sqlite_version_info < (3, 15, 0): @@ -308,11 +308,11 @@ def CheckFuncDeterministic(self): self.fail("Unexpected failure while creating partial index") @unittest.skipIf(sqlite.sqlite_version_info >= (3, 8, 3), "SQLite < 3.8.3 needed") - def CheckFuncDeterministicNotSupported(self): + def test_func_deterministic_not_supported(self): with self.assertRaises(sqlite.NotSupportedError): self.con.create_function("deterministic", 0, int, deterministic=True) - def CheckFuncDeterministicKeywordOnly(self): + def test_func_deterministic_keyword_only(self): with self.assertRaises(TypeError): self.con.create_function("deterministic", 0, int, True) @@ -347,81 +347,81 @@ def tearDown(self): #self.con.close() pass - def CheckAggrErrorOnCreate(self): + def test_aggr_error_on_create(self): with self.assertRaises(sqlite.OperationalError): self.con.create_function("bla", -100, AggrSum) - def CheckAggrNoStep(self): + def test_aggr_no_step(self): cur = self.con.cursor() with self.assertRaises(AttributeError) as cm: cur.execute("select nostep(t) from test") self.assertEqual(str(cm.exception), "'AggrNoStep' object has no attribute 'step'") - def CheckAggrNoFinalize(self): + def test_aggr_no_finalize(self): cur = self.con.cursor() with self.assertRaises(sqlite.OperationalError) as cm: cur.execute("select nofinalize(t) from test") val = cur.fetchone()[0] self.assertEqual(str(cm.exception), "user-defined aggregate's 'finalize' method raised error") - def CheckAggrExceptionInInit(self): + def test_aggr_exception_in_init(self): cur = self.con.cursor() with self.assertRaises(sqlite.OperationalError) as cm: cur.execute("select excInit(t) from test") val = cur.fetchone()[0] self.assertEqual(str(cm.exception), "user-defined aggregate's '__init__' method raised error") - def CheckAggrExceptionInStep(self): + def test_aggr_exception_in_step(self): cur = self.con.cursor() with self.assertRaises(sqlite.OperationalError) as cm: cur.execute("select excStep(t) from test") val = cur.fetchone()[0] self.assertEqual(str(cm.exception), "user-defined aggregate's 'step' method raised error") - def CheckAggrExceptionInFinalize(self): + def test_aggr_exception_in_finalize(self): cur = self.con.cursor() with self.assertRaises(sqlite.OperationalError) as cm: cur.execute("select excFinalize(t) from test") val = cur.fetchone()[0] self.assertEqual(str(cm.exception), "user-defined aggregate's 'finalize' method raised error") - def CheckAggrCheckParamStr(self): + def test_aggr_check_param_str(self): cur = self.con.cursor() cur.execute("select checkType('str', ?)", ("foo",)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckAggrCheckParamInt(self): + def test_aggr_check_param_int(self): cur = self.con.cursor() cur.execute("select checkType('int', ?)", (42,)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckAggrCheckParamsInt(self): + def test_aggr_check_params_int(self): cur = self.con.cursor() cur.execute("select checkTypes('int', ?, ?)", (42, 24)) val = cur.fetchone()[0] self.assertEqual(val, 2) - def CheckAggrCheckParamFloat(self): + def test_aggr_check_param_float(self): cur = self.con.cursor() cur.execute("select checkType('float', ?)", (3.14,)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckAggrCheckParamNone(self): + def test_aggr_check_param_none(self): cur = self.con.cursor() cur.execute("select checkType('None', ?)", (None,)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckAggrCheckParamBlob(self): + def test_aggr_check_param_blob(self): cur = self.con.cursor() cur.execute("select checkType('blob', ?)", (memoryview(b"blob"),)) val = cur.fetchone()[0] self.assertEqual(val, 1) - def CheckAggrCheckAggrSum(self): + def test_aggr_check_aggr_sum(self): cur = self.con.cursor() cur.execute("delete from test") cur.executemany("insert into test(i) values (?)", [(10,), (20,), (30,)]) @@ -494,17 +494,17 @@ def authorizer_cb(action, arg1, arg2, dbname, source): def suite(): - function_suite = unittest.makeSuite(FunctionTests, "Check") - aggregate_suite = unittest.makeSuite(AggregateTests, "Check") - authorizer_suite = unittest.makeSuite(AuthorizerTests) - return unittest.TestSuite(( - function_suite, - aggregate_suite, - authorizer_suite, - unittest.makeSuite(AuthorizerRaiseExceptionTests), - unittest.makeSuite(AuthorizerIllegalTypeTests), - unittest.makeSuite(AuthorizerLargeIntegerTests), - )) + tests = [ + AggregateTests, + AuthorizerIllegalTypeTests, + AuthorizerLargeIntegerTests, + AuthorizerRaiseExceptionTests, + AuthorizerTests, + FunctionTests, + ] + return unittest.TestSuite( + [unittest.TestLoader().loadTestsFromTestCase(t) for t in tests] + ) def test(): runner = unittest.TextTestRunner() diff --git a/Misc/NEWS.d/next/Tests/2020-05-30-13-39-22.bpo-40823.yB7K5w.rst b/Misc/NEWS.d/next/Tests/2020-05-30-13-39-22.bpo-40823.yB7K5w.rst new file mode 100644 index 0000000000000..55919521cf806 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2020-05-30-13-39-22.bpo-40823.yB7K5w.rst @@ -0,0 +1,2 @@ +Use :meth:`unittest.TestLoader().loadTestsFromTestCase` instead of +:meth:`unittest.makeSuite` in :mod:`sqlite3` tests. Patch by Erlend E. Aasland. From webhook-mailer at python.org Wed Jan 6 19:36:51 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Thu, 07 Jan 2021 00:36:51 -0000 Subject: [Python-checkins] bpo-42847: Normalise Lib/sqlite3/test/* file encodings (GH-24147) Message-ID: https://github.com/python/cpython/commit/deab1e54ff1695cdbe87f8db3d2c382d8e78330f commit: deab1e54ff1695cdbe87f8db3d2c382d8e78330f branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-07T02:36:35+02:00 summary: bpo-42847: Normalise Lib/sqlite3/test/* file encodings (GH-24147) Convert from ISO-8859-1 to UTF-8. files: M Lib/sqlite3/test/dbapi.py M Lib/sqlite3/test/factory.py M Lib/sqlite3/test/hooks.py M Lib/sqlite3/test/regression.py M Lib/sqlite3/test/transactions.py M Lib/sqlite3/test/types.py diff --git a/Lib/sqlite3/test/dbapi.py b/Lib/sqlite3/test/dbapi.py index 7985cd3fcf914..68a3062239532 100644 --- a/Lib/sqlite3/test/dbapi.py +++ b/Lib/sqlite3/test/dbapi.py @@ -1,7 +1,6 @@ -#-*- coding: iso-8859-1 -*- # pysqlite2/test/dbapi.py: tests for DB-API compliance # -# Copyright (C) 2004-2010 Gerhard H?ring +# Copyright (C) 2004-2010 Gerhard H??ring # # This file is part of pysqlite. # diff --git a/Lib/sqlite3/test/factory.py b/Lib/sqlite3/test/factory.py index 9eebb7beef18a..876428497542f 100644 --- a/Lib/sqlite3/test/factory.py +++ b/Lib/sqlite3/test/factory.py @@ -1,7 +1,6 @@ -#-*- coding: iso-8859-1 -*- # pysqlite2/test/factory.py: tests for the various factories in pysqlite # -# Copyright (C) 2005-2007 Gerhard H?ring +# Copyright (C) 2005-2007 Gerhard H??ring # # This file is part of pysqlite. # @@ -235,20 +234,20 @@ def setUp(self): self.con = sqlite.connect(":memory:") def test_unicode(self): - austria = "?sterreich" + austria = "??sterreich" row = self.con.execute("select ?", (austria,)).fetchone() self.assertEqual(type(row[0]), str, "type of row[0] must be unicode") def test_string(self): self.con.text_factory = bytes - austria = "?sterreich" + austria = "??sterreich" row = self.con.execute("select ?", (austria,)).fetchone() self.assertEqual(type(row[0]), bytes, "type of row[0] must be bytes") self.assertEqual(row[0], austria.encode("utf-8"), "column must equal original data in UTF-8") def test_custom(self): self.con.text_factory = lambda x: str(x, "utf-8", "ignore") - austria = "?sterreich" + austria = "??sterreich" row = self.con.execute("select ?", (austria,)).fetchone() self.assertEqual(type(row[0]), str, "type of row[0] must be unicode") self.assertTrue(row[0].endswith("reich"), "column must contain original data") @@ -258,7 +257,7 @@ def test_optimized_unicode(self): with self.assertWarns(DeprecationWarning) as cm: self.con.text_factory = sqlite.OptimizedUnicode self.assertIn("factory.py", cm.filename) - austria = "?sterreich" + austria = "??sterreich" germany = "Deutchland" a_row = self.con.execute("select ?", (austria,)).fetchone() d_row = self.con.execute("select ?", (germany,)).fetchone() diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index 4250888377c83..a219e8911f706 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -1,7 +1,6 @@ -#-*- coding: iso-8859-1 -*- # pysqlite2/test/hooks.py: tests for various SQLite-specific hooks # -# Copyright (C) 2006-2007 Gerhard H?ring +# Copyright (C) 2006-2007 Gerhard H??ring # # This file is part of pysqlite. # @@ -42,7 +41,7 @@ def test_create_collation_not_callable(self): def test_create_collation_not_ascii(self): con = sqlite.connect(":memory:") with self.assertRaises(sqlite.ProgrammingError): - con.create_collation("coll?", lambda x, y: (x > y) - (x < y)) + con.create_collation("coll??", lambda x, y: (x > y) - (x < y)) def test_create_collation_bad_upper(self): class BadUpperStr(str): diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py index 1312424cfab96..c8e0b27564ad1 100644 --- a/Lib/sqlite3/test/regression.py +++ b/Lib/sqlite3/test/regression.py @@ -1,7 +1,6 @@ -#-*- coding: iso-8859-1 -*- # pysqlite2/test/regression.py: pysqlite regression tests # -# Copyright (C) 2006-2010 Gerhard H?ring +# Copyright (C) 2006-2010 Gerhard H??ring # # This file is part of pysqlite. # diff --git a/Lib/sqlite3/test/transactions.py b/Lib/sqlite3/test/transactions.py index 3b47ff174a0ad..80284902a1a6e 100644 --- a/Lib/sqlite3/test/transactions.py +++ b/Lib/sqlite3/test/transactions.py @@ -1,7 +1,6 @@ -#-*- coding: iso-8859-1 -*- # pysqlite2/test/transactions.py: tests transactions # -# Copyright (C) 2005-2007 Gerhard H?ring +# Copyright (C) 2005-2007 Gerhard H??ring # # This file is part of pysqlite. # diff --git a/Lib/sqlite3/test/types.py b/Lib/sqlite3/test/types.py index df8aad989a804..92ec6349f8bd2 100644 --- a/Lib/sqlite3/test/types.py +++ b/Lib/sqlite3/test/types.py @@ -1,7 +1,6 @@ -#-*- coding: iso-8859-1 -*- # pysqlite2/test/types.py: tests for type conversion and detection # -# Copyright (C) 2005 Gerhard H?ring +# Copyright (C) 2005 Gerhard H??ring # # This file is part of pysqlite. # @@ -41,10 +40,10 @@ def tearDown(self): self.con.close() def test_string(self): - self.cur.execute("insert into test(s) values (?)", ("?sterreich",)) + self.cur.execute("insert into test(s) values (?)", ("??sterreich",)) self.cur.execute("select s from test") row = self.cur.fetchone() - self.assertEqual(row[0], "?sterreich") + self.assertEqual(row[0], "??sterreich") def test_small_int(self): self.cur.execute("insert into test(i) values (?)", (42,)) @@ -75,9 +74,9 @@ def test_blob(self): self.assertEqual(row[0], sample) def test_unicode_execute(self): - self.cur.execute("select '?sterreich'") + self.cur.execute("select '??sterreich'") row = self.cur.fetchone() - self.assertEqual(row[0], "?sterreich") + self.assertEqual(row[0], "??sterreich") class DeclTypesTests(unittest.TestCase): class Foo: From webhook-mailer at python.org Wed Jan 6 21:03:28 2021 From: webhook-mailer at python.org (ncoghlan) Date: Thu, 07 Jan 2021 02:03:28 -0000 Subject: [Python-checkins] bpo-42783: Documentation for asyncio.sleep(0) (#24002) Message-ID: https://github.com/python/cpython/commit/5c30145afb6053998e3518befff638d207047f00 commit: 5c30145afb6053998e3518befff638d207047f00 branch: master author: Simon Willison committer: ncoghlan date: 2021-01-07T12:03:18+10:00 summary: bpo-42783: Documentation for asyncio.sleep(0) (#24002) Co-authored-by: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com> files: M Doc/library/asyncio-task.rst diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 45e58437e0366..1ca1b4a06d7e8 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -293,6 +293,10 @@ Sleeping ``sleep()`` always suspends the current task, allowing other tasks to run. + Setting the delay to 0 provides an optimized path to allow other + tasks to run. This can be used by long-running functions to avoid + blocking the event loop for the full duration of the function call. + .. _asyncio_example_sleep: Example of coroutine displaying the current date every second From webhook-mailer at python.org Thu Jan 7 11:49:18 2021 From: webhook-mailer at python.org (markshannon) Date: Thu, 07 Jan 2021 16:49:18 -0000 Subject: [Python-checkins] Update frame.f_lineno before any call to the (C) tracing function. (GH-24150) Message-ID: https://github.com/python/cpython/commit/8643345bdbd6bcf4b3b8b18abaf488f5fa361b7a commit: 8643345bdbd6bcf4b3b8b18abaf488f5fa361b7a branch: master author: Mark Shannon committer: markshannon date: 2021-01-07T16:49:02Z summary: Update frame.f_lineno before any call to the (C) tracing function. (GH-24150) * Minimizes breakage of C extensions and ensures PyFrame_GetLineNumber is efficient. files: M Python/ceval.c diff --git a/Python/ceval.c b/Python/ceval.c index 609215623b948..5e2a160f0ed35 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -46,10 +46,10 @@ _Py_IDENTIFIER(__name__); /* Forward declarations */ Py_LOCAL_INLINE(PyObject *) call_function( - PyThreadState *tstate, PyObject ***pp_stack, + PyThreadState *tstate, PyCodeAddressRange *, PyObject ***pp_stack, Py_ssize_t oparg, PyObject *kwnames); static PyObject * do_call_core( - PyThreadState *tstate, PyObject *func, + PyThreadState *tstate, PyCodeAddressRange *, PyObject *func, PyObject *callargs, PyObject *kwdict); #ifdef LLTRACE @@ -58,12 +58,15 @@ static int prtrace(PyThreadState *, PyObject *, const char *); #endif static int call_trace(Py_tracefunc, PyObject *, PyThreadState *, PyFrameObject *, + PyCodeAddressRange *, int, PyObject *); static int call_trace_protected(Py_tracefunc, PyObject *, PyThreadState *, PyFrameObject *, + PyCodeAddressRange *, int, PyObject *); static void call_exc_trace(Py_tracefunc, PyObject *, - PyThreadState *, PyFrameObject *); + PyThreadState *, PyFrameObject *, + PyCodeAddressRange *); static int maybe_call_line_trace(Py_tracefunc, PyObject *, PyThreadState *, PyFrameObject *, PyCodeAddressRange *, int *); @@ -1380,6 +1383,9 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) } tstate->frame = f; + co = f->f_code; + PyCodeAddressRange bounds; + _PyCode_InitAddressRange(co, &bounds); if (tstate->use_tracing) { if (tstate->c_tracefunc != NULL) { @@ -1398,7 +1404,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) whenever an exception is detected. */ if (call_trace_protected(tstate->c_tracefunc, tstate->c_traceobj, - tstate, f, PyTrace_CALL, Py_None)) { + tstate, f, &bounds, + PyTrace_CALL, Py_None)) { /* Trace function raised an error */ goto exit_eval_frame; } @@ -1408,7 +1415,8 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) return itself and isn't called for "line" events */ if (call_trace_protected(tstate->c_profilefunc, tstate->c_profileobj, - tstate, f, PyTrace_CALL, Py_None)) { + tstate, f, &bounds, + PyTrace_CALL, Py_None)) { /* Profile function raised an error */ goto exit_eval_frame; } @@ -1418,9 +1426,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) if (PyDTrace_FUNCTION_ENTRY_ENABLED()) dtrace_function_entry(f); - co = f->f_code; - PyCodeAddressRange bounds; - _PyCode_InitAddressRange(co, &bounds); int instr_prev = -1; names = co->co_names; @@ -2348,7 +2353,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) if (retval == NULL) { if (tstate->c_tracefunc != NULL && _PyErr_ExceptionMatches(tstate, PyExc_StopIteration)) - call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, tstate, f); + call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, tstate, f, &bounds); if (_PyGen_FetchStopIterationValue(&retval) == 0) { gen_status = PYGEN_RETURN; } @@ -3596,7 +3601,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) goto error; } else if (tstate->c_tracefunc != NULL) { - call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, tstate, f); + call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, tstate, f, &bounds); } _PyErr_Clear(tstate); } @@ -3764,7 +3769,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) `callable` will be POPed by call_function. NULL will will be POPed manually later. */ - res = call_function(tstate, &sp, oparg, NULL); + res = call_function(tstate, &bounds, &sp, oparg, NULL); stack_pointer = sp; (void)POP(); /* POP the NULL. */ } @@ -3781,7 +3786,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) We'll be passing `oparg + 1` to call_function, to make it accept the `self` as a first argument. */ - res = call_function(tstate, &sp, oparg + 1, NULL); + res = call_function(tstate, &bounds, &sp, oparg + 1, NULL); stack_pointer = sp; } @@ -3795,7 +3800,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) PREDICTED(CALL_FUNCTION); PyObject **sp, *res; sp = stack_pointer; - res = call_function(tstate, &sp, oparg, NULL); + res = call_function(tstate, &bounds, &sp, oparg, NULL); stack_pointer = sp; PUSH(res); if (res == NULL) { @@ -3812,7 +3817,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) assert(PyTuple_GET_SIZE(names) <= oparg); /* We assume without checking that names contains only strings */ sp = stack_pointer; - res = call_function(tstate, &sp, oparg, names); + res = call_function(tstate, &bounds, &sp, oparg, names); stack_pointer = sp; PUSH(res); Py_DECREF(names); @@ -3857,7 +3862,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) } assert(PyTuple_CheckExact(callargs)); - result = do_call_core(tstate, func, callargs, kwargs); + result = do_call_core(tstate, &bounds, func, callargs, kwargs); Py_DECREF(func); Py_DECREF(callargs); Py_XDECREF(kwargs); @@ -4024,7 +4029,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) assert(f->f_state == FRAME_EXECUTING); f->f_state = FRAME_UNWINDING; call_exc_trace(tstate->c_tracefunc, tstate->c_traceobj, - tstate, f); + tstate, f, &bounds); } exception_unwind: f->f_state = FRAME_UNWINDING; @@ -4102,13 +4107,13 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) if (tstate->use_tracing) { if (tstate->c_tracefunc) { if (call_trace_protected(tstate->c_tracefunc, tstate->c_traceobj, - tstate, f, PyTrace_RETURN, retval)) { + tstate, f, &bounds, PyTrace_RETURN, retval)) { Py_CLEAR(retval); } } if (tstate->c_profilefunc) { if (call_trace_protected(tstate->c_profilefunc, tstate->c_profileobj, - tstate, f, PyTrace_RETURN, retval)) { + tstate, f, &bounds, PyTrace_RETURN, retval)) { Py_CLEAR(retval); } } @@ -4902,7 +4907,9 @@ prtrace(PyThreadState *tstate, PyObject *v, const char *str) static void call_exc_trace(Py_tracefunc func, PyObject *self, - PyThreadState *tstate, PyFrameObject *f) + PyThreadState *tstate, + PyFrameObject *f, + PyCodeAddressRange *bounds) { PyObject *type, *value, *traceback, *orig_traceback, *arg; int err; @@ -4918,7 +4925,7 @@ call_exc_trace(Py_tracefunc func, PyObject *self, _PyErr_Restore(tstate, type, value, orig_traceback); return; } - err = call_trace(func, self, tstate, f, PyTrace_EXCEPTION, arg); + err = call_trace(func, self, tstate, f, bounds, PyTrace_EXCEPTION, arg); Py_DECREF(arg); if (err == 0) { _PyErr_Restore(tstate, type, value, orig_traceback); @@ -4933,12 +4940,13 @@ call_exc_trace(Py_tracefunc func, PyObject *self, static int call_trace_protected(Py_tracefunc func, PyObject *obj, PyThreadState *tstate, PyFrameObject *frame, + PyCodeAddressRange *bounds, int what, PyObject *arg) { PyObject *type, *value, *traceback; int err; _PyErr_Fetch(tstate, &type, &value, &traceback); - err = call_trace(func, obj, tstate, frame, what, arg); + err = call_trace(func, obj, tstate, frame, bounds, what, arg); if (err == 0) { _PyErr_Restore(tstate, type, value, traceback); @@ -4955,6 +4963,7 @@ call_trace_protected(Py_tracefunc func, PyObject *obj, static int call_trace(Py_tracefunc func, PyObject *obj, PyThreadState *tstate, PyFrameObject *frame, + PyCodeAddressRange *bounds, int what, PyObject *arg) { int result; @@ -4962,7 +4971,14 @@ call_trace(Py_tracefunc func, PyObject *obj, return 0; tstate->tracing++; tstate->use_tracing = 0; + if (frame->f_lasti < 0) { + frame->f_lineno = frame->f_code->co_firstlineno; + } + else { + frame->f_lineno = _PyCode_CheckLineNumber(frame->f_lasti, bounds); + } result = func(obj, frame, what, arg); + frame->f_lineno = 0; tstate->use_tracing = ((tstate->c_tracefunc != NULL) || (tstate->c_profilefunc != NULL)); tstate->tracing--; @@ -5005,16 +5021,12 @@ maybe_call_line_trace(Py_tracefunc func, PyObject *obj, if (frame->f_lasti < *instr_prev || (line != lastline && frame->f_lasti == bounds->ar_start)) { - frame->f_lineno = line; - result = call_trace(func, obj, tstate, frame, PyTrace_LINE, Py_None); - frame->f_lineno = 0; + result = call_trace(func, obj, tstate, frame, bounds, PyTrace_LINE, Py_None); } } /* Always emit an opcode event if we're tracing all opcodes. */ if (frame->f_trace_opcodes) { - frame->f_lineno = _PyCode_CheckLineNumber(frame->f_lasti, bounds); - result = call_trace(func, obj, tstate, frame, PyTrace_OPCODE, Py_None); - frame->f_lineno = 0; + result = call_trace(func, obj, tstate, frame, bounds, PyTrace_OPCODE, Py_None); } *instr_prev = frame->f_lasti; return result; @@ -5281,7 +5293,7 @@ PyEval_GetFuncDesc(PyObject *func) #define C_TRACE(x, call) \ if (tstate->use_tracing && tstate->c_profilefunc) { \ if (call_trace(tstate->c_profilefunc, tstate->c_profileobj, \ - tstate, tstate->frame, \ + tstate, tstate->frame, bounds, \ PyTrace_C_CALL, func)) { \ x = NULL; \ } \ @@ -5291,13 +5303,13 @@ if (tstate->use_tracing && tstate->c_profilefunc) { \ if (x == NULL) { \ call_trace_protected(tstate->c_profilefunc, \ tstate->c_profileobj, \ - tstate, tstate->frame, \ + tstate, tstate->frame, bounds, \ PyTrace_C_EXCEPTION, func); \ /* XXX should pass (type, value, tb) */ \ } else { \ if (call_trace(tstate->c_profilefunc, \ tstate->c_profileobj, \ - tstate, tstate->frame, \ + tstate, tstate->frame, bounds, \ PyTrace_C_RETURN, func)) { \ Py_DECREF(x); \ x = NULL; \ @@ -5312,6 +5324,7 @@ if (tstate->use_tracing && tstate->c_profilefunc) { \ static PyObject * trace_call_function(PyThreadState *tstate, + PyCodeAddressRange *bounds, PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) @@ -5346,7 +5359,11 @@ trace_call_function(PyThreadState *tstate, /* Issue #29227: Inline call_function() into _PyEval_EvalFrameDefault() to reduce the stack consumption. */ Py_LOCAL_INLINE(PyObject *) _Py_HOT_FUNCTION -call_function(PyThreadState *tstate, PyObject ***pp_stack, Py_ssize_t oparg, PyObject *kwnames) +call_function(PyThreadState *tstate, + PyCodeAddressRange *bounds, + PyObject ***pp_stack, + Py_ssize_t oparg, + PyObject *kwnames) { PyObject **pfunc = (*pp_stack) - oparg - 1; PyObject *func = *pfunc; @@ -5356,7 +5373,7 @@ call_function(PyThreadState *tstate, PyObject ***pp_stack, Py_ssize_t oparg, PyO PyObject **stack = (*pp_stack) - nargs - nkwargs; if (tstate->use_tracing) { - x = trace_call_function(tstate, func, stack, nargs, kwnames); + x = trace_call_function(tstate, bounds, func, stack, nargs, kwnames); } else { x = PyObject_Vectorcall(func, stack, nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, kwnames); @@ -5374,7 +5391,11 @@ call_function(PyThreadState *tstate, PyObject ***pp_stack, Py_ssize_t oparg, PyO } static PyObject * -do_call_core(PyThreadState *tstate, PyObject *func, PyObject *callargs, PyObject *kwdict) +do_call_core(PyThreadState *tstate, + PyCodeAddressRange *bounds, + PyObject *func, + PyObject *callargs, + PyObject *kwdict) { PyObject *result; From webhook-mailer at python.org Thu Jan 7 13:06:23 2021 From: webhook-mailer at python.org (miss-islington) Date: Thu, 07 Jan 2021 18:06:23 -0000 Subject: [Python-checkins] [3.9] bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) (GH-24149) Message-ID: https://github.com/python/cpython/commit/8c3914aef47e6e5a31b48a0b1f165ec3f4dc4c98 commit: 8c3914aef47e6e5a31b48a0b1f165ec3f4dc4c98 branch: 3.9 author: Yair Frid committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-07T10:06:13-08:00 summary: [3.9] bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) (GH-24149) This is a backport of https://github.com/python/cpython/pull/24100 Automerge-Triggered-By: GH:brettcannon files: A Misc/NEWS.d/next/Documentation/2021-01-07-12-08-59.bpo-42811.ePF7EC.rst M Doc/library/importlib.rst diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 305bb54d5271d..cb2a5686a95a5 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1473,7 +1473,7 @@ an :term:`importer`. If **name** has no leading dots, then **name** is simply returned. This allows for usage such as - ``importlib.util.resolve_name('sys', __package__)`` without doing a + ``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a check to see if the **package** argument is needed. :exc:`ImportError` is raised if **name** is a relative module name but diff --git a/Misc/NEWS.d/next/Documentation/2021-01-07-12-08-59.bpo-42811.ePF7EC.rst b/Misc/NEWS.d/next/Documentation/2021-01-07-12-08-59.bpo-42811.ePF7EC.rst new file mode 100644 index 0000000000000..179c0655c7068 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-01-07-12-08-59.bpo-42811.ePF7EC.rst @@ -0,0 +1,2 @@ +Updated importlib.utils.resolve_name() doc to use __spec__.parent instead of +__package__. (Thanks Yair Frid.) From webhook-mailer at python.org Thu Jan 7 13:07:57 2021 From: webhook-mailer at python.org (brettcannon) Date: Thu, 07 Jan 2021 18:07:57 -0000 Subject: [Python-checkins] bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) (GH-24144) Message-ID: https://github.com/python/cpython/commit/ca8e96d1edbeb536f58da91e607082463398fce1 commit: ca8e96d1edbeb536f58da91e607082463398fce1 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: brettcannon date: 2021-01-07T10:07:48-08:00 summary: bpo-42811: Update importlib.utils.resolve_name() docs to use __spec__.parent (GH-24100) (GH-24144) Automerge-Triggered-By: GH:brettcannon (cherry picked from commit ff8458b918050168acda1ad6d079f52b8effa821) Co-authored-by: Yair Frid files: A Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst M Doc/library/importlib.rst diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 8635e2bc66f3a..304da984ace6b 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -1439,7 +1439,7 @@ an :term:`importer`. If **name** has no leading dots, then **name** is simply returned. This allows for usage such as - ``importlib.util.resolve_name('sys', __package__)`` without doing a + ``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a check to see if the **package** argument is needed. :exc:`ValueError` is raised if **name** is a relative module name but diff --git a/Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst b/Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst new file mode 100644 index 0000000000000..768508e0ce1c1 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-01-04-22-14-22.bpo-42811.HY2beA.rst @@ -0,0 +1,2 @@ +Updated importlib.utils.resolve_name() doc to use __spec__.parent +instead of __package__. (Thanks Yair Frid.) From webhook-mailer at python.org Thu Jan 7 16:18:16 2021 From: webhook-mailer at python.org (ethanfurman) Date: Thu, 07 Jan 2021 21:18:16 -0000 Subject: [Python-checkins] bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) Message-ID: https://github.com/python/cpython/commit/a581a868d97f649aedf868a1d27865a10925c73a commit: a581a868d97f649aedf868a1d27865a10925c73a branch: master author: Ethan Furman committer: ethanfurman date: 2021-01-07T13:17:55-08:00 summary: bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) Solution to support calls to `__init_subclass__` with members defined is too brittle and breaks with certain mixins. files: A Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst M Lib/enum.py M Lib/test/test_enum.py diff --git a/Lib/enum.py b/Lib/enum.py index 75249bfdc1be1..a93642068f743 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -9,14 +9,6 @@ ] -class _NoInitSubclass: - """ - temporary base class to suppress calling __init_subclass__ - """ - @classmethod - def __init_subclass__(cls, **kwds): - pass - def _is_descriptor(obj): """ Returns True if obj is a descriptor, False otherwise. @@ -227,22 +219,7 @@ def __new__(metacls, cls, bases, classdict, **kwds): if '__doc__' not in classdict: classdict['__doc__'] = 'An enumeration.' - # postpone calling __init_subclass__ - if '__init_subclass__' in classdict and classdict['__init_subclass__'] is None: - raise TypeError('%s.__init_subclass__ cannot be None') - # remove current __init_subclass__ so previous one can be found with getattr - new_init_subclass = classdict.pop('__init_subclass__', None) - # create our new Enum type - if bases: - bases = (_NoInitSubclass, ) + bases - enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) - enum_class.__bases__ = enum_class.__bases__[1:] #or (object, ) - else: - enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) - old_init_subclass = getattr(enum_class, '__init_subclass__', None) - # and restore the new one (if there was one) - if new_init_subclass is not None: - enum_class.__init_subclass__ = classmethod(new_init_subclass) + enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) enum_class._member_names_ = [] # names in definition order enum_class._member_map_ = {} # name->value map enum_class._member_type_ = member_type @@ -354,9 +331,6 @@ def __new__(metacls, cls, bases, classdict, **kwds): if _order_ != enum_class._member_names_: raise TypeError('member order does not match _order_') - # finally, call parents' __init_subclass__ - if Enum is not None and old_init_subclass is not None: - old_init_subclass(**kwds) return enum_class def __bool__(self): @@ -734,9 +708,6 @@ def _generate_next_value_(name, start, count, last_values): else: return start - def __init_subclass__(cls, **kwds): - super().__init_subclass__(**kwds) - @classmethod def _missing_(cls, value): return None diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 19b4fa5464ce7..196438ada1582 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -2119,52 +2119,7 @@ class ThirdFailedStrEnum(StrEnum): one = '1' two = b'2', 'ascii', 9 - def test_init_subclass_calling(self): - class MyEnum(Enum): - def __init_subclass__(cls, **kwds): - super(MyEnum, cls).__init_subclass__(**kwds) - self.assertFalse(cls.__dict__.get('_test', False)) - cls._test1 = 'MyEnum' - # - class TheirEnum(MyEnum): - def __init_subclass__(cls, **kwds): - super().__init_subclass__(**kwds) - cls._test2 = 'TheirEnum' - class WhoseEnum(TheirEnum): - def __init_subclass__(cls, **kwds): - pass - class NoEnum(WhoseEnum): - ONE = 1 - self.assertEqual(TheirEnum.__dict__['_test1'], 'MyEnum') - self.assertEqual(WhoseEnum.__dict__['_test1'], 'MyEnum') - self.assertEqual(WhoseEnum.__dict__['_test2'], 'TheirEnum') - self.assertFalse(NoEnum.__dict__.get('_test1', False)) - self.assertFalse(NoEnum.__dict__.get('_test2', False)) - # - class OurEnum(MyEnum): - def __init_subclass__(cls, **kwds): - cls._test2 = 'OurEnum' - class WhereEnum(OurEnum): - def __init_subclass__(cls, **kwds): - pass - class NeverEnum(WhereEnum): - ONE = 'one' - self.assertEqual(OurEnum.__dict__['_test1'], 'MyEnum') - self.assertFalse(WhereEnum.__dict__.get('_test1', False)) - self.assertEqual(WhereEnum.__dict__['_test2'], 'OurEnum') - self.assertFalse(NeverEnum.__dict__.get('_test1', False)) - self.assertFalse(NeverEnum.__dict__.get('_test2', False)) - def test_init_subclass_parameter(self): - class multiEnum(Enum): - def __init_subclass__(cls, multi): - for member in cls: - member._as_parameter_ = multi * member.value - class E(multiEnum, multi=3): - A = 1 - B = 2 - self.assertEqual(E.A._as_parameter_, 3) - self.assertEqual(E.B._as_parameter_, 6) @unittest.skipUnless( sys.version_info[:2] == (3, 9), diff --git a/Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst b/Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst new file mode 100644 index 0000000000000..927283521e80e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst @@ -0,0 +1 @@ +remove __init_subclass__ support for Enum members From webhook-mailer at python.org Thu Jan 7 16:56:06 2021 From: webhook-mailer at python.org (ethanfurman) Date: Thu, 07 Jan 2021 21:56:06 -0000 Subject: [Python-checkins] [3.9] bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) (GH-24155) Message-ID: https://github.com/python/cpython/commit/9ab4dd452287169f08a8cf4d4c68c2139f8de714 commit: 9ab4dd452287169f08a8cf4d4c68c2139f8de714 branch: 3.9 author: Ethan Furman committer: ethanfurman date: 2021-01-07T13:55:59-08:00 summary: [3.9] bpo-42851: [Enum] remove brittle __init_subclass__ support (GH-24154) (GH-24155) Solution to support calls to `__init_subclass__` with members defined is too brittle and breaks with certain mixins.. (cherry picked from commit a581a868d97f649aedf868a1d27865a10925c73a) files: A Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst M Lib/enum.py M Lib/test/test_enum.py diff --git a/Lib/enum.py b/Lib/enum.py index 1c22380f03b38..1fddb1c75e8be 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -9,14 +9,6 @@ ] -class _NoInitSubclass: - """ - temporary base class to suppress calling __init_subclass__ - """ - @classmethod - def __init_subclass__(cls, **kwds): - pass - def _is_descriptor(obj): """ Returns True if obj is a descriptor, False otherwise. @@ -219,22 +211,7 @@ def __new__(metacls, cls, bases, classdict, **kwds): if '__doc__' not in classdict: classdict['__doc__'] = 'An enumeration.' - # postpone calling __init_subclass__ - if '__init_subclass__' in classdict and classdict['__init_subclass__'] is None: - raise TypeError('%s.__init_subclass__ cannot be None') - # remove current __init_subclass__ so previous one can be found with getattr - new_init_subclass = classdict.pop('__init_subclass__', None) - # create our new Enum type - if bases: - bases = (_NoInitSubclass, ) + bases - enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) - enum_class.__bases__ = enum_class.__bases__[1:] #or (object, ) - else: - enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) - old_init_subclass = getattr(enum_class, '__init_subclass__', None) - # and restore the new one (if there was one) - if new_init_subclass is not None: - enum_class.__init_subclass__ = classmethod(new_init_subclass) + enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) enum_class._member_names_ = [] # names in definition order enum_class._member_map_ = {} # name->value map enum_class._member_type_ = member_type @@ -346,9 +323,6 @@ def __new__(metacls, cls, bases, classdict, **kwds): if _order_ != enum_class._member_names_: raise TypeError('member order does not match _order_') - # finally, call parents' __init_subclass__ - if Enum is not None and old_init_subclass is not None: - old_init_subclass(**kwds) return enum_class def __bool__(self): @@ -726,9 +700,6 @@ def _generate_next_value_(name, start, count, last_values): else: return start - def __init_subclass__(cls, **kwds): - super().__init_subclass__(**kwds) - @classmethod def _missing_(cls, value): return None diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index f6db73167dc95..4e22986325521 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -2065,52 +2065,6 @@ class Private(Enum): except ValueError: pass - def test_init_subclass_calling(self): - class MyEnum(Enum): - def __init_subclass__(cls, **kwds): - super(MyEnum, cls).__init_subclass__(**kwds) - self.assertFalse(cls.__dict__.get('_test', False)) - cls._test1 = 'MyEnum' - # - class TheirEnum(MyEnum): - def __init_subclass__(cls, **kwds): - super().__init_subclass__(**kwds) - cls._test2 = 'TheirEnum' - class WhoseEnum(TheirEnum): - def __init_subclass__(cls, **kwds): - pass - class NoEnum(WhoseEnum): - ONE = 1 - self.assertEqual(TheirEnum.__dict__['_test1'], 'MyEnum') - self.assertEqual(WhoseEnum.__dict__['_test1'], 'MyEnum') - self.assertEqual(WhoseEnum.__dict__['_test2'], 'TheirEnum') - self.assertFalse(NoEnum.__dict__.get('_test1', False)) - self.assertFalse(NoEnum.__dict__.get('_test2', False)) - # - class OurEnum(MyEnum): - def __init_subclass__(cls, **kwds): - cls._test2 = 'OurEnum' - class WhereEnum(OurEnum): - def __init_subclass__(cls, **kwds): - pass - class NeverEnum(WhereEnum): - ONE = 'one' - self.assertEqual(OurEnum.__dict__['_test1'], 'MyEnum') - self.assertFalse(WhereEnum.__dict__.get('_test1', False)) - self.assertEqual(WhereEnum.__dict__['_test2'], 'OurEnum') - self.assertFalse(NeverEnum.__dict__.get('_test1', False)) - self.assertFalse(NeverEnum.__dict__.get('_test2', False)) - - def test_init_subclass_parameter(self): - class multiEnum(Enum): - def __init_subclass__(cls, multi): - for member in cls: - member._as_parameter_ = multi * member.value - class E(multiEnum, multi=3): - A = 1 - B = 2 - self.assertEqual(E.A._as_parameter_, 3) - self.assertEqual(E.B._as_parameter_, 6) class TestOrder(unittest.TestCase): diff --git a/Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst b/Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst new file mode 100644 index 0000000000000..927283521e80e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-07-11-44-22.bpo-42851.uyQFyd.rst @@ -0,0 +1 @@ +remove __init_subclass__ support for Enum members From webhook-mailer at python.org Thu Jan 7 17:31:57 2021 From: webhook-mailer at python.org (miss-islington) Date: Thu, 07 Jan 2021 22:31:57 -0000 Subject: [Python-checkins] bpo-42860: Remove type error from grammar (GH-24156) Message-ID: https://github.com/python/cpython/commit/07dcd86ceed0bd88d1e96dcf53b1de2fea024385 commit: 07dcd86ceed0bd88d1e96dcf53b1de2fea024385 branch: master author: Lysandros Nikolaou committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-07T14:31:25-08:00 summary: bpo-42860: Remove type error from grammar (GH-24156) This is only there so that alternative implementations written in statically-typed languages can use this grammar without having type errors in the way. Automerge-Triggered-By: GH:lysnikolaou files: M Grammar/python.gram M Parser/parser.c diff --git a/Grammar/python.gram b/Grammar/python.gram index 8517bf2f9ba8d..05ddce520fbae 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -696,11 +696,17 @@ invalid_dict_comprehension: | '{' a='**' bitwise_or for_if_clauses '}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "dict unpacking cannot be used in dict comprehension") } invalid_parameters: - | param_no_default* (slash_with_default | param_with_default+) param_no_default { + | param_no_default* invalid_parameters_helper param_no_default { RAISE_SYNTAX_ERROR("non-default argument follows default argument") } +invalid_parameters_helper: # This is only there to avoid type errors + | a=slash_with_default { _PyPegen_singleton_seq(p, a) } + | param_with_default+ invalid_lambda_parameters: - | lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default { + | lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default { RAISE_SYNTAX_ERROR("non-default argument follows default argument") } +invalid_lambda_parameters_helper: + | a=lambda_slash_with_default { _PyPegen_singleton_seq(p, a) } + | lambda_param_with_default+ invalid_star_etc: | '*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR("named arguments must follow bare *") } | '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR("bare * has associated type comment") } diff --git a/Parser/parser.c b/Parser/parser.c index 66c6c45b35898..f7794e715b918 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -221,170 +221,170 @@ static KeywordToken *reserved_keywords[] = { #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 +#define invalid_parameters_helper_type 1155 +#define invalid_lambda_parameters_type 1156 +#define invalid_lambda_parameters_helper_type 1157 +#define invalid_star_etc_type 1158 +#define invalid_lambda_star_etc_type 1159 +#define invalid_double_type_comments_type 1160 +#define invalid_with_item_type 1161 +#define invalid_for_target_type 1162 +#define invalid_group_type 1163 +#define invalid_import_from_targets_type 1164 +#define _loop0_1_type 1165 +#define _loop0_2_type 1166 +#define _loop0_4_type 1167 +#define _gather_3_type 1168 +#define _loop0_6_type 1169 +#define _gather_5_type 1170 +#define _loop0_8_type 1171 +#define _gather_7_type 1172 +#define _loop0_10_type 1173 +#define _gather_9_type 1174 +#define _loop1_11_type 1175 +#define _loop0_13_type 1176 +#define _gather_12_type 1177 +#define _tmp_14_type 1178 +#define _tmp_15_type 1179 +#define _tmp_16_type 1180 +#define _tmp_17_type 1181 +#define _tmp_18_type 1182 +#define _tmp_19_type 1183 +#define _tmp_20_type 1184 +#define _tmp_21_type 1185 +#define _loop1_22_type 1186 +#define _tmp_23_type 1187 +#define _tmp_24_type 1188 +#define _loop0_26_type 1189 +#define _gather_25_type 1190 +#define _loop0_28_type 1191 +#define _gather_27_type 1192 +#define _tmp_29_type 1193 +#define _tmp_30_type 1194 +#define _loop0_31_type 1195 +#define _loop1_32_type 1196 +#define _loop0_34_type 1197 +#define _gather_33_type 1198 +#define _tmp_35_type 1199 +#define _loop0_37_type 1200 +#define _gather_36_type 1201 +#define _tmp_38_type 1202 +#define _loop0_40_type 1203 +#define _gather_39_type 1204 +#define _loop0_42_type 1205 +#define _gather_41_type 1206 +#define _loop0_44_type 1207 +#define _gather_43_type 1208 +#define _loop0_46_type 1209 +#define _gather_45_type 1210 +#define _tmp_47_type 1211 +#define _loop1_48_type 1212 +#define _tmp_49_type 1213 +#define _tmp_50_type 1214 +#define _tmp_51_type 1215 +#define _tmp_52_type 1216 +#define _tmp_53_type 1217 +#define _loop0_54_type 1218 +#define _loop0_55_type 1219 +#define _loop0_56_type 1220 +#define _loop1_57_type 1221 +#define _loop0_58_type 1222 +#define _loop1_59_type 1223 +#define _loop1_60_type 1224 +#define _loop1_61_type 1225 +#define _loop0_62_type 1226 +#define _loop1_63_type 1227 +#define _loop0_64_type 1228 +#define _loop1_65_type 1229 +#define _loop0_66_type 1230 +#define _loop1_67_type 1231 +#define _loop1_68_type 1232 +#define _tmp_69_type 1233 +#define _loop1_70_type 1234 +#define _loop0_72_type 1235 +#define _gather_71_type 1236 +#define _loop1_73_type 1237 +#define _loop0_74_type 1238 +#define _loop0_75_type 1239 +#define _loop0_76_type 1240 +#define _loop1_77_type 1241 +#define _loop0_78_type 1242 +#define _loop1_79_type 1243 +#define _loop1_80_type 1244 +#define _loop1_81_type 1245 +#define _loop0_82_type 1246 +#define _loop1_83_type 1247 +#define _loop0_84_type 1248 +#define _loop1_85_type 1249 +#define _loop0_86_type 1250 +#define _loop1_87_type 1251 +#define _loop1_88_type 1252 +#define _loop1_89_type 1253 +#define _loop1_90_type 1254 +#define _tmp_91_type 1255 +#define _loop0_93_type 1256 +#define _gather_92_type 1257 +#define _tmp_94_type 1258 +#define _tmp_95_type 1259 +#define _tmp_96_type 1260 +#define _tmp_97_type 1261 +#define _loop1_98_type 1262 +#define _tmp_99_type 1263 +#define _tmp_100_type 1264 +#define _loop0_102_type 1265 +#define _gather_101_type 1266 +#define _loop1_103_type 1267 +#define _loop0_104_type 1268 +#define _loop0_105_type 1269 +#define _loop0_107_type 1270 +#define _gather_106_type 1271 +#define _tmp_108_type 1272 +#define _loop0_110_type 1273 +#define _gather_109_type 1274 +#define _loop0_112_type 1275 +#define _gather_111_type 1276 +#define _loop0_114_type 1277 +#define _gather_113_type 1278 +#define _loop0_116_type 1279 +#define _gather_115_type 1280 +#define _loop0_117_type 1281 +#define _loop0_119_type 1282 +#define _gather_118_type 1283 +#define _loop1_120_type 1284 +#define _tmp_121_type 1285 +#define _loop0_123_type 1286 +#define _gather_122_type 1287 +#define _loop0_125_type 1288 +#define _gather_124_type 1289 +#define _tmp_126_type 1290 +#define _loop0_127_type 1291 +#define _loop0_128_type 1292 +#define _loop0_129_type 1293 +#define _tmp_130_type 1294 +#define _tmp_131_type 1295 +#define _loop0_132_type 1296 +#define _loop1_133_type 1297 +#define _loop0_134_type 1298 +#define _loop1_135_type 1299 +#define _tmp_136_type 1300 +#define _tmp_137_type 1301 +#define _tmp_138_type 1302 +#define _tmp_139_type 1303 +#define _tmp_140_type 1304 +#define _tmp_141_type 1305 +#define _tmp_142_type 1306 +#define _tmp_143_type 1307 +#define _tmp_144_type 1308 +#define _tmp_145_type 1309 +#define _tmp_146_type 1310 +#define _tmp_147_type 1311 +#define _tmp_148_type 1312 +#define _tmp_149_type 1313 +#define _tmp_150_type 1314 +#define _tmp_151_type 1315 +#define _tmp_152_type 1316 +#define _tmp_153_type 1317 +#define _tmp_154_type 1318 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -541,7 +541,9 @@ static void *invalid_primary_rule(Parser *p); static void *invalid_comprehension_rule(Parser *p); static void *invalid_dict_comprehension_rule(Parser *p); static void *invalid_parameters_rule(Parser *p); +static void *invalid_parameters_helper_rule(Parser *p); static void *invalid_lambda_parameters_rule(Parser *p); +static void *invalid_lambda_parameters_helper_rule(Parser *p); static void *invalid_star_etc_rule(Parser *p); static void *invalid_lambda_star_etc_rule(Parser *p); static void *invalid_double_type_comments_rule(Parser *p); @@ -681,9 +683,9 @@ static asdl_seq *_loop0_129_rule(Parser *p); static void *_tmp_130_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 *_loop1_133_rule(Parser *p); static asdl_seq *_loop0_134_rule(Parser *p); -static void *_tmp_135_rule(Parser *p); +static asdl_seq *_loop1_135_rule(Parser *p); static void *_tmp_136_rule(Parser *p); static void *_tmp_137_rule(Parser *p); static void *_tmp_138_rule(Parser *p); @@ -701,10 +703,8 @@ static void *_tmp_149_rule(Parser *p); static void *_tmp_150_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); +static void *_tmp_153_rule(Parser *p); +static void *_tmp_154_rule(Parser *p); // file: statements? $ @@ -15294,8 +15294,7 @@ invalid_dict_comprehension_rule(Parser *p) return _res; } -// invalid_parameters: -// | param_no_default* (slash_with_default | param_with_default+) param_no_default +// invalid_parameters: param_no_default* invalid_parameters_helper param_no_default static void * invalid_parameters_rule(Parser *p) { @@ -15306,24 +15305,24 @@ invalid_parameters_rule(Parser *p) } void * _res = NULL; int _mark = p->mark; - { // param_no_default* (slash_with_default | param_with_default+) param_no_default + { // param_no_default* invalid_parameters_helper param_no_default if (p->error_indicator) { D(p->level--); 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")); + D(fprintf(stderr, "%*c> invalid_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default* invalid_parameters_helper param_no_default")); asdl_seq * _loop0_132_var; - void *_tmp_133_var; + void *invalid_parameters_helper_var; arg_ty param_no_default_var; if ( (_loop0_132_var = _loop0_132_rule(p)) // param_no_default* && - (_tmp_133_var = _tmp_133_rule(p)) // slash_with_default | param_with_default+ + (invalid_parameters_helper_var = invalid_parameters_helper_rule(p)) // invalid_parameters_helper && (param_no_default_var = param_no_default_rule(p)) // param_no_default ) { - D(fprintf(stderr, "%*c+ invalid_parameters[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_no_default* (slash_with_default | param_with_default+) param_no_default")); + D(fprintf(stderr, "%*c+ invalid_parameters[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_no_default* invalid_parameters_helper param_no_default")); _res = RAISE_SYNTAX_ERROR ( "non-default argument follows default argument" ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -15334,7 +15333,67 @@ invalid_parameters_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s invalid_parameters[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_no_default* (slash_with_default | param_with_default+) param_no_default")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_no_default* invalid_parameters_helper param_no_default")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// invalid_parameters_helper: slash_with_default | param_with_default+ +static void * +invalid_parameters_helper_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // slash_with_default + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "slash_with_default")); + SlashWithDefault* a; + if ( + (a = slash_with_default_rule(p)) // slash_with_default + ) + { + D(fprintf(stderr, "%*c+ invalid_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "slash_with_default")); + _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 invalid_parameters_helper[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "slash_with_default")); + } + { // param_with_default+ + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); + asdl_seq * _loop1_133_var; + if ( + (_loop1_133_var = _loop1_133_rule(p)) // param_with_default+ + ) + { + D(fprintf(stderr, "%*c+ invalid_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); + _res = _loop1_133_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_parameters_helper[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default+")); } _res = NULL; done: @@ -15343,7 +15402,7 @@ invalid_parameters_rule(Parser *p) } // invalid_lambda_parameters: -// | lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default +// | lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default static void * invalid_lambda_parameters_rule(Parser *p) { @@ -15354,24 +15413,24 @@ invalid_lambda_parameters_rule(Parser *p) } void * _res = NULL; int _mark = p->mark; - { // lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default + { // lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default if (p->error_indicator) { D(p->level--); 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")); + D(fprintf(stderr, "%*c> invalid_lambda_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default")); asdl_seq * _loop0_134_var; - void *_tmp_135_var; + void *invalid_lambda_parameters_helper_var; arg_ty lambda_param_no_default_var; if ( (_loop0_134_var = _loop0_134_rule(p)) // lambda_param_no_default* && - (_tmp_135_var = _tmp_135_rule(p)) // lambda_slash_with_default | lambda_param_with_default+ + (invalid_lambda_parameters_helper_var = invalid_lambda_parameters_helper_rule(p)) // invalid_lambda_parameters_helper && (lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default ) { - D(fprintf(stderr, "%*c+ invalid_lambda_parameters[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default")); + D(fprintf(stderr, "%*c+ invalid_lambda_parameters[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default")); _res = RAISE_SYNTAX_ERROR ( "non-default argument follows default argument" ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -15382,7 +15441,69 @@ invalid_lambda_parameters_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s invalid_lambda_parameters[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// invalid_lambda_parameters_helper: +// | lambda_slash_with_default +// | lambda_param_with_default+ +static void * +invalid_lambda_parameters_helper_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // lambda_slash_with_default + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_lambda_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); + SlashWithDefault* a; + if ( + (a = lambda_slash_with_default_rule(p)) // lambda_slash_with_default + ) + { + D(fprintf(stderr, "%*c+ invalid_lambda_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default")); + _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 invalid_lambda_parameters_helper[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_slash_with_default")); + } + { // lambda_param_with_default+ + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_lambda_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); + asdl_seq * _loop1_135_var; + if ( + (_loop1_135_var = _loop1_135_rule(p)) // lambda_param_with_default+ + ) + { + D(fprintf(stderr, "%*c+ invalid_lambda_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); + _res = _loop1_135_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_lambda_parameters_helper[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default+")); } _res = NULL; done: @@ -23743,59 +23864,75 @@ _loop0_132_rule(Parser *p) return _seq; } -// _tmp_133: slash_with_default | param_with_default+ -static void * -_tmp_133_rule(Parser *p) +// _loop1_133: param_with_default +static asdl_seq * +_loop1_133_rule(Parser *p) { D(p->level++); if (p->error_indicator) { D(p->level--); return NULL; } - void * _res = NULL; + void *_res = NULL; int _mark = p->mark; - { // slash_with_default - if (p->error_indicator) { - D(p->level--); - return NULL; - } - 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_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_133[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "slash_with_default")); + int _start_mark = p->mark; + void **_children = PyMem_Malloc(sizeof(void *)); + if (!_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; } - { // param_with_default+ + ssize_t _children_capacity = 1; + ssize_t _n = 0; + { // param_with_default if (p->error_indicator) { D(p->level--); return NULL; } - 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_153_var = _loop1_153_rule(p)) // param_with_default+ + D(fprintf(stderr, "%*c> _loop1_133[%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 ) { - 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; + _res = param_with_default_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 _tmp_133[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default+")); + D(fprintf(stderr, "%*c%s _loop1_133[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default")); } - _res = NULL; - done: + 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_133_type, _seq); D(p->level--); - return _res; + return _seq; } // _loop0_134: lambda_param_no_default @@ -23864,59 +24001,75 @@ _loop0_134_rule(Parser *p) return _seq; } -// _tmp_135: lambda_slash_with_default | lambda_param_with_default+ -static void * -_tmp_135_rule(Parser *p) +// _loop1_135: lambda_param_with_default +static asdl_seq * +_loop1_135_rule(Parser *p) { D(p->level++); if (p->error_indicator) { D(p->level--); return NULL; } - void * _res = NULL; + void *_res = NULL; int _mark = p->mark; - { // lambda_slash_with_default - if (p->error_indicator) { - D(p->level--); - return NULL; - } - 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_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_135[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_slash_with_default")); + int _start_mark = p->mark; + void **_children = PyMem_Malloc(sizeof(void *)); + if (!_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; } - { // lambda_param_with_default+ + ssize_t _children_capacity = 1; + ssize_t _n = 0; + { // lambda_param_with_default if (p->error_indicator) { D(p->level--); return NULL; } - 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_154_var = _loop1_154_rule(p)) // lambda_param_with_default+ + D(fprintf(stderr, "%*c> _loop1_135[%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 ) { - 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; + _res = lambda_param_with_default_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 _tmp_135[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default+")); + D(fprintf(stderr, "%*c%s _loop1_135[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default")); } - _res = NULL; - done: + 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_135_type, _seq); D(p->level--); - return _res; + return _seq; } // _tmp_136: ')' | ',' (')' | '**') @@ -23956,15 +24109,15 @@ _tmp_136_rule(Parser *p) } D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); Token * _literal; - void *_tmp_155_var; + void *_tmp_153_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_155_var = _tmp_155_rule(p)) // ')' | '**' + (_tmp_153_var = _tmp_153_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_155_var); + _res = _PyPegen_dummy_name(p, _literal, _tmp_153_var); goto done; } p->mark = _mark; @@ -24014,15 +24167,15 @@ _tmp_137_rule(Parser *p) } D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); Token * _literal; - void *_tmp_156_var; + void *_tmp_154_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_156_var = _tmp_156_rule(p)) // ':' | '**' + (_tmp_154_var = _tmp_154_rule(p)) // ':' | '**' ) { 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); + _res = _PyPegen_dummy_name(p, _literal, _tmp_154_var); goto done; } p->mark = _mark; @@ -24723,151 +24876,9 @@ _tmp_152_rule(Parser *p) return _res; } -// _loop1_153: param_with_default -static asdl_seq * -_loop1_153_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; - { // param_with_default - if (p->error_indicator) { - D(p->level--); - return NULL; - } - 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 - ) - { - _res = param_with_default_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_153[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default")); - } - 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_153_type, _seq); - D(p->level--); - return _seq; -} - -// _loop1_154: lambda_param_with_default -static asdl_seq * -_loop1_154_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; - { // lambda_param_with_default - if (p->error_indicator) { - D(p->level--); - return NULL; - } - 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 - ) - { - _res = lambda_param_with_default_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_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) { - 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_154_type, _seq); - D(p->level--); - return _seq; -} - -// _tmp_155: ')' | '**' +// _tmp_153: ')' | '**' static void * -_tmp_155_rule(Parser *p) +_tmp_153_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24881,18 +24892,18 @@ _tmp_155_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // '**' @@ -24900,18 +24911,18 @@ _tmp_155_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -24920,9 +24931,9 @@ _tmp_155_rule(Parser *p) return _res; } -// _tmp_156: ':' | '**' +// _tmp_154: ':' | '**' static void * -_tmp_156_rule(Parser *p) +_tmp_154_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24936,18 +24947,18 @@ _tmp_156_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // '**' @@ -24955,18 +24966,18 @@ _tmp_156_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; From webhook-mailer at python.org Thu Jan 7 18:15:30 2021 From: webhook-mailer at python.org (vstinner) Date: Thu, 07 Jan 2021 23:15:30 -0000 Subject: [Python-checkins] bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157) Message-ID: https://github.com/python/cpython/commit/07f2cee93f1b619650403981c455f47bfed8d818 commit: 07f2cee93f1b619650403981c455f47bfed8d818 branch: master author: Victor Stinner committer: vstinner date: 2021-01-08T00:15:22+01:00 summary: bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157) Convert the 6 CJK codec extension modules (_codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw) to the multiphase initialization API (PEP 489). Remove getmultibytecodec() local cache: always import _multibytecodec. It should be uncommon to get a codec. For example, this function is only called once per CJK codec module. Fix a reference leak in register_maps() error path. files: A Misc/NEWS.d/next/Library/2021-01-07-23-31-17.bpo-42846.kukDjw.rst M Lib/test/test_multibytecodec.py M Modules/cjkcodecs/cjkcodecs.h diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py index 7c3b67f3cbf6e..3efa1505e5c92 100644 --- a/Lib/test/test_multibytecodec.py +++ b/Lib/test/test_multibytecodec.py @@ -3,11 +3,15 @@ # Unit test for multibytecodec itself # +import _multibytecodec +import codecs +import io +import sys +import textwrap +import unittest from test import support from test.support import os_helper from test.support.os_helper import TESTFN -import unittest, io, codecs, sys -import _multibytecodec ALL_CJKENCODINGS = [ # _codecs_cn @@ -205,6 +209,24 @@ def test_issue5640(self): self.assertEqual(encoder.encode('\xff'), b'\\xff') self.assertEqual(encoder.encode('\n'), b'\n') + @support.cpython_only + def test_subinterp(self): + # bpo-42846: Test a CJK codec in a subinterpreter + import _testcapi + encoding = 'cp932' + text = "Python ?????1990 ??????????????" + code = textwrap.dedent(""" + import codecs + encoding = %r + text = %r + encoder = codecs.getincrementalencoder(encoding)() + text2 = encoder.encode(text).decode(encoding) + if text2 != text: + raise ValueError(f"encoding issue: {text2!a} != {text!a}") + """) % (encoding, text) + res = _testcapi.run_in_subinterp(code) + self.assertEqual(res, 0) + class Test_IncrementalDecoder(unittest.TestCase): def test_dbcs(self): diff --git a/Misc/NEWS.d/next/Library/2021-01-07-23-31-17.bpo-42846.kukDjw.rst b/Misc/NEWS.d/next/Library/2021-01-07-23-31-17.bpo-42846.kukDjw.rst new file mode 100644 index 0000000000000..6f8a739ec1da2 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-07-23-31-17.bpo-42846.kukDjw.rst @@ -0,0 +1,3 @@ +Convert the 6 CJK codec extension modules (_codecs_cn, _codecs_hk, +_codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw) to the multiphase +initialization API (:pep:`489`). Patch by Victor Stinner. diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index e41755b197ffc..3b89bc93ed142 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -245,15 +245,13 @@ static const struct dbcs_map *mapping_list; static PyObject * getmultibytecodec(void) { - static PyObject *cofunc = NULL; - - if (cofunc == NULL) { - PyObject *mod = PyImport_ImportModuleNoBlock("_multibytecodec"); - if (mod == NULL) - return NULL; - cofunc = PyObject_GetAttrString(mod, "__create_codec"); - Py_DECREF(mod); + PyObject *mod = PyImport_ImportModuleNoBlock("_multibytecodec"); + if (mod == NULL) { + return NULL; } + + PyObject *cofunc = PyObject_GetAttrString(mod, "__create_codec"); + Py_DECREF(mod); return cofunc; } @@ -297,10 +295,6 @@ getcodec(PyObject *self, PyObject *encoding) return r; } -static struct PyMethodDef __methods[] = { - {"getcodec", (PyCFunction)getcodec, METH_O, ""}, - {NULL, NULL}, -}; static int register_maps(PyObject *module) @@ -309,12 +303,17 @@ register_maps(PyObject *module) for (h = mapping_list; h->charset[0] != '\0'; h++) { char mhname[256] = "__map_"; - int r; strcpy(mhname + sizeof("__map_") - 1, h->charset); - r = PyModule_AddObject(module, mhname, - PyCapsule_New((void *)h, PyMultibyteCodec_CAPSULE_NAME, NULL)); - if (r == -1) + + PyObject *capsule = PyCapsule_New((void *)h, + PyMultibyteCodec_CAPSULE_NAME, NULL); + if (capsule == NULL) { + return -1; + } + if (PyModule_AddObject(module, mhname, capsule) < 0) { + Py_DECREF(capsule); return -1; + } } return 0; } @@ -395,25 +394,36 @@ importmap(const char *modname, const char *symbol, } #endif +static int +_cjk_exec(PyObject *module) +{ + return register_maps(module); +} + + +static struct PyMethodDef _cjk_methods[] = { + {"getcodec", (PyCFunction)getcodec, METH_O, ""}, + {NULL, NULL}, +}; + +static PyModuleDef_Slot _cjk_slots[] = { + {Py_mod_exec, _cjk_exec}, + {0, NULL} +}; + #define I_AM_A_MODULE_FOR(loc) \ - static struct PyModuleDef __module = { \ + static struct PyModuleDef _cjk_module = { \ PyModuleDef_HEAD_INIT, \ - "_codecs_"#loc, \ - NULL, \ - 0, \ - __methods, \ - NULL, \ - NULL, \ - NULL, \ - NULL \ + .m_name = "_codecs_"#loc, \ + .m_size = 0, \ + .m_methods = _cjk_methods, \ + .m_slots = _cjk_slots, \ }; \ + \ PyMODINIT_FUNC \ PyInit__codecs_##loc(void) \ { \ - PyObject *m = PyModule_Create(&__module); \ - if (m != NULL) \ - (void)register_maps(m); \ - return m; \ + return PyModuleDef_Init(&_cjk_module); \ } #endif From webhook-mailer at python.org Fri Jan 8 09:01:50 2021 From: webhook-mailer at python.org (vstinner) Date: Fri, 08 Jan 2021 14:01:50 -0000 Subject: [Python-checkins] bpo-42866: Fix refleak in CJK getcodec() (GH-24165) Message-ID: https://github.com/python/cpython/commit/e542d417b96077d04aec089505eacb990c9799ae commit: e542d417b96077d04aec089505eacb990c9799ae branch: master author: Victor Stinner committer: vstinner date: 2021-01-08T15:01:38+01:00 summary: bpo-42866: Fix refleak in CJK getcodec() (GH-24165) Fix a reference leak in the getcodec() function of CJK codecs. files: A Misc/NEWS.d/next/Library/2021-01-08-10-57-21.bpo-42866.Y1DnrO.rst M Modules/cjkcodecs/cjkcodecs.h diff --git a/Misc/NEWS.d/next/Library/2021-01-08-10-57-21.bpo-42866.Y1DnrO.rst b/Misc/NEWS.d/next/Library/2021-01-08-10-57-21.bpo-42866.Y1DnrO.rst new file mode 100644 index 0000000000000..3ea6cc239aa69 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-08-10-57-21.bpo-42866.Y1DnrO.rst @@ -0,0 +1,2 @@ +Fix a reference leak in the ``getcodec()`` function of CJK codecs. Patch by +Victor Stinner. diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index 3b89bc93ed142..ba8fad26055a8 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -291,6 +291,7 @@ getcodec(PyObject *self, PyObject *encoding) r = PyObject_CallOneArg(cofunc, codecobj); Py_DECREF(codecobj); + Py_DECREF(cofunc); return r; } From webhook-mailer at python.org Fri Jan 8 09:44:11 2021 From: webhook-mailer at python.org (vstinner) Date: Fri, 08 Jan 2021 14:44:11 -0000 Subject: [Python-checkins] bpo-42866: Add traverse func to _multibytecodec.MultibyteCodec (GH-24166) Message-ID: https://github.com/python/cpython/commit/11ef53aefbecfac18b63cee518a7184f771f708c commit: 11ef53aefbecfac18b63cee518a7184f771f708c branch: master author: Victor Stinner committer: vstinner date: 2021-01-08T15:43:59+01:00 summary: bpo-42866: Add traverse func to _multibytecodec.MultibyteCodec (GH-24166) Convert _multibytecodec.MultibyteCodec type to a GC type and adds a traverse function. files: M Modules/cjkcodecs/multibytecodec.c diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 4f34b8a82fb94..5070c983d402c 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -721,11 +721,19 @@ static struct PyMethodDef multibytecodec_methods[] = { {NULL, NULL}, }; +static int +multibytecodec_traverse(PyObject *self, visitproc visit, void *arg) +{ + Py_VISIT(Py_TYPE(self)); + return 0; +} + static void multibytecodec_dealloc(MultibyteCodecObject *self) { + PyObject_GC_UnTrack(self); PyTypeObject *tp = Py_TYPE(self); - PyObject_Free(self); + tp->tp_free(self); Py_DECREF(tp); } @@ -733,13 +741,14 @@ static PyType_Slot multibytecodec_slots[] = { {Py_tp_dealloc, multibytecodec_dealloc}, {Py_tp_getattro, PyObject_GenericGetAttr}, {Py_tp_methods, multibytecodec_methods}, + {Py_tp_traverse, multibytecodec_traverse}, {0, NULL}, }; static PyType_Spec multibytecodec_spec = { .name = MODULE_NAME ".MultibyteCodec", .basicsize = sizeof(MultibyteCodecObject), - .flags = Py_TPFLAGS_DEFAULT, + .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, .slots = multibytecodec_slots, }; @@ -1944,11 +1953,12 @@ _multibytecodec___create_codec(PyObject *module, PyObject *arg) return NULL; _multibytecodec_state *state = _multibytecodec_get_state(module); - self = PyObject_New(MultibyteCodecObject, state->multibytecodec_type); + self = PyObject_GC_New(MultibyteCodecObject, state->multibytecodec_type); if (self == NULL) return NULL; self->codec = codec; + PyObject_GC_Track(self); return (PyObject *)self; } From webhook-mailer at python.org Fri Jan 8 13:08:41 2021 From: webhook-mailer at python.org (gvanrossum) Date: Fri, 08 Jan 2021 18:08:41 -0000 Subject: [Python-checkins] Fix a typo in docs for typing.Concatenate (#24169) Message-ID: https://github.com/python/cpython/commit/68e1f259bee7723d63488854b69a4bef2b7e5db2 commit: 68e1f259bee7723d63488854b69a4bef2b7e5db2 branch: master author: Johan Dahlin committer: gvanrossum date: 2021-01-08T10:08:21-08:00 summary: Fix a typo in docs for typing.Concatenate (#24169) Return param spec should be R, not T files: M Doc/library/typing.rst diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index d74f8bcc27a20..c14c710813381 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -707,7 +707,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn 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: + def inner(*args: P.args, **kwargs: P.kwargs) -> R: # Provide the lock as the first argument. return f(my_lock, *args, **kwargs) return inner From webhook-mailer at python.org Fri Jan 8 18:35:27 2021 From: webhook-mailer at python.org (vstinner) Date: Fri, 08 Jan 2021 23:35:27 -0000 Subject: [Python-checkins] bpo-42802: Remove distutils bdist_wininst command (GH-24043) Message-ID: https://github.com/python/cpython/commit/0e2a0f72cc9af0899eacb5604e44a563c0b06110 commit: 0e2a0f72cc9af0899eacb5604e44a563c0b06110 branch: master author: Victor Stinner committer: vstinner date: 2021-01-09T00:35:01+01:00 summary: bpo-42802: Remove distutils bdist_wininst command (GH-24043) The distutils bdist_wininst command deprecated in Python 3.8 has been removed. The distutils bidst_wheel command is now recommended to distribute binary packages on Windows. * Remove Lib/distutils/command/bdist_wininst.py * Remove PC/bdist_wininst/ project * Remove Lib/distutils/command/wininst-*.exe programs * Remove all references to bdist_wininst files: A Misc/NEWS.d/next/Library/2021-01-01-15-29-16.bpo-42802.Lw-bzl.rst D Lib/distutils/command/bdist_wininst.py D Lib/distutils/command/wininst-10.0-amd64.exe D Lib/distutils/command/wininst-10.0.exe D Lib/distutils/command/wininst-14.0-amd64.exe D Lib/distutils/command/wininst-14.0.exe D Lib/distutils/command/wininst-6.0.exe D Lib/distutils/command/wininst-7.1.exe D Lib/distutils/command/wininst-8.0.exe D Lib/distutils/command/wininst-9.0-amd64.exe D Lib/distutils/command/wininst-9.0.exe D Lib/distutils/tests/test_bdist_wininst.py D PC/bdist_wininst/PythonPowered.bmp D PC/bdist_wininst/README.txt D PC/bdist_wininst/archive.h D PC/bdist_wininst/bdist_wininst.vcxproj D PC/bdist_wininst/bdist_wininst.vcxproj.filters D PC/bdist_wininst/build.bat D PC/bdist_wininst/extract.c D PC/bdist_wininst/install.c D PC/bdist_wininst/install.rc D PC/bdist_wininst/resource.h D PC/layout/support/distutils.command.bdist_wininst.py D Tools/msi/distutils.command.bdist_wininst.py M Doc/distutils/apiref.rst M Doc/distutils/builtdist.rst M Doc/distutils/commandref.rst M Doc/distutils/introduction.rst M Doc/extending/building.rst M Doc/whatsnew/3.10.rst M Lib/distutils/command/__init__.py M Lib/distutils/command/bdist.py M Lib/distutils/command/bdist_msi.py M Lib/distutils/tests/test_bdist.py M Lib/test/test_sundry.py M Makefile.pre.in M PC/layout/main.py M PC/layout/support/options.py M PCbuild/lib.pyproj M PCbuild/pcbuild.sln diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index b14197c2f94db..6c69c11ccaa9a 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -1862,11 +1862,6 @@ Subclasses of :class:`Command` must define the following methods. .. _Windows Installer: https://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx - In most cases, the ``bdist_msi`` installer is a better choice than the - ``bdist_wininst`` installer, because it provides better support for - Win64 platforms, allows administrators to perform non-interactive - installations, and allows installation through group policies. - :mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a Redhat RPM and SRPM =========================================================================================== @@ -1878,19 +1873,6 @@ Subclasses of :class:`Command` must define the following methods. .. % todo -:mod:`distutils.command.bdist_wininst` --- Build a Windows installer -==================================================================== - -.. module:: distutils.command.bdist_wininst - :synopsis: Build a Windows installer - -.. deprecated:: 3.8 - Use bdist_wheel (wheel packages) instead. - - -.. % todo - - :mod:`distutils.command.sdist` --- Build a source distribution ============================================================== diff --git a/Doc/distutils/builtdist.rst b/Doc/distutils/builtdist.rst index e032c03e229a5..c4409aca284f4 100644 --- a/Doc/distutils/builtdist.rst +++ b/Doc/distutils/builtdist.rst @@ -96,9 +96,6 @@ The available formats for built distributions are: +-------------+------------------------------+---------+ | ``sdux`` | HP-UX :program:`swinstall` | | +-------------+------------------------------+---------+ -| ``wininst`` | self-extracting ZIP file for | \(4) | -| | Windows | | -+-------------+------------------------------+---------+ | ``msi`` | Microsoft Installer. | | +-------------+------------------------------+---------+ @@ -141,14 +138,9 @@ generated by each, are: +--------------------------+-------------------------------------+ | :command:`bdist_rpm` | rpm, srpm | +--------------------------+-------------------------------------+ -| :command:`bdist_wininst` | wininst | -+--------------------------+-------------------------------------+ | :command:`bdist_msi` | msi | +--------------------------+-------------------------------------+ -.. note:: - bdist_wininst is deprecated since Python 3.8. - .. note:: bdist_msi is deprecated since Python 3.9. @@ -190,8 +182,7 @@ The former allows you to specify RPM-specific options; the latter allows you to easily specify multiple formats in one run. If you need to do both, you can explicitly specify multiple :command:`bdist_\*` commands and their options:: - python setup.py bdist_rpm --packager="John Doe " \ - bdist_wininst --target-version="2.0" + python setup.py bdist_rpm --packager="John Doe " Creating RPM packages is driven by a :file:`.spec` file, much as using the Distutils is driven by the setup script. To make your life easier, the @@ -299,61 +290,6 @@ file winds up deep in the "build tree," in a temporary directory created by .. % to the \file{.spec} file.) -.. _creating-wininst: - -Creating Windows Installers -=========================== - -.. warning:: - bdist_wininst is deprecated since Python 3.8. - -.. warning:: - bdist_msi is deprecated since Python 3.9. - -Executable installers are the natural format for binary distributions on -Windows. They display a nice graphical user interface, display some information -about the module distribution to be installed taken from the metadata in the -setup script, let the user select a few options, and start or cancel the -installation. - -Since the metadata is taken from the setup script, creating Windows installers -is usually as easy as running:: - - python setup.py bdist_wininst - -or the :command:`bdist` command with the :option:`!--formats` option:: - - python setup.py bdist --formats=wininst - -If you have a pure module distribution (only containing pure Python modules and -packages), the resulting installer will be version independent and have a name -like :file:`foo-1.0.win32.exe`. Note that creating ``wininst`` binary -distributions in only supported on Windows systems. - -If you have a non-pure distribution, the extensions can only be created on a -Windows platform, and will be Python version dependent. The installer filename -will reflect this and now has the form :file:`foo-1.0.win32-py2.0.exe`. You -have to create a separate installer for every Python version you want to -support. - -The installer will try to compile pure modules into :term:`bytecode` after installation -on the target system in normal and optimizing mode. If you don't want this to -happen for some reason, you can run the :command:`bdist_wininst` command with -the :option:`!--no-target-compile` and/or the :option:`!--no-target-optimize` -option. - -By default the installer will display the cool "Python Powered" logo when it is -run, but you can also supply your own 152x261 bitmap which must be a Windows -:file:`.bmp` file with the :option:`!--bitmap` option. - -The installer will also display a large title on the desktop background window -when it is run, which is constructed from the name of your distribution and the -version number. This can be changed to another text by using the -:option:`!--title` option. - -The installer file will be written to the "distribution directory" --- normally -:file:`dist/`, but customizable with the :option:`!--dist-dir` option. - .. _cross-compile-windows: Cross-compiling on Windows @@ -370,10 +306,7 @@ For example, on a 32bit version of Windows, you could execute:: python setup.py build --plat-name=win-amd64 -to build a 64bit version of your extension. The Windows Installers also -support this option, so the command:: - - python setup.py build --plat-name=win-amd64 bdist_wininst +to build a 64bit version of your extension. would create a 64bit installation executable on your 32bit version of Windows. @@ -462,18 +395,3 @@ built-in functions in the installation script. and *iconindex* is the index of the icon in the file *iconpath*. Again, for details consult the Microsoft documentation for the :class:`IShellLink` interface. - - -Vista User Access Control (UAC) -=============================== - -Starting with Python 2.6, bdist_wininst supports a :option:`!--user-access-control` -option. The default is 'none' (meaning no UAC handling is done), and other -valid values are 'auto' (meaning prompt for UAC elevation if Python was -installed for all users) and 'force' (meaning always prompt for elevation). - -.. note:: - bdist_wininst is deprecated since Python 3.8. - -.. note:: - bdist_msi is deprecated since Python 3.9. diff --git a/Doc/distutils/commandref.rst b/Doc/distutils/commandref.rst index 0f6fe2aba865f..3e247e68d3a05 100644 --- a/Doc/distutils/commandref.rst +++ b/Doc/distutils/commandref.rst @@ -101,6 +101,5 @@ anything except backslash or colon. .. % \subsection{\protect\command{bdist}} .. % \subsection{\protect\command{bdist\_dumb}} .. % \subsection{\protect\command{bdist\_rpm}} -.. % \subsection{\protect\command{bdist\_wininst}} diff --git a/Doc/distutils/introduction.rst b/Doc/distutils/introduction.rst index 1f8a560e13861..87ed178e52bd4 100644 --- a/Doc/distutils/introduction.rst +++ b/Doc/distutils/introduction.rst @@ -112,17 +112,6 @@ the setup script. The difference is which Distutils *commands* they use: the :command:`install` is more often for installers (although most developers will want to install their own code occasionally). -If you want to make things really easy for your users, you can create one or -more built distributions for them. For instance, if you are running on a -Windows machine, and want to make things easy for other Windows users, you can -create an executable installer (the most appropriate type of built distribution -for this platform) with the :command:`bdist_wininst` command. For example:: - - python setup.py bdist_wininst - -will create an executable installer, :file:`foo-1.0.win32.exe`, in the current -directory. - Other useful built distribution formats are RPM, implemented by the :command:`bdist_rpm` command, Solaris :program:`pkgtool` (:command:`bdist_pkgtool`), and HP-UX :program:`swinstall` diff --git a/Doc/extending/building.rst b/Doc/extending/building.rst index 753b5511ed9d6..69dffbd56abf1 100644 --- a/Doc/extending/building.rst +++ b/Doc/extending/building.rst @@ -162,6 +162,5 @@ If the source distribution has been built successfully, maintainers can also create binary distributions. Depending on the platform, one of the following commands can be used to do so. :: - python setup.py bdist_wininst python setup.py bdist_rpm python setup.py bdist_dumb diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index e615574fb2fab..92fecb4bbcec4 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -236,6 +236,14 @@ by :func:`curses.color_content`, :func:`curses.init_color`, support is provided by the underlying ncurses library. (Contributed by Jeffrey Kintscher and Hans Petter Jansson in :issue:`36982`.) +distutils +--------- + +The ``bdist_wininst`` command deprecated in Python 3.8 has been removed. +The ``bidst_wheel`` command is now recommended to distribute binary packages +on Windows. +(Contributed by Victor Stinner in :issue:`42802`.) + doctest ------- diff --git a/Lib/distutils/command/__init__.py b/Lib/distutils/command/__init__.py index 481eea9fd4b5a..fd0bfae7ade6f 100644 --- a/Lib/distutils/command/__init__.py +++ b/Lib/distutils/command/__init__.py @@ -19,7 +19,6 @@ 'bdist', 'bdist_dumb', 'bdist_rpm', - 'bdist_wininst', 'check', 'upload', # These two are reserved for future use: diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py index 014871d280edb..d580a8090bd20 100644 --- a/Lib/distutils/command/bdist.py +++ b/Lib/distutils/command/bdist.py @@ -62,7 +62,7 @@ class bdist(Command): # Establish the preferred order (for the --help-formats option). format_commands = ['rpm', 'gztar', 'bztar', 'xztar', 'ztar', 'tar', - 'wininst', 'zip', 'msi'] + 'zip', 'msi'] # And the real information. format_command = {'rpm': ('bdist_rpm', "RPM distribution"), @@ -71,8 +71,6 @@ class bdist(Command): 'xztar': ('bdist_dumb', "xz'ed tar file"), 'ztar': ('bdist_dumb', "compressed tar file"), 'tar': ('bdist_dumb', "tar file"), - 'wininst': ('bdist_wininst', - "Windows executable installer"), 'zip': ('bdist_dumb', "ZIP file"), 'msi': ('bdist_msi', "Microsoft Installer") } diff --git a/Lib/distutils/command/bdist_msi.py b/Lib/distutils/command/bdist_msi.py index 0863a1883e720..2ed017b4d664d 100644 --- a/Lib/distutils/command/bdist_msi.py +++ b/Lib/distutils/command/bdist_msi.py @@ -1,7 +1,5 @@ # Copyright (C) 2005, 2006 Martin von L?wis # Licensed to PSF under a Contributor Agreement. -# The bdist_wininst command proper -# based on bdist_wininst """ Implements the bdist_msi command. """ diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py deleted file mode 100644 index 0e9ddaa21419e..0000000000000 --- a/Lib/distutils/command/bdist_wininst.py +++ /dev/null @@ -1,377 +0,0 @@ -"""distutils.command.bdist_wininst - -Implements the Distutils 'bdist_wininst' command: create a windows installer -exe-program.""" - -import os -import sys -import warnings -from distutils.core import Command -from distutils.util import get_platform -from distutils.dir_util import remove_tree -from distutils.errors import * -from distutils.sysconfig import get_python_version -from distutils import log - -class bdist_wininst(Command): - - description = "create an executable installer for MS Windows" - - user_options = [('bdist-dir=', None, - "temporary directory for creating the distribution"), - ('plat-name=', 'p', - "platform name to embed in generated filenames " - "(default: %s)" % get_platform()), - ('keep-temp', 'k', - "keep the pseudo-installation tree around after " + - "creating the distribution archive"), - ('target-version=', None, - "require a specific python version" + - " on the target system"), - ('no-target-compile', 'c', - "do not compile .py to .pyc on the target system"), - ('no-target-optimize', 'o', - "do not compile .py to .pyo (optimized) " - "on the target system"), - ('dist-dir=', 'd', - "directory to put final built distributions in"), - ('bitmap=', 'b', - "bitmap to use for the installer instead of python-powered logo"), - ('title=', 't', - "title to display on the installer background instead of default"), - ('skip-build', None, - "skip rebuilding everything (for testing/debugging)"), - ('install-script=', None, - "basename of installation script to be run after " - "installation or before deinstallation"), - ('pre-install-script=', None, - "Fully qualified filename of a script to be run before " - "any files are installed. This script need not be in the " - "distribution"), - ('user-access-control=', None, - "specify Vista's UAC handling - 'none'/default=no " - "handling, 'auto'=use UAC if target Python installed for " - "all users, 'force'=always use UAC"), - ] - - boolean_options = ['keep-temp', 'no-target-compile', 'no-target-optimize', - 'skip-build'] - - # bpo-10945: bdist_wininst requires mbcs encoding only available on Windows - _unsupported = (sys.platform != "win32") - - def __init__(self, *args, **kw): - super().__init__(*args, **kw) - warnings.warn("bdist_wininst command is deprecated since Python 3.8, " - "use bdist_wheel (wheel packages) instead", - DeprecationWarning, 2) - - def initialize_options(self): - self.bdist_dir = None - self.plat_name = None - self.keep_temp = 0 - self.no_target_compile = 0 - self.no_target_optimize = 0 - self.target_version = None - self.dist_dir = None - self.bitmap = None - self.title = None - self.skip_build = None - self.install_script = None - self.pre_install_script = None - self.user_access_control = None - - - def finalize_options(self): - self.set_undefined_options('bdist', ('skip_build', 'skip_build')) - - if self.bdist_dir is None: - if self.skip_build and self.plat_name: - # If build is skipped and plat_name is overridden, bdist will - # not see the correct 'plat_name' - so set that up manually. - bdist = self.distribution.get_command_obj('bdist') - bdist.plat_name = self.plat_name - # next the command will be initialized using that name - bdist_base = self.get_finalized_command('bdist').bdist_base - self.bdist_dir = os.path.join(bdist_base, 'wininst') - - if not self.target_version: - self.target_version = "" - - if not self.skip_build and self.distribution.has_ext_modules(): - short_version = get_python_version() - if self.target_version and self.target_version != short_version: - raise DistutilsOptionError( - "target version can only be %s, or the '--skip-build'" \ - " option must be specified" % (short_version,)) - self.target_version = short_version - - self.set_undefined_options('bdist', - ('dist_dir', 'dist_dir'), - ('plat_name', 'plat_name'), - ) - - if self.install_script: - for script in self.distribution.scripts: - if self.install_script == os.path.basename(script): - break - else: - raise DistutilsOptionError( - "install_script '%s' not found in scripts" - % self.install_script) - - def run(self): - if (sys.platform != "win32" and - (self.distribution.has_ext_modules() or - self.distribution.has_c_libraries())): - raise DistutilsPlatformError \ - ("distribution contains extensions and/or C libraries; " - "must be compiled on a Windows 32 platform") - - if not self.skip_build: - self.run_command('build') - - install = self.reinitialize_command('install', reinit_subcommands=1) - install.root = self.bdist_dir - install.skip_build = self.skip_build - install.warn_dir = 0 - install.plat_name = self.plat_name - - install_lib = self.reinitialize_command('install_lib') - # we do not want to include pyc or pyo files - install_lib.compile = 0 - install_lib.optimize = 0 - - if self.distribution.has_ext_modules(): - # If we are building an installer for a Python version other - # than the one we are currently running, then we need to ensure - # our build_lib reflects the other Python version rather than ours. - # Note that for target_version!=sys.version, we must have skipped the - # build step, so there is no issue with enforcing the build of this - # version. - target_version = self.target_version - if not target_version: - assert self.skip_build, "Should have already checked this" - target_version = '%d.%d' % sys.version_info[:2] - plat_specifier = ".%s-%s" % (self.plat_name, target_version) - build = self.get_finalized_command('build') - build.build_lib = os.path.join(build.build_base, - 'lib' + plat_specifier) - - # Use a custom scheme for the zip-file, because we have to decide - # at installation time which scheme to use. - for key in ('purelib', 'platlib', 'headers', 'scripts', 'data'): - value = key.upper() - if key == 'headers': - value = value + '/Include/$dist_name' - setattr(install, - 'install_' + key, - value) - - log.info("installing to %s", self.bdist_dir) - install.ensure_finalized() - - # avoid warning of 'install_lib' about installing - # into a directory not in sys.path - sys.path.insert(0, os.path.join(self.bdist_dir, 'PURELIB')) - - install.run() - - del sys.path[0] - - # And make an archive relative to the root of the - # pseudo-installation tree. - from tempfile import mktemp - archive_basename = mktemp() - fullname = self.distribution.get_fullname() - arcname = self.make_archive(archive_basename, "zip", - root_dir=self.bdist_dir) - # create an exe containing the zip-file - self.create_exe(arcname, fullname, self.bitmap) - if self.distribution.has_ext_modules(): - pyversion = get_python_version() - else: - pyversion = 'any' - self.distribution.dist_files.append(('bdist_wininst', pyversion, - self.get_installer_filename(fullname))) - # remove the zip-file again - log.debug("removing temporary file '%s'", arcname) - os.remove(arcname) - - if not self.keep_temp: - remove_tree(self.bdist_dir, dry_run=self.dry_run) - - def get_inidata(self): - # Return data describing the installation. - lines = [] - metadata = self.distribution.metadata - - # Write the [metadata] section. - lines.append("[metadata]") - - # 'info' will be displayed in the installer's dialog box, - # describing the items to be installed. - info = (metadata.long_description or '') + '\n' - - # Escape newline characters - def escape(s): - return s.replace("\n", "\\n") - - for name in ["author", "author_email", "description", "maintainer", - "maintainer_email", "name", "url", "version"]: - data = getattr(metadata, name, "") - if data: - info = info + ("\n %s: %s" % \ - (name.capitalize(), escape(data))) - lines.append("%s=%s" % (name, escape(data))) - - # The [setup] section contains entries controlling - # the installer runtime. - lines.append("\n[Setup]") - if self.install_script: - lines.append("install_script=%s" % self.install_script) - lines.append("info=%s" % escape(info)) - lines.append("target_compile=%d" % (not self.no_target_compile)) - lines.append("target_optimize=%d" % (not self.no_target_optimize)) - if self.target_version: - lines.append("target_version=%s" % self.target_version) - if self.user_access_control: - lines.append("user_access_control=%s" % self.user_access_control) - - title = self.title or self.distribution.get_fullname() - lines.append("title=%s" % escape(title)) - import time - import distutils - build_info = "Built %s with distutils-%s" % \ - (time.ctime(time.time()), distutils.__version__) - lines.append("build_info=%s" % build_info) - return "\n".join(lines) - - def create_exe(self, arcname, fullname, bitmap=None): - import struct - - self.mkpath(self.dist_dir) - - cfgdata = self.get_inidata() - - installer_name = self.get_installer_filename(fullname) - self.announce("creating %s" % installer_name) - - if bitmap: - with open(bitmap, "rb") as f: - bitmapdata = f.read() - bitmaplen = len(bitmapdata) - else: - bitmaplen = 0 - - with open(installer_name, "wb") as file: - file.write(self.get_exe_bytes()) - if bitmap: - file.write(bitmapdata) - - # Convert cfgdata from unicode to ascii, mbcs encoded - if isinstance(cfgdata, str): - cfgdata = cfgdata.encode("mbcs") - - # Append the pre-install script - cfgdata = cfgdata + b"\0" - if self.pre_install_script: - # We need to normalize newlines, so we open in text mode and - # convert back to bytes. "latin-1" simply avoids any possible - # failures. - with open(self.pre_install_script, "r", - encoding="latin-1") as script: - script_data = script.read().encode("latin-1") - cfgdata = cfgdata + script_data + b"\n\0" - else: - # empty pre-install script - cfgdata = cfgdata + b"\0" - file.write(cfgdata) - - # The 'magic number' 0x1234567B is used to make sure that the - # binary layout of 'cfgdata' is what the wininst.exe binary - # expects. If the layout changes, increment that number, make - # the corresponding changes to the wininst.exe sources, and - # recompile them. - header = struct.pack(" - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - ARM - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - ARM - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C} - wininst - false - - - - - Application - false - NotSet - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(PySourcePath)lib\distutils\command\ - false - wininst-$(VisualStudioVersion) - wininst-14.0 - wininst-12.0 - wininst-11.0 - wininst-10.0 - $(TargetName)-amd64 - .exe - - - - $(OutDir)wininst.tlb - - - MinSpace - $(zlibDir);%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDebug - MultiThreaded - - - $(PySourcePath)PC\bdist_wininst;%(AdditionalIncludeDirectories) - - - comctl32.lib;imagehlp.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/PC/bdist_wininst/bdist_wininst.vcxproj.filters b/PC/bdist_wininst/bdist_wininst.vcxproj.filters deleted file mode 100644 index c97742e723970..0000000000000 --- a/PC/bdist_wininst/bdist_wininst.vcxproj.filters +++ /dev/null @@ -1,67 +0,0 @@ -? - - - - {293b1092-03ad-4b7c-acb9-c4ab62e52f55} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {0edc0406-282f-4dbc-b60e-a867c34a2a31} - - - {ea0c0f0e-3b73-474e-a999-e9689d032ccc} - h;hpp;hxx;hm;inl - - - {0c77c1cf-3f87-4f87-bd86-b425211c2181} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {d10220c7-69e3-47c5-8d82-c8e0d4d2ac88} - - - - - Source Files - - - Source Files - - - Source Files\zlib - - - Source Files\zlib - - - Source Files\zlib - - - Source Files\zlib - - - Source Files\zlib - - - Source Files\zlib - - - - - Resource Files - - - - - Header Files - - - Header Files\zlib - - - - - Resource Files - - - \ No newline at end of file diff --git a/PC/bdist_wininst/build.bat b/PC/bdist_wininst/build.bat deleted file mode 100644 index 3ce46cfd3806b..0000000000000 --- a/PC/bdist_wininst/build.bat +++ /dev/null @@ -1,19 +0,0 @@ - at echo off -setlocal - -set D=%~dp0 -set PCBUILD=%~dp0..\..\PCbuild\ - - -echo Building Lib\distutils\command\wininst-xx.0.exe - -call "%PCBUILD%find_msbuild.bat" %MSBUILD% -if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2) - -%MSBUILD% "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32 -if errorlevel 1 goto :eof - - -echo Building Lib\distutils\command\wininst-xx.0-amd64.exe - -%MSBUILD% "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64 diff --git a/PC/bdist_wininst/extract.c b/PC/bdist_wininst/extract.c deleted file mode 100644 index 0249d9ff542f8..0000000000000 --- a/PC/bdist_wininst/extract.c +++ /dev/null @@ -1,320 +0,0 @@ -/* - IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST - BE REBUILT AS WELL. - - IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE - CHECKED IN AS WELL! -*/ - -#include - -#include "zlib.h" - -#include -#include - -#include "archive.h" - -/* Convert unix-path to dos-path */ -static void normpath(char *path) -{ - while (path && *path) { - if (*path == '/') - *path = '\\'; - ++path; - } -} - -BOOL ensure_directory(char *pathname, char *new_part, NOTIFYPROC notify) -{ - while (new_part && *new_part && (new_part = strchr(new_part, '\\'))) { - DWORD attr; - *new_part = '\0'; - attr = GetFileAttributes(pathname); - if (attr == -1) { - /* nothing found */ - if (!CreateDirectory(pathname, NULL) && notify) - notify(SYSTEM_ERROR, - "CreateDirectory (%s)", pathname); - else - notify(DIR_CREATED, pathname); - } - if (attr & FILE_ATTRIBUTE_DIRECTORY) { - ; - } else { - SetLastError(183); - if (notify) - notify(SYSTEM_ERROR, - "CreateDirectory (%s)", pathname); - } - *new_part = '\\'; - ++new_part; - } - return TRUE; -} - -/* XXX Should better explicitly specify - * uncomp_size and file_times instead of pfhdr! - */ -char *map_new_file(DWORD flags, char *filename, - char *pathname_part, int size, - WORD wFatDate, WORD wFatTime, - NOTIFYPROC notify) -{ - HANDLE hFile, hFileMapping; - char *dst; - FILETIME ft; - - try_again: - if (!flags) - flags = CREATE_NEW; - hFile = CreateFile(filename, - GENERIC_WRITE | GENERIC_READ, - 0, NULL, - flags, - FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) { - DWORD x = GetLastError(); - switch (x) { - case ERROR_FILE_EXISTS: - if (notify && notify(CAN_OVERWRITE, filename)) - hFile = CreateFile(filename, - GENERIC_WRITE|GENERIC_READ, - 0, NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); - else { - if (notify) - notify(FILE_OVERWRITTEN, filename); - return NULL; - } - break; - case ERROR_PATH_NOT_FOUND: - if (ensure_directory(filename, pathname_part, notify)) - goto try_again; - else - return FALSE; - break; - default: - SetLastError(x); - break; - } - } - if (hFile == INVALID_HANDLE_VALUE) { - if (notify) - notify (SYSTEM_ERROR, "CreateFile (%s)", filename); - return NULL; - } - - if (notify) - notify(FILE_CREATED, filename); - - DosDateTimeToFileTime(wFatDate, wFatTime, &ft); - SetFileTime(hFile, &ft, &ft, &ft); - - - if (size == 0) { - /* We cannot map a zero-length file (Also it makes - no sense */ - CloseHandle(hFile); - return NULL; - } - - hFileMapping = CreateFileMapping(hFile, - NULL, PAGE_READWRITE, 0, size, NULL); - - CloseHandle(hFile); - - if (hFileMapping == NULL) { - if (notify) - notify(SYSTEM_ERROR, - "CreateFileMapping (%s)", filename); - return NULL; - } - - dst = MapViewOfFile(hFileMapping, - FILE_MAP_WRITE, 0, 0, 0); - - CloseHandle(hFileMapping); - - if (!dst) { - if (notify) - notify(SYSTEM_ERROR, "MapViewOfFile (%s)", filename); - return NULL; - } - return dst; -} - - -BOOL -extract_file(char *dst, char *src, int method, int comp_size, - int uncomp_size, NOTIFYPROC notify) -{ - z_stream zstream; - int result; - - if (method == Z_DEFLATED) { - int x; - memset(&zstream, 0, sizeof(zstream)); - zstream.next_in = src; - zstream.avail_in = comp_size+1; - zstream.next_out = dst; - zstream.avail_out = uncomp_size; - -/* Apparently an undocumented feature of zlib: Set windowsize - to negative values to suppress the gzip header and be compatible with - zip! */ - result = TRUE; - if (Z_OK != (x = inflateInit2(&zstream, -15))) { - if (notify) - notify(ZLIB_ERROR, - "inflateInit2 returns %d", x); - result = FALSE; - goto cleanup; - } - if (Z_STREAM_END != (x = inflate(&zstream, Z_FINISH))) { - if (notify) - notify(ZLIB_ERROR, - "inflate returns %d", x); - result = FALSE; - } - cleanup: - if (Z_OK != (x = inflateEnd(&zstream))) { - if (notify) - notify (ZLIB_ERROR, - "inflateEnd returns %d", x); - result = FALSE; - } - } else if (method == 0) { - memcpy(dst, src, uncomp_size); - result = TRUE; - } else - result = FALSE; - UnmapViewOfFile(dst); - return result; -} - -/* Open a zip-compatible archive and extract all files - * into the specified directory (which is assumed to exist) - */ -BOOL -unzip_archive(SCHEME *scheme, char *dirname, char *data, DWORD size, - NOTIFYPROC notify) -{ - int n; - char pathname[MAX_PATH]; - char *new_part; - - /* read the end of central directory record */ - struct eof_cdir *pe = (struct eof_cdir *)&data[size - sizeof - (struct eof_cdir)]; - - int arc_start = size - sizeof (struct eof_cdir) - pe->nBytesCDir - - pe->ofsCDir; - - /* set position to start of central directory */ - int pos = arc_start + pe->ofsCDir; - - /* make sure this is a zip file */ - if (pe->tag != 0x06054b50) - return FALSE; - - /* Loop through the central directory, reading all entries */ - for (n = 0; n < pe->nTotalCDir; ++n) { - int i; - char *fname; - char *pcomp; - char *dst; - struct cdir *pcdir; - struct fhdr *pfhdr; - - pcdir = (struct cdir *)&data[pos]; - pfhdr = (struct fhdr *)&data[pcdir->ofs_local_header + - arc_start]; - - if (pcdir->tag != 0x02014b50) - return FALSE; - if (pfhdr->tag != 0x04034b50) - return FALSE; - pos += sizeof(struct cdir); - fname = (char *)&data[pos]; /* This is not null terminated! */ - pos += pcdir->fname_length + pcdir->extra_length + - pcdir->comment_length; - - pcomp = &data[pcdir->ofs_local_header - + sizeof(struct fhdr) - + arc_start - + pfhdr->fname_length - + pfhdr->extra_length]; - - /* dirname is the Python home directory (prefix) */ - strcpy(pathname, dirname); - if (pathname[strlen(pathname)-1] != '\\') - strcat(pathname, "\\"); - new_part = &pathname[lstrlen(pathname)]; - /* we must now match the first part of the pathname - * in the archive to a component in the installation - * scheme (PURELIB, PLATLIB, HEADERS, SCRIPTS, or DATA) - * and replace this part by the one in the scheme to use - */ - for (i = 0; scheme[i].name; ++i) { - if (0 == strnicmp(scheme[i].name, fname, - strlen(scheme[i].name))) { - char *rest; - int len; - - /* length of the replaced part */ - int namelen = strlen(scheme[i].name); - - strcat(pathname, scheme[i].prefix); - - rest = fname + namelen; - len = pfhdr->fname_length - namelen; - - if ((pathname[strlen(pathname)-1] != '\\') - && (pathname[strlen(pathname)-1] != '/')) - strcat(pathname, "\\"); - /* Now that pathname ends with a separator, - * we must make sure rest does not start with - * an additional one. - */ - if ((rest[0] == '\\') || (rest[0] == '/')) { - ++rest; - --len; - } - - strncat(pathname, rest, len); - goto Done; - } - } - /* no prefix to replace found, go unchanged */ - strncat(pathname, fname, pfhdr->fname_length); - Done: - normpath(pathname); - if (pathname[strlen(pathname)-1] != '\\') { - /* - * The local file header (pfhdr) does not always - * contain the compressed and uncompressed sizes of - * the data depending on bit 3 of the flags field. So - * it seems better to use the data from the central - * directory (pcdir). - */ - dst = map_new_file(0, pathname, new_part, - pcdir->uncomp_size, - pcdir->last_mod_file_date, - pcdir->last_mod_file_time, notify); - if (dst) { - if (!extract_file(dst, pcomp, pfhdr->method, - pcdir->comp_size, - pcdir->uncomp_size, - notify)) - return FALSE; - } /* else ??? */ - } - if (notify) - notify(NUM_FILES, new_part, (int)pe->nTotalCDir, - (int)n+1); - } - return TRUE; -} diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c deleted file mode 100644 index 5d77542582a0d..0000000000000 --- a/PC/bdist_wininst/install.c +++ /dev/null @@ -1,2700 +0,0 @@ -/* - IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST - BE REBUILT AS WELL. - - IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE - CHECKED IN AS WELL! -*/ - -/* - * Written by Thomas Heller, May 2000 - * - * $Id$ - */ - -/* - * Windows Installer program for distutils. - * - * (a kind of self-extracting zip-file) - * - * At runtime, the exefile has appended: - * - compressed setup-data in ini-format, containing the following sections: - * [metadata] - * author=Greg Ward - * author_email=gward at python.net - * description=Python Distribution Utilities - * licence=Python - * name=Distutils - * url=http://www.python.org/sigs/distutils-sig/ - * version=0.9pre - * - * [Setup] - * info= text to be displayed in the edit-box - * title= to be displayed by this program - * target_version = if present, python version required - * pyc_compile = if 0, do not compile py to pyc - * pyo_compile = if 0, do not compile py to pyo - * - * - a struct meta_data_hdr, describing the above - * - a zip-file, containing the modules to be installed. - * for the format see http://www.pkware.com/appnote.html - * - * What does this program do? - * - the setup-data is uncompressed and written to a temporary file. - * - setup-data is queried with GetPrivateProfile... calls - * - [metadata] - info is displayed in the dialog box - * - The registry is searched for installations of python - * - The user can select the python version to use. - * - The python-installation directory (sys.prefix) is displayed - * - When the start-button is pressed, files from the zip-archive - * are extracted to the file system. All .py filenames are stored - * in a list. - */ -/* - * Includes now an uninstaller. - */ - -/* - * To Do: - * - * display some explanation when no python version is found - * instead showing the user an empty listbox to select something from. - * - * Finish the code so that we can use other python installations - * additionally to those found in the registry, - * and then #define USE_OTHER_PYTHON_VERSIONS - * - * - install a help-button, which will display something meaningful - * to the poor user. - * text to the user - * - should there be a possibility to display a README file - * before starting the installation (if one is present in the archive) - * - more comments about what the code does(?) - * - * - evolve this into a full blown installer (???) - */ - -#include -#include -#include -#include -#include -#include -#include "resource.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "archive.h" - -/* Only for debugging! - static int dprintf(char *fmt, ...) - { - char Buffer[4096]; - va_list marker; - int result; - - va_start(marker, fmt); - result = wvsprintf(Buffer, fmt, marker); - OutputDebugString(Buffer); - return result; - } -*/ - -/* Bah: global variables */ -FILE *logfile; - -char modulename[MAX_PATH]; -wchar_t wmodulename[MAX_PATH]; - -HWND hwndMain; -HWND hDialog; - -char *ini_file; /* Full pathname of ini-file */ -/* From ini-file */ -char info[4096]; /* [Setup] info= */ -char title[80]; /* [Setup] title=, contains package name - including version: "Distutils-1.0.1" */ -char target_version[10]; /* [Setup] target_version=, required python - version or empty string */ -char build_info[80]; /* [Setup] build_info=, distutils version - and build date */ - -char meta_name[80]; /* package name without version like - 'Distutils' */ -char install_script[MAX_PATH]; -char *pre_install_script; /* run before we install a single file */ - -char user_access_control[10]; // one of 'auto', 'force', otherwise none. - -int py_major, py_minor; /* Python version selected for installation */ - -char *arc_data; /* memory mapped archive */ -DWORD arc_size; /* number of bytes in archive */ -int exe_size; /* number of bytes for exe-file portion */ -char python_dir[MAX_PATH]; -char pythondll[MAX_PATH]; -BOOL pyc_compile, pyo_compile; -/* Either HKLM or HKCU, depending on where Python itself is registered, and - the permissions of the current user. */ -HKEY hkey_root = (HKEY)-1; - -BOOL success; /* Installation successful? */ -char *failure_reason = NULL; - -HANDLE hBitmap; -char *bitmap_bytes; - -static const char *REGISTRY_SUFFIX_6432 = -#ifdef _WIN64 - ""; -#else - "-32"; -#endif - - -#define WM_NUMFILES WM_USER+1 -/* wParam: 0, lParam: total number of files */ -#define WM_NEXTFILE WM_USER+2 -/* wParam: number of this file */ -/* lParam: points to pathname */ - -static BOOL notify(int code, char *fmt, ...); - -/* Note: If scheme.prefix is nonempty, it must end with a '\'! */ -/* Note: purelib must be the FIRST entry! */ -SCHEME old_scheme[] = { - { "PURELIB", "" }, - { "PLATLIB", "" }, - { "HEADERS", "" }, /* 'Include/dist_name' part already in archive */ - { "SCRIPTS", "Scripts\\" }, - { "DATA", "" }, - { NULL, NULL }, -}; - -SCHEME new_scheme[] = { - { "PURELIB", "Lib\\site-packages\\" }, - { "PLATLIB", "Lib\\site-packages\\" }, - { "HEADERS", "" }, /* 'Include/dist_name' part already in archive */ - { "SCRIPTS", "Scripts\\" }, - { "DATA", "" }, - { NULL, NULL }, -}; - -static void unescape(char *dst, char *src, unsigned size) -{ - char *eon; - char ch; - - while (src && *src && (size > 2)) { - if (*src == '\\') { - switch (*++src) { - case 'n': - ++src; - *dst++ = '\r'; - *dst++ = '\n'; - size -= 2; - break; - case 'r': - ++src; - *dst++ = '\r'; - --size; - break; - case '0': case '1': case '2': case '3': - ch = (char)strtol(src, &eon, 8); - if (ch == '\n') { - *dst++ = '\r'; - --size; - } - *dst++ = ch; - --size; - src = eon; - } - } else { - *dst++ = *src++; - --size; - } - } - *dst = '\0'; -} - -static struct tagFile { - char *path; - struct tagFile *next; -} *file_list = NULL; - -static void set_failure_reason(char *reason) -{ - if (failure_reason) - free(failure_reason); - failure_reason = strdup(reason); - success = FALSE; -} -static char *get_failure_reason() -{ - if (!failure_reason) - return "Installation failed."; - return failure_reason; -} - -static void add_to_filelist(char *path) -{ - struct tagFile *p; - p = (struct tagFile *)malloc(sizeof(struct tagFile)); - p->path = strdup(path); - p->next = file_list; - file_list = p; -} - -static int do_compile_files(int (__cdecl * PyRun_SimpleString)(char *), - int optimize) -{ - struct tagFile *p; - int total, n; - char Buffer[MAX_PATH + 64]; - int errors = 0; - - total = 0; - p = file_list; - while (p) { - ++total; - p = p->next; - } - SendDlgItemMessage(hDialog, IDC_PROGRESS, PBM_SETRANGE, 0, - MAKELPARAM(0, total)); - SendDlgItemMessage(hDialog, IDC_PROGRESS, PBM_SETPOS, 0, 0); - - n = 0; - p = file_list; - while (p) { - ++n; - wsprintf(Buffer, - "import py_compile; py_compile.compile (r'%s')", - p->path); - if (PyRun_SimpleString(Buffer)) { - ++errors; - } - /* We send the notification even if the files could not - * be created so that the uninstaller will remove them - * in case they are created later. - */ - wsprintf(Buffer, "%s%c", p->path, optimize ? 'o' : 'c'); - notify(FILE_CREATED, Buffer); - - SendDlgItemMessage(hDialog, IDC_PROGRESS, PBM_SETPOS, n, 0); - SetDlgItemText(hDialog, IDC_INFO, p->path); - p = p->next; - } - return errors; -} - -#define DECLPROC(dll, result, name, args)\ - typedef result (*__PROC__##name) args;\ - result (*name)args = (__PROC__##name)GetProcAddress(dll, #name) - - -#define DECLVAR(dll, type, name)\ - type *name = (type*)GetProcAddress(dll, #name) - -typedef void PyObject; - -// Convert a "char *" string to "whcar_t *", or NULL on error. -// Result string must be free'd -wchar_t *widen_string(char *src) -{ - wchar_t *result; - DWORD dest_cch; - int src_len = strlen(src) + 1; // include NULL term in all ops - /* use MultiByteToWideChar() to see how much we need. */ - /* NOTE: this will include the null-term in the length */ - dest_cch = MultiByteToWideChar(CP_ACP, 0, src, src_len, NULL, 0); - // alloc the buffer - result = (wchar_t *)malloc(dest_cch * sizeof(wchar_t)); - if (result==NULL) - return NULL; - /* do the conversion */ - if (0==MultiByteToWideChar(CP_ACP, 0, src, src_len, result, dest_cch)) { - free(result); - return NULL; - } - return result; -} - -/* - * Returns number of files which failed to compile, - * -1 if python could not be loaded at all - */ -static int compile_filelist(HINSTANCE hPython, BOOL optimize_flag) -{ - DECLPROC(hPython, void, Py_Initialize, (void)); - DECLPROC(hPython, void, Py_SetProgramName, (wchar_t *)); - DECLPROC(hPython, void, Py_Finalize, (void)); - DECLPROC(hPython, int, PyRun_SimpleString, (char *)); - DECLPROC(hPython, PyObject *, PySys_GetObject, (char *)); - DECLVAR(hPython, int, Py_OptimizeFlag); - - int errors = 0; - struct tagFile *p = file_list; - - if (!p) - return 0; - - if (!Py_Initialize || !Py_SetProgramName || !Py_Finalize) - return -1; - - if (!PyRun_SimpleString || !PySys_GetObject || !Py_OptimizeFlag) - return -1; - - *Py_OptimizeFlag = optimize_flag ? 1 : 0; - Py_SetProgramName(wmodulename); - Py_Initialize(); - - errors += do_compile_files(PyRun_SimpleString, optimize_flag); - Py_Finalize(); - - return errors; -} - -typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); - -struct PyMethodDef { - char *ml_name; - PyCFunction ml_meth; - int ml_flags; - char *ml_doc; -}; -typedef struct PyMethodDef PyMethodDef; - -// XXX - all of these are potentially fragile! We load and unload -// the Python DLL multiple times - so storing functions pointers -// is dangerous (although things *look* OK at present) -// Better might be to roll prepare_script_environment() into -// LoadPythonDll(), and create a new UnloadPythonDLL() which also -// clears the global pointers. -void *(*g_Py_BuildValue)(char *, ...); -int (*g_PyArg_ParseTuple)(PyObject *, char *, ...); -PyObject * (*g_PyLong_FromVoidPtr)(void *); - -PyObject *g_PyExc_ValueError; -PyObject *g_PyExc_OSError; - -PyObject *(*g_PyErr_Format)(PyObject *, char *, ...); - -#define DEF_CSIDL(name) { name, #name } - -struct { - int nFolder; - char *name; -} csidl_names[] = { - /* Startup menu for all users. - NT only */ - DEF_CSIDL(CSIDL_COMMON_STARTMENU), - /* Startup menu. */ - DEF_CSIDL(CSIDL_STARTMENU), - -/* DEF_CSIDL(CSIDL_COMMON_APPDATA), */ -/* DEF_CSIDL(CSIDL_LOCAL_APPDATA), */ - /* Repository for application-specific data. - Needs Internet Explorer 4.0 */ - DEF_CSIDL(CSIDL_APPDATA), - - /* The desktop for all users. - NT only */ - DEF_CSIDL(CSIDL_COMMON_DESKTOPDIRECTORY), - /* The desktop. */ - DEF_CSIDL(CSIDL_DESKTOPDIRECTORY), - - /* Startup folder for all users. - NT only */ - DEF_CSIDL(CSIDL_COMMON_STARTUP), - /* Startup folder. */ - DEF_CSIDL(CSIDL_STARTUP), - - /* Programs item in the start menu for all users. - NT only */ - DEF_CSIDL(CSIDL_COMMON_PROGRAMS), - /* Program item in the user's start menu. */ - DEF_CSIDL(CSIDL_PROGRAMS), - -/* DEF_CSIDL(CSIDL_PROGRAM_FILES_COMMON), */ -/* DEF_CSIDL(CSIDL_PROGRAM_FILES), */ - - /* Virtual folder containing fonts. */ - DEF_CSIDL(CSIDL_FONTS), -}; - -#define DIM(a) (sizeof(a) / sizeof((a)[0])) - -static PyObject *FileCreated(PyObject *self, PyObject *args) -{ - char *path; - if (!g_PyArg_ParseTuple(args, "s", &path)) - return NULL; - notify(FILE_CREATED, path); - return g_Py_BuildValue(""); -} - -static PyObject *DirectoryCreated(PyObject *self, PyObject *args) -{ - char *path; - if (!g_PyArg_ParseTuple(args, "s", &path)) - return NULL; - notify(DIR_CREATED, path); - return g_Py_BuildValue(""); -} - -static PyObject *GetSpecialFolderPath(PyObject *self, PyObject *args) -{ - char *name; - char lpszPath[MAX_PATH]; - int i; - static HRESULT (WINAPI *My_SHGetSpecialFolderPath)(HWND hwnd, - LPTSTR lpszPath, - int nFolder, - BOOL fCreate); - - if (!My_SHGetSpecialFolderPath) { - HINSTANCE hLib = LoadLibrary("shell32.dll"); - if (!hLib) { - g_PyErr_Format(g_PyExc_OSError, - "function not available"); - return NULL; - } - My_SHGetSpecialFolderPath = (BOOL (WINAPI *)(HWND, LPTSTR, - int, BOOL)) - GetProcAddress(hLib, - "SHGetSpecialFolderPathA"); - } - - if (!g_PyArg_ParseTuple(args, "s", &name)) - return NULL; - - if (!My_SHGetSpecialFolderPath) { - g_PyErr_Format(g_PyExc_OSError, "function not available"); - return NULL; - } - - for (i = 0; i < DIM(csidl_names); ++i) { - if (0 == strcmpi(csidl_names[i].name, name)) { - int nFolder; - nFolder = csidl_names[i].nFolder; - if (My_SHGetSpecialFolderPath(NULL, lpszPath, - nFolder, 0)) - return g_Py_BuildValue("s", lpszPath); - else { - g_PyErr_Format(g_PyExc_OSError, - "no such folder (%s)", name); - return NULL; - } - - } - }; - g_PyErr_Format(g_PyExc_ValueError, "unknown CSIDL (%s)", name); - return NULL; -} - -static PyObject *CreateShortcut(PyObject *self, PyObject *args) -{ - char *path; /* path and filename */ - char *description; - char *filename; - - char *arguments = NULL; - char *iconpath = NULL; - int iconindex = 0; - char *workdir = NULL; - - WCHAR wszFilename[MAX_PATH]; - - IShellLink *ps1 = NULL; - IPersistFile *pPf = NULL; - - HRESULT hr; - - hr = CoInitialize(NULL); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "CoInitialize failed, error 0x%x", hr); - goto error; - } - - if (!g_PyArg_ParseTuple(args, "sss|sssi", - &path, &description, &filename, - &arguments, &workdir, &iconpath, &iconindex)) - return NULL; - - hr = CoCreateInstance(&CLSID_ShellLink, - NULL, - CLSCTX_INPROC_SERVER, - &IID_IShellLink, - &ps1); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "CoCreateInstance failed, error 0x%x", hr); - goto error; - } - - hr = ps1->lpVtbl->QueryInterface(ps1, &IID_IPersistFile, - (void **)&pPf); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "QueryInterface(IPersistFile) error 0x%x", hr); - goto error; - } - - - hr = ps1->lpVtbl->SetPath(ps1, path); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "SetPath() failed, error 0x%x", hr); - goto error; - } - - hr = ps1->lpVtbl->SetDescription(ps1, description); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "SetDescription() failed, error 0x%x", hr); - goto error; - } - - if (arguments) { - hr = ps1->lpVtbl->SetArguments(ps1, arguments); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "SetArguments() error 0x%x", hr); - goto error; - } - } - - if (iconpath) { - hr = ps1->lpVtbl->SetIconLocation(ps1, iconpath, iconindex); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "SetIconLocation() error 0x%x", hr); - goto error; - } - } - - if (workdir) { - hr = ps1->lpVtbl->SetWorkingDirectory(ps1, workdir); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "SetWorkingDirectory() error 0x%x", hr); - goto error; - } - } - - MultiByteToWideChar(CP_ACP, 0, - filename, -1, - wszFilename, MAX_PATH); - - hr = pPf->lpVtbl->Save(pPf, wszFilename, TRUE); - if (FAILED(hr)) { - g_PyErr_Format(g_PyExc_OSError, - "Failed to create shortcut '%s' - error 0x%x", filename, hr); - goto error; - } - - pPf->lpVtbl->Release(pPf); - ps1->lpVtbl->Release(ps1); - CoUninitialize(); - return g_Py_BuildValue(""); - - error: - if (pPf) - pPf->lpVtbl->Release(pPf); - - if (ps1) - ps1->lpVtbl->Release(ps1); - - CoUninitialize(); - - return NULL; -} - -static PyObject *PyMessageBox(PyObject *self, PyObject *args) -{ - int rc; - char *text, *caption; - int flags; - if (!g_PyArg_ParseTuple(args, "ssi", &text, &caption, &flags)) - return NULL; - rc = MessageBox(GetFocus(), text, caption, flags); - return g_Py_BuildValue("i", rc); -} - -static PyObject *GetRootHKey(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return g_PyLong_FromVoidPtr(hkey_root); -} - -#define METH_VARARGS 0x0001 -#define METH_NOARGS 0x0004 - -PyMethodDef meth[] = { - {"create_shortcut", CreateShortcut, METH_VARARGS, NULL}, - {"get_special_folder_path", GetSpecialFolderPath, METH_VARARGS, NULL}, - {"get_root_hkey", GetRootHKey, METH_NOARGS, NULL}, - {"file_created", FileCreated, METH_VARARGS, NULL}, - {"directory_created", DirectoryCreated, METH_VARARGS, NULL}, - {"message_box", PyMessageBox, METH_VARARGS, NULL}, -}; - -static HINSTANCE LoadPythonDll(char *fname) -{ - char fullpath[_MAX_PATH]; - LONG size = sizeof(fullpath); - char subkey_name[80]; - char buffer[260 + 12]; - HINSTANCE h; - - /* make sure PYTHONHOME is set, to that sys.path is initialized correctly */ - wsprintf(buffer, "PYTHONHOME=%s", python_dir); - _putenv(buffer); - h = LoadLibrary(fname); - if (h) - return h; - wsprintf(subkey_name, - "SOFTWARE\\Python\\PythonCore\\%d.%d%s\\InstallPath", - py_major, py_minor, REGISTRY_SUFFIX_6432); - if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER, subkey_name, - fullpath, &size) && - ERROR_SUCCESS != RegQueryValue(HKEY_LOCAL_MACHINE, subkey_name, - fullpath, &size)) - return NULL; - strcat(fullpath, "\\"); - strcat(fullpath, fname); - // We use LOAD_WITH_ALTERED_SEARCH_PATH to ensure any dependent DLLs - // next to the Python DLL (eg, the CRT DLL) are also loaded. - return LoadLibraryEx(fullpath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); -} - -static int prepare_script_environment(HINSTANCE hPython) -{ - PyObject *mod; - DECLPROC(hPython, PyObject *, PyImport_ImportModule, (char *)); - DECLPROC(hPython, int, PyObject_SetAttrString, (PyObject *, char *, PyObject *)); - DECLPROC(hPython, PyObject *, PyObject_GetAttrString, (PyObject *, char *)); - DECLPROC(hPython, PyObject *, PyCFunction_New, (PyMethodDef *, PyObject *)); - DECLPROC(hPython, PyObject *, Py_BuildValue, (char *, ...)); - DECLPROC(hPython, int, PyArg_ParseTuple, (PyObject *, char *, ...)); - DECLPROC(hPython, PyObject *, PyErr_Format, (PyObject *, char *)); - DECLPROC(hPython, PyObject *, PyLong_FromVoidPtr, (void *)); - if (!PyImport_ImportModule || !PyObject_GetAttrString || - !PyObject_SetAttrString || !PyCFunction_New) - return 1; - if (!Py_BuildValue || !PyArg_ParseTuple || !PyErr_Format) - return 1; - - mod = PyImport_ImportModule("builtins"); - if (mod) { - int i; - g_PyExc_ValueError = PyObject_GetAttrString(mod, "ValueError"); - g_PyExc_OSError = PyObject_GetAttrString(mod, "OSError"); - for (i = 0; i < DIM(meth); ++i) { - PyObject_SetAttrString(mod, meth[i].ml_name, - PyCFunction_New(&meth[i], NULL)); - } - } - g_Py_BuildValue = Py_BuildValue; - g_PyArg_ParseTuple = PyArg_ParseTuple; - g_PyErr_Format = PyErr_Format; - g_PyLong_FromVoidPtr = PyLong_FromVoidPtr; - - return 0; -} - -/* - * This function returns one of the following error codes: - * 1 if the Python-dll does not export the functions we need - * 2 if no install-script is specified in pathname - * 3 if the install-script file could not be opened - * the return value of PyRun_SimpleString() or Py_FinalizeEx() otherwise, - * which is 0 if everything is ok, -1 if an exception had occurred - * in the install-script. - */ - -static int -do_run_installscript(HINSTANCE hPython, char *pathname, int argc, char **argv) -{ - int fh, result, i; - static wchar_t *wargv[256]; - DECLPROC(hPython, void, Py_Initialize, (void)); - DECLPROC(hPython, int, PySys_SetArgv, (int, wchar_t **)); - DECLPROC(hPython, int, PyRun_SimpleString, (char *)); - DECLPROC(hPython, int, Py_FinalizeEx, (void)); - DECLPROC(hPython, PyObject *, Py_BuildValue, (char *, ...)); - DECLPROC(hPython, PyObject *, PyCFunction_New, - (PyMethodDef *, PyObject *)); - DECLPROC(hPython, int, PyArg_ParseTuple, (PyObject *, char *, ...)); - DECLPROC(hPython, PyObject *, PyErr_Format, (PyObject *, char *)); - - if (!Py_Initialize || !PySys_SetArgv - || !PyRun_SimpleString || !Py_FinalizeEx) - return 1; - - if (!Py_BuildValue || !PyArg_ParseTuple || !PyErr_Format) - return 1; - - if (!PyCFunction_New || !PyArg_ParseTuple || !PyErr_Format) - return 1; - - if (pathname == NULL || pathname[0] == '\0') - return 2; - - fh = open(pathname, _O_RDONLY | O_NOINHERIT); - if (-1 == fh) { - fprintf(stderr, "Could not open postinstall-script %s\n", - pathname); - return 3; - } - - SetDlgItemText(hDialog, IDC_INFO, "Running Script..."); - - Py_Initialize(); - - prepare_script_environment(hPython); - // widen the argv array for py3k. - memset(wargv, 0, sizeof(wargv)); - for (i=0;i 0) { - script[n] = '\n'; - script[n+1] = 0; - result = PyRun_SimpleString(script); - } - } - } - if (Py_FinalizeEx() < 0) { - result = -1; - } - - close(fh); - return result; -} - -static int -run_installscript(char *pathname, int argc, char **argv, char **pOutput) -{ - HINSTANCE hPython; - int result = 1; - int out_buf_size; - HANDLE redirected, old_stderr, old_stdout; - char *tempname; - - *pOutput = NULL; - - tempname = tempnam(NULL, NULL); - // We use a static CRT while the Python version we load uses - // the CRT from one of various possible DLLs. As a result we - // need to redirect the standard handles using the API rather - // than the CRT. - redirected = CreateFile( - tempname, - GENERIC_WRITE | GENERIC_READ, - FILE_SHARE_READ, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, - NULL); - old_stdout = GetStdHandle(STD_OUTPUT_HANDLE); - old_stderr = GetStdHandle(STD_ERROR_HANDLE); - SetStdHandle(STD_OUTPUT_HANDLE, redirected); - SetStdHandle(STD_ERROR_HANDLE, redirected); - - hPython = LoadPythonDll(pythondll); - if (hPython) { - result = do_run_installscript(hPython, pathname, argc, argv); - FreeLibrary(hPython); - } else { - fprintf(stderr, "*** Could not load Python ***"); - } - SetStdHandle(STD_OUTPUT_HANDLE, old_stdout); - SetStdHandle(STD_ERROR_HANDLE, old_stderr); - out_buf_size = min(GetFileSize(redirected, NULL), 4096); - *pOutput = malloc(out_buf_size+1); - if (*pOutput) { - DWORD nread = 0; - SetFilePointer(redirected, 0, 0, FILE_BEGIN); - ReadFile(redirected, *pOutput, out_buf_size, &nread, NULL); - (*pOutput)[nread] = '\0'; - } - CloseHandle(redirected); - DeleteFile(tempname); - return result; -} - -static int do_run_simple_script(HINSTANCE hPython, char *script) -{ - int rc; - DECLPROC(hPython, void, Py_Initialize, (void)); - DECLPROC(hPython, void, Py_SetProgramName, (wchar_t *)); - DECLPROC(hPython, int, Py_FinalizeEx, (void)); - DECLPROC(hPython, int, PyRun_SimpleString, (char *)); - DECLPROC(hPython, void, PyErr_Print, (void)); - - if (!Py_Initialize || !Py_SetProgramName || !Py_FinalizeEx || - !PyRun_SimpleString || !PyErr_Print) - return -1; - - Py_SetProgramName(wmodulename); - Py_Initialize(); - prepare_script_environment(hPython); - rc = PyRun_SimpleString(script); - if (rc) - PyErr_Print(); - if (Py_FinalizeEx() < 0) { - rc = -1; - } - return rc; -} - -static int run_simple_script(char *script) -{ - int rc; - HINSTANCE hPython; - char *tempname = tempnam(NULL, NULL); - // Redirect output using win32 API - see comments above... - HANDLE redirected = CreateFile( - tempname, - GENERIC_WRITE | GENERIC_READ, - FILE_SHARE_READ, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, - NULL); - HANDLE old_stdout = GetStdHandle(STD_OUTPUT_HANDLE); - HANDLE old_stderr = GetStdHandle(STD_ERROR_HANDLE); - SetStdHandle(STD_OUTPUT_HANDLE, redirected); - SetStdHandle(STD_ERROR_HANDLE, redirected); - - hPython = LoadPythonDll(pythondll); - if (!hPython) { - char reason[128]; - wsprintf(reason, "Can't load Python for pre-install script (%d)", GetLastError()); - set_failure_reason(reason); - return -1; - } - rc = do_run_simple_script(hPython, script); - FreeLibrary(hPython); - SetStdHandle(STD_OUTPUT_HANDLE, old_stdout); - SetStdHandle(STD_ERROR_HANDLE, old_stderr); - /* We only care about the output when we fail. If the script works - OK, then we discard it - */ - if (rc) { - int err_buf_size; - char *err_buf; - const char *prefix = "Running the pre-installation script failed\r\n"; - int prefix_len = strlen(prefix); - err_buf_size = GetFileSize(redirected, NULL); - if (err_buf_size==INVALID_FILE_SIZE) // an error - let's try anyway... - err_buf_size = 4096; - err_buf = malloc(prefix_len + err_buf_size + 1); - if (err_buf) { - DWORD n = 0; - strcpy(err_buf, prefix); - SetFilePointer(redirected, 0, 0, FILE_BEGIN); - ReadFile(redirected, err_buf+prefix_len, err_buf_size, &n, NULL); - err_buf[prefix_len+n] = '\0'; - set_failure_reason(err_buf); - free(err_buf); - } else { - set_failure_reason("Out of memory!"); - } - } - CloseHandle(redirected); - DeleteFile(tempname); - return rc; -} - - -static BOOL SystemError(int error, char *msg) -{ - char Buffer[1024]; - int n; - - if (error) { - LPVOID lpMsgBuf; - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - error, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)&lpMsgBuf, - 0, - NULL - ); - strncpy(Buffer, lpMsgBuf, sizeof(Buffer)); - LocalFree(lpMsgBuf); - } else - Buffer[0] = '\0'; - n = lstrlen(Buffer); - _snprintf(Buffer+n, sizeof(Buffer)-n, msg); - MessageBox(hwndMain, Buffer, "Runtime Error", MB_OK | MB_ICONSTOP); - return FALSE; -} - -static BOOL notify (int code, char *fmt, ...) -{ - char Buffer[1024]; - va_list marker; - BOOL result = TRUE; - int a, b; - char *cp; - - va_start(marker, fmt); - _vsnprintf(Buffer, sizeof(Buffer), fmt, marker); - - switch (code) { -/* Questions */ - case CAN_OVERWRITE: - break; - -/* Information notification */ - case DIR_CREATED: - if (logfile) - fprintf(logfile, "100 Made Dir: %s\n", fmt); - break; - - case FILE_CREATED: - if (logfile) - fprintf(logfile, "200 File Copy: %s\n", fmt); - goto add_to_filelist_label; - break; - - case FILE_OVERWRITTEN: - if (logfile) - fprintf(logfile, "200 File Overwrite: %s\n", fmt); - add_to_filelist_label: - if ((cp = strrchr(fmt, '.')) && (0 == strcmp (cp, ".py"))) - add_to_filelist(fmt); - break; - -/* Error Messages */ - case ZLIB_ERROR: - MessageBox(GetFocus(), Buffer, "Error", - MB_OK | MB_ICONWARNING); - break; - - case SYSTEM_ERROR: - SystemError(GetLastError(), Buffer); - break; - - case NUM_FILES: - a = va_arg(marker, int); - b = va_arg(marker, int); - SendMessage(hDialog, WM_NUMFILES, 0, MAKELPARAM(0, a)); - SendMessage(hDialog, WM_NEXTFILE, b,(LPARAM)fmt); - } - va_end(marker); - - return result; -} - -static char *MapExistingFile(char *pathname, DWORD *psize) -{ - HANDLE hFile, hFileMapping; - DWORD nSizeLow, nSizeHigh; - char *data; - - hFile = CreateFile(pathname, - GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) - return NULL; - nSizeLow = GetFileSize(hFile, &nSizeHigh); - hFileMapping = CreateFileMapping(hFile, - NULL, PAGE_READONLY, 0, 0, NULL); - CloseHandle(hFile); - - if (hFileMapping == NULL) - return NULL; - - data = MapViewOfFile(hFileMapping, - FILE_MAP_READ, 0, 0, 0); - - CloseHandle(hFileMapping); - *psize = nSizeLow; - return data; -} - - -static void create_bitmap(HWND hwnd) -{ - BITMAPFILEHEADER *bfh; - BITMAPINFO *bi; - HDC hdc; - - if (!bitmap_bytes) - return; - - if (hBitmap) - return; - - hdc = GetDC(hwnd); - - bfh = (BITMAPFILEHEADER *)bitmap_bytes; - bi = (BITMAPINFO *)(bitmap_bytes + sizeof(BITMAPFILEHEADER)); - - hBitmap = CreateDIBitmap(hdc, - &bi->bmiHeader, - CBM_INIT, - bitmap_bytes + bfh->bfOffBits, - bi, - DIB_RGB_COLORS); - ReleaseDC(hwnd, hdc); -} - -/* Extract everything we need to begin the installation. Currently this - is the INI filename with install data, and the raw pre-install script -*/ -static BOOL ExtractInstallData(char *data, DWORD size, int *pexe_size, - char **out_ini_file, char **out_preinstall_script) -{ - /* read the end of central directory record */ - struct eof_cdir *pe = (struct eof_cdir *)&data[size - sizeof - (struct eof_cdir)]; - - int arc_start = size - sizeof (struct eof_cdir) - pe->nBytesCDir - - pe->ofsCDir; - - int ofs = arc_start - sizeof (struct meta_data_hdr); - - /* read meta_data info */ - struct meta_data_hdr *pmd = (struct meta_data_hdr *)&data[ofs]; - char *src, *dst; - char *ini_file; - char tempdir[MAX_PATH]; - - /* ensure that if we fail, we don't have garbage out pointers */ - *out_ini_file = *out_preinstall_script = NULL; - - if (pe->tag != 0x06054b50) { - return FALSE; - } - - if (pmd->tag != 0x1234567B) { - return SystemError(0, - "Invalid cfgdata magic number (see bdist_wininst.py)"); - } - if (ofs < 0) { - return FALSE; - } - - if (pmd->bitmap_size) { - /* Store pointer to bitmap bytes */ - bitmap_bytes = (char *)pmd - pmd->uncomp_size - pmd->bitmap_size; - } - - *pexe_size = ofs - pmd->uncomp_size - pmd->bitmap_size; - - src = ((char *)pmd) - pmd->uncomp_size; - ini_file = malloc(MAX_PATH); /* will be returned, so do not free it */ - if (!ini_file) - return FALSE; - if (!GetTempPath(sizeof(tempdir), tempdir) - || !GetTempFileName(tempdir, "~du", 0, ini_file)) { - SystemError(GetLastError(), - "Could not create temporary file"); - return FALSE; - } - - dst = map_new_file(CREATE_ALWAYS, ini_file, NULL, pmd->uncomp_size, - 0, 0, NULL/*notify*/); - if (!dst) - return FALSE; - /* Up to the first \0 is the INI file data. */ - strncpy(dst, src, pmd->uncomp_size); - src += strlen(dst) + 1; - /* Up to next \0 is the pre-install script */ - *out_preinstall_script = strdup(src); - *out_ini_file = ini_file; - UnmapViewOfFile(dst); - return TRUE; -} - -static void PumpMessages(void) -{ - MSG msg; - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -} - -LRESULT CALLBACK -WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - HFONT hFont; - int h; - PAINTSTRUCT ps; - switch (msg) { - case WM_PAINT: - hdc = BeginPaint(hwnd, &ps); - h = GetSystemMetrics(SM_CYSCREEN) / 10; - hFont = CreateFont(h, 0, 0, 0, 700, TRUE, - 0, 0, 0, 0, 0, 0, 0, "Times Roman"); - hFont = SelectObject(hdc, hFont); - SetBkMode(hdc, TRANSPARENT); - TextOut(hdc, 15, 15, title, strlen(title)); - SetTextColor(hdc, RGB(255, 255, 255)); - TextOut(hdc, 10, 10, title, strlen(title)); - DeleteObject(SelectObject(hdc, hFont)); - EndPaint(hwnd, &ps); - return 0; - } - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static HWND CreateBackground(char *title) -{ - WNDCLASS wc; - HWND hwnd; - char buffer[4096]; - - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.lpfnWndProc = WindowProc; - wc.cbWndExtra = 0; - wc.cbClsExtra = 0; - wc.hInstance = GetModuleHandle(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = CreateSolidBrush(RGB(0, 0, 128)); - wc.lpszMenuName = NULL; - wc.lpszClassName = "SetupWindowClass"; - - if (!RegisterClass(&wc)) - MessageBox(hwndMain, - "Could not register window class", - "Setup.exe", MB_OK); - - wsprintf(buffer, "Setup %s", title); - hwnd = CreateWindow("SetupWindowClass", - buffer, - 0, - 0, 0, - GetSystemMetrics(SM_CXFULLSCREEN), - GetSystemMetrics(SM_CYFULLSCREEN), - NULL, - NULL, - GetModuleHandle(NULL), - NULL); - ShowWindow(hwnd, SW_SHOWMAXIMIZED); - UpdateWindow(hwnd); - return hwnd; -} - -/* - * Center a window on the screen - */ -static void CenterWindow(HWND hwnd) -{ - RECT rc; - int w, h; - - GetWindowRect(hwnd, &rc); - w = GetSystemMetrics(SM_CXSCREEN); - h = GetSystemMetrics(SM_CYSCREEN); - MoveWindow(hwnd, - (w - (rc.right-rc.left))/2, - (h - (rc.bottom-rc.top))/2, - rc.right-rc.left, rc.bottom-rc.top, FALSE); -} - -#include - -INT_PTR CALLBACK -IntroDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LPNMHDR lpnm; - char Buffer[4096]; - - switch (msg) { - case WM_INITDIALOG: - create_bitmap(hwnd); - if(hBitmap) - SendDlgItemMessage(hwnd, IDC_BITMAP, STM_SETIMAGE, - IMAGE_BITMAP, (LPARAM)hBitmap); - CenterWindow(GetParent(hwnd)); - wsprintf(Buffer, - "This Wizard will install %s on your computer. " - "Click Next to continue " - "or Cancel to exit the Setup Wizard.", - meta_name); - SetDlgItemText(hwnd, IDC_TITLE, Buffer); - SetDlgItemText(hwnd, IDC_INTRO_TEXT, info); - SetDlgItemText(hwnd, IDC_BUILD_INFO, build_info); - return FALSE; - - case WM_NOTIFY: - lpnm = (LPNMHDR) lParam; - - switch (lpnm->code) { - case PSN_SETACTIVE: - PropSheet_SetWizButtons(GetParent(hwnd), PSWIZB_NEXT); - break; - - case PSN_WIZNEXT: - break; - - case PSN_RESET: - break; - - default: - break; - } - } - return FALSE; -} - -#ifdef USE_OTHER_PYTHON_VERSIONS -/* These are really private variables used to communicate - * between StatusRoutine and CheckPythonExe - */ -char bound_image_dll[_MAX_PATH]; -int bound_image_major; -int bound_image_minor; - -static BOOL __stdcall StatusRoutine(IMAGEHLP_STATUS_REASON reason, - PSTR ImageName, - PSTR DllName, - ULONG Va, - ULONG Parameter) -{ - char fname[_MAX_PATH]; - int int_version; - - switch(reason) { - case BindOutOfMemory: - case BindRvaToVaFailed: - case BindNoRoomInImage: - case BindImportProcedureFailed: - break; - - case BindImportProcedure: - case BindForwarder: - case BindForwarderNOT: - case BindImageModified: - case BindExpandFileHeaders: - case BindImageComplete: - case BindSymbolsNotUpdated: - case BindMismatchedSymbols: - case BindImportModuleFailed: - break; - - case BindImportModule: - if (1 == sscanf(DllName, "python%d", &int_version)) { - SearchPath(NULL, DllName, NULL, sizeof(fname), - fname, NULL); - strcpy(bound_image_dll, fname); - bound_image_major = int_version / 10; - bound_image_minor = int_version % 10; - OutputDebugString("BOUND "); - OutputDebugString(fname); - OutputDebugString("\n"); - } - break; - } - return TRUE; -} - -/* - */ -static LPSTR get_sys_prefix(LPSTR exe, LPSTR dll) -{ - void (__cdecl * Py_Initialize)(void); - void (__cdecl * Py_SetProgramName)(char *); - void (__cdecl * Py_Finalize)(void); - void* (__cdecl * PySys_GetObject)(char *); - void (__cdecl * PySys_SetArgv)(int, char **); - char* (__cdecl * Py_GetPrefix)(void); - char* (__cdecl * Py_GetPath)(void); - HINSTANCE hPython; - LPSTR prefix = NULL; - int (__cdecl * PyRun_SimpleString)(char *); - - { - char Buffer[256]; - wsprintf(Buffer, "PYTHONHOME=%s", exe); - *strrchr(Buffer, '\\') = '\0'; -// MessageBox(GetFocus(), Buffer, "PYTHONHOME", MB_OK); - _putenv(Buffer); - _putenv("PYTHONPATH="); - } - - hPython = LoadLibrary(dll); - if (!hPython) - return NULL; - Py_Initialize = (void (*)(void))GetProcAddress - (hPython,"Py_Initialize"); - - PySys_SetArgv = (void (*)(int, char **))GetProcAddress - (hPython,"PySys_SetArgv"); - - PyRun_SimpleString = (int (*)(char *))GetProcAddress - (hPython,"PyRun_SimpleString"); - - Py_SetProgramName = (void (*)(char *))GetProcAddress - (hPython,"Py_SetProgramName"); - - PySys_GetObject = (void* (*)(char *))GetProcAddress - (hPython,"PySys_GetObject"); - - Py_GetPrefix = (char * (*)(void))GetProcAddress - (hPython,"Py_GetPrefix"); - - Py_GetPath = (char * (*)(void))GetProcAddress - (hPython,"Py_GetPath"); - - Py_Finalize = (void (*)(void))GetProcAddress(hPython, - "Py_Finalize"); - Py_SetProgramName(exe); - Py_Initialize(); - PySys_SetArgv(1, &exe); - - MessageBox(GetFocus(), Py_GetPrefix(), "PREFIX", MB_OK); - MessageBox(GetFocus(), Py_GetPath(), "PATH", MB_OK); - - Py_Finalize(); - FreeLibrary(hPython); - - return prefix; -} - -static BOOL -CheckPythonExe(LPSTR pathname, LPSTR version, int *pmajor, int *pminor) -{ - bound_image_dll[0] = '\0'; - if (!BindImageEx(BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE | BIND_ALL_IMAGES, - pathname, - NULL, - NULL, - StatusRoutine)) - return SystemError(0, "Could not bind image"); - if (bound_image_dll[0] == '\0') - return SystemError(0, "Does not seem to be a python executable"); - *pmajor = bound_image_major; - *pminor = bound_image_minor; - if (version && *version) { - char core_version[12]; - wsprintf(core_version, "%d.%d", bound_image_major, bound_image_minor); - if (strcmp(version, core_version)) - return SystemError(0, "Wrong Python version"); - } - get_sys_prefix(pathname, bound_image_dll); - return TRUE; -} - -/* - * Browse for other python versions. Insert it into the listbox specified - * by hwnd. version, if not NULL or empty, is the version required. - */ -static BOOL GetOtherPythonVersion(HWND hwnd, LPSTR version) -{ - char vers_name[_MAX_PATH + 80]; - DWORD itemindex; - OPENFILENAME of; - char pathname[_MAX_PATH]; - DWORD result; - - strcpy(pathname, "python.exe"); - - memset(&of, 0, sizeof(of)); - of.lStructSize = sizeof(OPENFILENAME); - of.hwndOwner = GetParent(hwnd); - of.hInstance = NULL; - of.lpstrFilter = "python.exe\0python.exe\0"; - of.lpstrCustomFilter = NULL; - of.nMaxCustFilter = 0; - of.nFilterIndex = 1; - of.lpstrFile = pathname; - of.nMaxFile = sizeof(pathname); - of.lpstrFileTitle = NULL; - of.nMaxFileTitle = 0; - of.lpstrInitialDir = NULL; - of.lpstrTitle = "Python executable"; - of.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; - of.lpstrDefExt = "exe"; - - result = GetOpenFileName(&of); - if (result) { - int major, minor; - if (!CheckPythonExe(pathname, version, &major, &minor)) { - return FALSE; - } - *strrchr(pathname, '\\') = '\0'; - wsprintf(vers_name, "Python Version %d.%d in %s", - major, minor, pathname); - itemindex = SendMessage(hwnd, LB_INSERTSTRING, -1, - (LPARAM)(LPSTR)vers_name); - SendMessage(hwnd, LB_SETCURSEL, itemindex, 0); - SendMessage(hwnd, LB_SETITEMDATA, itemindex, - (LPARAM)(LPSTR)strdup(pathname)); - return TRUE; - } - return FALSE; -} -#endif /* USE_OTHER_PYTHON_VERSIONS */ - -typedef struct _InstalledVersionInfo { - char prefix[MAX_PATH+1]; // sys.prefix directory. - HKEY hkey; // Is this Python in HKCU or HKLM? -} InstalledVersionInfo; - - -/* - * Fill the listbox specified by hwnd with all python versions found - * in the registry. version, if not NULL or empty, is the version - * required. - */ -static BOOL GetPythonVersions(HWND hwnd, HKEY hkRoot, LPSTR version) -{ - DWORD index = 0; - char core_version[80]; - HKEY hKey; - BOOL result = TRUE; - DWORD bufsize; - - if (ERROR_SUCCESS != RegOpenKeyEx(hkRoot, - "Software\\Python\\PythonCore", - 0, KEY_READ, &hKey)) - return FALSE; - bufsize = sizeof(core_version); - while (ERROR_SUCCESS == RegEnumKeyEx(hKey, index, - core_version, &bufsize, NULL, - NULL, NULL, NULL)) { - char subkey_name[80], vers_name[80]; - int itemindex; - DWORD value_size; - HKEY hk; - - bufsize = sizeof(core_version); - ++index; - if (version && *version && strcmp(version, core_version)) - continue; - - wsprintf(vers_name, "Python Version %s (found in registry)", - core_version); - wsprintf(subkey_name, - "Software\\Python\\PythonCore\\%s\\InstallPath", - core_version); - if (ERROR_SUCCESS == RegOpenKeyEx(hkRoot, subkey_name, 0, KEY_READ, &hk)) { - InstalledVersionInfo *ivi = - (InstalledVersionInfo *)malloc(sizeof(InstalledVersionInfo)); - value_size = sizeof(ivi->prefix); - if (ivi && - ERROR_SUCCESS == RegQueryValueEx(hk, NULL, NULL, NULL, - ivi->prefix, &value_size)) { - itemindex = SendMessage(hwnd, LB_ADDSTRING, 0, - (LPARAM)(LPSTR)vers_name); - ivi->hkey = hkRoot; - SendMessage(hwnd, LB_SETITEMDATA, itemindex, - (LPARAM)(LPSTR)ivi); - } - RegCloseKey(hk); - } - } - RegCloseKey(hKey); - return result; -} - -/* Determine if the current user can write to HKEY_LOCAL_MACHINE */ -BOOL HasLocalMachinePrivs() -{ - HKEY hKey; - DWORD result; - static char KeyName[] = - "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; - - result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, - KeyName, - 0, - KEY_CREATE_SUB_KEY, - &hKey); - if (result==0) - RegCloseKey(hKey); - return result==0; -} - -// Check the root registry key to use - either HKLM or HKCU. -// If Python is installed in HKCU, then our extension also must be installed -// in HKCU - as Python won't be available for other users, we shouldn't either -// (and will fail if we are!) -// If Python is installed in HKLM, then we will also prefer to use HKLM, but -// this may not be possible - so we silently fall back to HKCU. -// -// We assume hkey_root is already set to where Python itself is installed. -void CheckRootKey(HWND hwnd) -{ - if (hkey_root==HKEY_CURRENT_USER) { - ; // as above, always install ourself in HKCU too. - } else if (hkey_root==HKEY_LOCAL_MACHINE) { - // Python in HKLM, but we may or may not have permissions there. - // Open the uninstall key with 'create' permissions - if this fails, - // we don't have permission. - if (!HasLocalMachinePrivs()) - hkey_root = HKEY_CURRENT_USER; - } else { - MessageBox(hwnd, "Don't know Python's installation type", - "Strange", MB_OK | MB_ICONSTOP); - /* Default to wherever they can, but preferring HKLM */ - hkey_root = HasLocalMachinePrivs() ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; - } -} - -/* Return the installation scheme depending on Python version number */ -SCHEME *GetScheme(int major, int minor) -{ - if (major > 2) - return new_scheme; - else if((major == 2) && (minor >= 2)) - return new_scheme; - return old_scheme; -} - -INT_PTR CALLBACK -SelectPythonDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LPNMHDR lpnm; - - switch (msg) { - case WM_INITDIALOG: - if (hBitmap) - SendDlgItemMessage(hwnd, IDC_BITMAP, STM_SETIMAGE, - IMAGE_BITMAP, (LPARAM)hBitmap); - GetPythonVersions(GetDlgItem(hwnd, IDC_VERSIONS_LIST), - HKEY_LOCAL_MACHINE, target_version); - GetPythonVersions(GetDlgItem(hwnd, IDC_VERSIONS_LIST), - HKEY_CURRENT_USER, target_version); - { /* select the last entry which is the highest python - version found */ - int count; - count = SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST, - LB_GETCOUNT, 0, 0); - if (count && count != LB_ERR) - SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST, LB_SETCURSEL, - count-1, 0); - - /* If a specific Python version is required, - * display a prominent notice showing this fact. - */ - if (target_version && target_version[0]) { - char buffer[4096]; - wsprintf(buffer, - "Python %s is required for this package. " - "Select installation to use:", - target_version); - SetDlgItemText(hwnd, IDC_TITLE, buffer); - } - - if (count == 0) { - char Buffer[4096]; - const char *msg; - if (target_version && target_version[0]) { - wsprintf(Buffer, - "Python version %s required, which was not found" - " in the registry.", target_version); - msg = Buffer; - } else - msg = "No Python installation found in the registry."; - MessageBox(hwnd, msg, "Cannot install", - MB_OK | MB_ICONSTOP); - } - } - goto UpdateInstallDir; - break; - - case WM_COMMAND: - switch (LOWORD(wParam)) { -/* - case IDC_OTHERPYTHON: - if (GetOtherPythonVersion(GetDlgItem(hwnd, IDC_VERSIONS_LIST), - target_version)) - goto UpdateInstallDir; - break; -*/ - case IDC_VERSIONS_LIST: - switch (HIWORD(wParam)) { - int id; - case LBN_SELCHANGE: - UpdateInstallDir: - PropSheet_SetWizButtons(GetParent(hwnd), - PSWIZB_BACK | PSWIZB_NEXT); - id = SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST, - LB_GETCURSEL, 0, 0); - if (id == LB_ERR) { - PropSheet_SetWizButtons(GetParent(hwnd), - PSWIZB_BACK); - SetDlgItemText(hwnd, IDC_PATH, ""); - SetDlgItemText(hwnd, IDC_INSTALL_PATH, ""); - strcpy(python_dir, ""); - strcpy(pythondll, ""); - } else { - char *pbuf; - int result; - InstalledVersionInfo *ivi; - PropSheet_SetWizButtons(GetParent(hwnd), - PSWIZB_BACK | PSWIZB_NEXT); - /* Get the python directory */ - ivi = (InstalledVersionInfo *) - SendDlgItemMessage(hwnd, - IDC_VERSIONS_LIST, - LB_GETITEMDATA, - id, - 0); - hkey_root = ivi->hkey; - strcpy(python_dir, ivi->prefix); - SetDlgItemText(hwnd, IDC_PATH, python_dir); - /* retrieve the python version and pythondll to use */ - result = SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST, - LB_GETTEXTLEN, (WPARAM)id, 0); - pbuf = (char *)malloc(result + 1); - if (pbuf) { - /* guess the name of the python-dll */ - SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST, - LB_GETTEXT, (WPARAM)id, - (LPARAM)pbuf); - result = sscanf(pbuf, "Python Version %d.%d", - &py_major, &py_minor); - if (result == 2) { -#ifdef _DEBUG - wsprintf(pythondll, "python%d%d_d.dll", - py_major, py_minor); -#else - wsprintf(pythondll, "python%d%d.dll", - py_major, py_minor); -#endif - } - free(pbuf); - } else - strcpy(pythondll, ""); - /* retrieve the scheme for this version */ - { - char install_path[_MAX_PATH]; - SCHEME *scheme = GetScheme(py_major, py_minor); - strcpy(install_path, python_dir); - if (install_path[strlen(install_path)-1] != '\\') - strcat(install_path, "\\"); - strcat(install_path, scheme[0].prefix); - SetDlgItemText(hwnd, IDC_INSTALL_PATH, install_path); - } - } - } - break; - } - return 0; - - case WM_NOTIFY: - lpnm = (LPNMHDR) lParam; - - switch (lpnm->code) { - int id; - case PSN_SETACTIVE: - id = SendDlgItemMessage(hwnd, IDC_VERSIONS_LIST, - LB_GETCURSEL, 0, 0); - if (id == LB_ERR) - PropSheet_SetWizButtons(GetParent(hwnd), - PSWIZB_BACK); - else - PropSheet_SetWizButtons(GetParent(hwnd), - PSWIZB_BACK | PSWIZB_NEXT); - break; - - case PSN_WIZNEXT: - break; - - case PSN_WIZFINISH: - break; - - case PSN_RESET: - break; - - default: - break; - } - } - return 0; -} - -static BOOL OpenLogfile(char *dir) -{ - char buffer[_MAX_PATH+1]; - time_t ltime; - struct tm *now; - long result; - HKEY hKey, hSubkey; - char subkey_name[256]; - static char KeyName[] = - "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; - const char *root_name = (hkey_root==HKEY_LOCAL_MACHINE ? - "HKEY_LOCAL_MACHINE" : "HKEY_CURRENT_USER"); - DWORD disposition; - - /* Use Create, as the Uninstall subkey may not exist under HKCU. - Use CreateKeyEx, so we can specify a SAM specifying write access - */ - result = RegCreateKeyEx(hkey_root, - KeyName, - 0, /* reserved */ - NULL, /* class */ - 0, /* options */ - KEY_CREATE_SUB_KEY, /* sam */ - NULL, /* security */ - &hKey, /* result key */ - NULL); /* disposition */ - if (result != ERROR_SUCCESS) { - if (result == ERROR_ACCESS_DENIED) { - /* This should no longer be able to happen - we have already - checked if they have permissions in HKLM, and all users - should have write access to HKCU. - */ - MessageBox(GetFocus(), - "You do not seem to have sufficient access rights\n" - "on this machine to install this software", - NULL, - MB_OK | MB_ICONSTOP); - return FALSE; - } else { - MessageBox(GetFocus(), KeyName, "Could not open key", MB_OK); - } - } - - sprintf(buffer, "%s\\%s-wininst.log", dir, meta_name); - logfile = fopen(buffer, "a"); - if (!logfile) { - char error[1024]; - - sprintf(error, "Can't create \"%s\" (%s).\n\n" - "Try to execute the installer as administrator.", - buffer, strerror(errno)); - MessageBox(GetFocus(), error, NULL, MB_OK | MB_ICONSTOP); - return FALSE; - } - - time(<ime); - now = localtime(<ime); - strftime(buffer, sizeof(buffer), - "*** Installation started %Y/%m/%d %H:%M ***\n", - localtime(<ime)); - fprintf(logfile, buffer); - fprintf(logfile, "Source: %s\n", modulename); - - /* Root key must be first entry processed by uninstaller. */ - fprintf(logfile, "999 Root Key: %s\n", root_name); - - sprintf(subkey_name, "%s-py%d.%d", meta_name, py_major, py_minor); - - result = RegCreateKeyEx(hKey, subkey_name, - 0, NULL, 0, - KEY_WRITE, - NULL, - &hSubkey, - &disposition); - - if (result != ERROR_SUCCESS) - MessageBox(GetFocus(), subkey_name, "Could not create key", MB_OK); - - RegCloseKey(hKey); - - if (disposition == REG_CREATED_NEW_KEY) - fprintf(logfile, "020 Reg DB Key: [%s]%s\n", KeyName, subkey_name); - - sprintf(buffer, "Python %d.%d %s", py_major, py_minor, title); - - result = RegSetValueEx(hSubkey, "DisplayName", - 0, - REG_SZ, - buffer, - strlen(buffer)+1); - - if (result != ERROR_SUCCESS) - MessageBox(GetFocus(), buffer, "Could not set key value", MB_OK); - - fprintf(logfile, "040 Reg DB Value: [%s\\%s]%s=%s\n", - KeyName, subkey_name, "DisplayName", buffer); - - { - FILE *fp; - sprintf(buffer, "%s\\Remove%s.exe", dir, meta_name); - fp = fopen(buffer, "wb"); - fwrite(arc_data, exe_size, 1, fp); - fclose(fp); - - sprintf(buffer, "\"%s\\Remove%s.exe\" -u \"%s\\%s-wininst.log\"", - dir, meta_name, dir, meta_name); - - result = RegSetValueEx(hSubkey, "UninstallString", - 0, - REG_SZ, - buffer, - strlen(buffer)+1); - - if (result != ERROR_SUCCESS) - MessageBox(GetFocus(), buffer, "Could not set key value", MB_OK); - - fprintf(logfile, "040 Reg DB Value: [%s\\%s]%s=%s\n", - KeyName, subkey_name, "UninstallString", buffer); - } - return TRUE; -} - -static void CloseLogfile(void) -{ - char buffer[_MAX_PATH+1]; - time_t ltime; - struct tm *now; - - time(<ime); - now = localtime(<ime); - strftime(buffer, sizeof(buffer), - "*** Installation finished %Y/%m/%d %H:%M ***\n", - localtime(<ime)); - fprintf(logfile, buffer); - if (logfile) - fclose(logfile); -} - -INT_PTR CALLBACK -InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LPNMHDR lpnm; - char Buffer[4096]; - SCHEME *scheme; - - switch (msg) { - case WM_INITDIALOG: - if (hBitmap) - SendDlgItemMessage(hwnd, IDC_BITMAP, STM_SETIMAGE, - IMAGE_BITMAP, (LPARAM)hBitmap); - wsprintf(Buffer, - "Click Next to begin the installation of %s. " - "If you want to review or change any of your " - " installation settings, click Back. " - "Click Cancel to exit the wizard.", - meta_name); - SetDlgItemText(hwnd, IDC_TITLE, Buffer); - SetDlgItemText(hwnd, IDC_INFO, "Ready to install"); - break; - - case WM_NUMFILES: - SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETRANGE, 0, lParam); - PumpMessages(); - return TRUE; - - case WM_NEXTFILE: - SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETPOS, wParam, - 0); - SetDlgItemText(hwnd, IDC_INFO, (LPSTR)lParam); - PumpMessages(); - return TRUE; - - case WM_NOTIFY: - lpnm = (LPNMHDR) lParam; - - switch (lpnm->code) { - case PSN_SETACTIVE: - PropSheet_SetWizButtons(GetParent(hwnd), - PSWIZB_BACK | PSWIZB_NEXT); - break; - - case PSN_WIZFINISH: - break; - - case PSN_WIZNEXT: - /* Handle a Next button click here */ - hDialog = hwnd; - success = TRUE; - - /* Disable the buttons while we work. Sending CANCELTOCLOSE has - the effect of disabling the cancel button, which is a) as we - do everything synchronously we can't cancel, and b) the next - step is 'finished', when it is too late to cancel anyway. - The next step being 'Finished' means we also don't need to - restore the button state back */ - PropSheet_SetWizButtons(GetParent(hwnd), 0); - SendMessage(GetParent(hwnd), PSM_CANCELTOCLOSE, 0, 0); - /* Make sure the installation directory name ends in a */ - /* backslash */ - if (python_dir[strlen(python_dir)-1] != '\\') - strcat(python_dir, "\\"); - /* Strip the trailing backslash again */ - python_dir[strlen(python_dir)-1] = '\0'; - - CheckRootKey(hwnd); - - if (!OpenLogfile(python_dir)) - break; - -/* - * The scheme we have to use depends on the Python version... - if sys.version < "2.2": - WINDOWS_SCHEME = { - 'purelib': '$base', - 'platlib': '$base', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } - else: - WINDOWS_SCHEME = { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', - } -*/ - scheme = GetScheme(py_major, py_minor); - /* Run the pre-install script. */ - if (pre_install_script && *pre_install_script) { - SetDlgItemText (hwnd, IDC_TITLE, - "Running pre-installation script"); - run_simple_script(pre_install_script); - } - if (!success) { - break; - } - /* Extract all files from the archive */ - SetDlgItemText(hwnd, IDC_TITLE, "Installing files..."); - if (!unzip_archive (scheme, - python_dir, arc_data, - arc_size, notify)) - set_failure_reason("Failed to unzip installation files"); - /* Compile the py-files */ - if (success && pyc_compile) { - int errors; - HINSTANCE hPython; - SetDlgItemText(hwnd, IDC_TITLE, - "Compiling files to .pyc..."); - - SetDlgItemText(hDialog, IDC_INFO, "Loading python..."); - hPython = LoadPythonDll(pythondll); - if (hPython) { - errors = compile_filelist(hPython, FALSE); - FreeLibrary(hPython); - } - /* Compilation errors are intentionally ignored: - * Python2.0 contains a bug which will result - * in sys.path containing garbage under certain - * circumstances, and an error message will only - * confuse the user. - */ - } - if (success && pyo_compile) { - int errors; - HINSTANCE hPython; - SetDlgItemText(hwnd, IDC_TITLE, - "Compiling files to .pyo..."); - - SetDlgItemText(hDialog, IDC_INFO, "Loading python..."); - hPython = LoadPythonDll(pythondll); - if (hPython) { - errors = compile_filelist(hPython, TRUE); - FreeLibrary(hPython); - } - /* Errors ignored: see above */ - } - - - break; - - case PSN_RESET: - break; - - default: - break; - } - } - return 0; -} - - -INT_PTR CALLBACK -FinishedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LPNMHDR lpnm; - - switch (msg) { - case WM_INITDIALOG: - if (hBitmap) - SendDlgItemMessage(hwnd, IDC_BITMAP, STM_SETIMAGE, - IMAGE_BITMAP, (LPARAM)hBitmap); - if (!success) - SetDlgItemText(hwnd, IDC_INFO, get_failure_reason()); - - /* async delay: will show the dialog box completely before - the install_script is started */ - PostMessage(hwnd, WM_USER, 0, 0L); - return TRUE; - - case WM_USER: - - if (success && install_script && install_script[0]) { - char fname[MAX_PATH]; - char *buffer; - HCURSOR hCursor; - int result; - - char *argv[3] = {NULL, "-install", NULL}; - - SetDlgItemText(hwnd, IDC_TITLE, - "Please wait while running postinstall script..."); - strcpy(fname, python_dir); - strcat(fname, "\\Scripts\\"); - strcat(fname, install_script); - - if (logfile) - fprintf(logfile, "300 Run Script: [%s]%s\n", pythondll, fname); - - hCursor = SetCursor(LoadCursor(NULL, IDC_WAIT)); - - argv[0] = fname; - - result = run_installscript(fname, 2, argv, &buffer); - if (0 != result) { - fprintf(stderr, "*** run_installscript: internal error 0x%X ***\n", result); - } - if (buffer) - SetDlgItemText(hwnd, IDC_INFO, buffer); - SetDlgItemText(hwnd, IDC_TITLE, - "Postinstall script finished.\n" - "Click the Finish button to exit the Setup wizard."); - - free(buffer); - SetCursor(hCursor); - CloseLogfile(); - } - - return TRUE; - - case WM_NOTIFY: - lpnm = (LPNMHDR) lParam; - - switch (lpnm->code) { - case PSN_SETACTIVE: /* Enable the Finish button */ - PropSheet_SetWizButtons(GetParent(hwnd), PSWIZB_FINISH); - break; - - case PSN_WIZNEXT: - break; - - case PSN_WIZFINISH: - break; - - case PSN_RESET: - break; - - default: - break; - } - } - return 0; -} - -void RunWizard(HWND hwnd) -{ - PROPSHEETPAGE psp = {0}; - HPROPSHEETPAGE ahpsp[4] = {0}; - PROPSHEETHEADER psh = {0}; - - /* Display module information */ - psp.dwSize = sizeof(psp); - psp.dwFlags = PSP_DEFAULT|PSP_HIDEHEADER; - psp.hInstance = GetModuleHandle (NULL); - psp.lParam = 0; - psp.pfnDlgProc = IntroDlgProc; - psp.pszTemplate = MAKEINTRESOURCE(IDD_INTRO); - - ahpsp[0] = CreatePropertySheetPage(&psp); - - /* Select python version to use */ - psp.dwFlags = PSP_DEFAULT|PSP_HIDEHEADER; - psp.pszTemplate = MAKEINTRESOURCE(IDD_SELECTPYTHON); - psp.pfnDlgProc = SelectPythonDlgProc; - - ahpsp[1] = CreatePropertySheetPage(&psp); - - /* Install the files */ - psp.dwFlags = PSP_DEFAULT|PSP_HIDEHEADER; - psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFILES); - psp.pfnDlgProc = InstallFilesDlgProc; - - ahpsp[2] = CreatePropertySheetPage(&psp); - - /* Show success or failure */ - psp.dwFlags = PSP_DEFAULT|PSP_HIDEHEADER; - psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHED); - psp.pfnDlgProc = FinishedDlgProc; - - ahpsp[3] = CreatePropertySheetPage(&psp); - - /* Create the property sheet */ - psh.dwSize = sizeof(psh); - psh.hInstance = GetModuleHandle(NULL); - psh.hwndParent = hwnd; - psh.phpage = ahpsp; - psh.dwFlags = PSH_WIZARD/*97*//*|PSH_WATERMARK|PSH_HEADER*/; - psh.pszbmWatermark = NULL; - psh.pszbmHeader = NULL; - psh.nStartPage = 0; - psh.nPages = 4; - - PropertySheet(&psh); -} - -// subtly different from HasLocalMachinePrivs(), in that after executing -// an 'elevated' process, we expect this to return TRUE - but there is no -// such implication for HasLocalMachinePrivs -BOOL MyIsUserAnAdmin() -{ - typedef BOOL (WINAPI *PFNIsUserAnAdmin)(); - static PFNIsUserAnAdmin pfnIsUserAnAdmin = NULL; - HMODULE shell32; - // This function isn't guaranteed to be available (and it can't hurt - // to leave the library loaded) - if (0 == (shell32=LoadLibrary("shell32.dll"))) - return FALSE; - if (NULL == (pfnIsUserAnAdmin=(PFNIsUserAnAdmin)GetProcAddress(shell32, "IsUserAnAdmin"))) - return FALSE; - return (*pfnIsUserAnAdmin)(); -} - -// Some magic for Vista's UAC. If there is a target_version, and -// if that target version is installed in the registry under -// HKLM, and we are not current administrator, then -// re-execute ourselves requesting elevation. -// Split into 2 functions - "should we elevate" and "spawn elevated" - -// Returns TRUE if we should spawn an elevated child -BOOL NeedAutoUAC() -{ - HKEY hk; - char key_name[80]; - // no Python version info == we can't know yet. - if (target_version[0] == '\0') - return FALSE; - // see how python is current installed - wsprintf(key_name, - "Software\\Python\\PythonCore\\%s\\InstallPath", - target_version); - if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, - key_name, 0, KEY_READ, &hk)) - return FALSE; - RegCloseKey(hk); - // Python is installed in HKLM - we must elevate. - return TRUE; -} - -// Spawn ourself as an elevated application. On failure, a message is -// displayed to the user - but this app will always terminate, even -// on error. -void SpawnUAC() -{ - // interesting failure scenario that has been seen: initial executable - // runs from a network drive - but once elevated, that network share - // isn't seen, and ShellExecute fails with SE_ERR_ACCESSDENIED. - int ret = (int)ShellExecute(0, "runas", modulename, "", NULL, - SW_SHOWNORMAL); - if (ret <= 32) { - char msg[128]; - wsprintf(msg, "Failed to start elevated process (ShellExecute returned %d)", ret); - MessageBox(0, msg, "Setup", MB_OK | MB_ICONERROR); - } -} - -int DoInstall(void) -{ - char ini_buffer[4096]; - - /* Read installation information */ - GetPrivateProfileString("Setup", "title", "", ini_buffer, - sizeof(ini_buffer), ini_file); - unescape(title, ini_buffer, sizeof(title)); - - GetPrivateProfileString("Setup", "info", "", ini_buffer, - sizeof(ini_buffer), ini_file); - unescape(info, ini_buffer, sizeof(info)); - - GetPrivateProfileString("Setup", "build_info", "", build_info, - sizeof(build_info), ini_file); - - pyc_compile = GetPrivateProfileInt("Setup", "target_compile", 1, - ini_file); - pyo_compile = GetPrivateProfileInt("Setup", "target_optimize", 1, - ini_file); - - GetPrivateProfileString("Setup", "target_version", "", - target_version, sizeof(target_version), - ini_file); - - GetPrivateProfileString("metadata", "name", "", - meta_name, sizeof(meta_name), - ini_file); - - GetPrivateProfileString("Setup", "install_script", "", - install_script, sizeof(install_script), - ini_file); - - GetPrivateProfileString("Setup", "user_access_control", "", - user_access_control, sizeof(user_access_control), ini_file); - - strcat(target_version, REGISTRY_SUFFIX_6432); - - // See if we need to do the Vista UAC magic. - if (strcmp(user_access_control, "force")==0) { - if (!MyIsUserAnAdmin()) { - SpawnUAC(); - return 0; - } - // already admin - keep going - } else if (strcmp(user_access_control, "auto")==0) { - // Check if it looks like we need UAC control, based - // on how Python itself was installed. - if (!MyIsUserAnAdmin() && NeedAutoUAC()) { - SpawnUAC(); - return 0; - } - } else { - // display a warning about unknown values - only the developer - // of the extension will see it (until they fix it!) - if (user_access_control[0] && strcmp(user_access_control, "none") != 0) { - MessageBox(GetFocus(), "Bad user_access_control value", "oops", MB_OK); - // nothing to do. - } - } - - hwndMain = CreateBackground(title); - - RunWizard(hwndMain); - - /* Clean up */ - UnmapViewOfFile(arc_data); - if (ini_file) - DeleteFile(ini_file); - - if (hBitmap) - DeleteObject(hBitmap); - - return 0; -} - -/*********************** uninstall section ******************************/ - -static int compare(const void *p1, const void *p2) -{ - return strcmp(*(char **)p2, *(char **)p1); -} - -/* - * Commit suicide (remove the uninstaller itself). - * - * Create a batch file to first remove the uninstaller - * (will succeed after it has finished), then the batch file itself. - * - * This technique has been demonstrated by Jeff Richter, - * MSJ 1/1996 - */ -void remove_exe(void) -{ - char exename[_MAX_PATH]; - char batname[_MAX_PATH]; - FILE *fp; - STARTUPINFO si; - PROCESS_INFORMATION pi; - - GetModuleFileName(NULL, exename, sizeof(exename)); - sprintf(batname, "%s.bat", exename); - fp = fopen(batname, "w"); - fprintf(fp, ":Repeat\n"); - fprintf(fp, "del \"%s\"\n", exename); - fprintf(fp, "if exist \"%s\" goto Repeat\n", exename); - fprintf(fp, "del \"%s\"\n", batname); - fclose(fp); - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - si.dwFlags = STARTF_USESHOWWINDOW; - si.wShowWindow = SW_HIDE; - if (CreateProcess(NULL, - batname, - NULL, - NULL, - FALSE, - CREATE_SUSPENDED | IDLE_PRIORITY_CLASS, - NULL, - "\\", - &si, - &pi)) { - SetThreadPriority(pi.hThread, THREAD_PRIORITY_IDLE); - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); - SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); - CloseHandle(pi.hProcess); - ResumeThread(pi.hThread); - CloseHandle(pi.hThread); - } -} - -void DeleteRegistryKey(char *string) -{ - char *keyname; - char *subkeyname; - char *delim; - HKEY hKey; - long result; - char *line; - - line = strdup(string); /* so we can change it */ - - keyname = strchr(line, '['); - if (!keyname) - return; - ++keyname; - - subkeyname = strchr(keyname, ']'); - if (!subkeyname) - return; - *subkeyname++='\0'; - delim = strchr(subkeyname, '\n'); - if (delim) - *delim = '\0'; - - result = RegOpenKeyEx(hkey_root, - keyname, - 0, - KEY_WRITE, - &hKey); - - if (result != ERROR_SUCCESS) - MessageBox(GetFocus(), string, "Could not open key", MB_OK); - else { - result = RegDeleteKey(hKey, subkeyname); - if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) - MessageBox(GetFocus(), string, "Could not delete key", MB_OK); - RegCloseKey(hKey); - } - free(line); -} - -void DeleteRegistryValue(char *string) -{ - char *keyname; - char *valuename; - char *value; - HKEY hKey; - long result; - char *line; - - line = strdup(string); /* so we can change it */ - -/* Format is 'Reg DB Value: [key]name=value' */ - keyname = strchr(line, '['); - if (!keyname) - return; - ++keyname; - valuename = strchr(keyname, ']'); - if (!valuename) - return; - *valuename++ = '\0'; - value = strchr(valuename, '='); - if (!value) - return; - - *value++ = '\0'; - - result = RegOpenKeyEx(hkey_root, - keyname, - 0, - KEY_WRITE, - &hKey); - if (result != ERROR_SUCCESS) - MessageBox(GetFocus(), string, "Could not open key", MB_OK); - else { - result = RegDeleteValue(hKey, valuename); - if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) - MessageBox(GetFocus(), string, "Could not delete value", MB_OK); - RegCloseKey(hKey); - } - free(line); -} - -BOOL MyDeleteFile(char *line) -{ - char *pathname = strchr(line, ':'); - if (!pathname) - return FALSE; - ++pathname; - while (isspace(*pathname)) - ++pathname; - return DeleteFile(pathname); -} - -BOOL MyRemoveDirectory(char *line) -{ - char *pathname = strchr(line, ':'); - if (!pathname) - return FALSE; - ++pathname; - while (isspace(*pathname)) - ++pathname; - return RemoveDirectory(pathname); -} - -BOOL Run_RemoveScript(char *line) -{ - char *dllname; - char *scriptname; - static char lastscript[MAX_PATH]; - -/* Format is 'Run Scripts: [pythondll]scriptname' */ -/* XXX Currently, pythondll carries no path!!! */ - dllname = strchr(line, '['); - if (!dllname) - return FALSE; - ++dllname; - scriptname = strchr(dllname, ']'); - if (!scriptname) - return FALSE; - *scriptname++ = '\0'; - /* this function may be called more than one time with the same - script, only run it one time */ - if (strcmp(lastscript, scriptname)) { - char *argv[3] = {NULL, "-remove", NULL}; - char *buffer = NULL; - - argv[0] = scriptname; - - if (0 != run_installscript(scriptname, 2, argv, &buffer)) - fprintf(stderr, "*** Could not run installation script ***"); - - if (buffer && buffer[0]) - MessageBox(GetFocus(), buffer, "uninstall-script", MB_OK); - free(buffer); - - strcpy(lastscript, scriptname); - } - return TRUE; -} - -int DoUninstall(int argc, char **argv) -{ - FILE *logfile; - char buffer[4096]; - int nLines = 0; - int i; - char *cp; - int nFiles = 0; - int nDirs = 0; - int nErrors = 0; - char **lines; - int lines_buffer_size = 10; - - if (argc != 3) { - MessageBox(NULL, - "Wrong number of args", - NULL, - MB_OK); - return 1; /* Error */ - } - if (strcmp(argv[1], "-u")) { - MessageBox(NULL, - "2. arg is not -u", - NULL, - MB_OK); - return 1; /* Error */ - } - - logfile = fopen(argv[2], "r"); - if (!logfile) { - MessageBox(NULL, - "could not open logfile", - NULL, - MB_OK); - return 1; /* Error */ - } - - lines = (char **)malloc(sizeof(char *) * lines_buffer_size); - if (!lines) - return SystemError(0, "Out of memory"); - - /* Read the whole logfile, reallocating the buffer */ - while (fgets(buffer, sizeof(buffer), logfile)) { - int len = strlen(buffer); - /* remove trailing white space */ - while (isspace(buffer[len-1])) - len -= 1; - buffer[len] = '\0'; - lines[nLines++] = strdup(buffer); - if (nLines >= lines_buffer_size) { - lines_buffer_size += 10; - lines = (char **)realloc(lines, - sizeof(char *) * lines_buffer_size); - if (!lines) - return SystemError(0, "Out of memory"); - } - } - fclose(logfile); - - /* Sort all the lines, so that highest 3-digit codes are first */ - qsort(&lines[0], nLines, sizeof(char *), - compare); - - if (IDYES != MessageBox(NULL, - "Are you sure you want to remove\n" - "this package from your computer?", - "Please confirm", - MB_YESNO | MB_ICONQUESTION)) - return 0; - - hkey_root = HKEY_LOCAL_MACHINE; - cp = ""; - for (i = 0; i < nLines; ++i) { - /* Ignore duplicate lines */ - if (strcmp(cp, lines[i])) { - int ign; - cp = lines[i]; - /* Parse the lines */ - if (2 == sscanf(cp, "%d Root Key: %s", &ign, &buffer)) { - if (strcmp(buffer, "HKEY_CURRENT_USER")==0) - hkey_root = HKEY_CURRENT_USER; - else { - // HKLM - check they have permissions. - if (!HasLocalMachinePrivs()) { - MessageBox(GetFocus(), - "You do not seem to have sufficient access rights\n" - "on this machine to uninstall this software", - NULL, - MB_OK | MB_ICONSTOP); - return 1; /* Error */ - } - } - } else if (2 == sscanf(cp, "%d Made Dir: %s", &ign, &buffer)) { - if (MyRemoveDirectory(cp)) - ++nDirs; - else { - int code = GetLastError(); - if (code != 2 && code != 3) { /* file or path not found */ - ++nErrors; - } - } - } else if (2 == sscanf(cp, "%d File Copy: %s", &ign, &buffer)) { - if (MyDeleteFile(cp)) - ++nFiles; - else { - int code = GetLastError(); - if (code != 2 && code != 3) { /* file or path not found */ - ++nErrors; - } - } - } else if (2 == sscanf(cp, "%d File Overwrite: %s", &ign, &buffer)) { - if (MyDeleteFile(cp)) - ++nFiles; - else { - int code = GetLastError(); - if (code != 2 && code != 3) { /* file or path not found */ - ++nErrors; - } - } - } else if (2 == sscanf(cp, "%d Reg DB Key: %s", &ign, &buffer)) { - DeleteRegistryKey(cp); - } else if (2 == sscanf(cp, "%d Reg DB Value: %s", &ign, &buffer)) { - DeleteRegistryValue(cp); - } else if (2 == sscanf(cp, "%d Run Script: %s", &ign, &buffer)) { - Run_RemoveScript(cp); - } - } - } - - if (DeleteFile(argv[2])) { - ++nFiles; - } else { - ++nErrors; - SystemError(GetLastError(), argv[2]); - } - if (nErrors) - wsprintf(buffer, - "%d files and %d directories removed\n" - "%d files or directories could not be removed", - nFiles, nDirs, nErrors); - else - wsprintf(buffer, "%d files and %d directories removed", - nFiles, nDirs); - MessageBox(NULL, buffer, "Uninstall Finished!", - MB_OK | MB_ICONINFORMATION); - remove_exe(); - return 0; -} - -int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, - LPSTR lpszCmdLine, INT nCmdShow) -{ - extern int __argc; - extern char **__argv; - char *basename; - - GetModuleFileName(NULL, modulename, sizeof(modulename)); - GetModuleFileNameW(NULL, wmodulename, sizeof(wmodulename)/sizeof(wmodulename[0])); - - /* Map the executable file to memory */ - arc_data = MapExistingFile(modulename, &arc_size); - if (!arc_data) { - SystemError(GetLastError(), "Could not open archive"); - return 1; - } - - /* OK. So this program can act as installer (self-extracting - * zip-file, or as uninstaller when started with '-u logfile' - * command line flags. - * - * The installer is usually started without command line flags, - * and the uninstaller is usually started with the '-u logfile' - * flag. What to do if some innocent user double-clicks the - * exe-file? - * The following implements a defensive strategy... - */ - - /* Try to extract the configuration data into a temporary file */ - if (ExtractInstallData(arc_data, arc_size, &exe_size, - &ini_file, &pre_install_script)) - return DoInstall(); - - if (!ini_file && __argc > 1) { - return DoUninstall(__argc, __argv); - } - - - basename = strrchr(modulename, '\\'); - if (basename) - ++basename; - - /* Last guess about the purpose of this program */ - if (basename && (0 == strncmp(basename, "Remove", 6))) - SystemError(0, "This program is normally started by windows"); - else - SystemError(0, "Setup program invalid or damaged"); - return 1; -} diff --git a/PC/bdist_wininst/install.rc b/PC/bdist_wininst/install.rc deleted file mode 100644 index dfa2ffcd7415d..0000000000000 --- a/PC/bdist_wininst/install.rc +++ /dev/null @@ -1,77 +0,0 @@ -/* - IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST - BE REBUILT AS WELL. - - IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE - CHECKED IN AS WELL! -*/ - -#include -#include "resource.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) - -IDB_BITMAP BITMAP DISCARDABLE "PythonPowered.bmp" - - -IDD_INTRO DIALOGEX 0, 0, 379, 178 -STYLE WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Setup" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "This Wizard will install %s on your computer. Click Next to continue or Cancel to exit the Setup Wizard.", - IDC_TITLE,125,10,247,20,NOT WS_GROUP - EDITTEXT IDC_INTRO_TEXT,125,31,247,131,ES_MULTILINE | ES_READONLY | - WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP - CONTROL 110,IDC_BITMAP,"Static",SS_BITMAP | SS_CENTERIMAGE,6,8, - 104,163,WS_EX_CLIENTEDGE - LTEXT "",IDC_BUILD_INFO,125,163,247,8 -END - -IDD_SELECTPYTHON DIALOGEX 0, 0, 379, 178 -STYLE WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Setup" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Select python installation to use:",IDC_TITLE,125,10, - 247,12,NOT WS_GROUP - EDITTEXT IDC_PATH,191,136,181,14,ES_AUTOHSCROLL | ES_READONLY - LTEXT "Python Directory:",IDC_STATIC,125,137,55,8 - LISTBOX IDC_VERSIONS_LIST,125,24,247,106,LBS_SORT | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - CONTROL 110,IDC_BITMAP,"Static",SS_BITMAP | SS_CENTERIMAGE,6,8, - 104,163,WS_EX_CLIENTEDGE - EDITTEXT IDC_INSTALL_PATH,191,157,181,14,ES_AUTOHSCROLL | - ES_READONLY - LTEXT "Installation Directory:",IDC_STATIC,125,158,66,8 - PUSHBUTTON "Find other ...",IDC_OTHERPYTHON,322,7,50,14,NOT - WS_VISIBLE -END - -IDD_INSTALLFILES DIALOGEX 0, 0, 379, 178 -STYLE WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Setup" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Click Next to begin the installation. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the Wizard.", - IDC_TITLE,125,10,246,31,NOT WS_GROUP - CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 125,157,246,14 - CTEXT "Installation progress:",IDC_INFO,125,137,246,8 - CONTROL 110,IDC_BITMAP,"Static",SS_BITMAP | SS_CENTERIMAGE,6,8, - 104,163,WS_EX_CLIENTEDGE -END - -IDD_FINISHED DIALOGEX 0, 0, 379, 178 -STYLE WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Setup" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Click the Finish button to exit the Setup wizard.", - IDC_TITLE,125,10,247,31,NOT WS_GROUP - CONTROL 110,IDC_BITMAP,"Static",SS_BITMAP | SS_CENTERIMAGE,6,8, - 104,163,WS_EX_CLIENTEDGE - EDITTEXT IDC_INFO,125,40,247,131,ES_MULTILINE | ES_READONLY | - WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP -END diff --git a/PC/bdist_wininst/resource.h b/PC/bdist_wininst/resource.h deleted file mode 100644 index 86aeabb13ad5f..0000000000000 --- a/PC/bdist_wininst/resource.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST - BE REBUILT AS WELL. - - IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE - CHECKED IN AS WELL! -*/ - -#define IDD_DIALOG1 101 -#define IDB_BITMAP1 103 -#define IDD_INTRO 107 -#define IDD_SELECTPYTHON 108 -#define IDD_INSTALLFILES 109 -#define IDD_FINISHED 110 -#define IDB_BITMAP 110 -#define IDC_EDIT1 1000 -#define IDC_TITLE 1000 -#define IDC_START 1001 -#define IDC_PROGRESS 1003 -#define IDC_INFO 1004 -#define IDC_PYTHON15 1006 -#define IDC_PATH 1007 -#define IDC_PYTHON16 1008 -#define IDC_INSTALL_PATH 1008 -#define IDC_PYTHON20 1009 -#define IDC_BROWSE 1010 -#define IDC_INTRO_TEXT 1021 -#define IDC_VERSIONS_LIST 1022 -#define IDC_BUILD_INFO 1024 -#define IDC_BITMAP 1025 -#define IDC_OTHERPYTHON 1026 diff --git a/PC/layout/main.py b/PC/layout/main.py index 8c69c91542d24..fb6f5265859ff 100644 --- a/PC/layout/main.py +++ b/PC/layout/main.py @@ -33,9 +33,6 @@ from .support.props import * from .support.nuspec import * -BDIST_WININST_FILES_ONLY = FileNameSet("wininst-*", "bdist_wininst.py") -BDIST_WININST_STUB = "PC/layout/support/distutils.command.bdist_wininst.py" - TEST_PYDS_ONLY = FileStemSet("xxlimited", "xxlimited_35", "_ctypes_test", "_test*") TEST_DIRS_ONLY = FileNameSet("test", "tests") @@ -100,17 +97,11 @@ def _c(f): else: if f in TCLTK_FILES_ONLY: return ns.include_tcltk - if f in BDIST_WININST_FILES_ONLY: - return ns.include_bdist_wininst return True for dest, src in rglob(ns.source / "Lib", "**/*", _c): yield dest, src - if not ns.include_bdist_wininst: - src = ns.source / BDIST_WININST_STUB - yield Path("distutils/command/bdist_wininst.py"), src - def get_tcltk_lib(ns): if not ns.include_tcltk: diff --git a/PC/layout/support/distutils.command.bdist_wininst.py b/PC/layout/support/distutils.command.bdist_wininst.py deleted file mode 100644 index 6e9b49fe42df6..0000000000000 --- a/PC/layout/support/distutils.command.bdist_wininst.py +++ /dev/null @@ -1,25 +0,0 @@ -"""distutils.command.bdist_wininst - -Suppress the 'bdist_wininst' command, while still allowing -setuptools to import it without breaking.""" - -from distutils.core import Command -from distutils.errors import DistutilsPlatformError - - -class bdist_wininst(Command): - description = "create an executable installer for MS Windows" - - # Marker for tests that we have the unsupported bdist_wininst - _unsupported = True - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - raise DistutilsPlatformError( - "bdist_wininst is not supported in this Python distribution" - ) diff --git a/PC/layout/support/options.py b/PC/layout/support/options.py index 5e1543b59ccd5..9faf20c0fdc7a 100644 --- a/PC/layout/support/options.py +++ b/PC/layout/support/options.py @@ -26,7 +26,6 @@ def public(f): "venv": {"help": "venv"}, "dev": {"help": "headers and libs"}, "symbols": {"help": "symbols"}, - "bdist-wininst": {"help": "bdist_wininst support"}, "underpth": {"help": "a python._pth file", "not-in-all": True}, "launchers": {"help": "specific launchers"}, "appxmanifest": {"help": "an appxmanifest"}, @@ -81,7 +80,6 @@ def public(f): "venv", "dev", "symbols", - "bdist-wininst", "chm", ], }, diff --git a/PCbuild/lib.pyproj b/PCbuild/lib.pyproj index 1be60b1a11b93..eba4d7591568d 100644 --- a/PCbuild/lib.pyproj +++ b/PCbuild/lib.pyproj @@ -162,7 +162,6 @@ - @@ -204,7 +203,6 @@ - diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln index 4b6dc1e6771dc..3507b972797c9 100644 --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln @@ -53,8 +53,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "..\PC\bdist_wininst\bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcxproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}" diff --git a/Tools/msi/distutils.command.bdist_wininst.py b/Tools/msi/distutils.command.bdist_wininst.py deleted file mode 100644 index 548fdd0cc432e..0000000000000 --- a/Tools/msi/distutils.command.bdist_wininst.py +++ /dev/null @@ -1,23 +0,0 @@ -"""distutils.command.bdist_wininst - -Suppresses the 'bdist_wininst' command, while still allowing -setuptools to import it without breaking.""" - -from distutils.core import Command -from distutils.errors import DistutilsPlatformError - -class bdist_wininst(Command): - description = "create an executable installer for MS Windows" - - # Marker for tests that we have the unsupported bdist_wininst - _unsupported = True - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - raise DistutilsPlatformError("bdist_wininst is not supported " - "in this Python distribution") From webhook-mailer at python.org Sat Jan 9 06:26:03 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Sat, 09 Jan 2021 11:26:03 -0000 Subject: [Python-checkins] bpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170) Message-ID: https://github.com/python/cpython/commit/d16f6176abdecbb7ab231dc78beccfaa095beff6 commit: d16f6176abdecbb7ab231dc78beccfaa095beff6 branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-09T13:25:55+02:00 summary: bpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170) files: M Lib/sqlite3/dbapi2.py M Lib/sqlite3/test/dbapi.py diff --git a/Lib/sqlite3/dbapi2.py b/Lib/sqlite3/dbapi2.py index 6475f98a646f9..cfe6225f46efc 100644 --- a/Lib/sqlite3/dbapi2.py +++ b/Lib/sqlite3/dbapi2.py @@ -96,7 +96,7 @@ def enable_shared_cache(enable): "the cache=shared query parameter." ) warnings.warn(msg, DeprecationWarning, stacklevel=2) - return _old_enable_shared_cache + return _old_enable_shared_cache(enable) # Clean up namespace diff --git a/Lib/sqlite3/test/dbapi.py b/Lib/sqlite3/test/dbapi.py index 68a3062239532..39c9bf5b61143 100644 --- a/Lib/sqlite3/test/dbapi.py +++ b/Lib/sqlite3/test/dbapi.py @@ -23,6 +23,7 @@ import threading import unittest import sqlite3 as sqlite +import sys from test.support.os_helper import TESTFN, unlink @@ -82,6 +83,9 @@ def test_not_supported_error(self): sqlite.DatabaseError), "NotSupportedError is not a subclass of DatabaseError") + # sqlite3_enable_shared_cache() is deprecated on macOS and calling it may raise + # OperationalError on some buildbots. + @unittest.skipIf(sys.platform == "darwin", "shared cache is deprecated on macOS") def test_shared_cache_deprecated(self): for enable in (True, False): with self.assertWarns(DeprecationWarning) as cm: From webhook-mailer at python.org Sun Jan 10 01:59:55 2021 From: webhook-mailer at python.org (terryjreedy) Date: Sun, 10 Jan 2021 06:59:55 -0000 Subject: [Python-checkins] bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) Message-ID: https://github.com/python/cpython/commit/81f87bbf9f65702062021a78abd9b8f82c98a414 commit: 81f87bbf9f65702062021a78abd9b8f82c98a414 branch: master author: Terry Jan Reedy committer: terryjreedy date: 2021-01-10T01:59:47-05:00 summary: bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) If __repr__ uses instance attributes, as normal, and one steps through the __init__ method, debugger may try to get repr before the instance attributes exist. reprlib.repr handles the error. files: A Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/debugger_r.py M Lib/idlelib/idle_test/test_debugger_r.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index b04ea7493477e..26200981eb8d9 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ Released on 2021-10-04? ====================================== +bpo-33065: Fix problem debugging user classes with __repr__ method. + bpo-32631: Finish zzdummy example extension module: make menu entries work; add docstrings and tests with 100% coverage. diff --git a/Lib/idlelib/debugger_r.py b/Lib/idlelib/debugger_r.py index 9dcfc56414c05..26204438858d8 100644 --- a/Lib/idlelib/debugger_r.py +++ b/Lib/idlelib/debugger_r.py @@ -19,7 +19,7 @@ barrier, in particular frame and traceback objects. """ - +import reprlib import types from idlelib import debugger @@ -170,7 +170,7 @@ def dict_keys_list(self, did): def dict_item(self, did, key): dict = dicttable[did] value = dict[key] - value = repr(value) ### can't pickle module 'builtins' + value = reprlib.repr(value) ### can't pickle module 'builtins' return value #----------end class IdbAdapter---------- @@ -390,4 +390,4 @@ def restart_subprocess_debugger(rpcclt): if __name__ == "__main__": from unittest import main - main('idlelib.idle_test.test_debugger', verbosity=2, exit=False) + main('idlelib.idle_test.test_debugger_r', verbosity=2, exit=False) diff --git a/Lib/idlelib/idle_test/test_debugger_r.py b/Lib/idlelib/idle_test/test_debugger_r.py index 199f63447ce6c..638ebd36a7405 100644 --- a/Lib/idlelib/idle_test/test_debugger_r.py +++ b/Lib/idlelib/idle_test/test_debugger_r.py @@ -25,5 +25,19 @@ def test_init(self): # Classes GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy, # GUIAdapter, IdbProxy plus 7 module functions. +class IdbAdapterTest(unittest.TestCase): + + def test_dict_item_noattr(self): # Issue 33065. + + class BinData: + def __repr__(self): + return self.length + + debugger_r.dicttable[0] = {'BinData': BinData()} + idb = debugger_r.IdbAdapter(None) + self.assertTrue(idb.dict_item(0, 'BinData')) + debugger_r.dicttable.clear() + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst b/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst new file mode 100644 index 0000000000000..87948f3cd1baa --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst @@ -0,0 +1 @@ +Fix problem debugging user classes with __repr__ method. From webhook-mailer at python.org Sun Jan 10 02:31:11 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 10 Jan 2021 07:31:11 -0000 Subject: [Python-checkins] bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) Message-ID: https://github.com/python/cpython/commit/5ded7efa6a7a232dd4a41e6e65e4dae47146514b commit: 5ded7efa6a7a232dd4a41e6e65e4dae47146514b 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-09T23:30:59-08:00 summary: bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) If __repr__ uses instance attributes, as normal, and one steps through the __init__ method, debugger may try to get repr before the instance attributes exist. reprlib.repr handles the error. (cherry picked from commit 81f87bbf9f65702062021a78abd9b8f82c98a414) Co-authored-by: Terry Jan Reedy files: A Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/debugger_r.py M Lib/idlelib/idle_test/test_debugger_r.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index bc15501a7b062..44782fcb0cecd 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ Released on 2020-12-?? ====================================== +bpo-33065: Fix problem debugging user classes with __repr__ method. + bpo-32631: Finish zzdummy example extension module: make menu entries work; add docstrings and tests with 100% coverage. diff --git a/Lib/idlelib/debugger_r.py b/Lib/idlelib/debugger_r.py index 9dcfc56414c05..26204438858d8 100644 --- a/Lib/idlelib/debugger_r.py +++ b/Lib/idlelib/debugger_r.py @@ -19,7 +19,7 @@ barrier, in particular frame and traceback objects. """ - +import reprlib import types from idlelib import debugger @@ -170,7 +170,7 @@ def dict_keys_list(self, did): def dict_item(self, did, key): dict = dicttable[did] value = dict[key] - value = repr(value) ### can't pickle module 'builtins' + value = reprlib.repr(value) ### can't pickle module 'builtins' return value #----------end class IdbAdapter---------- @@ -390,4 +390,4 @@ def restart_subprocess_debugger(rpcclt): if __name__ == "__main__": from unittest import main - main('idlelib.idle_test.test_debugger', verbosity=2, exit=False) + main('idlelib.idle_test.test_debugger_r', verbosity=2, exit=False) diff --git a/Lib/idlelib/idle_test/test_debugger_r.py b/Lib/idlelib/idle_test/test_debugger_r.py index 199f63447ce6c..638ebd36a7405 100644 --- a/Lib/idlelib/idle_test/test_debugger_r.py +++ b/Lib/idlelib/idle_test/test_debugger_r.py @@ -25,5 +25,19 @@ def test_init(self): # Classes GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy, # GUIAdapter, IdbProxy plus 7 module functions. +class IdbAdapterTest(unittest.TestCase): + + def test_dict_item_noattr(self): # Issue 33065. + + class BinData: + def __repr__(self): + return self.length + + debugger_r.dicttable[0] = {'BinData': BinData()} + idb = debugger_r.IdbAdapter(None) + self.assertTrue(idb.dict_item(0, 'BinData')) + debugger_r.dicttable.clear() + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst b/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst new file mode 100644 index 0000000000000..87948f3cd1baa --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst @@ -0,0 +1 @@ +Fix problem debugging user classes with __repr__ method. From webhook-mailer at python.org Sun Jan 10 02:31:11 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 10 Jan 2021 07:31:11 -0000 Subject: [Python-checkins] bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) Message-ID: https://github.com/python/cpython/commit/799f8489d418b7f9207d333eac38214931bd7dcc commit: 799f8489d418b7f9207d333eac38214931bd7dcc 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-09T23:30:43-08:00 summary: bpo-33065: Fix problem debugging user classes with __repr__ method (GH-24183) If __repr__ uses instance attributes, as normal, and one steps through the __init__ method, debugger may try to get repr before the instance attributes exist. reprlib.repr handles the error. (cherry picked from commit 81f87bbf9f65702062021a78abd9b8f82c98a414) Co-authored-by: Terry Jan Reedy files: A Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/debugger_r.py M Lib/idlelib/idle_test/test_debugger_r.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index c466fe9cc7776..0033e66f9b8a2 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ Released on 2020-12-07? ====================================== +bpo-33065: Fix problem debugging user classes with __repr__ method. + bpo-32631: Finish zzdummy example extension module: make menu entries work; add docstrings and tests with 100% coverage. diff --git a/Lib/idlelib/debugger_r.py b/Lib/idlelib/debugger_r.py index 9dcfc56414c05..26204438858d8 100644 --- a/Lib/idlelib/debugger_r.py +++ b/Lib/idlelib/debugger_r.py @@ -19,7 +19,7 @@ barrier, in particular frame and traceback objects. """ - +import reprlib import types from idlelib import debugger @@ -170,7 +170,7 @@ def dict_keys_list(self, did): def dict_item(self, did, key): dict = dicttable[did] value = dict[key] - value = repr(value) ### can't pickle module 'builtins' + value = reprlib.repr(value) ### can't pickle module 'builtins' return value #----------end class IdbAdapter---------- @@ -390,4 +390,4 @@ def restart_subprocess_debugger(rpcclt): if __name__ == "__main__": from unittest import main - main('idlelib.idle_test.test_debugger', verbosity=2, exit=False) + main('idlelib.idle_test.test_debugger_r', verbosity=2, exit=False) diff --git a/Lib/idlelib/idle_test/test_debugger_r.py b/Lib/idlelib/idle_test/test_debugger_r.py index 199f63447ce6c..638ebd36a7405 100644 --- a/Lib/idlelib/idle_test/test_debugger_r.py +++ b/Lib/idlelib/idle_test/test_debugger_r.py @@ -25,5 +25,19 @@ def test_init(self): # Classes GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy, # GUIAdapter, IdbProxy plus 7 module functions. +class IdbAdapterTest(unittest.TestCase): + + def test_dict_item_noattr(self): # Issue 33065. + + class BinData: + def __repr__(self): + return self.length + + debugger_r.dicttable[0] = {'BinData': BinData()} + idb = debugger_r.IdbAdapter(None) + self.assertTrue(idb.dict_item(0, 'BinData')) + debugger_r.dicttable.clear() + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst b/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst new file mode 100644 index 0000000000000..87948f3cd1baa --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-01-10-01-25-43.bpo-33065.zmyHYJ.rst @@ -0,0 +1 @@ +Fix problem debugging user classes with __repr__ method. From webhook-mailer at python.org Sun Jan 10 19:12:06 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 11 Jan 2021 00:12:06 -0000 Subject: [Python-checkins] Fix various ParamSpec errors in typing (GH-24176) Message-ID: https://github.com/python/cpython/commit/ace008c531dd685a30c1dd68f9b5ba35f20171cf commit: ace008c531dd685a30c1dd68f9b5ba35f20171cf 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-10T16:11:41-08:00 summary: Fix various ParamSpec errors in typing (GH-24176) 1. ParamSpec -> TypeVar for ``typing.Concatenate`` 2. ParamSpec's call signature should align with its documentation. Noticed in GH-24169 files: M Doc/library/typing.rst M Lib/typing.py diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index c14c710813381..3b4dba3e0e0a9 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -695,10 +695,10 @@ These can be used as types in annotations using ``[]``, each having a unique syn from collections.abc import Callable from threading import Lock - from typing import Any, Concatenate, ParamSpec + from typing import Any, Concatenate, ParamSpec, TypeVar P = ParamSpec('P') - R = ParamSpec('R') + R = TypeVar('R') # Use this lock to ensure that only one thread is executing a function # at any time. diff --git a/Lib/typing.py b/Lib/typing.py index 88d0d623a421f..6224930c3b027 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -779,7 +779,7 @@ def add_two(x: float, y: float) -> float: args = object() kwargs = object() - def __init__(self, name, bound=None, covariant=False, contravariant=False): + def __init__(self, name, *, bound=None, covariant=False, contravariant=False): self.__name__ = name super().__init__(bound, covariant, contravariant) try: From webhook-mailer at python.org Mon Jan 11 19:41:44 2021 From: webhook-mailer at python.org (gvanrossum) Date: Tue, 12 Jan 2021 00:41:44 -0000 Subject: [Python-checkins] bpo-42870: Document change in argparse help output. (GH-24190) Message-ID: https://github.com/python/cpython/commit/fb35fa49d192368e94ffec09c092260ed0fea2e1 commit: fb35fa49d192368e94ffec09c092260ed0fea2e1 branch: master author: Tom?? Hrn?iar committer: gvanrossum date: 2021-01-11T16:41:35-08:00 summary: bpo-42870: Document change in argparse help output. (GH-24190) files: M Doc/whatsnew/3.10.rst M Misc/ACKS diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 92fecb4bbcec4..d2b3ed75f8c27 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -189,6 +189,12 @@ New Modules Improved Modules ================ +argparse +-------- + +Misleading phrase "optional arguments" was replaced with "options" in argparse help. Some tests might require adaptation if they rely on exact output match. +(Contributed by Raymond Hettinger in :issue:`9694`.) + base64 ------ diff --git a/Misc/ACKS b/Misc/ACKS index 211455b4dfc3c..136266965a869 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -761,6 +761,7 @@ Ken Howard Brad Howes Mike Hoy Ben Hoyt +Tom?? Hrn?iar Miro Hron?ok Chiu-Hsiang Hsu Chih-Hao Huang From webhook-mailer at python.org Tue Jan 12 04:30:17 2021 From: webhook-mailer at python.org (vstinner) Date: Tue, 12 Jan 2021 09:30:17 -0000 Subject: [Python-checkins] bpo-42882: _PyRuntimeState_Init() leaves unicode next_index unchanged (GH-24193) Message-ID: https://github.com/python/cpython/commit/44bf57aca627bd11a08b12fe4e4b6a0e1d268862 commit: 44bf57aca627bd11a08b12fe4e4b6a0e1d268862 branch: master author: Victor Stinner committer: vstinner date: 2021-01-12T10:29:45+01:00 summary: bpo-42882: _PyRuntimeState_Init() leaves unicode next_index unchanged (GH-24193) Fix the _PyUnicode_FromId() function (_Py_IDENTIFIER(var) API) when Py_Initialize() / Py_Finalize() is called multiple times: preserve _PyRuntime.unicode_ids.next_index value. Use _PyRuntimeState_INIT macro instead memset(0) to reset _PyRuntimeState members to zero. files: A Misc/NEWS.d/next/Core and Builtins/2021-01-11-17-58-52.bpo-42882.WfTdfg.rst M Include/internal/pycore_runtime.h M Python/pystate.c diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h index 8c54abbb0694a..bcd710c4496bd 100644 --- a/Include/internal/pycore_runtime.h +++ b/Include/internal/pycore_runtime.h @@ -51,6 +51,8 @@ typedef struct _Py_AuditHookEntry { struct _Py_unicode_runtime_ids { PyThread_type_lock lock; + // next_index value must be preserved when Py_Initialize()/Py_Finalize() + // is called multiple times: see _PyUnicode_FromId() implementation. Py_ssize_t next_index; }; @@ -107,6 +109,8 @@ typedef struct pyruntimestate { PyPreConfig preconfig; + // Audit values must be preserved when Py_Initialize()/Py_Finalize() + // is called multiple times. Py_OpenCodeHookFunction open_code_hook; void *open_code_userdata; _Py_AuditHookEntry *audit_hook_head; diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-11-17-58-52.bpo-42882.WfTdfg.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-11-17-58-52.bpo-42882.WfTdfg.rst new file mode 100644 index 0000000000000..6cc7c92194c26 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-11-17-58-52.bpo-42882.WfTdfg.rst @@ -0,0 +1,3 @@ +Fix the :c:func:`_PyUnicode_FromId` function (_Py_IDENTIFIER(var) API) when +:c:func:`Py_Initialize` / :c:func:`Py_Finalize` is called multiple times: +preserve ``_PyRuntime.unicode_ids.next_index`` value. diff --git a/Python/pystate.c b/Python/pystate.c index c791b23999383..ebf76a058b640 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -54,6 +54,9 @@ _PyRuntimeState_Init_impl(_PyRuntimeState *runtime) void *open_code_hook = runtime->open_code_hook; void *open_code_userdata = runtime->open_code_userdata; _Py_AuditHookEntry *audit_hook_head = runtime->audit_hook_head; + // bpo-42882: Preserve next_index value if Py_Initialize()/Py_Finalize() + // is called multiple times. + int64_t unicode_next_index = runtime->unicode_ids.next_index; memset(runtime, 0, sizeof(*runtime)); @@ -90,7 +93,7 @@ _PyRuntimeState_Init_impl(_PyRuntimeState *runtime) if (runtime->unicode_ids.lock == NULL) { return _PyStatus_NO_MEMORY(); } - runtime->unicode_ids.next_index = 0; + runtime->unicode_ids.next_index = unicode_next_index; return _PyStatus_OK(); } From webhook-mailer at python.org Tue Jan 12 05:27:00 2021 From: webhook-mailer at python.org (vstinner) Date: Tue, 12 Jan 2021 10:27:00 -0000 Subject: [Python-checkins] bpo-42882: Add test_embed.test_unicode_id_init() (GH-24198) Message-ID: https://github.com/python/cpython/commit/11d13e83abedabba12b28773317f1a365113e7af commit: 11d13e83abedabba12b28773317f1a365113e7af branch: master author: Victor Stinner committer: vstinner date: 2021-01-12T11:26:26+01:00 summary: bpo-42882: Add test_embed.test_unicode_id_init() (GH-24198) Test that _PyUnicode_FromId() works when Python is initialized multiples times. files: M Lib/test/test_embed.py M Programs/_testembed.c diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index a7d912178a2ad..6833b2540d67d 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -1472,5 +1472,11 @@ def test_audit_run_stdin(self): timeout=support.SHORT_TIMEOUT, returncode=1) +class MiscTests(EmbeddingTestsMixin, unittest.TestCase): + def test_unicode_id_init(self): + # bpo-42882: Test that _PyUnicode_FromId() works + # when Python is initialized multiples times. + self.run_embedded_interpreter("test_unicode_id_init") + if __name__ == "__main__": unittest.main() diff --git a/Programs/_testembed.c b/Programs/_testembed.c index 748ea8a8f3360..52c56746813a3 100644 --- a/Programs/_testembed.c +++ b/Programs/_testembed.c @@ -1686,6 +1686,42 @@ static int test_get_argc_argv(void) } +static int test_unicode_id_init(void) +{ + // bpo-42882: Test that _PyUnicode_FromId() works + // when Python is initialized multiples times. + _Py_IDENTIFIER(test_unicode_id_init); + + // Initialize Python once without using the identifier + _testembed_Py_Initialize(); + Py_Finalize(); + + // Now initialize Python multiple times and use the identifier. + // The first _PyUnicode_FromId() call initializes the identifier index. + for (int i=0; i<3; i++) { + _testembed_Py_Initialize(); + + PyObject *str1, *str2; + + str1 = _PyUnicode_FromId(&PyId_test_unicode_id_init); + assert(str1 != NULL); + assert(Py_REFCNT(str1) == 1); + + str2 = PyUnicode_FromString("test_unicode_id_init"); + assert(str2 != NULL); + + assert(PyUnicode_Compare(str1, str2) == 0); + + // str1 is a borrowed reference + Py_DECREF(str2); + + Py_Finalize(); + } + return 0; +} + + + /* ********************************************************* * List of test cases and the function that implements it. * @@ -1754,6 +1790,8 @@ static struct TestCase TestCases[] = { {"test_audit_run_interactivehook", test_audit_run_interactivehook}, {"test_audit_run_startup", test_audit_run_startup}, {"test_audit_run_stdin", test_audit_run_stdin}, + + {"test_unicode_id_init", test_unicode_id_init}, {NULL, NULL} }; From webhook-mailer at python.org Tue Jan 12 09:43:44 2021 From: webhook-mailer at python.org (encukou) Date: Tue, 12 Jan 2021 14:43:44 -0000 Subject: [Python-checkins] bpo-41994: Fix refcount issues in Python/import.c (GH-22632) Message-ID: https://github.com/python/cpython/commit/4db8988420e0a122d617df741381b0c385af032c commit: 4db8988420e0a122d617df741381b0c385af032c branch: master author: Serhiy Storchaka committer: encukou date: 2021-01-12T15:43:32+01:00 summary: bpo-41994: Fix refcount issues in Python/import.c (GH-22632) https://bugs.python.org/issue41994 files: A Misc/NEWS.d/next/Core and Builtins/2020-10-10-14-16-03.bpo-41994.Xop8sV.rst M Include/cpython/import.h M Include/internal/pycore_import.h M Python/import.c diff --git a/Include/cpython/import.h b/Include/cpython/import.h index 3b20a74c855db..bad68f0e0980d 100644 --- a/Include/cpython/import.h +++ b/Include/cpython/import.h @@ -13,8 +13,6 @@ PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module); PyAPI_FUNC(void) _PyImport_AcquireLock(void); PyAPI_FUNC(int) _PyImport_ReleaseLock(void); -PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *); - PyAPI_FUNC(int) _PyImport_FixupBuiltin( PyObject *mod, const char *name, /* UTF-8 encoded string */ diff --git a/Include/internal/pycore_import.h b/Include/internal/pycore_import.h index fd9fa5ab23faa..e21ed0a7a06a2 100644 --- a/Include/internal/pycore_import.h +++ b/Include/internal/pycore_import.h @@ -5,11 +5,6 @@ extern "C" { #endif -PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( - PyThreadState *tstate, - const char *name /* UTF-8 encoded string */ - ); - #ifdef HAVE_FORK extern PyStatus _PyImport_ReInitLock(void); #endif diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-10-10-14-16-03.bpo-41994.Xop8sV.rst b/Misc/NEWS.d/next/Core and Builtins/2020-10-10-14-16-03.bpo-41994.Xop8sV.rst new file mode 100644 index 0000000000000..36d5011ee71a6 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-10-10-14-16-03.bpo-41994.Xop8sV.rst @@ -0,0 +1 @@ +Fixed possible leak in ``import`` when ``sys.modules`` is not a ``dict``. diff --git a/Python/import.c b/Python/import.c index 1522abc705ffb..75ac21df82da9 100644 --- a/Python/import.c +++ b/Python/import.c @@ -409,7 +409,7 @@ PyImport_GetMagicTag(void) modules. A copy of the module's dictionary is stored by calling _PyImport_FixupExtensionObject() immediately after the module initialization function succeeds. A copy can be retrieved from there by calling - _PyImport_FindExtensionObject(). + import_find_extension(). Modules which do support multiple initialization set their m_size field to a non-negative number (indicating the size of the @@ -522,10 +522,14 @@ import_find_extension(PyThreadState *tstate, PyObject *name, if (mod == NULL) return NULL; mdict = PyModule_GetDict(mod); - if (mdict == NULL) + if (mdict == NULL) { + Py_DECREF(mod); return NULL; - if (PyDict_Update(mdict, def->m_base.m_copy)) + } + if (PyDict_Update(mdict, def->m_base.m_copy)) { + Py_DECREF(mod); return NULL; + } } else { if (def->m_base.m_init == NULL) @@ -537,10 +541,10 @@ import_find_extension(PyThreadState *tstate, PyObject *name, Py_DECREF(mod); return NULL; } - Py_DECREF(mod); } if (_PyState_AddModule(tstate, mod, def) < 0) { PyMapping_DelItem(modules, name); + Py_DECREF(mod); return NULL; } @@ -552,31 +556,10 @@ import_find_extension(PyThreadState *tstate, PyObject *name, return mod; } -PyObject * -_PyImport_FindExtensionObject(PyObject *name, PyObject *filename) -{ - PyThreadState *tstate = _PyThreadState_GET(); - return import_find_extension(tstate, name, filename); -} - - -PyObject * -_PyImport_FindBuiltin(PyThreadState *tstate, const char *name) -{ - PyObject *res, *nameobj; - nameobj = PyUnicode_InternFromString(name); - if (nameobj == NULL) - return NULL; - res = import_find_extension(tstate, nameobj, nameobj); - Py_DECREF(nameobj); - return res; -} /* Get the module object corresponding to a module name. First check the modules dictionary if there's one there, - if not, create a new one and insert it in the modules dictionary. - Because the former action is most common, THIS DOES NOT RETURN A - 'NEW' REFERENCE! */ + if not, create a new one and insert it in the modules dictionary. */ static PyObject * import_add_module(PyThreadState *tstate, PyObject *name) @@ -591,6 +574,7 @@ import_add_module(PyThreadState *tstate, PyObject *name) PyObject *m; if (PyDict_CheckExact(modules)) { m = PyDict_GetItemWithError(modules, name); + Py_XINCREF(m); } else { m = PyObject_GetItem(modules, name); @@ -606,6 +590,7 @@ import_add_module(PyThreadState *tstate, PyObject *name) if (m != NULL && PyModule_Check(m)) { return m; } + Py_XDECREF(m); m = PyModule_NewObject(name); if (m == NULL) return NULL; @@ -613,7 +598,6 @@ import_add_module(PyThreadState *tstate, PyObject *name) Py_DECREF(m); return NULL; } - Py_DECREF(m); /* Yes, it still exists, in modules! */ return m; } @@ -622,7 +606,17 @@ PyObject * PyImport_AddModuleObject(PyObject *name) { PyThreadState *tstate = _PyThreadState_GET(); - return import_add_module(tstate, name); + PyObject *mod = import_add_module(tstate, name); + if (mod) { + PyObject *ref = PyWeakref_NewRef(mod, NULL); + Py_DECREF(mod); + if (ref == NULL) { + return NULL; + } + mod = PyWeakref_GetObject(ref); + Py_DECREF(ref); + } + return mod; /* borrowed reference */ } @@ -747,7 +741,7 @@ static PyObject * module_dict_for_exec(PyThreadState *tstate, PyObject *name) { _Py_IDENTIFIER(__builtins__); - PyObject *m, *d = NULL; + PyObject *m, *d; m = import_add_module(tstate, name); if (m == NULL) @@ -762,10 +756,13 @@ module_dict_for_exec(PyThreadState *tstate, PyObject *name) } if (r < 0) { remove_module(tstate, name); + Py_DECREF(m); return NULL; } - return d; /* Return a borrowed reference. */ + Py_INCREF(d); + Py_DECREF(m); + return d; } static PyObject * @@ -809,8 +806,10 @@ PyImport_ExecCodeModuleObject(PyObject *name, PyObject *co, PyObject *pathname, } external = PyObject_GetAttrString(tstate->interp->importlib, "_bootstrap_external"); - if (external == NULL) + if (external == NULL) { + Py_DECREF(d); return NULL; + } res = _PyObject_CallMethodIdObjArgs(external, &PyId__fix_up_module, d, name, pathname, cpathname, NULL); @@ -819,6 +818,7 @@ PyImport_ExecCodeModuleObject(PyObject *name, PyObject *co, PyObject *pathname, Py_DECREF(res); res = exec_code_in_module(tstate, name, d, co); } + Py_DECREF(d); return res; } @@ -912,8 +912,7 @@ is_builtin(PyObject *name) that can handle the path item. Return None if no hook could; this tells our caller that the path based finder could not find a finder for this path item. Cache the result in - path_importer_cache. - Returns a borrowed reference. */ + path_importer_cache. */ static PyObject * get_path_importer(PyThreadState *tstate, PyObject *path_importer_cache, @@ -931,8 +930,10 @@ get_path_importer(PyThreadState *tstate, PyObject *path_importer_cache, return NULL; /* Shouldn't happen */ importer = PyDict_GetItemWithError(path_importer_cache, p); - if (importer != NULL || _PyErr_Occurred(tstate)) + if (importer != NULL || _PyErr_Occurred(tstate)) { + Py_XINCREF(importer); return importer; + } /* set path_importer_cache[p] to None to avoid recursion */ if (PyDict_SetItem(path_importer_cache, p, Py_None) != 0) @@ -952,13 +953,11 @@ get_path_importer(PyThreadState *tstate, PyObject *path_importer_cache, _PyErr_Clear(tstate); } if (importer == NULL) { - return Py_None; + Py_RETURN_NONE; } - if (importer != NULL) { - int err = PyDict_SetItem(path_importer_cache, p, importer); + if (PyDict_SetItem(path_importer_cache, p, importer) < 0) { Py_DECREF(importer); - if (err != 0) - return NULL; + return NULL; } return importer; } @@ -967,24 +966,19 @@ PyObject * PyImport_GetImporter(PyObject *path) { PyThreadState *tstate = _PyThreadState_GET(); - PyObject *importer=NULL, *path_importer_cache=NULL, *path_hooks=NULL; - - path_importer_cache = PySys_GetObject("path_importer_cache"); - path_hooks = PySys_GetObject("path_hooks"); - if (path_importer_cache != NULL && path_hooks != NULL) { - importer = get_path_importer(tstate, path_importer_cache, - path_hooks, path); + PyObject *path_importer_cache = PySys_GetObject("path_importer_cache"); + PyObject *path_hooks = PySys_GetObject("path_hooks"); + if (path_importer_cache == NULL || path_hooks == NULL) { + return NULL; } - Py_XINCREF(importer); /* get_path_importer returns a borrowed reference */ - return importer; + return get_path_importer(tstate, path_importer_cache, path_hooks, path); } static PyObject* create_builtin(PyThreadState *tstate, PyObject *name, PyObject *spec) { - PyObject *mod = _PyImport_FindExtensionObject(name, name); + PyObject *mod = import_find_extension(tstate, name, name); if (mod || _PyErr_Occurred(tstate)) { - Py_XINCREF(mod); return mod; } @@ -1165,10 +1159,12 @@ PyImport_ImportFrozenModuleObject(PyObject *name) d = PyModule_GetDict(m); l = PyList_New(0); if (l == NULL) { + Py_DECREF(m); goto err_return; } err = PyDict_SetItemString(d, "__path__", l); Py_DECREF(l); + Py_DECREF(m); if (err != 0) goto err_return; } @@ -1177,6 +1173,7 @@ PyImport_ImportFrozenModuleObject(PyObject *name) goto err_return; } m = exec_code_in_module(tstate, name, d, co); + Py_DECREF(d); if (m == NULL) { goto err_return; } @@ -1875,7 +1872,6 @@ _imp_init_frozen_impl(PyObject *module, PyObject *name) { PyThreadState *tstate = _PyThreadState_GET(); int ret; - PyObject *m; ret = PyImport_ImportFrozenModuleObject(name); if (ret < 0) @@ -1883,9 +1879,7 @@ _imp_init_frozen_impl(PyObject *module, PyObject *name) if (ret == 0) { Py_RETURN_NONE; } - m = import_add_module(tstate, name); - Py_XINCREF(m); - return m; + return import_add_module(tstate, name); } /*[clinic input] @@ -2009,11 +2003,11 @@ _imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file) return NULL; } - mod = _PyImport_FindExtensionObject(name, path); + PyThreadState *tstate = _PyThreadState_GET(); + mod = import_find_extension(tstate, name, path); if (mod != NULL || PyErr_Occurred()) { Py_DECREF(name); Py_DECREF(path); - Py_XINCREF(mod); return mod; } From webhook-mailer at python.org Tue Jan 12 09:45:13 2021 From: webhook-mailer at python.org (encukou) Date: Tue, 12 Jan 2021 14:45:13 -0000 Subject: [Python-checkins] [3.8] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24120) Message-ID: https://github.com/python/cpython/commit/187f76def8a5bd0af7ab512575cad30cfe624b05 commit: 187f76def8a5bd0af7ab512575cad30cfe624b05 branch: 3.8 author: Petr Viktorin committer: encukou date: 2021-01-12T15:45:05+01:00 summary: [3.8] bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999) (GH-24120) Co-Authored-By: Andreas Schneider Co-Authored-By: Antoine Pitrou . Co-authored-by: Petr Viktorin (cherry picked from commit 056c08211b402b4dbc1530a9de9d00ad5309909f) https://bugs.python.org/issue40052 files: A Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst M Include/cpython/abstract.h M Objects/call.c diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index 2ea3209bca109..dbfce2dc9061d 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -82,14 +82,14 @@ _PyVectorcall_Function(PyObject *callable) { PyTypeObject *tp = Py_TYPE(callable); Py_ssize_t offset = tp->tp_vectorcall_offset; - vectorcallfunc *ptr; + vectorcallfunc ptr; if (!PyType_HasFeature(tp, _Py_TPFLAGS_HAVE_VECTORCALL)) { return NULL; } assert(PyCallable_Check(callable)); assert(offset > 0); - ptr = (vectorcallfunc*)(((char *)callable) + offset); - return *ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; } /* Call the callable object 'callable' with the "vectorcall" calling 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 new file mode 100644 index 0000000000000..538488e2fbacc --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst @@ -0,0 +1,2 @@ +Fix an alignment build warning/error in function ``PyVectorcall_Function()``. +Patch by Andreas Schneider, Antoine Pitrou and Petr Viktorin. diff --git a/Objects/call.c b/Objects/call.c index c66389854d8bf..9672be01ed059 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -175,13 +175,14 @@ PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *kwargs) { /* get vectorcallfunc as in _PyVectorcall_Function, but without * the _Py_TPFLAGS_HAVE_VECTORCALL check */ + vectorcallfunc func; Py_ssize_t offset = Py_TYPE(callable)->tp_vectorcall_offset; if (offset <= 0) { PyErr_Format(PyExc_TypeError, "'%.200s' object does not support vectorcall", Py_TYPE(callable)->tp_name); return NULL; } - vectorcallfunc func = *(vectorcallfunc *)(((char *)callable) + offset); + memcpy(&func, (char *) callable + offset, sizeof(func)); if (func == NULL) { PyErr_Format(PyExc_TypeError, "'%.200s' object does not support vectorcall", Py_TYPE(callable)->tp_name); From webhook-mailer at python.org Tue Jan 12 13:18:05 2021 From: webhook-mailer at python.org (miss-islington) Date: Tue, 12 Jan 2021 18:18:05 -0000 Subject: [Python-checkins] bpo-42874: Remove grep -qE options for Solaris 10 compatibility (GH-24200) Message-ID: https://github.com/python/cpython/commit/0f66498fd8ee8644be6df963b86a1523f6069ddd commit: 0f66498fd8ee8644be6df963b86a1523f6069ddd branch: master author: Paul Ganssle committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-12T10:17:52-08:00 summary: bpo-42874: Remove grep -qE options for Solaris 10 compatibility (GH-24200) According to [bpo-42874](), some versions of grep do not support the `-q` and `-E` options. Although both options are used elsewhere in the configure script, this particular bit of validation can be achieved without them, so there's no real harm in using a grep call with no flags. Would be good to get some people taking advantage of the `--with-tzpath` arguments in the wild to try this out.. Local testing seems to indicate that this does the same thing, but I don't know that we have any buildbots using this option. Maybe @pablogsal? [bpo-42874](): files: A Misc/NEWS.d/next/Build/2021-01-12-10-06-50.bpo-42874.XKK61g.rst M configure M configure.ac diff --git a/Misc/NEWS.d/next/Build/2021-01-12-10-06-50.bpo-42874.XKK61g.rst b/Misc/NEWS.d/next/Build/2021-01-12-10-06-50.bpo-42874.XKK61g.rst new file mode 100644 index 0000000000000..c3ef7b34bc7d7 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-01-12-10-06-50.bpo-42874.XKK61g.rst @@ -0,0 +1,3 @@ +Removed the grep -q and -E flags in the tzpath validation section of the +configure script to better accomodate users of some platforms (specifically +Solaris 10). diff --git a/configure b/configure index 5691c27cf66fe..1d81c00c6359c 100755 --- a/configure +++ b/configure @@ -10252,7 +10252,7 @@ validate_tzpath() { fi # Bad paths are those that don't start with / - if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then + if ( echo $1 | grep '\(^\|:\)\([^/]\|$\)' > /dev/null); then as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5 return 1; fi diff --git a/configure.ac b/configure.ac index 990d6bfdd81b7..08c462ac9f629 100644 --- a/configure.ac +++ b/configure.ac @@ -2980,7 +2980,7 @@ validate_tzpath() { # Bad paths are those that don't start with / dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output - if ( echo $1 | grep -qE '(^|:)(@<:@^/@:>@|$)' ); then + if ( echo $1 | grep '\(^\|:\)\(@<:@^/@:>@\|$\)' > /dev/null); then AC_MSG_ERROR([--with-tzpath must contain only absolute paths, not $1]) return 1; fi From webhook-mailer at python.org Tue Jan 12 17:14:36 2021 From: webhook-mailer at python.org (gvanrossum) Date: Tue, 12 Jan 2021 22:14:36 -0000 Subject: [Python-checkins] bpo-42848: remove recursion from TracebackException (GH-24158) Message-ID: https://github.com/python/cpython/commit/6dfd1734f5b230bb8fbd2a9df806c1333b6652a8 commit: 6dfd1734f5b230bb8fbd2a9df806c1333b6652a8 branch: master author: Irit Katriel committer: gvanrossum date: 2021-01-12T14:14:27-08:00 summary: bpo-42848: remove recursion from TracebackException (GH-24158) files: A Misc/NEWS.d/next/Library/2021-01-12-19-34-06.bpo-42848.5G8oBl.rst M Lib/test/test_traceback.py M Lib/traceback.py diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index abb5762cd43ef..07555a0411a08 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -1148,6 +1148,31 @@ def test_context(self): self.assertEqual(exc_info[0], exc.exc_type) self.assertEqual(str(exc_info[1]), str(exc)) + def test_long_context_chain(self): + def f(): + try: + 1/0 + except: + f() + + try: + f() + except RecursionError: + exc_info = sys.exc_info() + else: + self.fail("Exception not raised") + + te = traceback.TracebackException(*exc_info) + res = list(te.format()) + + # many ZeroDiv errors followed by the RecursionError + self.assertGreater(len(res), sys.getrecursionlimit()) + self.assertGreater( + len([l for l in res if 'ZeroDivisionError:' in l]), + sys.getrecursionlimit() * 0.5) + self.assertIn( + "RecursionError: maximum recursion depth exceeded", res[-1]) + def test_no_refs_to_exception_and_traceback_objects(self): try: 1/0 diff --git a/Lib/traceback.py b/Lib/traceback.py index 4e008bc0e081a..aef37c9a7af68 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -481,39 +481,10 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None, # permit backwards compat with the existing API, otherwise we # need stub thunk objects just to glue it together. # Handle loops in __cause__ or __context__. + is_recursive_call = _seen is not None if _seen is None: _seen = set() _seen.add(id(exc_value)) - # Gracefully handle (the way Python 2.4 and earlier did) the case of - # being called with no type or value (None, None, None). - if (exc_value and exc_value.__cause__ is not None - and id(exc_value.__cause__) not in _seen): - cause = TracebackException( - type(exc_value.__cause__), - exc_value.__cause__, - exc_value.__cause__.__traceback__, - limit=limit, - lookup_lines=False, - capture_locals=capture_locals, - _seen=_seen) - else: - cause = None - if (exc_value and exc_value.__context__ is not None - and id(exc_value.__context__) not in _seen): - context = TracebackException( - type(exc_value.__context__), - exc_value.__context__, - exc_value.__context__.__traceback__, - limit=limit, - lookup_lines=False, - capture_locals=capture_locals, - _seen=_seen) - else: - context = None - self.__cause__ = cause - self.__context__ = context - self.__suppress_context__ = \ - exc_value.__suppress_context__ if exc_value else False # TODO: locals. self.stack = StackSummary.extract( walk_tb(exc_traceback), limit=limit, lookup_lines=lookup_lines, @@ -532,6 +503,45 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None, self.msg = exc_value.msg if lookup_lines: self._load_lines() + self.__suppress_context__ = \ + exc_value.__suppress_context__ if exc_value else False + + # Convert __cause__ and __context__ to `TracebackExceptions`s, use a + # queue to avoid recursion (only the top-level call gets _seen == None) + if not is_recursive_call: + queue = [(self, exc_value)] + while queue: + te, e = queue.pop() + if (e and e.__cause__ is not None + and id(e.__cause__) not in _seen): + cause = TracebackException( + type(e.__cause__), + e.__cause__, + e.__cause__.__traceback__, + limit=limit, + lookup_lines=lookup_lines, + capture_locals=capture_locals, + _seen=_seen) + else: + cause = None + if (e and e.__context__ is not None + and id(e.__context__) not in _seen): + context = TracebackException( + type(e.__context__), + e.__context__, + e.__context__.__traceback__, + limit=limit, + lookup_lines=lookup_lines, + capture_locals=capture_locals, + _seen=_seen) + else: + context = None + te.__cause__ = cause + te.__context__ = context + if cause: + queue.append((te.__cause__, e.__cause__)) + if context: + queue.append((te.__context__, e.__context__)) @classmethod def from_exception(cls, exc, *args, **kwargs): @@ -542,10 +552,6 @@ def _load_lines(self): """Private API. force all lines in the stack to be loaded.""" for frame in self.stack: frame.line - if self.__context__: - self.__context__._load_lines() - if self.__cause__: - self.__cause__._load_lines() def __eq__(self, other): if isinstance(other, TracebackException): @@ -622,15 +628,32 @@ def format(self, *, chain=True): The message indicating which exception occurred is always the last string in the output. """ - if chain: - if self.__cause__ is not None: - yield from self.__cause__.format(chain=chain) - yield _cause_message - elif (self.__context__ is not None and - not self.__suppress_context__): - yield from self.__context__.format(chain=chain) - yield _context_message - if self.stack: - yield 'Traceback (most recent call last):\n' - yield from self.stack.format() - yield from self.format_exception_only() + + output = [] + exc = self + while exc: + if chain: + if exc.__cause__ is not None: + chained_msg = _cause_message + chained_exc = exc.__cause__ + elif (exc.__context__ is not None and + not exc.__suppress_context__): + chained_msg = _context_message + chained_exc = exc.__context__ + else: + chained_msg = None + chained_exc = None + + output.append((chained_msg, exc)) + exc = chained_exc + else: + output.append((None, exc)) + exc = None + + for msg, exc in reversed(output): + if msg is not None: + yield msg + if exc.stack: + yield 'Traceback (most recent call last):\n' + yield from exc.stack.format() + yield from exc.format_exception_only() diff --git a/Misc/NEWS.d/next/Library/2021-01-12-19-34-06.bpo-42848.5G8oBl.rst b/Misc/NEWS.d/next/Library/2021-01-12-19-34-06.bpo-42848.5G8oBl.rst new file mode 100644 index 0000000000000..4490b6ae3405e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-12-19-34-06.bpo-42848.5G8oBl.rst @@ -0,0 +1 @@ +Removed recursion from :class:`~traceback.TracebackException` to allow it to handle long exception chains. \ No newline at end of file From webhook-mailer at python.org Tue Jan 12 18:16:46 2021 From: webhook-mailer at python.org (vstinner) Date: Tue, 12 Jan 2021 23:16:46 -0000 Subject: [Python-checkins] bpo-37324: Remove ABC aliases from collections (GH-23754) Message-ID: https://github.com/python/cpython/commit/c47c78b878ff617164b2b94ff711a6103e781753 commit: c47c78b878ff617164b2b94ff711a6103e781753 branch: master author: Hugo van Kemenade committer: vstinner date: 2021-01-13T00:16:37+01:00 summary: bpo-37324: Remove ABC aliases from collections (GH-23754) Remove deprecated aliases to Abstract Base Classes from the collections module. files: A Misc/NEWS.d/next/Core and Builtins/2020-12-12-20-09-12.bpo-37324.jB-9_U.rst M Doc/library/collections.rst M Doc/whatsnew/3.10.rst M Lib/collections/__init__.py diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 1293f542b0437..aa0acfaae45a5 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -33,11 +33,6 @@ Python's general purpose built-in containers, :class:`dict`, :class:`list`, :class:`UserString` wrapper around string objects for easier string subclassing ===================== ==================================================================== -.. deprecated-removed:: 3.3 3.10 - Moved :ref:`collections-abstract-base-classes` to the :mod:`collections.abc` module. - For backwards compatibility, they continue to be visible in this module through - Python 3.9. - :class:`ChainMap` objects ------------------------- diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index d2b3ed75f8c27..7a51a9dbfb83a 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -550,6 +550,10 @@ Removed now due to the _warnings module was converted to a builtin module in 2.6. (Contributed by Hai Shi in :issue:`42599`.) +* Remove deprecated aliases to :ref:`collections-abstract-base-classes` from + the :mod:`collections` module. + (Contributed by Victor Stinner in :issue:`37324`.) + Porting to Python 3.10 ====================== diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 9c25a2d2784b8..7d338131d6740 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -51,22 +51,6 @@ pass -def __getattr__(name): - # For backwards compatibility, continue to make the collections ABCs - # through Python 3.6 available through the collections module. - # Note, no new collections ABCs were added in Python 3.7 - if name in _collections_abc.__all__: - obj = getattr(_collections_abc, name) - import warnings - warnings.warn("Using or importing the ABCs from 'collections' instead " - "of from 'collections.abc' is deprecated since Python 3.3, " - "and in 3.10 it will stop working", - DeprecationWarning, stacklevel=2) - globals()[name] = obj - return obj - raise AttributeError(f'module {__name__!r} has no attribute {name!r}') - - ################################################################################ ### OrderedDict ################################################################################ diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-12-12-20-09-12.bpo-37324.jB-9_U.rst b/Misc/NEWS.d/next/Core and Builtins/2020-12-12-20-09-12.bpo-37324.jB-9_U.rst new file mode 100644 index 0000000000000..5b57da4de5a77 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-12-12-20-09-12.bpo-37324.jB-9_U.rst @@ -0,0 +1,2 @@ +Remove deprecated aliases to :ref:`collections-abstract-base-classes` from +the :mod:`collections` module. From webhook-mailer at python.org Wed Jan 13 02:48:09 2021 From: webhook-mailer at python.org (ethanfurman) Date: Wed, 13 Jan 2021 07:48:09 -0000 Subject: [Python-checkins] bpo-42901: [Enum] move member creation to `__set_name__` (GH-24196) Message-ID: https://github.com/python/cpython/commit/c314e60388282d9829762fb6c30b12e2807caa19 commit: c314e60388282d9829762fb6c30b12e2807caa19 branch: master author: Ethan Furman committer: ethanfurman date: 2021-01-12T23:47:57-08:00 summary: bpo-42901: [Enum] move member creation to `__set_name__` (GH-24196) `type.__new__` calls `__set_name__` and `__init_subclass__`, which means that any work metaclasses do after calling `super().__new__()` will not be available to those two methods. In particular, `Enum` classes that want to make use of `__init_subclass__` will not see any members. Almost all customization is therefore moved to before the `type.__new__()` call, including changing all members to a proto member descriptor with a `__set_name__` that will do the final conversion of a member to be an instance of the `Enum` class. files: A Misc/NEWS.d/next/Library/2021-01-11-17-36-59.bpo-42901.gFd-ta.rst M Lib/enum.py M Lib/inspect.py M Lib/test/test_enum.py diff --git a/Lib/enum.py b/Lib/enum.py index a93642068f743..8ca385420da02 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -1,11 +1,13 @@ import sys from types import MappingProxyType, DynamicClassAttribute +from builtins import property as _bltin_property __all__ = [ 'EnumMeta', 'Enum', 'IntEnum', 'StrEnum', 'Flag', 'IntFlag', 'auto', 'unique', + 'property', ] @@ -54,14 +56,20 @@ def _is_private(cls_name, name): else: return False -def _make_class_unpicklable(cls): +def _make_class_unpicklable(obj): """ - Make the given class un-picklable. + Make the given obj un-picklable. + + obj should be either a dictionary, on an Enum """ def _break_on_call_reduce(self, proto): raise TypeError('%r cannot be pickled' % self) - cls.__reduce_ex__ = _break_on_call_reduce - cls.__module__ = '' + if isinstance(obj, dict): + obj['__reduce_ex__'] = _break_on_call_reduce + obj['__module__'] = '' + else: + setattr(obj, '__reduce_ex__', _break_on_call_reduce) + setattr(obj, '__module__', '') _auto_null = object() class auto: @@ -70,6 +78,125 @@ class auto: """ value = _auto_null +class property(DynamicClassAttribute): + """ + This is a descriptor, used to define attributes that act differently + when accessed through an enum member and through an enum class. + Instance access is the same as property(), but access to an attribute + through the enum class will instead look in the class' _member_map_ for + a corresponding enum member. + """ + + def __get__(self, instance, ownerclass=None): + if instance is None: + try: + return ownerclass._member_map_[self.name] + except KeyError: + raise AttributeError('%r not found in %r' % (self.name, ownerclass.__name__)) + else: + if self.fget is None: + raise AttributeError('%s: cannot read attribute %r' % (ownerclass.__name__, self.name)) + else: + return self.fget(instance) + + def __set__(self, instance, value): + if self.fset is None: + raise AttributeError("%s: cannot set attribute %r" % (self.clsname, self.name)) + else: + return self.fset(instance, value) + + def __delete__(self, instance): + if self.fdel is None: + raise AttributeError("%s: cannot delete attribute %r" % (self.clsname, self.name)) + else: + return self.fdel(instance) + + def __set_name__(self, ownerclass, name): + self.name = name + self.clsname = ownerclass.__name__ + + +class _proto_member: + """ + intermediate step for enum members between class execution and final creation + """ + + def __init__(self, value): + self.value = value + + def __set_name__(self, enum_class, member_name): + """ + convert each quasi-member into an instance of the new enum class + """ + # first step: remove ourself from enum_class + delattr(enum_class, member_name) + # second step: create member based on enum_class + value = self.value + if not isinstance(value, tuple): + args = (value, ) + else: + args = value + if enum_class._member_type_ is tuple: # special case for tuple enums + args = (args, ) # wrap it one more time + if not enum_class._use_args_: + enum_member = enum_class._new_member_(enum_class) + if not hasattr(enum_member, '_value_'): + enum_member._value_ = value + else: + enum_member = enum_class._new_member_(enum_class, *args) + if not hasattr(enum_member, '_value_'): + if enum_class._member_type_ is object: + enum_member._value_ = value + else: + enum_member._value_ = enum_class._member_type_(*args) + value = enum_member._value_ + enum_member._name_ = member_name + enum_member.__objclass__ = enum_class + enum_member.__init__(*args) + # If another member with the same value was already defined, the + # new member becomes an alias to the existing one. + for name, canonical_member in enum_class._member_map_.items(): + if canonical_member._value_ == enum_member._value_: + enum_member = canonical_member + break + else: + # no other instances found, record this member in _member_names_ + enum_class._member_names_.append(member_name) + # get redirect in place before adding to _member_map_ + # but check for other instances in parent classes first + need_override = False + descriptor = None + for base in enum_class.__mro__[1:]: + descriptor = base.__dict__.get(member_name) + if descriptor is not None: + if isinstance(descriptor, (property, DynamicClassAttribute)): + break + else: + need_override = True + # keep looking for an enum.property + if descriptor and not need_override: + # previous enum.property found, no further action needed + pass + else: + redirect = property() + redirect.__set_name__(enum_class, member_name) + if descriptor and need_override: + # previous enum.property found, but some other inherited attribute + # is in the way; copy fget, fset, fdel to this one + redirect.fget = descriptor.fget + redirect.fset = descriptor.fset + redirect.fdel = descriptor.fdel + setattr(enum_class, member_name, redirect) + # now add to _member_map_ (even aliases) + enum_class._member_map_[member_name] = enum_member + try: + # This may fail if value is not hashable. We can't add the value + # to the map, and by-value lookups for this value will be + # linear. + enum_class._value2member_map_[value] = enum_member + except TypeError: + pass + class _EnumDict(dict): """ @@ -195,46 +322,39 @@ def __new__(metacls, cls, bases, classdict, **kwds): ignore = classdict['_ignore_'] for key in ignore: classdict.pop(key, None) - member_type, first_enum = metacls._get_mixins_(cls, bases) - __new__, save_new, use_args = metacls._find_new_( - classdict, member_type, first_enum, - ) - - # save enum items into separate mapping so they don't get baked into - # the new class - enum_members = {k: classdict[k] for k in classdict._member_names} - for name in classdict._member_names: - del classdict[name] - - # adjust the sunders - _order_ = classdict.pop('_order_', None) - + # + # grab member names + member_names = classdict._member_names + # # check for illegal enum names (any others?) - invalid_names = set(enum_members) & {'mro', ''} + invalid_names = set(member_names) & {'mro', ''} if invalid_names: raise ValueError('Invalid enum member name: {0}'.format( ','.join(invalid_names))) - - # create a default docstring if one has not been provided - if '__doc__' not in classdict: - classdict['__doc__'] = 'An enumeration.' - - enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) - enum_class._member_names_ = [] # names in definition order - enum_class._member_map_ = {} # name->value map - enum_class._member_type_ = member_type - - # save DynamicClassAttribute attributes from super classes so we know - # if we can take the shortcut of storing members in the class dict - dynamic_attributes = { - k for c in enum_class.mro() - for k, v in c.__dict__.items() - if isinstance(v, DynamicClassAttribute) - } - - # Reverse value->name map for hashable values. - enum_class._value2member_map_ = {} - + # + # adjust the sunders + _order_ = classdict.pop('_order_', None) + # convert to normal dict + classdict = dict(classdict.items()) + # + # data type of member and the controlling Enum class + member_type, first_enum = metacls._get_mixins_(cls, bases) + __new__, save_new, use_args = metacls._find_new_( + classdict, member_type, first_enum, + ) + classdict['_new_member_'] = __new__ + classdict['_use_args_'] = use_args + # + # convert future enum members into temporary _proto_members + for name in member_names: + classdict[name] = _proto_member(classdict[name]) + # + # house keeping structures + classdict['_member_names_'] = [] + classdict['_member_map_'] = {} + classdict['_value2member_map_'] = {} + classdict['_member_type_'] = member_type + # # If a custom type is mixed into the Enum, and it does not know how # to pickle itself, pickle.dumps will succeed but pickle.loads will # fail. Rather than have the error show up later and possibly far @@ -250,58 +370,21 @@ def __new__(metacls, cls, bases, classdict, **kwds): methods = ('__getnewargs_ex__', '__getnewargs__', '__reduce_ex__', '__reduce__') if not any(m in member_type.__dict__ for m in methods): - _make_class_unpicklable(enum_class) - - # instantiate them, checking for duplicates as we go - # we instantiate first instead of checking for duplicates first in case - # a custom __new__ is doing something funky with the values -- such as - # auto-numbering ;) - for member_name in classdict._member_names: - value = enum_members[member_name] - if not isinstance(value, tuple): - args = (value, ) - else: - args = value - if member_type is tuple: # special case for tuple enums - args = (args, ) # wrap it one more time - if not use_args: - enum_member = __new__(enum_class) - if not hasattr(enum_member, '_value_'): - enum_member._value_ = value - else: - enum_member = __new__(enum_class, *args) - if not hasattr(enum_member, '_value_'): - if member_type is object: - enum_member._value_ = value - else: - enum_member._value_ = member_type(*args) - value = enum_member._value_ - enum_member._name_ = member_name - enum_member.__objclass__ = enum_class - enum_member.__init__(*args) - # If another member with the same value was already defined, the - # new member becomes an alias to the existing one. - for name, canonical_member in enum_class._member_map_.items(): - if canonical_member._value_ == enum_member._value_: - enum_member = canonical_member - break - else: - # Aliases don't appear in member names (only in __members__). - enum_class._member_names_.append(member_name) - # performance boost for any member that would not shadow - # a DynamicClassAttribute - if member_name not in dynamic_attributes: - setattr(enum_class, member_name, enum_member) - # now add to _member_map_ - enum_class._member_map_[member_name] = enum_member - try: - # This may fail if value is not hashable. We can't add the value - # to the map, and by-value lookups for this value will be - # linear. - enum_class._value2member_map_[value] = enum_member - except TypeError: - pass - + _make_class_unpicklable(classdict) + # + # create a default docstring if one has not been provided + if '__doc__' not in classdict: + classdict['__doc__'] = 'An enumeration.' + try: + exc = None + enum_class = super().__new__(metacls, cls, bases, classdict, **kwds) + except RuntimeError as e: + # any exceptions raised by member.__new__ will get converted to a + # RuntimeError, so get that original exception back and raise it instead + exc = e.__cause__ or e + if exc is not None: + raise exc + # # double check that repr and friends are not the mixin's or various # things break (such as pickle) # however, if the method is defined in the Enum itself, don't replace @@ -314,7 +397,7 @@ def __new__(metacls, cls, bases, classdict, **kwds): enum_method = getattr(first_enum, name, None) if obj_method is not None and obj_method is class_method: setattr(enum_class, name, enum_method) - + # # replace any other __new__ with our own (as long as Enum is not None, # anyway) -- again, this is to support pickle if Enum is not None: @@ -323,14 +406,14 @@ def __new__(metacls, cls, bases, classdict, **kwds): if save_new: enum_class.__new_member__ = __new__ enum_class.__new__ = Enum.__new__ - + # # py3 support for definition order (helps keep py2/py3 code in sync) if _order_ is not None: if isinstance(_order_, str): _order_ = _order_.replace(',', ' ').split() if _order_ != enum_class._member_names_: raise TypeError('member order does not match _order_') - + # return enum_class def __bool__(self): @@ -424,7 +507,7 @@ def __iter__(cls): def __len__(cls): return len(cls._member_names_) - @property + @_bltin_property def __members__(cls): """ Returns a mapping of member name->value. @@ -491,7 +574,6 @@ def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, s else: member_name, member_value = item classdict[member_name] = member_value - enum_class = metacls.__new__(metacls, class_name, bases, classdict) # TODO: replace the frame hack if a blessed way to know the calling # module is ever developed @@ -501,13 +583,13 @@ def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, s except (AttributeError, ValueError, KeyError): pass if module is None: - _make_class_unpicklable(enum_class) + _make_class_unpicklable(classdict) else: - enum_class.__module__ = module + classdict['__module__'] = module if qualname is not None: - enum_class.__qualname__ = qualname + classdict['__qualname__'] = qualname - return enum_class + return metacls.__new__(metacls, class_name, bases, classdict) def _convert_(cls, name, module, filter, source=None): """ @@ -756,19 +838,20 @@ def __hash__(self): def __reduce_ex__(self, proto): return self.__class__, (self._value_, ) - # DynamicClassAttribute is used to provide access to the `name` and - # `value` properties of enum members while keeping some measure of + # enum.property is used to provide access to the `name` and + # `value` attributes of enum members while keeping some measure of # protection from modification, while still allowing for an enumeration # to have members named `name` and `value`. This works because enumeration - # members are not set directly on the enum class -- __getattr__ is - # used to look them up. + # members are not set directly on the enum class; they are kept in a + # separate structure, _member_map_, which is where enum.property looks for + # them - @DynamicClassAttribute + @property def name(self): """The name of the Enum member.""" return self._name_ - @DynamicClassAttribute + @property def value(self): """The value of the Enum member.""" return self._value_ diff --git a/Lib/inspect.py b/Lib/inspect.py index 70c5ef7bb6471..1f2cdebd899f8 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -408,7 +408,7 @@ def classify_class_attrs(cls): # attribute with the same name as a DynamicClassAttribute exists. for base in mro: for k, v in base.__dict__.items(): - if isinstance(v, types.DynamicClassAttribute): + if isinstance(v, types.DynamicClassAttribute) and v.fget is not None: names.append(k) result = [] processed = set() diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 196438ada1582..3ea623e9c883c 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -1677,6 +1677,13 @@ def test(self): class Test(Base): test = 1 self.assertEqual(Test.test.test, 'dynamic') + class Base2(Enum): + @enum.property + def flash(self): + return 'flashy dynamic' + class Test(Base2): + flash = 1 + self.assertEqual(Test.flash.flash, 'flashy dynamic') def test_no_duplicates(self): class UniqueEnum(Enum): @@ -2118,7 +2125,7 @@ class ThirdFailedStrEnum(StrEnum): class ThirdFailedStrEnum(StrEnum): one = '1' two = b'2', 'ascii', 9 - + @unittest.skipUnless( @@ -3269,7 +3276,7 @@ def test_inspect_getmembers(self): ('value', Enum.__dict__['value']), )) result = dict(inspect.getmembers(self.Color)) - self.assertEqual(values.keys(), result.keys()) + self.assertEqual(set(values.keys()), set(result.keys())) failed = False for k in values.keys(): if result[k] != values[k]: @@ -3306,6 +3313,10 @@ def test_inspect_classify_class_attrs(self): values.sort(key=lambda item: item.name) result = list(inspect.classify_class_attrs(self.Color)) result.sort(key=lambda item: item.name) + self.assertEqual( + len(values), len(result), + "%s != %s" % ([a.name for a in values], [a.name for a in result]) + ) failed = False for v, r in zip(values, result): if r != v: diff --git a/Misc/NEWS.d/next/Library/2021-01-11-17-36-59.bpo-42901.gFd-ta.rst b/Misc/NEWS.d/next/Library/2021-01-11-17-36-59.bpo-42901.gFd-ta.rst new file mode 100644 index 0000000000000..206bca1fb634c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-11-17-36-59.bpo-42901.gFd-ta.rst @@ -0,0 +1,3 @@ +[Enum] move member creation from ``EnumMeta.__new__`` to +``_proto_member.__set_name__``, allowing members to be created and visible +in ``__init_subclass__``. From webhook-mailer at python.org Wed Jan 13 05:15:50 2021 From: webhook-mailer at python.org (corona10) Date: Wed, 13 Jan 2021 10:15:50 -0000 Subject: [Python-checkins] bpo-1635741: Fix PyModule_AddObjectRef to use EXPORT_FUNC (GH-24205) Message-ID: https://github.com/python/cpython/commit/2396614b8958ad202378fd71a598eb4106ac5896 commit: 2396614b8958ad202378fd71a598eb4106ac5896 branch: master author: Dong-hee Na committer: corona10 date: 2021-01-13T19:15:40+09:00 summary: bpo-1635741: Fix PyModule_AddObjectRef to use EXPORT_FUNC (GH-24205) files: M PC/python3dll.c diff --git a/PC/python3dll.c b/PC/python3dll.c index fa44a46fb7622..683bba3a9364d 100644 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -346,6 +346,7 @@ EXPORT_FUNC(PyMemoryView_GetContiguous) EXPORT_FUNC(PyModule_AddFunctions) EXPORT_FUNC(PyModule_AddIntConstant) EXPORT_FUNC(PyModule_AddObject) +EXPORT_FUNC(PyModule_AddObjectRef) EXPORT_FUNC(PyModule_AddStringConstant) EXPORT_FUNC(PyModule_AddType) EXPORT_FUNC(PyModule_Create2) @@ -797,7 +798,6 @@ EXPORT_DATA(PyMemoryView_Type) EXPORT_DATA(PyMethodDescr_Type) EXPORT_DATA(PyModule_Type) EXPORT_DATA(PyModuleDef_Type) -EXPORT_DATA(PyModule_AddObjectRef) EXPORT_DATA(PyNullImporter_Type) EXPORT_DATA(PyODict_Type) EXPORT_DATA(PyODictItems_Type) From webhook-mailer at python.org Wed Jan 13 07:05:54 2021 From: webhook-mailer at python.org (markshannon) Date: Wed, 13 Jan 2021 12:05:54 -0000 Subject: [Python-checkins] bpo-42908: Mark cleanup code at end of try-except and with artificial (#24202) Message-ID: https://github.com/python/cpython/commit/3bd6035b6baf1a7d51b7cc2c6bb2c81886236b67 commit: 3bd6035b6baf1a7d51b7cc2c6bb2c81886236b67 branch: master author: Mark Shannon committer: markshannon date: 2021-01-13T12:05:43Z summary: bpo-42908: Mark cleanup code at end of try-except and with artificial (#24202) * Mark bytecodes at end of try-except as artificial. * Make sure that the CFG is consistent throughout optimiization. * Extend line-number propagation logic so that implicit returns after 'try-except' or 'with' have the correct line numbers. * Update importlib files: M Lib/test/test_dis.py 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_dis.py b/Lib/test/test_dis.py index 0383124464ff3..e342a14bf0156 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -1026,7 +1026,7 @@ def jumpy(): Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=42, argval=42, argrepr='', offset=36, starts_line=None, is_jump_target=False), Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=38, starts_line=8, is_jump_target=False), Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=52, argval=52, argrepr='', offset=40, starts_line=None, is_jump_target=False), - Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=8, argval=8, argrepr='', offset=42, starts_line=None, is_jump_target=True), + Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=8, argval=8, argrepr='', offset=42, starts_line=7, is_jump_target=True), Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=44, starts_line=10, is_jump_target=True), Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=46, starts_line=None, is_jump_target=False), Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='', offset=48, starts_line=None, is_jump_target=False), diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 83b03925c3a19..42989862502ac 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -916,6 +916,46 @@ def func(): (7, 'line'), (7, 'return')]) + def test_if_false_in_with(self): + + class C: + def __enter__(self): + return self + def __exit__(*args): + pass + + def func(): + with C(): + if False: + pass + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (-5, 'call'), + (-4, 'line'), + (-4, 'return'), + (2, 'line'), + (-3, 'call'), + (-2, 'line'), + (-2, 'return'), + (2, 'return')]) + + def test_if_false_in_try_except(self): + + def func(): + try: + if False: + pass + except Exception: + X + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (2, 'line'), + (2, '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 cf5c639feab7f..268c5aa9eab2e 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -95,7 +95,8 @@ typedef struct basicblock_ { struct basicblock_ *b_next; /* b_return is true if a RETURN_VALUE opcode is inserted. */ unsigned b_return : 1; - unsigned b_reachable : 1; + /* Number of predecssors that a block has. */ + int b_predecessors; /* Basic block has no fall through (it ends with a return, raise or jump) */ unsigned b_nofallthrough : 1; /* Basic block exits scope (it ends with a return or raise) */ @@ -825,6 +826,7 @@ compiler_copy_block(struct compiler *c, basicblock *block) result->b_instr[n] = block->b_instr[i]; } result->b_exit = block->b_exit; + result->b_nofallthrough = 1; return result; } @@ -1169,7 +1171,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg) */ static int -compiler_addop(struct compiler *c, int opcode) +compiler_addop_line(struct compiler *c, int opcode, int line) { basicblock *b; struct instr *i; @@ -1184,10 +1186,23 @@ compiler_addop(struct compiler *c, int opcode) i->i_oparg = 0; if (opcode == RETURN_VALUE) b->b_return = 1; - i->i_lineno = c->u->u_lineno; + i->i_lineno = line; return 1; } +static int +compiler_addop(struct compiler *c, int opcode) +{ + return compiler_addop_line(c, opcode, c->u->u_lineno); +} + +static int +compiler_addop_noline(struct compiler *c, int opcode) +{ + return compiler_addop_line(c, opcode, -1); +} + + static Py_ssize_t compiler_add_o(PyObject *dict, PyObject *o) { @@ -1448,6 +1463,11 @@ compiler_addop_j_noline(struct compiler *c, int opcode, basicblock *b) return 0; \ } +#define ADDOP_NOLINE(C, OP) { \ + if (!compiler_addop_noline((C), (OP))) \ + return 0; \ +} + #define ADDOP_IN_SCOPE(C, OP) { \ if (!compiler_addop((C), (OP))) { \ compiler_exit_scope(c); \ @@ -2955,9 +2975,7 @@ compiler_try_finally(struct compiler *c, stmt_ty s) else { VISIT_SEQ(c, stmt, s->v.Try.body); } - /* Mark code as artificial */ - c->u->u_lineno = -1; - ADDOP(c, POP_BLOCK); + ADDOP_NOLINE(c, POP_BLOCK); compiler_pop_fblock(c, FINALLY_TRY, body); VISIT_SEQ(c, stmt, s->v.Try.finalbody); ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, exit); @@ -3019,9 +3037,9 @@ compiler_try_except(struct compiler *c, stmt_ty s) if (!compiler_push_fblock(c, TRY_EXCEPT, body, NULL, NULL)) return 0; VISIT_SEQ(c, stmt, s->v.Try.body); - ADDOP(c, POP_BLOCK); compiler_pop_fblock(c, TRY_EXCEPT, body); - ADDOP_JUMP(c, JUMP_FORWARD, orelse); + ADDOP_NOLINE(c, POP_BLOCK); + ADDOP_JUMP_NOLINE(c, JUMP_FORWARD, orelse); n = asdl_seq_LEN(s->v.Try.handlers); compiler_use_next_block(c, except); /* Runtime will push a block here, so we need to account for that */ @@ -4925,6 +4943,9 @@ compiler_with(struct compiler *c, stmt_ty s, int pos) else if (!compiler_with(c, s, pos)) return 0; + + /* Mark all following code as artificial */ + c->u->u_lineno = -1; ADDOP(c, POP_BLOCK); compiler_pop_fblock(c, WITH, block); @@ -6396,22 +6417,24 @@ mark_reachable(struct assembler *a) { if (stack == NULL) { return -1; } - a->a_entry->b_reachable = 1; + a->a_entry->b_predecessors = 1; *sp++ = a->a_entry; while (sp > stack) { basicblock *b = *(--sp); - if (b->b_next && !b->b_nofallthrough && b->b_next->b_reachable == 0) { - b->b_next->b_reachable = 1; - *sp++ = b->b_next; + if (b->b_next && !b->b_nofallthrough) { + if (b->b_next->b_predecessors == 0) { + *sp++ = b->b_next; + } + b->b_next->b_predecessors++; } for (int i = 0; i < b->b_iused; i++) { basicblock *target; if (is_jump(&b->b_instr[i])) { target = b->b_instr[i].i_target; - if (target->b_reachable == 0) { - target->b_reachable = 1; + if (target->b_predecessors == 0) { *sp++ = target; } + target->b_predecessors++; } } } @@ -6419,13 +6442,46 @@ mark_reachable(struct assembler *a) { return 0; } +static void +eliminate_empty_basic_blocks(basicblock *entry) { + /* Eliminate empty blocks */ + for (basicblock *b = entry; b != NULL; b = b->b_next) { + basicblock *next = b->b_next; + if (next) { + while (next->b_iused == 0 && next->b_next) { + next = next->b_next; + } + b->b_next = next; + } + } + for (basicblock *b = entry; b != NULL; b = b->b_next) { + if (b->b_iused == 0) { + continue; + } + if (is_jump(&b->b_instr[b->b_iused-1])) { + basicblock *target = b->b_instr[b->b_iused-1].i_target; + while (target->b_iused == 0) { + target = target->b_next; + } + b->b_instr[b->b_iused-1].i_target = target; + } + } +} + + /* If an instruction has no line number, but it's predecessor in the BB does, - * then copy the line number. This reduces the size of the line number table, + * then copy the line number. If a successor block has no line number, and only + * one predecessor, then inherit the line number. + * This ensures that all exit blocks (with one predecessor) receive a line number. + * Also reduces the size of the line number table, * but has no impact on the generated line number events. */ static void -minimize_lineno_table(struct assembler *a) { +propogate_line_numbers(struct assembler *a) { for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { + if (b->b_iused == 0) { + continue; + } int prev_lineno = -1; for (int i = 0; i < b->b_iused; i++) { if (b->b_instr[i].i_lineno < 0) { @@ -6435,7 +6491,27 @@ minimize_lineno_table(struct assembler *a) { prev_lineno = b->b_instr[i].i_lineno; } } - + if (!b->b_nofallthrough && b->b_next->b_predecessors == 1) { + assert(b->b_next->b_iused); + if (b->b_next->b_instr[0].i_lineno < 0) { + b->b_next->b_instr[0].i_lineno = prev_lineno; + } + } + if (is_jump(&b->b_instr[b->b_iused-1])) { + switch (b->b_instr[b->b_iused-1].i_opcode) { + /* Note: Only actual jumps, not exception handlers */ + case SETUP_ASYNC_WITH: + case SETUP_WITH: + case SETUP_FINALLY: + continue; + } + basicblock *target = b->b_instr[b->b_iused-1].i_target; + if (target->b_predecessors == 1) { + if (target->b_instr[0].i_lineno < 0) { + target->b_instr[0].i_lineno = prev_lineno; + } + } + } } } @@ -6456,23 +6532,25 @@ optimize_cfg(struct assembler *a, PyObject *consts) return -1; } clean_basic_block(b); - assert(b->b_reachable == 0); + assert(b->b_predecessors == 0); } if (mark_reachable(a)) { return -1; } /* Delete unreachable instructions */ for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { - if (b->b_reachable == 0) { + if (b->b_predecessors == 0) { b->b_iused = 0; b->b_nofallthrough = 0; } } + eliminate_empty_basic_blocks(a->a_entry); /* Delete jump instructions made redundant by previous step. If a non-empty block ends with a jump instruction, check if the next non-empty block reached through normal flow control is the target of that jump. If it is, then the jump instruction is redundant and can be deleted. */ + int maybe_empty_blocks = 0; for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { if (b->b_iused > 0) { struct instr *b_last_instr = &b->b_instr[b->b_iused - 1]; @@ -6480,11 +6558,8 @@ optimize_cfg(struct assembler *a, PyObject *consts) b_last_instr->i_opcode == POP_JUMP_IF_TRUE || b_last_instr->i_opcode == JUMP_ABSOLUTE || b_last_instr->i_opcode == JUMP_FORWARD) { - basicblock *b_next_act = b->b_next; - while (b_next_act != NULL && b_next_act->b_iused == 0) { - b_next_act = b_next_act->b_next; - } - if (b_last_instr->i_target == b_next_act) { + if (b_last_instr->i_target == b->b_next) { + assert(b->b_next->b_iused); b->b_nofallthrough = 0; switch(b_last_instr->i_opcode) { case POP_JUMP_IF_FALSE: @@ -6497,19 +6572,17 @@ optimize_cfg(struct assembler *a, PyObject *consts) case JUMP_FORWARD: b_last_instr->i_opcode = NOP; clean_basic_block(b); + maybe_empty_blocks = 1; break; } - /* The blocks after this one are now reachable through it */ - b_next_act = b->b_next; - while (b_next_act != NULL && b_next_act->b_iused == 0) { - b_next_act->b_reachable = 1; - b_next_act = b_next_act->b_next; - } } } } } - minimize_lineno_table(a); + if (maybe_empty_blocks) { + eliminate_empty_basic_blocks(a->a_entry); + } + propogate_line_numbers(a); return 0; } diff --git a/Python/importlib.h b/Python/importlib.h index 45cd13a483dd5..6a0fc6e5af61a 100644 --- a/Python/importlib.h +++ b/Python/importlib.h @@ -183,1383 +183,1384 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 105,114,101,114,31,0,0,0,218,7,114,101,108,101,97,115, 101,169,2,114,33,0,0,0,114,40,0,0,0,114,5,0, 0,0,114,5,0,0,0,114,6,0,0,0,114,43,0,0, - 0,100,0,0,0,115,38,0,0,0,8,6,8,1,2,1, + 0,100,0,0,0,115,40,0,0,0,8,6,8,1,2,1, 2,1,8,1,20,1,6,1,14,1,14,1,10,9,8,248, - 12,1,12,1,44,1,10,2,10,1,2,244,8,14,255,128, - 122,19,95,77,111,100,117,108,101,76,111,99,107,46,97,99, - 113,117,105,114,101,99,1,0,0,0,0,0,0,0,0,0, - 0,0,2,0,0,0,8,0,0,0,67,0,0,0,115,144, - 0,0,0,116,0,160,1,161,0,125,1,124,0,106,2,143, - 110,1,0,124,0,106,3,124,1,107,3,114,34,116,4,100, - 1,131,1,130,1,124,0,106,5,100,2,107,4,115,48,74, - 0,130,1,124,0,4,0,106,5,100,3,56,0,2,0,95, - 5,124,0,106,5,100,2,107,2,114,108,100,0,124,0,95, - 3,124,0,106,6,114,108,124,0,4,0,106,6,100,3,56, - 0,2,0,95,6,124,0,106,7,160,8,161,0,1,0,87, - 0,100,0,4,0,4,0,131,3,1,0,100,0,83,0,49, - 0,115,130,119,1,1,0,1,0,1,0,89,0,1,0,100, - 0,83,0,41,4,78,250,31,99,97,110,110,111,116,32,114, - 101,108,101,97,115,101,32,117,110,45,97,99,113,117,105,114, - 101,100,32,108,111,99,107,114,25,0,0,0,114,42,0,0, - 0,41,9,114,26,0,0,0,114,35,0,0,0,114,27,0, - 0,0,114,29,0,0,0,218,12,82,117,110,116,105,109,101, - 69,114,114,111,114,114,30,0,0,0,114,31,0,0,0,114, - 28,0,0,0,114,44,0,0,0,114,45,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,44,0, - 0,0,125,0,0,0,115,24,0,0,0,8,1,8,1,10, - 1,8,1,14,1,14,1,10,1,6,1,6,1,14,1,46, - 1,255,128,122,19,95,77,111,100,117,108,101,76,111,99,107, - 46,114,101,108,101,97,115,101,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,18,0,0,0,100,1,160,0,124,0,106,1,116,2, - 124,0,131,1,161,2,83,0,41,2,78,122,23,95,77,111, - 100,117,108,101,76,111,99,107,40,123,33,114,125,41,32,97, - 116,32,123,125,169,3,218,6,102,111,114,109,97,116,114,20, - 0,0,0,218,2,105,100,169,1,114,33,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,218,8,95, - 95,114,101,112,114,95,95,138,0,0,0,115,4,0,0,0, - 18,1,255,128,122,20,95,77,111,100,117,108,101,76,111,99, - 107,46,95,95,114,101,112,114,95,95,78,41,9,114,9,0, - 0,0,114,8,0,0,0,114,1,0,0,0,114,10,0,0, - 0,114,34,0,0,0,114,41,0,0,0,114,43,0,0,0, - 114,44,0,0,0,114,52,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,23, - 0,0,0,65,0,0,0,115,16,0,0,0,8,0,4,1, - 8,5,8,8,8,21,8,25,12,13,255,128,114,23,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,48,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,83,0,41, - 11,218,16,95,68,117,109,109,121,77,111,100,117,108,101,76, - 111,99,107,122,86,65,32,115,105,109,112,108,101,32,95,77, - 111,100,117,108,101,76,111,99,107,32,101,113,117,105,118,97, - 108,101,110,116,32,102,111,114,32,80,121,116,104,111,110,32, - 98,117,105,108,100,115,32,119,105,116,104,111,117,116,10,32, - 32,32,32,109,117,108,116,105,45,116,104,114,101,97,100,105, - 110,103,32,115,117,112,112,111,114,116,46,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,16,0,0,0,124,1,124,0,95,0,100, - 1,124,0,95,1,100,0,83,0,114,24,0,0,0,41,2, - 114,20,0,0,0,114,30,0,0,0,114,32,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,34, - 0,0,0,146,0,0,0,115,6,0,0,0,6,1,10,1, - 255,128,122,25,95,68,117,109,109,121,77,111,100,117,108,101, - 76,111,99,107,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,18,0,0,0,124,0,4,0,106, - 0,100,1,55,0,2,0,95,0,100,2,83,0,41,3,78, - 114,42,0,0,0,84,41,1,114,30,0,0,0,114,51,0, + 12,1,12,1,14,1,30,128,10,2,10,1,2,244,8,14, + 255,128,122,19,95,77,111,100,117,108,101,76,111,99,107,46, + 97,99,113,117,105,114,101,99,1,0,0,0,0,0,0,0, + 0,0,0,0,2,0,0,0,8,0,0,0,67,0,0,0, + 115,144,0,0,0,116,0,160,1,161,0,125,1,124,0,106, + 2,143,110,1,0,124,0,106,3,124,1,107,3,114,34,116, + 4,100,1,131,1,130,1,124,0,106,5,100,2,107,4,115, + 48,74,0,130,1,124,0,4,0,106,5,100,3,56,0,2, + 0,95,5,124,0,106,5,100,2,107,2,114,108,100,0,124, + 0,95,3,124,0,106,6,114,108,124,0,4,0,106,6,100, + 3,56,0,2,0,95,6,124,0,106,7,160,8,161,0,1, + 0,87,0,100,0,4,0,4,0,131,3,1,0,100,0,83, + 0,49,0,115,130,119,1,1,0,1,0,1,0,89,0,1, + 0,100,0,83,0,41,4,78,250,31,99,97,110,110,111,116, + 32,114,101,108,101,97,115,101,32,117,110,45,97,99,113,117, + 105,114,101,100,32,108,111,99,107,114,25,0,0,0,114,42, + 0,0,0,41,9,114,26,0,0,0,114,35,0,0,0,114, + 27,0,0,0,114,29,0,0,0,218,12,82,117,110,116,105, + 109,101,69,114,114,111,114,114,30,0,0,0,114,31,0,0, + 0,114,28,0,0,0,114,44,0,0,0,114,45,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, + 44,0,0,0,125,0,0,0,115,26,0,0,0,8,1,8, + 1,10,1,8,1,14,1,14,1,10,1,6,1,6,1,14, + 1,10,1,36,128,255,128,122,19,95,77,111,100,117,108,101, + 76,111,99,107,46,114,101,108,101,97,115,101,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,18,0,0,0,100,1,160,0,124,0, + 106,1,116,2,124,0,131,1,161,2,83,0,41,2,78,122, + 23,95,77,111,100,117,108,101,76,111,99,107,40,123,33,114, + 125,41,32,97,116,32,123,125,169,3,218,6,102,111,114,109, + 97,116,114,20,0,0,0,218,2,105,100,169,1,114,33,0, 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, - 0,114,43,0,0,0,150,0,0,0,115,6,0,0,0,14, - 1,4,1,255,128,122,24,95,68,117,109,109,121,77,111,100, - 117,108,101,76,111,99,107,46,97,99,113,117,105,114,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,36,0,0,0,124,0,106, - 0,100,1,107,2,114,18,116,1,100,2,131,1,130,1,124, - 0,4,0,106,0,100,3,56,0,2,0,95,0,100,0,83, - 0,41,4,78,114,25,0,0,0,114,46,0,0,0,114,42, - 0,0,0,41,2,114,30,0,0,0,114,47,0,0,0,114, - 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,114,44,0,0,0,154,0,0,0,115,8,0,0, - 0,10,1,8,1,18,1,255,128,122,24,95,68,117,109,109, - 121,77,111,100,117,108,101,76,111,99,107,46,114,101,108,101, - 97,115,101,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,18,0,0, - 0,100,1,160,0,124,0,106,1,116,2,124,0,131,1,161, - 2,83,0,41,2,78,122,28,95,68,117,109,109,121,77,111, - 100,117,108,101,76,111,99,107,40,123,33,114,125,41,32,97, - 116,32,123,125,114,48,0,0,0,114,51,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,52,0, - 0,0,159,0,0,0,115,4,0,0,0,18,1,255,128,122, - 25,95,68,117,109,109,121,77,111,100,117,108,101,76,111,99, - 107,46,95,95,114,101,112,114,95,95,78,41,8,114,9,0, - 0,0,114,8,0,0,0,114,1,0,0,0,114,10,0,0, - 0,114,34,0,0,0,114,43,0,0,0,114,44,0,0,0, - 114,52,0,0,0,114,5,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,114,53,0,0,0,142,0, - 0,0,115,14,0,0,0,8,0,4,1,8,3,8,4,8, - 4,12,5,255,128,114,53,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,36,0,0,0,101,0,90,1,100,0,90,2, - 100,1,100,2,132,0,90,3,100,3,100,4,132,0,90,4, - 100,5,100,6,132,0,90,5,100,7,83,0,41,8,218,18, - 95,77,111,100,117,108,101,76,111,99,107,77,97,110,97,103, - 101,114,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,16,0,0,0, - 124,1,124,0,95,0,100,0,124,0,95,1,100,0,83,0, - 114,0,0,0,0,41,2,218,5,95,110,97,109,101,218,5, - 95,108,111,99,107,114,32,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,114,34,0,0,0,165,0, - 0,0,115,6,0,0,0,6,1,10,1,255,128,122,27,95, - 77,111,100,117,108,101,76,111,99,107,77,97,110,97,103,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,26,0,0,0,116,0,124,0,106,1,131,1, - 124,0,95,2,124,0,106,2,160,3,161,0,1,0,100,0, - 83,0,114,0,0,0,0,41,4,218,16,95,103,101,116,95, - 109,111,100,117,108,101,95,108,111,99,107,114,55,0,0,0, - 114,56,0,0,0,114,43,0,0,0,114,51,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,9, - 95,95,101,110,116,101,114,95,95,169,0,0,0,115,6,0, - 0,0,12,1,14,1,255,128,122,28,95,77,111,100,117,108, - 101,76,111,99,107,77,97,110,97,103,101,114,46,95,95,101, - 110,116,101,114,95,95,99,1,0,0,0,0,0,0,0,0, - 0,0,0,3,0,0,0,2,0,0,0,79,0,0,0,115, - 14,0,0,0,124,0,106,0,160,1,161,0,1,0,100,0, - 83,0,114,0,0,0,0,41,2,114,56,0,0,0,114,44, - 0,0,0,41,3,114,33,0,0,0,218,4,97,114,103,115, - 90,6,107,119,97,114,103,115,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,218,8,95,95,101,120,105,116,95, - 95,173,0,0,0,115,4,0,0,0,14,1,255,128,122,27, - 95,77,111,100,117,108,101,76,111,99,107,77,97,110,97,103, - 101,114,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,34,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,54,0,0,0,163,0,0,0,115,10,0,0,0,8,0, - 8,2,8,4,12,4,255,128,114,54,0,0,0,99,1,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,8,0, - 0,0,67,0,0,0,115,132,0,0,0,116,0,160,1,161, - 0,1,0,122,110,122,14,116,2,124,0,25,0,131,0,125, - 1,87,0,110,18,4,0,116,3,121,130,1,0,1,0,1, - 0,100,1,125,1,89,0,124,1,100,1,117,0,114,106,116, - 4,100,1,117,0,114,70,116,5,124,0,131,1,125,1,110, - 8,116,6,124,0,131,1,125,1,124,0,102,1,100,2,100, - 3,132,1,125,2,116,7,160,8,124,1,124,2,161,2,116, - 2,124,0,60,0,87,0,116,0,160,9,161,0,1,0,124, - 1,83,0,116,0,160,9,161,0,1,0,119,0,119,0,41, - 4,122,139,71,101,116,32,111,114,32,99,114,101,97,116,101, - 32,116,104,101,32,109,111,100,117,108,101,32,108,111,99,107, - 32,102,111,114,32,97,32,103,105,118,101,110,32,109,111,100, - 117,108,101,32,110,97,109,101,46,10,10,32,32,32,32,65, - 99,113,117,105,114,101,47,114,101,108,101,97,115,101,32,105, - 110,116,101,114,110,97,108,108,121,32,116,104,101,32,103,108, - 111,98,97,108,32,105,109,112,111,114,116,32,108,111,99,107, - 32,116,111,32,112,114,111,116,101,99,116,10,32,32,32,32, - 95,109,111,100,117,108,101,95,108,111,99,107,115,46,78,99, + 0,218,8,95,95,114,101,112,114,95,95,138,0,0,0,115, + 4,0,0,0,18,1,255,128,122,20,95,77,111,100,117,108, + 101,76,111,99,107,46,95,95,114,101,112,114,95,95,78,41, + 9,114,9,0,0,0,114,8,0,0,0,114,1,0,0,0, + 114,10,0,0,0,114,34,0,0,0,114,41,0,0,0,114, + 43,0,0,0,114,44,0,0,0,114,52,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, + 0,0,114,23,0,0,0,65,0,0,0,115,16,0,0,0, + 8,0,4,1,8,5,8,8,8,21,8,25,12,13,255,128, + 114,23,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,48, + 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,83,0,41,11,218,16,95,68,117,109,109,121,77,111,100, + 117,108,101,76,111,99,107,122,86,65,32,115,105,109,112,108, + 101,32,95,77,111,100,117,108,101,76,111,99,107,32,101,113, + 117,105,118,97,108,101,110,116,32,102,111,114,32,80,121,116, + 104,111,110,32,98,117,105,108,100,115,32,119,105,116,104,111, + 117,116,10,32,32,32,32,109,117,108,116,105,45,116,104,114, + 101,97,100,105,110,103,32,115,117,112,112,111,114,116,46,99, 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 8,0,0,0,83,0,0,0,115,54,0,0,0,116,0,160, - 1,161,0,1,0,122,34,116,2,160,3,124,1,161,1,124, - 0,117,0,114,30,116,2,124,1,61,0,87,0,116,0,160, - 4,161,0,1,0,100,0,83,0,116,0,160,4,161,0,1, - 0,119,0,114,0,0,0,0,41,5,218,4,95,105,109,112, - 218,12,97,99,113,117,105,114,101,95,108,111,99,107,218,13, - 95,109,111,100,117,108,101,95,108,111,99,107,115,114,38,0, - 0,0,218,12,114,101,108,101,97,115,101,95,108,111,99,107, - 41,2,218,3,114,101,102,114,20,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,6,0,0,0,218,2,99,98,198, - 0,0,0,115,14,0,0,0,8,1,2,1,14,4,6,1, - 2,128,22,2,255,128,122,28,95,103,101,116,95,109,111,100, - 117,108,101,95,108,111,99,107,46,60,108,111,99,97,108,115, - 62,46,99,98,41,10,114,61,0,0,0,114,62,0,0,0, - 114,63,0,0,0,218,8,75,101,121,69,114,114,111,114,114, - 26,0,0,0,114,53,0,0,0,114,23,0,0,0,218,8, - 95,119,101,97,107,114,101,102,114,65,0,0,0,114,64,0, - 0,0,41,3,114,20,0,0,0,114,27,0,0,0,114,66, + 2,0,0,0,67,0,0,0,115,16,0,0,0,124,1,124, + 0,95,0,100,1,124,0,95,1,100,0,83,0,114,24,0, + 0,0,41,2,114,20,0,0,0,114,30,0,0,0,114,32, 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, - 0,0,114,57,0,0,0,179,0,0,0,115,36,0,0,0, - 8,6,2,1,2,1,14,1,12,1,6,1,8,2,8,1, - 10,1,8,2,12,2,16,11,2,128,8,2,4,2,10,254, - 2,234,255,128,114,57,0,0,0,99,1,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,8,0,0,0,67,0, - 0,0,115,54,0,0,0,116,0,124,0,131,1,125,1,122, - 12,124,1,160,1,161,0,1,0,87,0,110,18,4,0,116, - 2,121,52,1,0,1,0,1,0,89,0,100,1,83,0,124, - 1,160,3,161,0,1,0,100,1,83,0,119,0,41,2,122, - 189,65,99,113,117,105,114,101,115,32,116,104,101,110,32,114, - 101,108,101,97,115,101,115,32,116,104,101,32,109,111,100,117, - 108,101,32,108,111,99,107,32,102,111,114,32,97,32,103,105, - 118,101,110,32,109,111,100,117,108,101,32,110,97,109,101,46, - 10,10,32,32,32,32,84,104,105,115,32,105,115,32,117,115, - 101,100,32,116,111,32,101,110,115,117,114,101,32,97,32,109, - 111,100,117,108,101,32,105,115,32,99,111,109,112,108,101,116, - 101,108,121,32,105,110,105,116,105,97,108,105,122,101,100,44, - 32,105,110,32,116,104,101,10,32,32,32,32,101,118,101,110, - 116,32,105,116,32,105,115,32,98,101,105,110,103,32,105,109, - 112,111,114,116,101,100,32,98,121,32,97,110,111,116,104,101, - 114,32,116,104,114,101,97,100,46,10,32,32,32,32,78,41, - 4,114,57,0,0,0,114,43,0,0,0,114,22,0,0,0, - 114,44,0,0,0,41,2,114,20,0,0,0,114,27,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, - 218,19,95,108,111,99,107,95,117,110,108,111,99,107,95,109, - 111,100,117,108,101,216,0,0,0,115,16,0,0,0,8,6, - 2,1,12,1,12,1,6,3,12,2,2,251,255,128,114,69, - 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, - 3,0,0,0,4,0,0,0,79,0,0,0,115,14,0,0, - 0,124,0,124,1,105,0,124,2,164,1,142,1,83,0,41, - 2,97,46,1,0,0,114,101,109,111,118,101,95,105,109,112, - 111,114,116,108,105,98,95,102,114,97,109,101,115,32,105,110, - 32,105,109,112,111,114,116,46,99,32,119,105,108,108,32,97, - 108,119,97,121,115,32,114,101,109,111,118,101,32,115,101,113, - 117,101,110,99,101,115,10,32,32,32,32,111,102,32,105,109, - 112,111,114,116,108,105,98,32,102,114,97,109,101,115,32,116, - 104,97,116,32,101,110,100,32,119,105,116,104,32,97,32,99, - 97,108,108,32,116,111,32,116,104,105,115,32,102,117,110,99, - 116,105,111,110,10,10,32,32,32,32,85,115,101,32,105,116, - 32,105,110,115,116,101,97,100,32,111,102,32,97,32,110,111, - 114,109,97,108,32,99,97,108,108,32,105,110,32,112,108,97, - 99,101,115,32,119,104,101,114,101,32,105,110,99,108,117,100, - 105,110,103,32,116,104,101,32,105,109,112,111,114,116,108,105, - 98,10,32,32,32,32,102,114,97,109,101,115,32,105,110,116, - 114,111,100,117,99,101,115,32,117,110,119,97,110,116,101,100, - 32,110,111,105,115,101,32,105,110,116,111,32,116,104,101,32, - 116,114,97,99,101,98,97,99,107,32,40,101,46,103,46,32, - 119,104,101,110,32,101,120,101,99,117,116,105,110,103,10,32, - 32,32,32,109,111,100,117,108,101,32,99,111,100,101,41,10, - 32,32,32,32,78,114,5,0,0,0,41,3,218,1,102,114, - 59,0,0,0,90,4,107,119,100,115,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,218,25,95,99,97,108,108, - 95,119,105,116,104,95,102,114,97,109,101,115,95,114,101,109, - 111,118,101,100,233,0,0,0,115,4,0,0,0,14,8,255, - 128,114,71,0,0,0,114,42,0,0,0,41,1,218,9,118, - 101,114,98,111,115,105,116,121,99,1,0,0,0,0,0,0, - 0,1,0,0,0,3,0,0,0,4,0,0,0,71,0,0, - 0,115,58,0,0,0,116,0,106,1,106,2,124,1,107,5, - 114,54,124,0,160,3,100,1,161,1,115,30,100,2,124,0, - 23,0,125,0,116,4,124,0,106,5,124,2,142,0,116,0, - 106,6,100,3,141,2,1,0,100,4,83,0,100,4,83,0, - 41,5,122,61,80,114,105,110,116,32,116,104,101,32,109,101, - 115,115,97,103,101,32,116,111,32,115,116,100,101,114,114,32, - 105,102,32,45,118,47,80,89,84,72,79,78,86,69,82,66, - 79,83,69,32,105,115,32,116,117,114,110,101,100,32,111,110, - 46,41,2,250,1,35,122,7,105,109,112,111,114,116,32,122, - 2,35,32,41,1,90,4,102,105,108,101,78,41,7,114,18, - 0,0,0,218,5,102,108,97,103,115,218,7,118,101,114,98, - 111,115,101,218,10,115,116,97,114,116,115,119,105,116,104,218, - 5,112,114,105,110,116,114,49,0,0,0,218,6,115,116,100, - 101,114,114,41,3,218,7,109,101,115,115,97,103,101,114,72, - 0,0,0,114,59,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,218,16,95,118,101,114,98,111,115, - 101,95,109,101,115,115,97,103,101,244,0,0,0,115,12,0, - 0,0,12,2,10,1,8,1,24,1,4,253,255,128,114,80, - 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,3,0,0,0,3,0,0,0,115,26,0,0, - 0,135,0,102,1,100,1,100,2,132,8,125,1,116,0,124, - 1,136,0,131,2,1,0,124,1,83,0,41,4,122,49,68, - 101,99,111,114,97,116,111,114,32,116,111,32,118,101,114,105, - 102,121,32,116,104,101,32,110,97,109,101,100,32,109,111,100, - 117,108,101,32,105,115,32,98,117,105,108,116,45,105,110,46, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,4,0,0,0,19,0,0,0,115,38,0,0,0,124,1, - 116,0,106,1,118,1,114,28,116,2,100,1,160,3,124,1, - 161,1,124,1,100,2,141,2,130,1,136,0,124,0,124,1, - 131,2,83,0,41,3,78,250,29,123,33,114,125,32,105,115, - 32,110,111,116,32,97,32,98,117,105,108,116,45,105,110,32, - 109,111,100,117,108,101,114,19,0,0,0,41,4,114,18,0, - 0,0,218,20,98,117,105,108,116,105,110,95,109,111,100,117, - 108,101,95,110,97,109,101,115,218,11,73,109,112,111,114,116, - 69,114,114,111,114,114,49,0,0,0,169,2,114,33,0,0, - 0,218,8,102,117,108,108,110,97,109,101,169,1,218,3,102, - 120,110,114,5,0,0,0,114,6,0,0,0,218,25,95,114, - 101,113,117,105,114,101,115,95,98,117,105,108,116,105,110,95, - 119,114,97,112,112,101,114,254,0,0,0,115,12,0,0,0, - 10,1,10,1,2,1,6,255,10,2,255,128,122,52,95,114, - 101,113,117,105,114,101,115,95,98,117,105,108,116,105,110,46, - 60,108,111,99,97,108,115,62,46,95,114,101,113,117,105,114, - 101,115,95,98,117,105,108,116,105,110,95,119,114,97,112,112, - 101,114,78,169,1,114,17,0,0,0,41,2,114,87,0,0, - 0,114,88,0,0,0,114,5,0,0,0,114,86,0,0,0, - 114,6,0,0,0,218,17,95,114,101,113,117,105,114,101,115, - 95,98,117,105,108,116,105,110,252,0,0,0,115,8,0,0, - 0,12,2,10,5,4,1,255,128,114,90,0,0,0,99,1, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3, - 0,0,0,3,0,0,0,115,26,0,0,0,135,0,102,1, - 100,1,100,2,132,8,125,1,116,0,124,1,136,0,131,2, - 1,0,124,1,83,0,41,4,122,47,68,101,99,111,114,97, - 116,111,114,32,116,111,32,118,101,114,105,102,121,32,116,104, - 101,32,110,97,109,101,100,32,109,111,100,117,108,101,32,105, - 115,32,102,114,111,122,101,110,46,99,2,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,4,0,0,0,19,0, - 0,0,115,38,0,0,0,116,0,160,1,124,1,161,1,115, - 28,116,2,100,1,160,3,124,1,161,1,124,1,100,2,141, - 2,130,1,136,0,124,0,124,1,131,2,83,0,169,3,78, - 122,27,123,33,114,125,32,105,115,32,110,111,116,32,97,32, - 102,114,111,122,101,110,32,109,111,100,117,108,101,114,19,0, - 0,0,41,4,114,61,0,0,0,218,9,105,115,95,102,114, - 111,122,101,110,114,83,0,0,0,114,49,0,0,0,114,84, - 0,0,0,114,86,0,0,0,114,5,0,0,0,114,6,0, - 0,0,218,24,95,114,101,113,117,105,114,101,115,95,102,114, - 111,122,101,110,95,119,114,97,112,112,101,114,9,1,0,0, - 115,12,0,0,0,10,1,10,1,2,1,6,255,10,2,255, - 128,122,50,95,114,101,113,117,105,114,101,115,95,102,114,111, - 122,101,110,46,60,108,111,99,97,108,115,62,46,95,114,101, - 113,117,105,114,101,115,95,102,114,111,122,101,110,95,119,114, - 97,112,112,101,114,78,114,89,0,0,0,41,2,114,87,0, - 0,0,114,93,0,0,0,114,5,0,0,0,114,86,0,0, - 0,114,6,0,0,0,218,16,95,114,101,113,117,105,114,101, - 115,95,102,114,111,122,101,110,7,1,0,0,115,8,0,0, - 0,12,2,10,5,4,1,255,128,114,94,0,0,0,99,2, - 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,4, - 0,0,0,67,0,0,0,115,74,0,0,0,100,1,125,2, - 116,0,160,1,124,2,116,2,161,2,1,0,116,3,124,1, - 124,0,131,2,125,3,124,1,116,4,106,5,118,0,114,66, - 116,4,106,5,124,1,25,0,125,4,116,6,124,3,124,4, - 131,2,1,0,116,4,106,5,124,1,25,0,83,0,116,7, - 124,3,131,1,83,0,41,3,122,128,76,111,97,100,32,116, - 104,101,32,115,112,101,99,105,102,105,101,100,32,109,111,100, - 117,108,101,32,105,110,116,111,32,115,121,115,46,109,111,100, - 117,108,101,115,32,97,110,100,32,114,101,116,117,114,110,32, - 105,116,46,10,10,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,108,111,97,100,101,114,46, - 101,120,101,99,95,109,111,100,117,108,101,32,105,110,115,116, - 101,97,100,46,10,10,32,32,32,32,122,103,116,104,101,32, - 108,111,97,100,95,109,111,100,117,108,101,40,41,32,109,101, - 116,104,111,100,32,105,115,32,100,101,112,114,101,99,97,116, - 101,100,32,97,110,100,32,115,108,97,116,101,100,32,102,111, - 114,32,114,101,109,111,118,97,108,32,105,110,32,80,121,116, - 104,111,110,32,51,46,49,50,59,32,117,115,101,32,101,120, - 101,99,95,109,111,100,117,108,101,40,41,32,105,110,115,116, - 101,97,100,78,41,8,218,9,95,119,97,114,110,105,110,103, - 115,218,4,119,97,114,110,218,18,68,101,112,114,101,99,97, - 116,105,111,110,87,97,114,110,105,110,103,218,16,115,112,101, - 99,95,102,114,111,109,95,108,111,97,100,101,114,114,18,0, - 0,0,218,7,109,111,100,117,108,101,115,218,5,95,101,120, - 101,99,218,5,95,108,111,97,100,41,5,114,33,0,0,0, - 114,85,0,0,0,218,3,109,115,103,218,4,115,112,101,99, - 218,6,109,111,100,117,108,101,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,218,17,95,108,111,97,100,95,109, - 111,100,117,108,101,95,115,104,105,109,19,1,0,0,115,18, - 0,0,0,4,6,12,2,10,1,10,1,10,1,10,1,10, - 1,8,2,255,128,114,105,0,0,0,99,1,0,0,0,0, - 0,0,0,0,0,0,0,5,0,0,0,8,0,0,0,67, - 0,0,0,115,206,0,0,0,116,0,124,0,100,1,100,0, - 131,3,125,1,116,1,124,1,100,2,131,2,114,50,122,12, - 124,1,160,2,124,0,161,1,87,0,83,0,4,0,116,3, - 121,204,1,0,1,0,1,0,89,0,122,10,124,0,106,4, - 125,2,87,0,110,16,4,0,116,5,121,202,1,0,1,0, - 1,0,89,0,110,16,124,2,100,0,117,1,114,94,116,6, - 124,2,131,1,83,0,122,10,124,0,106,7,125,3,87,0, - 110,18,4,0,116,5,121,200,1,0,1,0,1,0,100,3, - 125,3,89,0,122,10,124,0,106,8,125,4,87,0,110,50, - 4,0,116,5,121,198,1,0,1,0,1,0,124,1,100,0, - 117,0,114,170,100,4,160,9,124,3,161,1,6,0,89,0, - 83,0,100,5,160,9,124,3,124,1,161,2,6,0,89,0, - 83,0,100,6,160,9,124,3,124,4,161,2,83,0,119,0, - 119,0,119,0,119,0,41,7,78,218,10,95,95,108,111,97, - 100,101,114,95,95,218,11,109,111,100,117,108,101,95,114,101, - 112,114,250,1,63,250,13,60,109,111,100,117,108,101,32,123, - 33,114,125,62,250,20,60,109,111,100,117,108,101,32,123,33, - 114,125,32,40,123,33,114,125,41,62,250,23,60,109,111,100, - 117,108,101,32,123,33,114,125,32,102,114,111,109,32,123,33, - 114,125,62,41,10,114,13,0,0,0,114,11,0,0,0,114, - 107,0,0,0,218,9,69,120,99,101,112,116,105,111,110,218, - 8,95,95,115,112,101,99,95,95,114,2,0,0,0,218,22, - 95,109,111,100,117,108,101,95,114,101,112,114,95,102,114,111, - 109,95,115,112,101,99,114,9,0,0,0,218,8,95,95,102, - 105,108,101,95,95,114,49,0,0,0,41,5,114,104,0,0, - 0,218,6,108,111,97,100,101,114,114,103,0,0,0,114,20, - 0,0,0,218,8,102,105,108,101,110,97,109,101,114,5,0, - 0,0,114,5,0,0,0,114,6,0,0,0,218,12,95,109, - 111,100,117,108,101,95,114,101,112,114,38,1,0,0,115,56, - 0,0,0,12,2,10,1,2,4,12,1,12,1,2,1,2, - 1,10,1,12,1,4,1,8,2,8,1,2,4,10,1,12, - 1,6,1,2,1,10,1,12,1,8,1,14,1,16,2,12, - 2,2,250,2,252,2,246,2,252,255,128,114,118,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,114,0,0,0,101,0, - 90,1,100,0,90,2,100,1,90,3,100,2,100,2,100,2, - 100,3,156,3,100,4,100,5,132,2,90,4,100,6,100,7, - 132,0,90,5,100,8,100,9,132,0,90,6,101,7,100,10, - 100,11,132,0,131,1,90,8,101,8,106,9,100,12,100,11, - 132,0,131,1,90,8,101,7,100,13,100,14,132,0,131,1, - 90,10,101,7,100,15,100,16,132,0,131,1,90,11,101,11, - 106,9,100,17,100,16,132,0,131,1,90,11,100,2,83,0, - 41,18,218,10,77,111,100,117,108,101,83,112,101,99,97,208, - 5,0,0,84,104,101,32,115,112,101,99,105,102,105,99,97, - 116,105,111,110,32,102,111,114,32,97,32,109,111,100,117,108, - 101,44,32,117,115,101,100,32,102,111,114,32,108,111,97,100, - 105,110,103,46,10,10,32,32,32,32,65,32,109,111,100,117, - 108,101,39,115,32,115,112,101,99,32,105,115,32,116,104,101, - 32,115,111,117,114,99,101,32,102,111,114,32,105,110,102,111, - 114,109,97,116,105,111,110,32,97,98,111,117,116,32,116,104, - 101,32,109,111,100,117,108,101,46,32,32,70,111,114,10,32, - 32,32,32,100,97,116,97,32,97,115,115,111,99,105,97,116, - 101,100,32,119,105,116,104,32,116,104,101,32,109,111,100,117, - 108,101,44,32,105,110,99,108,117,100,105,110,103,32,115,111, - 117,114,99,101,44,32,117,115,101,32,116,104,101,32,115,112, - 101,99,39,115,10,32,32,32,32,108,111,97,100,101,114,46, - 10,10,32,32,32,32,96,110,97,109,101,96,32,105,115,32, - 116,104,101,32,97,98,115,111,108,117,116,101,32,110,97,109, - 101,32,111,102,32,116,104,101,32,109,111,100,117,108,101,46, - 32,32,96,108,111,97,100,101,114,96,32,105,115,32,116,104, - 101,32,108,111,97,100,101,114,10,32,32,32,32,116,111,32, - 117,115,101,32,119,104,101,110,32,108,111,97,100,105,110,103, - 32,116,104,101,32,109,111,100,117,108,101,46,32,32,96,112, - 97,114,101,110,116,96,32,105,115,32,116,104,101,32,110,97, - 109,101,32,111,102,32,116,104,101,10,32,32,32,32,112,97, - 99,107,97,103,101,32,116,104,101,32,109,111,100,117,108,101, - 32,105,115,32,105,110,46,32,32,84,104,101,32,112,97,114, - 101,110,116,32,105,115,32,100,101,114,105,118,101,100,32,102, - 114,111,109,32,116,104,101,32,110,97,109,101,46,10,10,32, - 32,32,32,96,105,115,95,112,97,99,107,97,103,101,96,32, - 100,101,116,101,114,109,105,110,101,115,32,105,102,32,116,104, - 101,32,109,111,100,117,108,101,32,105,115,32,99,111,110,115, - 105,100,101,114,101,100,32,97,32,112,97,99,107,97,103,101, - 32,111,114,10,32,32,32,32,110,111,116,46,32,32,79,110, - 32,109,111,100,117,108,101,115,32,116,104,105,115,32,105,115, - 32,114,101,102,108,101,99,116,101,100,32,98,121,32,116,104, - 101,32,96,95,95,112,97,116,104,95,95,96,32,97,116,116, - 114,105,98,117,116,101,46,10,10,32,32,32,32,96,111,114, - 105,103,105,110,96,32,105,115,32,116,104,101,32,115,112,101, - 99,105,102,105,99,32,108,111,99,97,116,105,111,110,32,117, - 115,101,100,32,98,121,32,116,104,101,32,108,111,97,100,101, - 114,32,102,114,111,109,32,119,104,105,99,104,32,116,111,10, - 32,32,32,32,108,111,97,100,32,116,104,101,32,109,111,100, - 117,108,101,44,32,105,102,32,116,104,97,116,32,105,110,102, - 111,114,109,97,116,105,111,110,32,105,115,32,97,118,97,105, - 108,97,98,108,101,46,32,32,87,104,101,110,32,102,105,108, - 101,110,97,109,101,32,105,115,10,32,32,32,32,115,101,116, - 44,32,111,114,105,103,105,110,32,119,105,108,108,32,109,97, - 116,99,104,46,10,10,32,32,32,32,96,104,97,115,95,108, - 111,99,97,116,105,111,110,96,32,105,110,100,105,99,97,116, - 101,115,32,116,104,97,116,32,97,32,115,112,101,99,39,115, - 32,34,111,114,105,103,105,110,34,32,114,101,102,108,101,99, - 116,115,32,97,32,108,111,99,97,116,105,111,110,46,10,32, - 32,32,32,87,104,101,110,32,116,104,105,115,32,105,115,32, - 84,114,117,101,44,32,96,95,95,102,105,108,101,95,95,96, - 32,97,116,116,114,105,98,117,116,101,32,111,102,32,116,104, - 101,32,109,111,100,117,108,101,32,105,115,32,115,101,116,46, - 10,10,32,32,32,32,96,99,97,99,104,101,100,96,32,105, - 115,32,116,104,101,32,108,111,99,97,116,105,111,110,32,111, - 102,32,116,104,101,32,99,97,99,104,101,100,32,98,121,116, - 101,99,111,100,101,32,102,105,108,101,44,32,105,102,32,97, - 110,121,46,32,32,73,116,10,32,32,32,32,99,111,114,114, - 101,115,112,111,110,100,115,32,116,111,32,116,104,101,32,96, - 95,95,99,97,99,104,101,100,95,95,96,32,97,116,116,114, - 105,98,117,116,101,46,10,10,32,32,32,32,96,115,117,98, - 109,111,100,117,108,101,95,115,101,97,114,99,104,95,108,111, - 99,97,116,105,111,110,115,96,32,105,115,32,116,104,101,32, - 115,101,113,117,101,110,99,101,32,111,102,32,112,97,116,104, - 32,101,110,116,114,105,101,115,32,116,111,10,32,32,32,32, - 115,101,97,114,99,104,32,119,104,101,110,32,105,109,112,111, - 114,116,105,110,103,32,115,117,98,109,111,100,117,108,101,115, - 46,32,32,73,102,32,115,101,116,44,32,105,115,95,112,97, - 99,107,97,103,101,32,115,104,111,117,108,100,32,98,101,10, - 32,32,32,32,84,114,117,101,45,45,97,110,100,32,70,97, - 108,115,101,32,111,116,104,101,114,119,105,115,101,46,10,10, - 32,32,32,32,80,97,99,107,97,103,101,115,32,97,114,101, - 32,115,105,109,112,108,121,32,109,111,100,117,108,101,115,32, - 116,104,97,116,32,40,109,97,121,41,32,104,97,118,101,32, - 115,117,98,109,111,100,117,108,101,115,46,32,32,73,102,32, - 97,32,115,112,101,99,10,32,32,32,32,104,97,115,32,97, - 32,110,111,110,45,78,111,110,101,32,118,97,108,117,101,32, - 105,110,32,96,115,117,98,109,111,100,117,108,101,95,115,101, - 97,114,99,104,95,108,111,99,97,116,105,111,110,115,96,44, - 32,116,104,101,32,105,109,112,111,114,116,10,32,32,32,32, - 115,121,115,116,101,109,32,119,105,108,108,32,99,111,110,115, - 105,100,101,114,32,109,111,100,117,108,101,115,32,108,111,97, - 100,101,100,32,102,114,111,109,32,116,104,101,32,115,112,101, - 99,32,97,115,32,112,97,99,107,97,103,101,115,46,10,10, - 32,32,32,32,79,110,108,121,32,102,105,110,100,101,114,115, - 32,40,115,101,101,32,105,109,112,111,114,116,108,105,98,46, - 97,98,99,46,77,101,116,97,80,97,116,104,70,105,110,100, - 101,114,32,97,110,100,10,32,32,32,32,105,109,112,111,114, - 116,108,105,98,46,97,98,99,46,80,97,116,104,69,110,116, - 114,121,70,105,110,100,101,114,41,32,115,104,111,117,108,100, - 32,109,111,100,105,102,121,32,77,111,100,117,108,101,83,112, - 101,99,32,105,110,115,116,97,110,99,101,115,46,10,10,32, - 32,32,32,78,41,3,218,6,111,114,105,103,105,110,218,12, - 108,111,97,100,101,114,95,115,116,97,116,101,218,10,105,115, - 95,112,97,99,107,97,103,101,99,3,0,0,0,0,0,0, - 0,3,0,0,0,6,0,0,0,2,0,0,0,67,0,0, - 0,115,54,0,0,0,124,1,124,0,95,0,124,2,124,0, - 95,1,124,3,124,0,95,2,124,4,124,0,95,3,124,5, - 114,32,103,0,110,2,100,0,124,0,95,4,100,1,124,0, - 95,5,100,0,124,0,95,6,100,0,83,0,41,2,78,70, - 41,7,114,20,0,0,0,114,116,0,0,0,114,120,0,0, - 0,114,121,0,0,0,218,26,115,117,98,109,111,100,117,108, + 0,0,114,34,0,0,0,146,0,0,0,115,6,0,0,0, + 6,1,10,1,255,128,122,25,95,68,117,109,109,121,77,111, + 100,117,108,101,76,111,99,107,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,18,0,0,0,124, + 0,4,0,106,0,100,1,55,0,2,0,95,0,100,2,83, + 0,41,3,78,114,42,0,0,0,84,41,1,114,30,0,0, + 0,114,51,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,6,0,0,0,114,43,0,0,0,150,0,0,0,115,6, + 0,0,0,14,1,4,1,255,128,122,24,95,68,117,109,109, + 121,77,111,100,117,108,101,76,111,99,107,46,97,99,113,117, + 105,114,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,36,0,0, + 0,124,0,106,0,100,1,107,2,114,18,116,1,100,2,131, + 1,130,1,124,0,4,0,106,0,100,3,56,0,2,0,95, + 0,100,0,83,0,41,4,78,114,25,0,0,0,114,46,0, + 0,0,114,42,0,0,0,41,2,114,30,0,0,0,114,47, + 0,0,0,114,51,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,44,0,0,0,154,0,0,0, + 115,8,0,0,0,10,1,8,1,18,1,255,128,122,24,95, + 68,117,109,109,121,77,111,100,117,108,101,76,111,99,107,46, + 114,101,108,101,97,115,101,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,18,0,0,0,100,1,160,0,124,0,106,1,116,2,124, + 0,131,1,161,2,83,0,41,2,78,122,28,95,68,117,109, + 109,121,77,111,100,117,108,101,76,111,99,107,40,123,33,114, + 125,41,32,97,116,32,123,125,114,48,0,0,0,114,51,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,52,0,0,0,159,0,0,0,115,4,0,0,0,18, + 1,255,128,122,25,95,68,117,109,109,121,77,111,100,117,108, + 101,76,111,99,107,46,95,95,114,101,112,114,95,95,78,41, + 8,114,9,0,0,0,114,8,0,0,0,114,1,0,0,0, + 114,10,0,0,0,114,34,0,0,0,114,43,0,0,0,114, + 44,0,0,0,114,52,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,53,0, + 0,0,142,0,0,0,115,14,0,0,0,8,0,4,1,8, + 3,8,4,8,4,12,5,255,128,114,53,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,36,0,0,0,101,0,90,1, + 100,0,90,2,100,1,100,2,132,0,90,3,100,3,100,4, + 132,0,90,4,100,5,100,6,132,0,90,5,100,7,83,0, + 41,8,218,18,95,77,111,100,117,108,101,76,111,99,107,77, + 97,110,97,103,101,114,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, + 16,0,0,0,124,1,124,0,95,0,100,0,124,0,95,1, + 100,0,83,0,114,0,0,0,0,41,2,218,5,95,110,97, + 109,101,218,5,95,108,111,99,107,114,32,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,34,0, + 0,0,165,0,0,0,115,6,0,0,0,6,1,10,1,255, + 128,122,27,95,77,111,100,117,108,101,76,111,99,107,77,97, + 110,97,103,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,26,0,0,0,116,0,124,0, + 106,1,131,1,124,0,95,2,124,0,106,2,160,3,161,0, + 1,0,100,0,83,0,114,0,0,0,0,41,4,218,16,95, + 103,101,116,95,109,111,100,117,108,101,95,108,111,99,107,114, + 55,0,0,0,114,56,0,0,0,114,43,0,0,0,114,51, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, + 0,0,218,9,95,95,101,110,116,101,114,95,95,169,0,0, + 0,115,6,0,0,0,12,1,14,1,255,128,122,28,95,77, + 111,100,117,108,101,76,111,99,107,77,97,110,97,103,101,114, + 46,95,95,101,110,116,101,114,95,95,99,1,0,0,0,0, + 0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,79, + 0,0,0,115,14,0,0,0,124,0,106,0,160,1,161,0, + 1,0,100,0,83,0,114,0,0,0,0,41,2,114,56,0, + 0,0,114,44,0,0,0,41,3,114,33,0,0,0,218,4, + 97,114,103,115,90,6,107,119,97,114,103,115,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,218,8,95,95,101, + 120,105,116,95,95,173,0,0,0,115,4,0,0,0,14,1, + 255,128,122,27,95,77,111,100,117,108,101,76,111,99,107,77, + 97,110,97,103,101,114,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,34,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,54,0,0,0,163,0,0,0,115,10,0, + 0,0,8,0,8,2,8,4,12,4,255,128,114,54,0,0, + 0,99,1,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,8,0,0,0,67,0,0,0,115,132,0,0,0,116, + 0,160,1,161,0,1,0,122,110,122,14,116,2,124,0,25, + 0,131,0,125,1,87,0,110,18,4,0,116,3,121,130,1, + 0,1,0,1,0,100,1,125,1,89,0,124,1,100,1,117, + 0,114,106,116,4,100,1,117,0,114,70,116,5,124,0,131, + 1,125,1,110,8,116,6,124,0,131,1,125,1,124,0,102, + 1,100,2,100,3,132,1,125,2,116,7,160,8,124,1,124, + 2,161,2,116,2,124,0,60,0,87,0,116,0,160,9,161, + 0,1,0,124,1,83,0,116,0,160,9,161,0,1,0,119, + 0,119,0,41,4,122,139,71,101,116,32,111,114,32,99,114, + 101,97,116,101,32,116,104,101,32,109,111,100,117,108,101,32, + 108,111,99,107,32,102,111,114,32,97,32,103,105,118,101,110, + 32,109,111,100,117,108,101,32,110,97,109,101,46,10,10,32, + 32,32,32,65,99,113,117,105,114,101,47,114,101,108,101,97, + 115,101,32,105,110,116,101,114,110,97,108,108,121,32,116,104, + 101,32,103,108,111,98,97,108,32,105,109,112,111,114,116,32, + 108,111,99,107,32,116,111,32,112,114,111,116,101,99,116,10, + 32,32,32,32,95,109,111,100,117,108,101,95,108,111,99,107, + 115,46,78,99,2,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,8,0,0,0,83,0,0,0,115,54,0,0, + 0,116,0,160,1,161,0,1,0,122,34,116,2,160,3,124, + 1,161,1,124,0,117,0,114,30,116,2,124,1,61,0,87, + 0,116,0,160,4,161,0,1,0,100,0,83,0,116,0,160, + 4,161,0,1,0,119,0,114,0,0,0,0,41,5,218,4, + 95,105,109,112,218,12,97,99,113,117,105,114,101,95,108,111, + 99,107,218,13,95,109,111,100,117,108,101,95,108,111,99,107, + 115,114,38,0,0,0,218,12,114,101,108,101,97,115,101,95, + 108,111,99,107,41,2,218,3,114,101,102,114,20,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,218, + 2,99,98,198,0,0,0,115,14,0,0,0,8,1,2,1, + 14,4,6,1,2,128,22,2,255,128,122,28,95,103,101,116, + 95,109,111,100,117,108,101,95,108,111,99,107,46,60,108,111, + 99,97,108,115,62,46,99,98,41,10,114,61,0,0,0,114, + 62,0,0,0,114,63,0,0,0,218,8,75,101,121,69,114, + 114,111,114,114,26,0,0,0,114,53,0,0,0,114,23,0, + 0,0,218,8,95,119,101,97,107,114,101,102,114,65,0,0, + 0,114,64,0,0,0,41,3,114,20,0,0,0,114,27,0, + 0,0,114,66,0,0,0,114,5,0,0,0,114,5,0,0, + 0,114,6,0,0,0,114,57,0,0,0,179,0,0,0,115, + 36,0,0,0,8,6,2,1,2,1,14,1,12,1,6,1, + 8,2,8,1,10,1,8,2,12,2,16,11,2,128,8,2, + 4,2,10,254,2,234,255,128,114,57,0,0,0,99,1,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,8,0, + 0,0,67,0,0,0,115,54,0,0,0,116,0,124,0,131, + 1,125,1,122,12,124,1,160,1,161,0,1,0,87,0,110, + 18,4,0,116,2,121,52,1,0,1,0,1,0,89,0,100, + 1,83,0,124,1,160,3,161,0,1,0,100,1,83,0,119, + 0,41,2,122,189,65,99,113,117,105,114,101,115,32,116,104, + 101,110,32,114,101,108,101,97,115,101,115,32,116,104,101,32, + 109,111,100,117,108,101,32,108,111,99,107,32,102,111,114,32, + 97,32,103,105,118,101,110,32,109,111,100,117,108,101,32,110, + 97,109,101,46,10,10,32,32,32,32,84,104,105,115,32,105, + 115,32,117,115,101,100,32,116,111,32,101,110,115,117,114,101, + 32,97,32,109,111,100,117,108,101,32,105,115,32,99,111,109, + 112,108,101,116,101,108,121,32,105,110,105,116,105,97,108,105, + 122,101,100,44,32,105,110,32,116,104,101,10,32,32,32,32, + 101,118,101,110,116,32,105,116,32,105,115,32,98,101,105,110, + 103,32,105,109,112,111,114,116,101,100,32,98,121,32,97,110, + 111,116,104,101,114,32,116,104,114,101,97,100,46,10,32,32, + 32,32,78,41,4,114,57,0,0,0,114,43,0,0,0,114, + 22,0,0,0,114,44,0,0,0,41,2,114,20,0,0,0, + 114,27,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,218,19,95,108,111,99,107,95,117,110,108,111, + 99,107,95,109,111,100,117,108,101,216,0,0,0,115,16,0, + 0,0,8,6,2,1,12,1,12,1,6,3,12,2,2,251, + 255,128,114,69,0,0,0,99,1,0,0,0,0,0,0,0, + 0,0,0,0,3,0,0,0,4,0,0,0,79,0,0,0, + 115,14,0,0,0,124,0,124,1,105,0,124,2,164,1,142, + 1,83,0,41,2,97,46,1,0,0,114,101,109,111,118,101, + 95,105,109,112,111,114,116,108,105,98,95,102,114,97,109,101, + 115,32,105,110,32,105,109,112,111,114,116,46,99,32,119,105, + 108,108,32,97,108,119,97,121,115,32,114,101,109,111,118,101, + 32,115,101,113,117,101,110,99,101,115,10,32,32,32,32,111, + 102,32,105,109,112,111,114,116,108,105,98,32,102,114,97,109, + 101,115,32,116,104,97,116,32,101,110,100,32,119,105,116,104, + 32,97,32,99,97,108,108,32,116,111,32,116,104,105,115,32, + 102,117,110,99,116,105,111,110,10,10,32,32,32,32,85,115, + 101,32,105,116,32,105,110,115,116,101,97,100,32,111,102,32, + 97,32,110,111,114,109,97,108,32,99,97,108,108,32,105,110, + 32,112,108,97,99,101,115,32,119,104,101,114,101,32,105,110, + 99,108,117,100,105,110,103,32,116,104,101,32,105,109,112,111, + 114,116,108,105,98,10,32,32,32,32,102,114,97,109,101,115, + 32,105,110,116,114,111,100,117,99,101,115,32,117,110,119,97, + 110,116,101,100,32,110,111,105,115,101,32,105,110,116,111,32, + 116,104,101,32,116,114,97,99,101,98,97,99,107,32,40,101, + 46,103,46,32,119,104,101,110,32,101,120,101,99,117,116,105, + 110,103,10,32,32,32,32,109,111,100,117,108,101,32,99,111, + 100,101,41,10,32,32,32,32,78,114,5,0,0,0,41,3, + 218,1,102,114,59,0,0,0,90,4,107,119,100,115,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,218,25,95, + 99,97,108,108,95,119,105,116,104,95,102,114,97,109,101,115, + 95,114,101,109,111,118,101,100,233,0,0,0,115,4,0,0, + 0,14,8,255,128,114,71,0,0,0,114,42,0,0,0,41, + 1,218,9,118,101,114,98,111,115,105,116,121,99,1,0,0, + 0,0,0,0,0,1,0,0,0,3,0,0,0,4,0,0, + 0,71,0,0,0,115,58,0,0,0,116,0,106,1,106,2, + 124,1,107,5,114,54,124,0,160,3,100,1,161,1,115,30, + 100,2,124,0,23,0,125,0,116,4,124,0,106,5,124,2, + 142,0,116,0,106,6,100,3,141,2,1,0,100,4,83,0, + 100,4,83,0,41,5,122,61,80,114,105,110,116,32,116,104, + 101,32,109,101,115,115,97,103,101,32,116,111,32,115,116,100, + 101,114,114,32,105,102,32,45,118,47,80,89,84,72,79,78, + 86,69,82,66,79,83,69,32,105,115,32,116,117,114,110,101, + 100,32,111,110,46,41,2,250,1,35,122,7,105,109,112,111, + 114,116,32,122,2,35,32,41,1,90,4,102,105,108,101,78, + 41,7,114,18,0,0,0,218,5,102,108,97,103,115,218,7, + 118,101,114,98,111,115,101,218,10,115,116,97,114,116,115,119, + 105,116,104,218,5,112,114,105,110,116,114,49,0,0,0,218, + 6,115,116,100,101,114,114,41,3,218,7,109,101,115,115,97, + 103,101,114,72,0,0,0,114,59,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,218,16,95,118,101, + 114,98,111,115,101,95,109,101,115,115,97,103,101,244,0,0, + 0,115,12,0,0,0,12,2,10,1,8,1,24,1,4,253, + 255,128,114,80,0,0,0,99,1,0,0,0,0,0,0,0, + 0,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0, + 115,26,0,0,0,135,0,102,1,100,1,100,2,132,8,125, + 1,116,0,124,1,136,0,131,2,1,0,124,1,83,0,41, + 4,122,49,68,101,99,111,114,97,116,111,114,32,116,111,32, + 118,101,114,105,102,121,32,116,104,101,32,110,97,109,101,100, + 32,109,111,100,117,108,101,32,105,115,32,98,117,105,108,116, + 45,105,110,46,99,2,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,4,0,0,0,19,0,0,0,115,38,0, + 0,0,124,1,116,0,106,1,118,1,114,28,116,2,100,1, + 160,3,124,1,161,1,124,1,100,2,141,2,130,1,136,0, + 124,0,124,1,131,2,83,0,41,3,78,250,29,123,33,114, + 125,32,105,115,32,110,111,116,32,97,32,98,117,105,108,116, + 45,105,110,32,109,111,100,117,108,101,114,19,0,0,0,41, + 4,114,18,0,0,0,218,20,98,117,105,108,116,105,110,95, + 109,111,100,117,108,101,95,110,97,109,101,115,218,11,73,109, + 112,111,114,116,69,114,114,111,114,114,49,0,0,0,169,2, + 114,33,0,0,0,218,8,102,117,108,108,110,97,109,101,169, + 1,218,3,102,120,110,114,5,0,0,0,114,6,0,0,0, + 218,25,95,114,101,113,117,105,114,101,115,95,98,117,105,108, + 116,105,110,95,119,114,97,112,112,101,114,254,0,0,0,115, + 12,0,0,0,10,1,10,1,2,1,6,255,10,2,255,128, + 122,52,95,114,101,113,117,105,114,101,115,95,98,117,105,108, + 116,105,110,46,60,108,111,99,97,108,115,62,46,95,114,101, + 113,117,105,114,101,115,95,98,117,105,108,116,105,110,95,119, + 114,97,112,112,101,114,78,169,1,114,17,0,0,0,41,2, + 114,87,0,0,0,114,88,0,0,0,114,5,0,0,0,114, + 86,0,0,0,114,6,0,0,0,218,17,95,114,101,113,117, + 105,114,101,115,95,98,117,105,108,116,105,110,252,0,0,0, + 115,8,0,0,0,12,2,10,5,4,1,255,128,114,90,0, + 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,3,0,0,0,3,0,0,0,115,26,0,0,0, + 135,0,102,1,100,1,100,2,132,8,125,1,116,0,124,1, + 136,0,131,2,1,0,124,1,83,0,41,4,122,47,68,101, + 99,111,114,97,116,111,114,32,116,111,32,118,101,114,105,102, + 121,32,116,104,101,32,110,97,109,101,100,32,109,111,100,117, + 108,101,32,105,115,32,102,114,111,122,101,110,46,99,2,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,4,0, + 0,0,19,0,0,0,115,38,0,0,0,116,0,160,1,124, + 1,161,1,115,28,116,2,100,1,160,3,124,1,161,1,124, + 1,100,2,141,2,130,1,136,0,124,0,124,1,131,2,83, + 0,169,3,78,122,27,123,33,114,125,32,105,115,32,110,111, + 116,32,97,32,102,114,111,122,101,110,32,109,111,100,117,108, + 101,114,19,0,0,0,41,4,114,61,0,0,0,218,9,105, + 115,95,102,114,111,122,101,110,114,83,0,0,0,114,49,0, + 0,0,114,84,0,0,0,114,86,0,0,0,114,5,0,0, + 0,114,6,0,0,0,218,24,95,114,101,113,117,105,114,101, + 115,95,102,114,111,122,101,110,95,119,114,97,112,112,101,114, + 9,1,0,0,115,12,0,0,0,10,1,10,1,2,1,6, + 255,10,2,255,128,122,50,95,114,101,113,117,105,114,101,115, + 95,102,114,111,122,101,110,46,60,108,111,99,97,108,115,62, + 46,95,114,101,113,117,105,114,101,115,95,102,114,111,122,101, + 110,95,119,114,97,112,112,101,114,78,114,89,0,0,0,41, + 2,114,87,0,0,0,114,93,0,0,0,114,5,0,0,0, + 114,86,0,0,0,114,6,0,0,0,218,16,95,114,101,113, + 117,105,114,101,115,95,102,114,111,122,101,110,7,1,0,0, + 115,8,0,0,0,12,2,10,5,4,1,255,128,114,94,0, + 0,0,99,2,0,0,0,0,0,0,0,0,0,0,0,5, + 0,0,0,4,0,0,0,67,0,0,0,115,74,0,0,0, + 100,1,125,2,116,0,160,1,124,2,116,2,161,2,1,0, + 116,3,124,1,124,0,131,2,125,3,124,1,116,4,106,5, + 118,0,114,66,116,4,106,5,124,1,25,0,125,4,116,6, + 124,3,124,4,131,2,1,0,116,4,106,5,124,1,25,0, + 83,0,116,7,124,3,131,1,83,0,41,3,122,128,76,111, + 97,100,32,116,104,101,32,115,112,101,99,105,102,105,101,100, + 32,109,111,100,117,108,101,32,105,110,116,111,32,115,121,115, + 46,109,111,100,117,108,101,115,32,97,110,100,32,114,101,116, + 117,114,110,32,105,116,46,10,10,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,108,111,97, + 100,101,114,46,101,120,101,99,95,109,111,100,117,108,101,32, + 105,110,115,116,101,97,100,46,10,10,32,32,32,32,122,103, + 116,104,101,32,108,111,97,100,95,109,111,100,117,108,101,40, + 41,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114, + 101,99,97,116,101,100,32,97,110,100,32,115,108,97,116,101, + 100,32,102,111,114,32,114,101,109,111,118,97,108,32,105,110, + 32,80,121,116,104,111,110,32,51,46,49,50,59,32,117,115, + 101,32,101,120,101,99,95,109,111,100,117,108,101,40,41,32, + 105,110,115,116,101,97,100,78,41,8,218,9,95,119,97,114, + 110,105,110,103,115,218,4,119,97,114,110,218,18,68,101,112, + 114,101,99,97,116,105,111,110,87,97,114,110,105,110,103,218, + 16,115,112,101,99,95,102,114,111,109,95,108,111,97,100,101, + 114,114,18,0,0,0,218,7,109,111,100,117,108,101,115,218, + 5,95,101,120,101,99,218,5,95,108,111,97,100,41,5,114, + 33,0,0,0,114,85,0,0,0,218,3,109,115,103,218,4, + 115,112,101,99,218,6,109,111,100,117,108,101,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,218,17,95,108,111, + 97,100,95,109,111,100,117,108,101,95,115,104,105,109,19,1, + 0,0,115,18,0,0,0,4,6,12,2,10,1,10,1,10, + 1,10,1,10,1,8,2,255,128,114,105,0,0,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,8, + 0,0,0,67,0,0,0,115,206,0,0,0,116,0,124,0, + 100,1,100,0,131,3,125,1,116,1,124,1,100,2,131,2, + 114,50,122,12,124,1,160,2,124,0,161,1,87,0,83,0, + 4,0,116,3,121,204,1,0,1,0,1,0,89,0,122,10, + 124,0,106,4,125,2,87,0,110,16,4,0,116,5,121,202, + 1,0,1,0,1,0,89,0,110,16,124,2,100,0,117,1, + 114,94,116,6,124,2,131,1,83,0,122,10,124,0,106,7, + 125,3,87,0,110,18,4,0,116,5,121,200,1,0,1,0, + 1,0,100,3,125,3,89,0,122,10,124,0,106,8,125,4, + 87,0,110,50,4,0,116,5,121,198,1,0,1,0,1,0, + 124,1,100,0,117,0,114,170,100,4,160,9,124,3,161,1, + 6,0,89,0,83,0,100,5,160,9,124,3,124,1,161,2, + 6,0,89,0,83,0,100,6,160,9,124,3,124,4,161,2, + 83,0,119,0,119,0,119,0,119,0,41,7,78,218,10,95, + 95,108,111,97,100,101,114,95,95,218,11,109,111,100,117,108, + 101,95,114,101,112,114,250,1,63,250,13,60,109,111,100,117, + 108,101,32,123,33,114,125,62,250,20,60,109,111,100,117,108, + 101,32,123,33,114,125,32,40,123,33,114,125,41,62,250,23, + 60,109,111,100,117,108,101,32,123,33,114,125,32,102,114,111, + 109,32,123,33,114,125,62,41,10,114,13,0,0,0,114,11, + 0,0,0,114,107,0,0,0,218,9,69,120,99,101,112,116, + 105,111,110,218,8,95,95,115,112,101,99,95,95,114,2,0, + 0,0,218,22,95,109,111,100,117,108,101,95,114,101,112,114, + 95,102,114,111,109,95,115,112,101,99,114,9,0,0,0,218, + 8,95,95,102,105,108,101,95,95,114,49,0,0,0,41,5, + 114,104,0,0,0,218,6,108,111,97,100,101,114,114,103,0, + 0,0,114,20,0,0,0,218,8,102,105,108,101,110,97,109, + 101,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,12,95,109,111,100,117,108,101,95,114,101,112,114,38,1, + 0,0,115,56,0,0,0,12,2,10,1,2,4,12,1,12, + 1,2,1,2,1,10,1,12,1,4,1,8,2,8,1,2, + 4,10,1,12,1,6,1,2,1,10,1,12,1,8,1,14, + 1,16,2,12,2,2,250,2,252,2,246,2,252,255,128,114, + 118,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,114,0, + 0,0,101,0,90,1,100,0,90,2,100,1,90,3,100,2, + 100,2,100,2,100,3,156,3,100,4,100,5,132,2,90,4, + 100,6,100,7,132,0,90,5,100,8,100,9,132,0,90,6, + 101,7,100,10,100,11,132,0,131,1,90,8,101,8,106,9, + 100,12,100,11,132,0,131,1,90,8,101,7,100,13,100,14, + 132,0,131,1,90,10,101,7,100,15,100,16,132,0,131,1, + 90,11,101,11,106,9,100,17,100,16,132,0,131,1,90,11, + 100,2,83,0,41,18,218,10,77,111,100,117,108,101,83,112, + 101,99,97,208,5,0,0,84,104,101,32,115,112,101,99,105, + 102,105,99,97,116,105,111,110,32,102,111,114,32,97,32,109, + 111,100,117,108,101,44,32,117,115,101,100,32,102,111,114,32, + 108,111,97,100,105,110,103,46,10,10,32,32,32,32,65,32, + 109,111,100,117,108,101,39,115,32,115,112,101,99,32,105,115, + 32,116,104,101,32,115,111,117,114,99,101,32,102,111,114,32, + 105,110,102,111,114,109,97,116,105,111,110,32,97,98,111,117, + 116,32,116,104,101,32,109,111,100,117,108,101,46,32,32,70, + 111,114,10,32,32,32,32,100,97,116,97,32,97,115,115,111, + 99,105,97,116,101,100,32,119,105,116,104,32,116,104,101,32, + 109,111,100,117,108,101,44,32,105,110,99,108,117,100,105,110, + 103,32,115,111,117,114,99,101,44,32,117,115,101,32,116,104, + 101,32,115,112,101,99,39,115,10,32,32,32,32,108,111,97, + 100,101,114,46,10,10,32,32,32,32,96,110,97,109,101,96, + 32,105,115,32,116,104,101,32,97,98,115,111,108,117,116,101, + 32,110,97,109,101,32,111,102,32,116,104,101,32,109,111,100, + 117,108,101,46,32,32,96,108,111,97,100,101,114,96,32,105, + 115,32,116,104,101,32,108,111,97,100,101,114,10,32,32,32, + 32,116,111,32,117,115,101,32,119,104,101,110,32,108,111,97, + 100,105,110,103,32,116,104,101,32,109,111,100,117,108,101,46, + 32,32,96,112,97,114,101,110,116,96,32,105,115,32,116,104, + 101,32,110,97,109,101,32,111,102,32,116,104,101,10,32,32, + 32,32,112,97,99,107,97,103,101,32,116,104,101,32,109,111, + 100,117,108,101,32,105,115,32,105,110,46,32,32,84,104,101, + 32,112,97,114,101,110,116,32,105,115,32,100,101,114,105,118, + 101,100,32,102,114,111,109,32,116,104,101,32,110,97,109,101, + 46,10,10,32,32,32,32,96,105,115,95,112,97,99,107,97, + 103,101,96,32,100,101,116,101,114,109,105,110,101,115,32,105, + 102,32,116,104,101,32,109,111,100,117,108,101,32,105,115,32, + 99,111,110,115,105,100,101,114,101,100,32,97,32,112,97,99, + 107,97,103,101,32,111,114,10,32,32,32,32,110,111,116,46, + 32,32,79,110,32,109,111,100,117,108,101,115,32,116,104,105, + 115,32,105,115,32,114,101,102,108,101,99,116,101,100,32,98, + 121,32,116,104,101,32,96,95,95,112,97,116,104,95,95,96, + 32,97,116,116,114,105,98,117,116,101,46,10,10,32,32,32, + 32,96,111,114,105,103,105,110,96,32,105,115,32,116,104,101, + 32,115,112,101,99,105,102,105,99,32,108,111,99,97,116,105, + 111,110,32,117,115,101,100,32,98,121,32,116,104,101,32,108, + 111,97,100,101,114,32,102,114,111,109,32,119,104,105,99,104, + 32,116,111,10,32,32,32,32,108,111,97,100,32,116,104,101, + 32,109,111,100,117,108,101,44,32,105,102,32,116,104,97,116, + 32,105,110,102,111,114,109,97,116,105,111,110,32,105,115,32, + 97,118,97,105,108,97,98,108,101,46,32,32,87,104,101,110, + 32,102,105,108,101,110,97,109,101,32,105,115,10,32,32,32, + 32,115,101,116,44,32,111,114,105,103,105,110,32,119,105,108, + 108,32,109,97,116,99,104,46,10,10,32,32,32,32,96,104, + 97,115,95,108,111,99,97,116,105,111,110,96,32,105,110,100, + 105,99,97,116,101,115,32,116,104,97,116,32,97,32,115,112, + 101,99,39,115,32,34,111,114,105,103,105,110,34,32,114,101, + 102,108,101,99,116,115,32,97,32,108,111,99,97,116,105,111, + 110,46,10,32,32,32,32,87,104,101,110,32,116,104,105,115, + 32,105,115,32,84,114,117,101,44,32,96,95,95,102,105,108, + 101,95,95,96,32,97,116,116,114,105,98,117,116,101,32,111, + 102,32,116,104,101,32,109,111,100,117,108,101,32,105,115,32, + 115,101,116,46,10,10,32,32,32,32,96,99,97,99,104,101, + 100,96,32,105,115,32,116,104,101,32,108,111,99,97,116,105, + 111,110,32,111,102,32,116,104,101,32,99,97,99,104,101,100, + 32,98,121,116,101,99,111,100,101,32,102,105,108,101,44,32, + 105,102,32,97,110,121,46,32,32,73,116,10,32,32,32,32, + 99,111,114,114,101,115,112,111,110,100,115,32,116,111,32,116, + 104,101,32,96,95,95,99,97,99,104,101,100,95,95,96,32, + 97,116,116,114,105,98,117,116,101,46,10,10,32,32,32,32, + 96,115,117,98,109,111,100,117,108,101,95,115,101,97,114,99, + 104,95,108,111,99,97,116,105,111,110,115,96,32,105,115,32, + 116,104,101,32,115,101,113,117,101,110,99,101,32,111,102,32, + 112,97,116,104,32,101,110,116,114,105,101,115,32,116,111,10, + 32,32,32,32,115,101,97,114,99,104,32,119,104,101,110,32, + 105,109,112,111,114,116,105,110,103,32,115,117,98,109,111,100, + 117,108,101,115,46,32,32,73,102,32,115,101,116,44,32,105, + 115,95,112,97,99,107,97,103,101,32,115,104,111,117,108,100, + 32,98,101,10,32,32,32,32,84,114,117,101,45,45,97,110, + 100,32,70,97,108,115,101,32,111,116,104,101,114,119,105,115, + 101,46,10,10,32,32,32,32,80,97,99,107,97,103,101,115, + 32,97,114,101,32,115,105,109,112,108,121,32,109,111,100,117, + 108,101,115,32,116,104,97,116,32,40,109,97,121,41,32,104, + 97,118,101,32,115,117,98,109,111,100,117,108,101,115,46,32, + 32,73,102,32,97,32,115,112,101,99,10,32,32,32,32,104, + 97,115,32,97,32,110,111,110,45,78,111,110,101,32,118,97, + 108,117,101,32,105,110,32,96,115,117,98,109,111,100,117,108, 101,95,115,101,97,114,99,104,95,108,111,99,97,116,105,111, - 110,115,218,13,95,115,101,116,95,102,105,108,101,97,116,116, - 114,218,7,95,99,97,99,104,101,100,41,6,114,33,0,0, - 0,114,20,0,0,0,114,116,0,0,0,114,120,0,0,0, - 114,121,0,0,0,114,122,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,114,34,0,0,0,111,1, - 0,0,115,16,0,0,0,6,2,6,1,6,1,6,1,14, - 1,6,3,10,1,255,128,122,19,77,111,100,117,108,101,83, - 112,101,99,46,95,95,105,110,105,116,95,95,99,1,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,6,0,0, - 0,67,0,0,0,115,102,0,0,0,100,1,160,0,124,0, - 106,1,161,1,100,2,160,0,124,0,106,2,161,1,103,2, - 125,1,124,0,106,3,100,0,117,1,114,52,124,1,160,4, - 100,3,160,0,124,0,106,3,161,1,161,1,1,0,124,0, - 106,5,100,0,117,1,114,80,124,1,160,4,100,4,160,0, - 124,0,106,5,161,1,161,1,1,0,100,5,160,0,124,0, - 106,6,106,7,100,6,160,8,124,1,161,1,161,2,83,0, - 41,7,78,122,9,110,97,109,101,61,123,33,114,125,122,11, - 108,111,97,100,101,114,61,123,33,114,125,122,11,111,114,105, - 103,105,110,61,123,33,114,125,122,29,115,117,98,109,111,100, - 117,108,101,95,115,101,97,114,99,104,95,108,111,99,97,116, - 105,111,110,115,61,123,125,122,6,123,125,40,123,125,41,122, - 2,44,32,41,9,114,49,0,0,0,114,20,0,0,0,114, - 116,0,0,0,114,120,0,0,0,218,6,97,112,112,101,110, - 100,114,123,0,0,0,218,9,95,95,99,108,97,115,115,95, - 95,114,9,0,0,0,218,4,106,111,105,110,41,2,114,33, - 0,0,0,114,59,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,114,52,0,0,0,123,1,0,0, - 115,22,0,0,0,10,1,10,1,4,255,10,2,18,1,10, - 1,8,1,4,1,6,255,22,2,255,128,122,19,77,111,100, - 117,108,101,83,112,101,99,46,95,95,114,101,112,114,95,95, - 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,102,0,0,0,124,0, - 106,0,125,2,122,72,124,0,106,1,124,1,106,1,107,2, - 111,76,124,0,106,2,124,1,106,2,107,2,111,76,124,0, - 106,3,124,1,106,3,107,2,111,76,124,2,124,1,106,0, - 107,2,111,76,124,0,106,4,124,1,106,4,107,2,111,76, - 124,0,106,5,124,1,106,5,107,2,87,0,83,0,4,0, - 116,6,121,100,1,0,1,0,1,0,116,7,6,0,89,0, - 83,0,119,0,114,0,0,0,0,41,8,114,123,0,0,0, - 114,20,0,0,0,114,116,0,0,0,114,120,0,0,0,218, - 6,99,97,99,104,101,100,218,12,104,97,115,95,108,111,99, - 97,116,105,111,110,114,2,0,0,0,218,14,78,111,116,73, - 109,112,108,101,109,101,110,116,101,100,41,3,114,33,0,0, - 0,90,5,111,116,104,101,114,90,4,115,109,115,108,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,218,6,95, - 95,101,113,95,95,133,1,0,0,115,34,0,0,0,6,1, - 2,1,12,1,10,1,2,255,10,2,2,254,8,3,2,253, - 10,4,2,252,10,5,4,251,12,6,8,1,2,255,255,128, - 122,17,77,111,100,117,108,101,83,112,101,99,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,58,0,0, - 0,124,0,106,0,100,0,117,0,114,52,124,0,106,1,100, - 0,117,1,114,52,124,0,106,2,114,52,116,3,100,0,117, - 0,114,38,116,4,130,1,116,3,160,5,124,0,106,1,161, - 1,124,0,95,0,124,0,106,0,83,0,114,0,0,0,0, - 41,6,114,125,0,0,0,114,120,0,0,0,114,124,0,0, - 0,218,19,95,98,111,111,116,115,116,114,97,112,95,101,120, - 116,101,114,110,97,108,218,19,78,111,116,73,109,112,108,101, - 109,101,110,116,101,100,69,114,114,111,114,90,11,95,103,101, - 116,95,99,97,99,104,101,100,114,51,0,0,0,114,5,0, - 0,0,114,5,0,0,0,114,6,0,0,0,114,129,0,0, - 0,145,1,0,0,115,14,0,0,0,10,2,16,1,8,1, - 4,1,14,1,6,1,255,128,122,17,77,111,100,117,108,101, - 83,112,101,99,46,99,97,99,104,101,100,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,10,0,0,0,124,1,124,0,95,0,100, - 0,83,0,114,0,0,0,0,41,1,114,125,0,0,0,41, - 2,114,33,0,0,0,114,129,0,0,0,114,5,0,0,0, - 114,5,0,0,0,114,6,0,0,0,114,129,0,0,0,154, - 1,0,0,115,4,0,0,0,10,2,255,128,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,32,0,0,0,124,0,106,0,100,1, - 117,0,114,26,124,0,106,1,160,2,100,2,161,1,100,3, - 25,0,83,0,124,0,106,1,83,0,41,4,122,32,84,104, - 101,32,110,97,109,101,32,111,102,32,116,104,101,32,109,111, - 100,117,108,101,39,115,32,112,97,114,101,110,116,46,78,218, - 1,46,114,25,0,0,0,41,3,114,123,0,0,0,114,20, - 0,0,0,218,10,114,112,97,114,116,105,116,105,111,110,114, - 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,218,6,112,97,114,101,110,116,158,1,0,0,115, - 8,0,0,0,10,3,16,1,6,2,255,128,122,17,77,111, - 100,117,108,101,83,112,101,99,46,112,97,114,101,110,116,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,6,0,0,0,124,0,106, - 0,83,0,114,0,0,0,0,41,1,114,124,0,0,0,114, - 51,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,114,130,0,0,0,166,1,0,0,115,4,0,0, - 0,6,2,255,128,122,23,77,111,100,117,108,101,83,112,101, - 99,46,104,97,115,95,108,111,99,97,116,105,111,110,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,14,0,0,0,116,0,124,1, - 131,1,124,0,95,1,100,0,83,0,114,0,0,0,0,41, - 2,218,4,98,111,111,108,114,124,0,0,0,41,2,114,33, - 0,0,0,218,5,118,97,108,117,101,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,114,130,0,0,0,170,1, - 0,0,115,4,0,0,0,14,2,255,128,41,12,114,9,0, - 0,0,114,8,0,0,0,114,1,0,0,0,114,10,0,0, - 0,114,34,0,0,0,114,52,0,0,0,114,132,0,0,0, - 218,8,112,114,111,112,101,114,116,121,114,129,0,0,0,218, - 6,115,101,116,116,101,114,114,137,0,0,0,114,130,0,0, - 0,114,5,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,6,0,0,0,114,119,0,0,0,74,1,0,0,115,36, - 0,0,0,8,0,4,1,4,36,2,1,12,255,8,12,8, - 10,2,12,10,1,4,8,10,1,2,3,10,1,2,7,10, - 1,4,3,14,1,255,128,114,119,0,0,0,169,2,114,120, - 0,0,0,114,122,0,0,0,99,2,0,0,0,0,0,0, - 0,2,0,0,0,6,0,0,0,8,0,0,0,67,0,0, - 0,115,150,0,0,0,116,0,124,1,100,1,131,2,114,74, - 116,1,100,2,117,0,114,22,116,2,130,1,116,1,106,3, - 125,4,124,3,100,2,117,0,114,48,124,4,124,0,124,1, - 100,3,141,2,83,0,124,3,114,56,103,0,110,2,100,2, - 125,5,124,4,124,0,124,1,124,5,100,4,141,3,83,0, - 124,3,100,2,117,0,114,132,116,0,124,1,100,5,131,2, - 114,128,122,14,124,1,160,4,124,0,161,1,125,3,87,0, - 110,24,4,0,116,5,121,148,1,0,1,0,1,0,100,2, - 125,3,89,0,110,4,100,6,125,3,116,6,124,0,124,1, - 124,2,124,3,100,7,141,4,83,0,119,0,41,8,122,53, - 82,101,116,117,114,110,32,97,32,109,111,100,117,108,101,32, - 115,112,101,99,32,98,97,115,101,100,32,111,110,32,118,97, - 114,105,111,117,115,32,108,111,97,100,101,114,32,109,101,116, - 104,111,100,115,46,90,12,103,101,116,95,102,105,108,101,110, - 97,109,101,78,41,1,114,116,0,0,0,41,2,114,116,0, - 0,0,114,123,0,0,0,114,122,0,0,0,70,114,142,0, - 0,0,41,7,114,11,0,0,0,114,133,0,0,0,114,134, - 0,0,0,218,23,115,112,101,99,95,102,114,111,109,95,102, - 105,108,101,95,108,111,99,97,116,105,111,110,114,122,0,0, - 0,114,83,0,0,0,114,119,0,0,0,41,6,114,20,0, - 0,0,114,116,0,0,0,114,120,0,0,0,114,122,0,0, - 0,114,143,0,0,0,90,6,115,101,97,114,99,104,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,98,0, - 0,0,175,1,0,0,115,40,0,0,0,10,2,8,1,4, - 1,6,1,8,2,12,1,12,1,6,1,2,1,6,255,8, - 3,10,1,2,1,14,1,12,1,8,1,4,3,16,2,2, - 250,255,128,114,98,0,0,0,99,3,0,0,0,0,0,0, - 0,0,0,0,0,8,0,0,0,8,0,0,0,67,0,0, - 0,115,44,1,0,0,122,10,124,0,106,0,125,3,87,0, - 110,18,4,0,116,1,144,1,121,42,1,0,1,0,1,0, - 89,0,110,12,124,3,100,0,117,1,114,42,124,3,83,0, - 124,0,106,2,125,4,124,1,100,0,117,0,114,84,122,10, - 124,0,106,3,125,1,87,0,110,16,4,0,116,1,144,1, - 121,40,1,0,1,0,1,0,89,0,122,10,124,0,106,4, - 125,5,87,0,110,20,4,0,116,1,144,1,121,38,1,0, - 1,0,1,0,100,0,125,5,89,0,124,2,100,0,117,0, - 114,170,124,5,100,0,117,0,114,166,122,10,124,1,106,5, - 125,2,87,0,110,26,4,0,116,1,144,1,121,36,1,0, - 1,0,1,0,100,0,125,2,89,0,110,4,124,5,125,2, - 122,10,124,0,106,6,125,6,87,0,110,20,4,0,116,1, - 144,1,121,34,1,0,1,0,1,0,100,0,125,6,89,0, - 122,14,116,7,124,0,106,8,131,1,125,7,87,0,110,20, - 4,0,116,1,144,1,121,32,1,0,1,0,1,0,100,0, - 125,7,89,0,116,9,124,4,124,1,124,2,100,1,141,3, - 125,3,124,5,100,0,117,0,144,1,114,10,100,2,110,2, - 100,3,124,3,95,10,124,6,124,3,95,11,124,7,124,3, - 95,12,124,3,83,0,119,0,119,0,119,0,119,0,119,0, - 119,0,41,4,78,169,1,114,120,0,0,0,70,84,41,13, - 114,113,0,0,0,114,2,0,0,0,114,9,0,0,0,114, - 106,0,0,0,114,115,0,0,0,218,7,95,79,82,73,71, - 73,78,218,10,95,95,99,97,99,104,101,100,95,95,218,4, - 108,105,115,116,218,8,95,95,112,97,116,104,95,95,114,119, - 0,0,0,114,124,0,0,0,114,129,0,0,0,114,123,0, - 0,0,41,8,114,104,0,0,0,114,116,0,0,0,114,120, - 0,0,0,114,103,0,0,0,114,20,0,0,0,90,8,108, - 111,99,97,116,105,111,110,114,129,0,0,0,114,123,0,0, + 110,115,96,44,32,116,104,101,32,105,109,112,111,114,116,10, + 32,32,32,32,115,121,115,116,101,109,32,119,105,108,108,32, + 99,111,110,115,105,100,101,114,32,109,111,100,117,108,101,115, + 32,108,111,97,100,101,100,32,102,114,111,109,32,116,104,101, + 32,115,112,101,99,32,97,115,32,112,97,99,107,97,103,101, + 115,46,10,10,32,32,32,32,79,110,108,121,32,102,105,110, + 100,101,114,115,32,40,115,101,101,32,105,109,112,111,114,116, + 108,105,98,46,97,98,99,46,77,101,116,97,80,97,116,104, + 70,105,110,100,101,114,32,97,110,100,10,32,32,32,32,105, + 109,112,111,114,116,108,105,98,46,97,98,99,46,80,97,116, + 104,69,110,116,114,121,70,105,110,100,101,114,41,32,115,104, + 111,117,108,100,32,109,111,100,105,102,121,32,77,111,100,117, + 108,101,83,112,101,99,32,105,110,115,116,97,110,99,101,115, + 46,10,10,32,32,32,32,78,41,3,218,6,111,114,105,103, + 105,110,218,12,108,111,97,100,101,114,95,115,116,97,116,101, + 218,10,105,115,95,112,97,99,107,97,103,101,99,3,0,0, + 0,0,0,0,0,3,0,0,0,6,0,0,0,2,0,0, + 0,67,0,0,0,115,54,0,0,0,124,1,124,0,95,0, + 124,2,124,0,95,1,124,3,124,0,95,2,124,4,124,0, + 95,3,124,5,114,32,103,0,110,2,100,0,124,0,95,4, + 100,1,124,0,95,5,100,0,124,0,95,6,100,0,83,0, + 41,2,78,70,41,7,114,20,0,0,0,114,116,0,0,0, + 114,120,0,0,0,114,121,0,0,0,218,26,115,117,98,109, + 111,100,117,108,101,95,115,101,97,114,99,104,95,108,111,99, + 97,116,105,111,110,115,218,13,95,115,101,116,95,102,105,108, + 101,97,116,116,114,218,7,95,99,97,99,104,101,100,41,6, + 114,33,0,0,0,114,20,0,0,0,114,116,0,0,0,114, + 120,0,0,0,114,121,0,0,0,114,122,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,34,0, + 0,0,111,1,0,0,115,16,0,0,0,6,2,6,1,6, + 1,6,1,14,1,6,3,10,1,255,128,122,19,77,111,100, + 117,108,101,83,112,101,99,46,95,95,105,110,105,116,95,95, + 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,6,0,0,0,67,0,0,0,115,102,0,0,0,100,1, + 160,0,124,0,106,1,161,1,100,2,160,0,124,0,106,2, + 161,1,103,2,125,1,124,0,106,3,100,0,117,1,114,52, + 124,1,160,4,100,3,160,0,124,0,106,3,161,1,161,1, + 1,0,124,0,106,5,100,0,117,1,114,80,124,1,160,4, + 100,4,160,0,124,0,106,5,161,1,161,1,1,0,100,5, + 160,0,124,0,106,6,106,7,100,6,160,8,124,1,161,1, + 161,2,83,0,41,7,78,122,9,110,97,109,101,61,123,33, + 114,125,122,11,108,111,97,100,101,114,61,123,33,114,125,122, + 11,111,114,105,103,105,110,61,123,33,114,125,122,29,115,117, + 98,109,111,100,117,108,101,95,115,101,97,114,99,104,95,108, + 111,99,97,116,105,111,110,115,61,123,125,122,6,123,125,40, + 123,125,41,122,2,44,32,41,9,114,49,0,0,0,114,20, + 0,0,0,114,116,0,0,0,114,120,0,0,0,218,6,97, + 112,112,101,110,100,114,123,0,0,0,218,9,95,95,99,108, + 97,115,115,95,95,114,9,0,0,0,218,4,106,111,105,110, + 41,2,114,33,0,0,0,114,59,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,114,52,0,0,0, + 123,1,0,0,115,22,0,0,0,10,1,10,1,4,255,10, + 2,18,1,10,1,8,1,4,1,6,255,22,2,255,128,122, + 19,77,111,100,117,108,101,83,112,101,99,46,95,95,114,101, + 112,114,95,95,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,102,0, + 0,0,124,0,106,0,125,2,122,72,124,0,106,1,124,1, + 106,1,107,2,111,76,124,0,106,2,124,1,106,2,107,2, + 111,76,124,0,106,3,124,1,106,3,107,2,111,76,124,2, + 124,1,106,0,107,2,111,76,124,0,106,4,124,1,106,4, + 107,2,111,76,124,0,106,5,124,1,106,5,107,2,87,0, + 83,0,4,0,116,6,121,100,1,0,1,0,1,0,116,7, + 6,0,89,0,83,0,119,0,114,0,0,0,0,41,8,114, + 123,0,0,0,114,20,0,0,0,114,116,0,0,0,114,120, + 0,0,0,218,6,99,97,99,104,101,100,218,12,104,97,115, + 95,108,111,99,97,116,105,111,110,114,2,0,0,0,218,14, + 78,111,116,73,109,112,108,101,109,101,110,116,101,100,41,3, + 114,33,0,0,0,90,5,111,116,104,101,114,90,4,115,109, + 115,108,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,218,6,95,95,101,113,95,95,133,1,0,0,115,34,0, + 0,0,6,1,2,1,12,1,10,1,2,255,10,2,2,254, + 8,3,2,253,10,4,2,252,10,5,4,251,12,6,8,1, + 2,255,255,128,122,17,77,111,100,117,108,101,83,112,101,99, + 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,58,0,0,0,124,0,106,0,100,0,117,0,114,52,124, + 0,106,1,100,0,117,1,114,52,124,0,106,2,114,52,116, + 3,100,0,117,0,114,38,116,4,130,1,116,3,160,5,124, + 0,106,1,161,1,124,0,95,0,124,0,106,0,83,0,114, + 0,0,0,0,41,6,114,125,0,0,0,114,120,0,0,0, + 114,124,0,0,0,218,19,95,98,111,111,116,115,116,114,97, + 112,95,101,120,116,101,114,110,97,108,218,19,78,111,116,73, + 109,112,108,101,109,101,110,116,101,100,69,114,114,111,114,90, + 11,95,103,101,116,95,99,97,99,104,101,100,114,51,0,0, 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, - 218,17,95,115,112,101,99,95,102,114,111,109,95,109,111,100, - 117,108,101,201,1,0,0,115,86,0,0,0,2,2,10,1, - 14,1,4,1,8,2,4,1,6,2,8,1,2,1,10,1, - 14,1,2,2,2,1,10,1,14,1,6,1,8,1,8,1, - 2,1,10,1,14,1,8,1,4,2,2,1,10,1,14,1, - 6,1,2,1,14,1,14,1,6,1,14,2,20,1,6,1, - 6,1,4,1,2,249,2,252,2,250,2,250,2,251,2,246, - 255,128,114,149,0,0,0,70,169,1,218,8,111,118,101,114, - 114,105,100,101,99,2,0,0,0,0,0,0,0,1,0,0, - 0,5,0,0,0,8,0,0,0,67,0,0,0,115,210,1, - 0,0,124,2,115,20,116,0,124,1,100,1,100,0,131,3, - 100,0,117,0,114,50,122,12,124,0,106,1,124,1,95,2, - 87,0,110,16,4,0,116,3,144,1,121,208,1,0,1,0, - 1,0,89,0,124,2,115,70,116,0,124,1,100,2,100,0, - 131,3,100,0,117,0,114,170,124,0,106,4,125,3,124,3, - 100,0,117,0,114,142,124,0,106,5,100,0,117,1,114,142, - 116,6,100,0,117,0,114,106,116,7,130,1,116,6,106,8, - 125,4,124,4,160,9,124,4,161,1,125,3,124,0,106,5, - 124,3,95,10,124,3,124,0,95,4,100,0,124,1,95,11, - 122,10,124,3,124,1,95,12,87,0,110,16,4,0,116,3, - 144,1,121,206,1,0,1,0,1,0,89,0,124,2,115,190, - 116,0,124,1,100,3,100,0,131,3,100,0,117,0,114,220, - 122,12,124,0,106,13,124,1,95,14,87,0,110,16,4,0, - 116,3,144,1,121,204,1,0,1,0,1,0,89,0,122,10, - 124,0,124,1,95,15,87,0,110,16,4,0,116,3,144,1, - 121,202,1,0,1,0,1,0,89,0,124,2,144,1,115,16, - 116,0,124,1,100,4,100,0,131,3,100,0,117,0,144,1, - 114,58,124,0,106,5,100,0,117,1,144,1,114,58,122,12, - 124,0,106,5,124,1,95,16,87,0,110,16,4,0,116,3, - 144,1,121,200,1,0,1,0,1,0,89,0,124,0,106,17, - 144,1,114,192,124,2,144,1,115,90,116,0,124,1,100,5, - 100,0,131,3,100,0,117,0,144,1,114,120,122,12,124,0, - 106,18,124,1,95,11,87,0,110,16,4,0,116,3,144,1, - 121,198,1,0,1,0,1,0,89,0,124,2,144,1,115,144, - 116,0,124,1,100,6,100,0,131,3,100,0,117,0,144,1, - 114,192,124,0,106,19,100,0,117,1,144,1,114,192,122,14, - 124,0,106,19,124,1,95,20,87,0,124,1,83,0,4,0, - 116,3,144,1,121,196,1,0,1,0,1,0,89,0,124,1, - 83,0,124,1,83,0,119,0,119,0,119,0,119,0,119,0, - 119,0,119,0,41,7,78,114,9,0,0,0,114,106,0,0, - 0,218,11,95,95,112,97,99,107,97,103,101,95,95,114,148, - 0,0,0,114,115,0,0,0,114,146,0,0,0,41,21,114, - 13,0,0,0,114,20,0,0,0,114,9,0,0,0,114,2, - 0,0,0,114,116,0,0,0,114,123,0,0,0,114,133,0, - 0,0,114,134,0,0,0,218,16,95,78,97,109,101,115,112, - 97,99,101,76,111,97,100,101,114,218,7,95,95,110,101,119, - 95,95,90,5,95,112,97,116,104,114,115,0,0,0,114,106, - 0,0,0,114,137,0,0,0,114,152,0,0,0,114,113,0, - 0,0,114,148,0,0,0,114,130,0,0,0,114,120,0,0, - 0,114,129,0,0,0,114,146,0,0,0,41,5,114,103,0, - 0,0,114,104,0,0,0,114,151,0,0,0,114,116,0,0, - 0,114,153,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,6,0,0,0,218,18,95,105,110,105,116,95,109,111,100, - 117,108,101,95,97,116,116,114,115,246,1,0,0,115,114,0, - 0,0,20,4,2,1,12,1,14,1,2,1,20,2,6,1, - 8,1,10,2,8,1,4,1,6,1,10,2,8,1,6,1, - 6,11,2,1,10,1,14,1,2,1,20,2,2,1,12,1, - 14,1,2,1,2,2,10,1,14,1,2,1,24,2,12,1, - 2,1,12,1,14,1,2,1,8,2,24,1,2,1,12,1, - 14,1,2,1,24,2,12,1,2,1,10,1,4,3,14,254, - 2,1,8,1,2,254,2,249,2,249,2,249,2,251,2,250, - 2,228,255,128,114,155,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,82,0,0,0,100,1,125,1,116,0,124,0,106, - 1,100,2,131,2,114,30,124,0,106,1,160,2,124,0,161, - 1,125,1,110,20,116,0,124,0,106,1,100,3,131,2,114, - 50,116,3,100,4,131,1,130,1,124,1,100,1,117,0,114, - 68,116,4,124,0,106,5,131,1,125,1,116,6,124,0,124, - 1,131,2,1,0,124,1,83,0,41,5,122,43,67,114,101, - 97,116,101,32,97,32,109,111,100,117,108,101,32,98,97,115, - 101,100,32,111,110,32,116,104,101,32,112,114,111,118,105,100, - 101,100,32,115,112,101,99,46,78,218,13,99,114,101,97,116, - 101,95,109,111,100,117,108,101,218,11,101,120,101,99,95,109, - 111,100,117,108,101,122,66,108,111,97,100,101,114,115,32,116, - 104,97,116,32,100,101,102,105,110,101,32,101,120,101,99,95, - 109,111,100,117,108,101,40,41,32,109,117,115,116,32,97,108, - 115,111,32,100,101,102,105,110,101,32,99,114,101,97,116,101, - 95,109,111,100,117,108,101,40,41,41,7,114,11,0,0,0, - 114,116,0,0,0,114,156,0,0,0,114,83,0,0,0,114, - 21,0,0,0,114,20,0,0,0,114,155,0,0,0,169,2, - 114,103,0,0,0,114,104,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,218,16,109,111,100,117,108, - 101,95,102,114,111,109,95,115,112,101,99,62,2,0,0,115, - 20,0,0,0,4,3,12,1,14,3,12,1,8,1,8,2, - 10,1,10,1,4,1,255,128,114,159,0,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,100,0,0,0,124,0,106,0,100, - 1,117,0,114,14,100,2,110,4,124,0,106,0,125,1,124, - 0,106,1,100,1,117,0,114,64,124,0,106,2,100,1,117, - 0,114,50,100,3,160,3,124,1,161,1,83,0,100,4,160, - 3,124,1,124,0,106,2,161,2,83,0,124,0,106,4,114, - 84,100,5,160,3,124,1,124,0,106,1,161,2,83,0,100, - 6,160,3,124,0,106,0,124,0,106,1,161,2,83,0,41, - 7,122,38,82,101,116,117,114,110,32,116,104,101,32,114,101, - 112,114,32,116,111,32,117,115,101,32,102,111,114,32,116,104, - 101,32,109,111,100,117,108,101,46,78,114,108,0,0,0,114, - 109,0,0,0,114,110,0,0,0,114,111,0,0,0,250,18, - 60,109,111,100,117,108,101,32,123,33,114,125,32,40,123,125, - 41,62,41,5,114,20,0,0,0,114,120,0,0,0,114,116, - 0,0,0,114,49,0,0,0,114,130,0,0,0,41,2,114, - 103,0,0,0,114,20,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,114,114,0,0,0,79,2,0, - 0,115,18,0,0,0,20,3,10,1,10,1,10,1,14,2, - 6,2,14,1,16,2,255,128,114,114,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,4,0,0,0,10,0, - 0,0,67,0,0,0,115,26,1,0,0,124,0,106,0,125, - 2,116,1,124,2,131,1,143,246,1,0,116,2,106,3,160, - 4,124,2,161,1,124,1,117,1,114,54,100,1,160,5,124, - 2,161,1,125,3,116,6,124,3,124,2,100,2,141,2,130, - 1,122,160,124,0,106,7,100,3,117,0,114,106,124,0,106, - 8,100,3,117,0,114,90,116,6,100,4,124,0,106,0,100, - 2,141,2,130,1,116,9,124,0,124,1,100,5,100,6,141, - 3,1,0,110,80,116,9,124,0,124,1,100,5,100,6,141, - 3,1,0,116,10,124,0,106,7,100,7,131,2,115,174,116, - 11,124,0,106,7,131,1,155,0,100,8,157,2,125,3,116, - 12,160,13,124,3,116,14,161,2,1,0,124,0,106,7,160, - 15,124,2,161,1,1,0,110,12,124,0,106,7,160,16,124, - 1,161,1,1,0,87,0,116,2,106,3,160,17,124,0,106, - 0,161,1,125,1,124,1,116,2,106,3,124,0,106,0,60, - 0,110,28,116,2,106,3,160,17,124,0,106,0,161,1,125, - 1,124,1,116,2,106,3,124,0,106,0,60,0,119,0,87, - 0,100,3,4,0,4,0,131,3,1,0,124,1,83,0,49, - 0,144,1,115,12,119,1,1,0,1,0,1,0,89,0,1, - 0,124,1,83,0,41,9,122,70,69,120,101,99,117,116,101, - 32,116,104,101,32,115,112,101,99,39,115,32,115,112,101,99, - 105,102,105,101,100,32,109,111,100,117,108,101,32,105,110,32, - 97,110,32,101,120,105,115,116,105,110,103,32,109,111,100,117, - 108,101,39,115,32,110,97,109,101,115,112,97,99,101,46,122, - 30,109,111,100,117,108,101,32,123,33,114,125,32,110,111,116, - 32,105,110,32,115,121,115,46,109,111,100,117,108,101,115,114, - 19,0,0,0,78,250,14,109,105,115,115,105,110,103,32,108, - 111,97,100,101,114,84,114,150,0,0,0,114,157,0,0,0, - 250,55,46,101,120,101,99,95,109,111,100,117,108,101,40,41, - 32,110,111,116,32,102,111,117,110,100,59,32,102,97,108,108, - 105,110,103,32,98,97,99,107,32,116,111,32,108,111,97,100, - 95,109,111,100,117,108,101,40,41,41,18,114,20,0,0,0, - 114,54,0,0,0,114,18,0,0,0,114,99,0,0,0,114, - 38,0,0,0,114,49,0,0,0,114,83,0,0,0,114,116, - 0,0,0,114,123,0,0,0,114,155,0,0,0,114,11,0, - 0,0,114,7,0,0,0,114,95,0,0,0,114,96,0,0, - 0,218,13,73,109,112,111,114,116,87,97,114,110,105,110,103, - 218,11,108,111,97,100,95,109,111,100,117,108,101,114,157,0, - 0,0,218,3,112,111,112,41,4,114,103,0,0,0,114,104, - 0,0,0,114,20,0,0,0,114,102,0,0,0,114,5,0, - 0,0,114,5,0,0,0,114,6,0,0,0,114,100,0,0, - 0,96,2,0,0,115,50,0,0,0,6,2,10,1,16,1, - 10,1,12,1,2,1,10,1,10,1,14,1,16,2,14,2, - 12,1,16,1,12,2,14,1,12,2,2,128,14,4,14,1, - 14,255,26,1,4,1,18,255,4,1,255,128,114,100,0,0, + 114,129,0,0,0,145,1,0,0,115,14,0,0,0,10,2, + 16,1,8,1,4,1,14,1,6,1,255,128,122,17,77,111, + 100,117,108,101,83,112,101,99,46,99,97,99,104,101,100,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,10,0,0,0,124,1,124, + 0,95,0,100,0,83,0,114,0,0,0,0,41,1,114,125, + 0,0,0,41,2,114,33,0,0,0,114,129,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,114,129, + 0,0,0,154,1,0,0,115,4,0,0,0,10,2,255,128, + 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,32,0,0,0,124,0, + 106,0,100,1,117,0,114,26,124,0,106,1,160,2,100,2, + 161,1,100,3,25,0,83,0,124,0,106,1,83,0,41,4, + 122,32,84,104,101,32,110,97,109,101,32,111,102,32,116,104, + 101,32,109,111,100,117,108,101,39,115,32,112,97,114,101,110, + 116,46,78,218,1,46,114,25,0,0,0,41,3,114,123,0, + 0,0,114,20,0,0,0,218,10,114,112,97,114,116,105,116, + 105,111,110,114,51,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,218,6,112,97,114,101,110,116,158, + 1,0,0,115,8,0,0,0,10,3,16,1,6,2,255,128, + 122,17,77,111,100,117,108,101,83,112,101,99,46,112,97,114, + 101,110,116,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,6,0,0, + 0,124,0,106,0,83,0,114,0,0,0,0,41,1,114,124, + 0,0,0,114,51,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,130,0,0,0,166,1,0,0, + 115,4,0,0,0,6,2,255,128,122,23,77,111,100,117,108, + 101,83,112,101,99,46,104,97,115,95,108,111,99,97,116,105, + 111,110,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,14,0,0,0, + 116,0,124,1,131,1,124,0,95,1,100,0,83,0,114,0, + 0,0,0,41,2,218,4,98,111,111,108,114,124,0,0,0, + 41,2,114,33,0,0,0,218,5,118,97,108,117,101,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,130,0, + 0,0,170,1,0,0,115,4,0,0,0,14,2,255,128,41, + 12,114,9,0,0,0,114,8,0,0,0,114,1,0,0,0, + 114,10,0,0,0,114,34,0,0,0,114,52,0,0,0,114, + 132,0,0,0,218,8,112,114,111,112,101,114,116,121,114,129, + 0,0,0,218,6,115,101,116,116,101,114,114,137,0,0,0, + 114,130,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,114,119,0,0,0,74,1, + 0,0,115,36,0,0,0,8,0,4,1,4,36,2,1,12, + 255,8,12,8,10,2,12,10,1,4,8,10,1,2,3,10, + 1,2,7,10,1,4,3,14,1,255,128,114,119,0,0,0, + 169,2,114,120,0,0,0,114,122,0,0,0,99,2,0,0, + 0,0,0,0,0,2,0,0,0,6,0,0,0,8,0,0, + 0,67,0,0,0,115,150,0,0,0,116,0,124,1,100,1, + 131,2,114,74,116,1,100,2,117,0,114,22,116,2,130,1, + 116,1,106,3,125,4,124,3,100,2,117,0,114,48,124,4, + 124,0,124,1,100,3,141,2,83,0,124,3,114,56,103,0, + 110,2,100,2,125,5,124,4,124,0,124,1,124,5,100,4, + 141,3,83,0,124,3,100,2,117,0,114,132,116,0,124,1, + 100,5,131,2,114,128,122,14,124,1,160,4,124,0,161,1, + 125,3,87,0,110,24,4,0,116,5,121,148,1,0,1,0, + 1,0,100,2,125,3,89,0,110,4,100,6,125,3,116,6, + 124,0,124,1,124,2,124,3,100,7,141,4,83,0,119,0, + 41,8,122,53,82,101,116,117,114,110,32,97,32,109,111,100, + 117,108,101,32,115,112,101,99,32,98,97,115,101,100,32,111, + 110,32,118,97,114,105,111,117,115,32,108,111,97,100,101,114, + 32,109,101,116,104,111,100,115,46,90,12,103,101,116,95,102, + 105,108,101,110,97,109,101,78,41,1,114,116,0,0,0,41, + 2,114,116,0,0,0,114,123,0,0,0,114,122,0,0,0, + 70,114,142,0,0,0,41,7,114,11,0,0,0,114,133,0, + 0,0,114,134,0,0,0,218,23,115,112,101,99,95,102,114, + 111,109,95,102,105,108,101,95,108,111,99,97,116,105,111,110, + 114,122,0,0,0,114,83,0,0,0,114,119,0,0,0,41, + 6,114,20,0,0,0,114,116,0,0,0,114,120,0,0,0, + 114,122,0,0,0,114,143,0,0,0,90,6,115,101,97,114, + 99,104,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,98,0,0,0,175,1,0,0,115,40,0,0,0,10, + 2,8,1,4,1,6,1,8,2,12,1,12,1,6,1,2, + 1,6,255,8,3,10,1,2,1,14,1,12,1,8,1,4, + 3,16,2,2,250,255,128,114,98,0,0,0,99,3,0,0, + 0,0,0,0,0,0,0,0,0,8,0,0,0,8,0,0, + 0,67,0,0,0,115,44,1,0,0,122,10,124,0,106,0, + 125,3,87,0,110,18,4,0,116,1,144,1,121,42,1,0, + 1,0,1,0,89,0,110,12,124,3,100,0,117,1,114,42, + 124,3,83,0,124,0,106,2,125,4,124,1,100,0,117,0, + 114,84,122,10,124,0,106,3,125,1,87,0,110,16,4,0, + 116,1,144,1,121,40,1,0,1,0,1,0,89,0,122,10, + 124,0,106,4,125,5,87,0,110,20,4,0,116,1,144,1, + 121,38,1,0,1,0,1,0,100,0,125,5,89,0,124,2, + 100,0,117,0,114,170,124,5,100,0,117,0,114,166,122,10, + 124,1,106,5,125,2,87,0,110,26,4,0,116,1,144,1, + 121,36,1,0,1,0,1,0,100,0,125,2,89,0,110,4, + 124,5,125,2,122,10,124,0,106,6,125,6,87,0,110,20, + 4,0,116,1,144,1,121,34,1,0,1,0,1,0,100,0, + 125,6,89,0,122,14,116,7,124,0,106,8,131,1,125,7, + 87,0,110,20,4,0,116,1,144,1,121,32,1,0,1,0, + 1,0,100,0,125,7,89,0,116,9,124,4,124,1,124,2, + 100,1,141,3,125,3,124,5,100,0,117,0,144,1,114,10, + 100,2,110,2,100,3,124,3,95,10,124,6,124,3,95,11, + 124,7,124,3,95,12,124,3,83,0,119,0,119,0,119,0, + 119,0,119,0,119,0,41,4,78,169,1,114,120,0,0,0, + 70,84,41,13,114,113,0,0,0,114,2,0,0,0,114,9, + 0,0,0,114,106,0,0,0,114,115,0,0,0,218,7,95, + 79,82,73,71,73,78,218,10,95,95,99,97,99,104,101,100, + 95,95,218,4,108,105,115,116,218,8,95,95,112,97,116,104, + 95,95,114,119,0,0,0,114,124,0,0,0,114,129,0,0, + 0,114,123,0,0,0,41,8,114,104,0,0,0,114,116,0, + 0,0,114,120,0,0,0,114,103,0,0,0,114,20,0,0, + 0,90,8,108,111,99,97,116,105,111,110,114,129,0,0,0, + 114,123,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,218,17,95,115,112,101,99,95,102,114,111,109, + 95,109,111,100,117,108,101,201,1,0,0,115,86,0,0,0, + 2,2,10,1,14,1,4,1,8,2,4,1,6,2,8,1, + 2,1,10,1,14,1,2,2,2,1,10,1,14,1,6,1, + 8,1,8,1,2,1,10,1,14,1,8,1,4,2,2,1, + 10,1,14,1,6,1,2,1,14,1,14,1,6,1,14,2, + 20,1,6,1,6,1,4,1,2,249,2,252,2,250,2,250, + 2,251,2,246,255,128,114,149,0,0,0,70,169,1,218,8, + 111,118,101,114,114,105,100,101,99,2,0,0,0,0,0,0, + 0,1,0,0,0,5,0,0,0,8,0,0,0,67,0,0, + 0,115,210,1,0,0,124,2,115,20,116,0,124,1,100,1, + 100,0,131,3,100,0,117,0,114,50,122,12,124,0,106,1, + 124,1,95,2,87,0,110,16,4,0,116,3,144,1,121,208, + 1,0,1,0,1,0,89,0,124,2,115,70,116,0,124,1, + 100,2,100,0,131,3,100,0,117,0,114,170,124,0,106,4, + 125,3,124,3,100,0,117,0,114,142,124,0,106,5,100,0, + 117,1,114,142,116,6,100,0,117,0,114,106,116,7,130,1, + 116,6,106,8,125,4,124,4,160,9,124,4,161,1,125,3, + 124,0,106,5,124,3,95,10,124,3,124,0,95,4,100,0, + 124,1,95,11,122,10,124,3,124,1,95,12,87,0,110,16, + 4,0,116,3,144,1,121,206,1,0,1,0,1,0,89,0, + 124,2,115,190,116,0,124,1,100,3,100,0,131,3,100,0, + 117,0,114,220,122,12,124,0,106,13,124,1,95,14,87,0, + 110,16,4,0,116,3,144,1,121,204,1,0,1,0,1,0, + 89,0,122,10,124,0,124,1,95,15,87,0,110,16,4,0, + 116,3,144,1,121,202,1,0,1,0,1,0,89,0,124,2, + 144,1,115,16,116,0,124,1,100,4,100,0,131,3,100,0, + 117,0,144,1,114,58,124,0,106,5,100,0,117,1,144,1, + 114,58,122,12,124,0,106,5,124,1,95,16,87,0,110,16, + 4,0,116,3,144,1,121,200,1,0,1,0,1,0,89,0, + 124,0,106,17,144,1,114,192,124,2,144,1,115,90,116,0, + 124,1,100,5,100,0,131,3,100,0,117,0,144,1,114,120, + 122,12,124,0,106,18,124,1,95,11,87,0,110,16,4,0, + 116,3,144,1,121,198,1,0,1,0,1,0,89,0,124,2, + 144,1,115,144,116,0,124,1,100,6,100,0,131,3,100,0, + 117,0,144,1,114,192,124,0,106,19,100,0,117,1,144,1, + 114,192,122,14,124,0,106,19,124,1,95,20,87,0,124,1, + 83,0,4,0,116,3,144,1,121,196,1,0,1,0,1,0, + 89,0,124,1,83,0,124,1,83,0,119,0,119,0,119,0, + 119,0,119,0,119,0,119,0,41,7,78,114,9,0,0,0, + 114,106,0,0,0,218,11,95,95,112,97,99,107,97,103,101, + 95,95,114,148,0,0,0,114,115,0,0,0,114,146,0,0, + 0,41,21,114,13,0,0,0,114,20,0,0,0,114,9,0, + 0,0,114,2,0,0,0,114,116,0,0,0,114,123,0,0, + 0,114,133,0,0,0,114,134,0,0,0,218,16,95,78,97, + 109,101,115,112,97,99,101,76,111,97,100,101,114,218,7,95, + 95,110,101,119,95,95,90,5,95,112,97,116,104,114,115,0, + 0,0,114,106,0,0,0,114,137,0,0,0,114,152,0,0, + 0,114,113,0,0,0,114,148,0,0,0,114,130,0,0,0, + 114,120,0,0,0,114,129,0,0,0,114,146,0,0,0,41, + 5,114,103,0,0,0,114,104,0,0,0,114,151,0,0,0, + 114,116,0,0,0,114,153,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,218,18,95,105,110,105,116, + 95,109,111,100,117,108,101,95,97,116,116,114,115,246,1,0, + 0,115,114,0,0,0,20,4,2,1,12,1,14,1,2,1, + 20,2,6,1,8,1,10,2,8,1,4,1,6,1,10,2, + 8,1,6,1,6,11,2,1,10,1,14,1,2,1,20,2, + 2,1,12,1,14,1,2,1,2,2,10,1,14,1,2,1, + 24,2,12,1,2,1,12,1,14,1,2,1,8,2,24,1, + 2,1,12,1,14,1,2,1,24,2,12,1,2,1,10,1, + 4,3,14,254,2,1,8,1,2,254,2,249,2,249,2,249, + 2,251,2,250,2,228,255,128,114,155,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,82,0,0,0,100,1,125,1,116, + 0,124,0,106,1,100,2,131,2,114,30,124,0,106,1,160, + 2,124,0,161,1,125,1,110,20,116,0,124,0,106,1,100, + 3,131,2,114,50,116,3,100,4,131,1,130,1,124,1,100, + 1,117,0,114,68,116,4,124,0,106,5,131,1,125,1,116, + 6,124,0,124,1,131,2,1,0,124,1,83,0,41,5,122, + 43,67,114,101,97,116,101,32,97,32,109,111,100,117,108,101, + 32,98,97,115,101,100,32,111,110,32,116,104,101,32,112,114, + 111,118,105,100,101,100,32,115,112,101,99,46,78,218,13,99, + 114,101,97,116,101,95,109,111,100,117,108,101,218,11,101,120, + 101,99,95,109,111,100,117,108,101,122,66,108,111,97,100,101, + 114,115,32,116,104,97,116,32,100,101,102,105,110,101,32,101, + 120,101,99,95,109,111,100,117,108,101,40,41,32,109,117,115, + 116,32,97,108,115,111,32,100,101,102,105,110,101,32,99,114, + 101,97,116,101,95,109,111,100,117,108,101,40,41,41,7,114, + 11,0,0,0,114,116,0,0,0,114,156,0,0,0,114,83, + 0,0,0,114,21,0,0,0,114,20,0,0,0,114,155,0, + 0,0,169,2,114,103,0,0,0,114,104,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,218,16,109, + 111,100,117,108,101,95,102,114,111,109,95,115,112,101,99,62, + 2,0,0,115,20,0,0,0,4,3,12,1,14,3,12,1, + 8,1,8,2,10,1,10,1,4,1,255,128,114,159,0,0, 0,99,1,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,8,0,0,0,67,0,0,0,115,18,1,0,0,122, - 18,124,0,106,0,160,1,124,0,106,2,161,1,1,0,87, - 0,110,46,1,0,1,0,1,0,124,0,106,2,116,3,106, - 4,118,0,114,64,116,3,106,4,160,5,124,0,106,2,161, - 1,125,1,124,1,116,3,106,4,124,0,106,2,60,0,130, - 0,116,3,106,4,160,5,124,0,106,2,161,1,125,1,124, - 1,116,3,106,4,124,0,106,2,60,0,116,6,124,1,100, - 1,100,0,131,3,100,0,117,0,114,138,122,12,124,0,106, - 0,124,1,95,7,87,0,110,16,4,0,116,8,144,1,121, - 16,1,0,1,0,1,0,89,0,116,6,124,1,100,2,100, - 0,131,3,100,0,117,0,114,212,122,40,124,1,106,9,124, - 1,95,10,116,11,124,1,100,3,131,2,115,192,124,0,106, - 2,160,12,100,4,161,1,100,5,25,0,124,1,95,10,87, - 0,110,16,4,0,116,8,144,1,121,14,1,0,1,0,1, - 0,89,0,116,6,124,1,100,6,100,0,131,3,100,0,117, - 0,144,1,114,8,122,12,124,0,124,1,95,13,87,0,124, - 1,83,0,4,0,116,8,144,1,121,12,1,0,1,0,1, - 0,89,0,124,1,83,0,124,1,83,0,119,0,119,0,119, - 0,41,7,78,114,106,0,0,0,114,152,0,0,0,114,148, - 0,0,0,114,135,0,0,0,114,25,0,0,0,114,113,0, - 0,0,41,14,114,116,0,0,0,114,164,0,0,0,114,20, - 0,0,0,114,18,0,0,0,114,99,0,0,0,114,165,0, - 0,0,114,13,0,0,0,114,106,0,0,0,114,2,0,0, - 0,114,9,0,0,0,114,152,0,0,0,114,11,0,0,0, - 114,136,0,0,0,114,113,0,0,0,114,158,0,0,0,114, - 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,25, - 95,108,111,97,100,95,98,97,99,107,119,97,114,100,95,99, - 111,109,112,97,116,105,98,108,101,126,2,0,0,115,64,0, - 0,0,2,3,18,1,6,1,12,1,14,1,12,1,2,1, - 14,3,12,1,16,1,2,1,12,1,14,1,2,1,16,1, - 2,1,8,4,10,1,22,1,14,1,2,1,18,1,2,1, - 8,1,4,3,14,254,2,1,8,1,2,254,2,251,2,246, - 255,128,114,166,0,0,0,99,1,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,11,0,0,0,67,0,0,0, - 115,242,0,0,0,124,0,106,0,100,0,117,1,114,58,116, - 1,124,0,106,0,100,1,131,2,115,58,116,2,124,0,106, - 0,131,1,155,0,100,2,157,2,125,1,116,3,160,4,124, - 1,116,5,161,2,1,0,116,6,124,0,131,1,83,0,116, - 7,124,0,131,1,125,2,100,3,124,0,95,8,122,158,124, - 2,116,9,106,10,124,0,106,11,60,0,122,52,124,0,106, - 0,100,0,117,0,114,124,124,0,106,12,100,0,117,0,114, - 122,116,13,100,4,124,0,106,11,100,5,141,2,130,1,110, - 12,124,0,106,0,160,14,124,2,161,1,1,0,87,0,110, - 38,1,0,1,0,1,0,122,14,116,9,106,10,124,0,106, - 11,61,0,87,0,130,0,4,0,116,15,121,240,1,0,1, - 0,1,0,89,0,130,0,116,9,106,10,160,16,124,0,106, - 11,161,1,125,2,124,2,116,9,106,10,124,0,106,11,60, - 0,116,17,100,6,124,0,106,11,124,0,106,0,131,3,1, - 0,87,0,100,7,124,0,95,8,124,2,83,0,100,7,124, - 0,95,8,119,0,119,0,41,8,78,114,157,0,0,0,114, - 162,0,0,0,84,114,161,0,0,0,114,19,0,0,0,122, - 18,105,109,112,111,114,116,32,123,33,114,125,32,35,32,123, - 33,114,125,70,41,18,114,116,0,0,0,114,11,0,0,0, - 114,7,0,0,0,114,95,0,0,0,114,96,0,0,0,114, - 163,0,0,0,114,166,0,0,0,114,159,0,0,0,90,13, - 95,105,110,105,116,105,97,108,105,122,105,110,103,114,18,0, - 0,0,114,99,0,0,0,114,20,0,0,0,114,123,0,0, - 0,114,83,0,0,0,114,157,0,0,0,114,67,0,0,0, - 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,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,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,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,0,4,0,0,0,67,0,0,0,115,100,0,0,0,124, + 0,106,0,100,1,117,0,114,14,100,2,110,4,124,0,106, + 0,125,1,124,0,106,1,100,1,117,0,114,64,124,0,106, + 2,100,1,117,0,114,50,100,3,160,3,124,1,161,1,83, + 0,100,4,160,3,124,1,124,0,106,2,161,2,83,0,124, + 0,106,4,114,84,100,5,160,3,124,1,124,0,106,1,161, + 2,83,0,100,6,160,3,124,0,106,0,124,0,106,1,161, + 2,83,0,41,7,122,38,82,101,116,117,114,110,32,116,104, + 101,32,114,101,112,114,32,116,111,32,117,115,101,32,102,111, + 114,32,116,104,101,32,109,111,100,117,108,101,46,78,114,108, + 0,0,0,114,109,0,0,0,114,110,0,0,0,114,111,0, + 0,0,250,18,60,109,111,100,117,108,101,32,123,33,114,125, + 32,40,123,125,41,62,41,5,114,20,0,0,0,114,120,0, + 0,0,114,116,0,0,0,114,49,0,0,0,114,130,0,0, + 0,41,2,114,103,0,0,0,114,20,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,114,114,0,0, + 0,79,2,0,0,115,18,0,0,0,20,3,10,1,10,1, + 10,1,14,2,6,2,14,1,16,2,255,128,114,114,0,0, + 0,99,2,0,0,0,0,0,0,0,0,0,0,0,4,0, + 0,0,10,0,0,0,67,0,0,0,115,26,1,0,0,124, + 0,106,0,125,2,116,1,124,2,131,1,143,246,1,0,116, + 2,106,3,160,4,124,2,161,1,124,1,117,1,114,54,100, + 1,160,5,124,2,161,1,125,3,116,6,124,3,124,2,100, + 2,141,2,130,1,122,160,124,0,106,7,100,3,117,0,114, + 106,124,0,106,8,100,3,117,0,114,90,116,6,100,4,124, + 0,106,0,100,2,141,2,130,1,116,9,124,0,124,1,100, + 5,100,6,141,3,1,0,110,80,116,9,124,0,124,1,100, + 5,100,6,141,3,1,0,116,10,124,0,106,7,100,7,131, + 2,115,174,116,11,124,0,106,7,131,1,155,0,100,8,157, + 2,125,3,116,12,160,13,124,3,116,14,161,2,1,0,124, + 0,106,7,160,15,124,2,161,1,1,0,110,12,124,0,106, + 7,160,16,124,1,161,1,1,0,87,0,116,2,106,3,160, + 17,124,0,106,0,161,1,125,1,124,1,116,2,106,3,124, + 0,106,0,60,0,110,28,116,2,106,3,160,17,124,0,106, + 0,161,1,125,1,124,1,116,2,106,3,124,0,106,0,60, + 0,119,0,87,0,100,3,4,0,4,0,131,3,1,0,124, + 1,83,0,49,0,144,1,115,12,119,1,1,0,1,0,1, + 0,89,0,1,0,124,1,83,0,41,9,122,70,69,120,101, + 99,117,116,101,32,116,104,101,32,115,112,101,99,39,115,32, + 115,112,101,99,105,102,105,101,100,32,109,111,100,117,108,101, + 32,105,110,32,97,110,32,101,120,105,115,116,105,110,103,32, + 109,111,100,117,108,101,39,115,32,110,97,109,101,115,112,97, + 99,101,46,122,30,109,111,100,117,108,101,32,123,33,114,125, + 32,110,111,116,32,105,110,32,115,121,115,46,109,111,100,117, + 108,101,115,114,19,0,0,0,78,250,14,109,105,115,115,105, + 110,103,32,108,111,97,100,101,114,84,114,150,0,0,0,114, + 157,0,0,0,250,55,46,101,120,101,99,95,109,111,100,117, + 108,101,40,41,32,110,111,116,32,102,111,117,110,100,59,32, + 102,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32, + 108,111,97,100,95,109,111,100,117,108,101,40,41,41,18,114, + 20,0,0,0,114,54,0,0,0,114,18,0,0,0,114,99, + 0,0,0,114,38,0,0,0,114,49,0,0,0,114,83,0, + 0,0,114,116,0,0,0,114,123,0,0,0,114,155,0,0, + 0,114,11,0,0,0,114,7,0,0,0,114,95,0,0,0, + 114,96,0,0,0,218,13,73,109,112,111,114,116,87,97,114, + 110,105,110,103,218,11,108,111,97,100,95,109,111,100,117,108, + 101,114,157,0,0,0,218,3,112,111,112,41,4,114,103,0, + 0,0,114,104,0,0,0,114,20,0,0,0,114,102,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,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,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, + 114,100,0,0,0,96,2,0,0,115,50,0,0,0,6,2, + 10,1,16,1,10,1,12,1,2,1,10,1,10,1,14,1, + 16,2,14,2,12,1,16,1,12,2,14,1,12,2,2,128, + 14,4,14,1,14,255,26,1,4,1,18,128,4,0,255,128, + 114,100,0,0,0,99,1,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,8,0,0,0,67,0,0,0,115,18, + 1,0,0,122,18,124,0,106,0,160,1,124,0,106,2,161, + 1,1,0,87,0,110,46,1,0,1,0,1,0,124,0,106, + 2,116,3,106,4,118,0,114,64,116,3,106,4,160,5,124, + 0,106,2,161,1,125,1,124,1,116,3,106,4,124,0,106, + 2,60,0,130,0,116,3,106,4,160,5,124,0,106,2,161, + 1,125,1,124,1,116,3,106,4,124,0,106,2,60,0,116, + 6,124,1,100,1,100,0,131,3,100,0,117,0,114,138,122, + 12,124,0,106,0,124,1,95,7,87,0,110,16,4,0,116, + 8,144,1,121,16,1,0,1,0,1,0,89,0,116,6,124, + 1,100,2,100,0,131,3,100,0,117,0,114,212,122,40,124, + 1,106,9,124,1,95,10,116,11,124,1,100,3,131,2,115, + 192,124,0,106,2,160,12,100,4,161,1,100,5,25,0,124, + 1,95,10,87,0,110,16,4,0,116,8,144,1,121,14,1, + 0,1,0,1,0,89,0,116,6,124,1,100,6,100,0,131, + 3,100,0,117,0,144,1,114,8,122,12,124,0,124,1,95, + 13,87,0,124,1,83,0,4,0,116,8,144,1,121,12,1, + 0,1,0,1,0,89,0,124,1,83,0,124,1,83,0,119, + 0,119,0,119,0,41,7,78,114,106,0,0,0,114,152,0, + 0,0,114,148,0,0,0,114,135,0,0,0,114,25,0,0, + 0,114,113,0,0,0,41,14,114,116,0,0,0,114,164,0, + 0,0,114,20,0,0,0,114,18,0,0,0,114,99,0,0, + 0,114,165,0,0,0,114,13,0,0,0,114,106,0,0,0, + 114,2,0,0,0,114,9,0,0,0,114,152,0,0,0,114, + 11,0,0,0,114,136,0,0,0,114,113,0,0,0,114,158, + 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, + 0,0,218,25,95,108,111,97,100,95,98,97,99,107,119,97, + 114,100,95,99,111,109,112,97,116,105,98,108,101,126,2,0, + 0,115,66,0,0,0,2,3,18,1,6,1,12,1,14,1, + 12,1,2,1,14,3,12,1,16,1,2,1,12,1,14,1, + 2,1,16,1,2,1,8,4,10,1,18,1,4,128,14,1, + 2,1,18,1,2,1,8,1,4,3,14,254,2,1,8,1, + 2,254,2,251,2,246,255,128,114,166,0,0,0,99,1,0, + 0,0,0,0,0,0,0,0,0,0,3,0,0,0,11,0, + 0,0,67,0,0,0,115,242,0,0,0,124,0,106,0,100, + 0,117,1,114,58,116,1,124,0,106,0,100,1,131,2,115, + 58,116,2,124,0,106,0,131,1,155,0,100,2,157,2,125, + 1,116,3,160,4,124,1,116,5,161,2,1,0,116,6,124, + 0,131,1,83,0,116,7,124,0,131,1,125,2,100,3,124, + 0,95,8,122,158,124,2,116,9,106,10,124,0,106,11,60, + 0,122,52,124,0,106,0,100,0,117,0,114,124,124,0,106, + 12,100,0,117,0,114,122,116,13,100,4,124,0,106,11,100, + 5,141,2,130,1,110,12,124,0,106,0,160,14,124,2,161, + 1,1,0,87,0,110,38,1,0,1,0,1,0,122,14,116, + 9,106,10,124,0,106,11,61,0,87,0,130,0,4,0,116, + 15,121,240,1,0,1,0,1,0,89,0,130,0,116,9,106, + 10,160,16,124,0,106,11,161,1,125,2,124,2,116,9,106, + 10,124,0,106,11,60,0,116,17,100,6,124,0,106,11,124, + 0,106,0,131,3,1,0,87,0,100,7,124,0,95,8,124, + 2,83,0,100,7,124,0,95,8,119,0,119,0,41,8,78, + 114,157,0,0,0,114,162,0,0,0,84,114,161,0,0,0, + 114,19,0,0,0,122,18,105,109,112,111,114,116,32,123,33, + 114,125,32,35,32,123,33,114,125,70,41,18,114,116,0,0, + 0,114,11,0,0,0,114,7,0,0,0,114,95,0,0,0, + 114,96,0,0,0,114,163,0,0,0,114,166,0,0,0,114, + 159,0,0,0,90,13,95,105,110,105,116,105,97,108,105,122, + 105,110,103,114,18,0,0,0,114,99,0,0,0,114,20,0, + 0,0,114,123,0,0,0,114,83,0,0,0,114,157,0,0, + 0,114,67,0,0,0,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,62,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,14,1,2,255,12,4,4,128,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,8,0,0,0,12,9,22,1,20,128,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,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, + 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, - 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, + 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,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,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, + 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,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,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,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,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, - 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, + 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,66,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,255,12,3,30,128,10,1,18,2,10,1,2,1,10, + 1,14,1,12,4,10,2,8,1,8,2,8,2,2,239,4, + 19,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,28,0, + 0,0,10,2,14,1,8,1,24,1,14,255,16,128,8,3, 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, @@ -1638,222 +1639,222 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 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, + 115,58,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, + 255,12,2,2,1,8,128,2,245,4,12,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,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,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 7ae4d1e7e9808..bdfdaa1feb8ef 100644 --- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -211,7 +211,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,11, 95,112,97,116,104,95,115,112,108,105,116,100,0,0,0,115, 20,0,0,0,12,2,16,1,8,1,12,1,8,1,18,1, - 12,1,2,128,8,1,255,128,114,55,0,0,0,99,1,0, + 12,1,2,254,8,3,255,128,114,55,0,0,0,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,10,0,0,0,116,0,160,1,124, 0,161,1,83,0,41,2,122,126,83,116,97,116,32,116,104, @@ -281,7 +281,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 0,218,11,95,112,97,116,104,95,105,115,97,98,115,143,0, 0,0,115,4,0,0,0,26,6,255,128,114,67,0,0,0, 233,182,1,0,0,99,3,0,0,0,0,0,0,0,0,0, - 0,0,6,0,0,0,11,0,0,0,67,0,0,0,115,174, + 0,0,6,0,0,0,11,0,0,0,67,0,0,0,115,170, 0,0,0,100,1,160,0,124,0,116,1,124,0,131,1,161, 2,125,3,116,2,160,3,124,3,116,2,106,4,116,2,106, 5,66,0,116,2,106,6,66,0,124,2,100,2,64,0,161, @@ -290,1139 +290,1139 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 4,4,0,4,0,131,3,1,0,110,16,49,0,115,94,119, 1,1,0,1,0,1,0,89,0,1,0,116,2,160,10,124, 3,124,0,161,2,1,0,87,0,100,4,83,0,4,0,116, - 11,121,172,1,0,1,0,1,0,122,14,116,2,160,12,124, + 11,121,168,1,0,1,0,1,0,122,14,116,2,160,12,124, 3,161,1,1,0,87,0,130,0,4,0,116,11,121,166,1, - 0,1,0,1,0,89,0,130,0,119,0,100,4,83,0,119, - 0,41,5,122,162,66,101,115,116,45,101,102,102,111,114,116, - 32,102,117,110,99,116,105,111,110,32,116,111,32,119,114,105, - 116,101,32,100,97,116,97,32,116,111,32,97,32,112,97,116, - 104,32,97,116,111,109,105,99,97,108,108,121,46,10,32,32, - 32,32,66,101,32,112,114,101,112,97,114,101,100,32,116,111, - 32,104,97,110,100,108,101,32,97,32,70,105,108,101,69,120, - 105,115,116,115,69,114,114,111,114,32,105,102,32,99,111,110, - 99,117,114,114,101,110,116,32,119,114,105,116,105,110,103,32, - 111,102,32,116,104,101,10,32,32,32,32,116,101,109,112,111, - 114,97,114,121,32,102,105,108,101,32,105,115,32,97,116,116, - 101,109,112,116,101,100,46,250,5,123,125,46,123,125,114,68, - 0,0,0,90,2,119,98,78,41,13,218,6,102,111,114,109, - 97,116,218,2,105,100,114,18,0,0,0,90,4,111,112,101, - 110,90,6,79,95,69,88,67,76,90,7,79,95,67,82,69, - 65,84,90,8,79,95,87,82,79,78,76,89,218,3,95,105, - 111,218,6,70,105,108,101,73,79,218,5,119,114,105,116,101, - 218,7,114,101,112,108,97,99,101,114,58,0,0,0,90,6, - 117,110,108,105,110,107,41,6,114,52,0,0,0,114,37,0, - 0,0,114,60,0,0,0,90,8,112,97,116,104,95,116,109, - 112,90,2,102,100,218,4,102,105,108,101,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,218,13,95,119,114,105, - 116,101,95,97,116,111,109,105,99,152,0,0,0,115,38,0, - 0,0,16,5,6,1,22,1,4,255,2,2,14,3,40,1, - 18,1,12,1,2,1,12,1,2,3,12,254,2,1,2,1, - 2,254,4,252,2,1,255,128,114,77,0,0,0,105,105,13, - 0,0,114,39,0,0,0,114,29,0,0,0,115,2,0,0, - 0,13,10,90,11,95,95,112,121,99,97,99,104,101,95,95, - 122,4,111,112,116,45,122,3,46,112,121,122,4,46,112,121, - 119,122,4,46,112,121,99,41,1,218,12,111,112,116,105,109, - 105,122,97,116,105,111,110,99,2,0,0,0,0,0,0,0, - 1,0,0,0,12,0,0,0,5,0,0,0,67,0,0,0, - 115,88,1,0,0,124,1,100,1,117,1,114,52,116,0,160, - 1,100,2,116,2,161,2,1,0,124,2,100,1,117,1,114, - 40,100,3,125,3,116,3,124,3,131,1,130,1,124,1,114, - 48,100,4,110,2,100,5,125,2,116,4,160,5,124,0,161, - 1,125,0,116,6,124,0,131,1,92,2,125,4,125,5,124, - 5,160,7,100,6,161,1,92,3,125,6,125,7,125,8,116, - 8,106,9,106,10,125,9,124,9,100,1,117,0,114,114,116, - 11,100,7,131,1,130,1,100,4,160,12,124,6,114,126,124, - 6,110,2,124,8,124,7,124,9,103,3,161,1,125,10,124, - 2,100,1,117,0,114,172,116,8,106,13,106,14,100,8,107, - 2,114,164,100,4,125,2,110,8,116,8,106,13,106,14,125, - 2,116,15,124,2,131,1,125,2,124,2,100,4,107,3,114, - 224,124,2,160,16,161,0,115,210,116,17,100,9,160,18,124, - 2,161,1,131,1,130,1,100,10,160,18,124,10,116,19,124, - 2,161,3,125,10,124,10,116,20,100,8,25,0,23,0,125, - 11,116,8,106,21,100,1,117,1,144,1,114,76,116,22,124, - 4,131,1,144,1,115,16,116,23,116,4,160,24,161,0,124, - 4,131,2,125,4,124,4,100,5,25,0,100,11,107,2,144, - 1,114,56,124,4,100,8,25,0,116,25,118,1,144,1,114, - 56,124,4,100,12,100,1,133,2,25,0,125,4,116,23,116, - 8,106,21,124,4,160,26,116,25,161,1,124,11,131,3,83, - 0,116,23,124,4,116,27,124,11,131,3,83,0,41,13,97, - 254,2,0,0,71,105,118,101,110,32,116,104,101,32,112,97, - 116,104,32,116,111,32,97,32,46,112,121,32,102,105,108,101, - 44,32,114,101,116,117,114,110,32,116,104,101,32,112,97,116, - 104,32,116,111,32,105,116,115,32,46,112,121,99,32,102,105, - 108,101,46,10,10,32,32,32,32,84,104,101,32,46,112,121, - 32,102,105,108,101,32,100,111,101,115,32,110,111,116,32,110, - 101,101,100,32,116,111,32,101,120,105,115,116,59,32,116,104, - 105,115,32,115,105,109,112,108,121,32,114,101,116,117,114,110, - 115,32,116,104,101,32,112,97,116,104,32,116,111,32,116,104, - 101,10,32,32,32,32,46,112,121,99,32,102,105,108,101,32, - 99,97,108,99,117,108,97,116,101,100,32,97,115,32,105,102, - 32,116,104,101,32,46,112,121,32,102,105,108,101,32,119,101, - 114,101,32,105,109,112,111,114,116,101,100,46,10,10,32,32, - 32,32,84,104,101,32,39,111,112,116,105,109,105,122,97,116, - 105,111,110,39,32,112,97,114,97,109,101,116,101,114,32,99, - 111,110,116,114,111,108,115,32,116,104,101,32,112,114,101,115, - 117,109,101,100,32,111,112,116,105,109,105,122,97,116,105,111, - 110,32,108,101,118,101,108,32,111,102,10,32,32,32,32,116, - 104,101,32,98,121,116,101,99,111,100,101,32,102,105,108,101, - 46,32,73,102,32,39,111,112,116,105,109,105,122,97,116,105, - 111,110,39,32,105,115,32,110,111,116,32,78,111,110,101,44, - 32,116,104,101,32,115,116,114,105,110,103,32,114,101,112,114, - 101,115,101,110,116,97,116,105,111,110,10,32,32,32,32,111, - 102,32,116,104,101,32,97,114,103,117,109,101,110,116,32,105, - 115,32,116,97,107,101,110,32,97,110,100,32,118,101,114,105, - 102,105,101,100,32,116,111,32,98,101,32,97,108,112,104,97, - 110,117,109,101,114,105,99,32,40,101,108,115,101,32,86,97, - 108,117,101,69,114,114,111,114,10,32,32,32,32,105,115,32, - 114,97,105,115,101,100,41,46,10,10,32,32,32,32,84,104, - 101,32,100,101,98,117,103,95,111,118,101,114,114,105,100,101, - 32,112,97,114,97,109,101,116,101,114,32,105,115,32,100,101, - 112,114,101,99,97,116,101,100,46,32,73,102,32,100,101,98, - 117,103,95,111,118,101,114,114,105,100,101,32,105,115,32,110, - 111,116,32,78,111,110,101,44,10,32,32,32,32,97,32,84, - 114,117,101,32,118,97,108,117,101,32,105,115,32,116,104,101, - 32,115,97,109,101,32,97,115,32,115,101,116,116,105,110,103, - 32,39,111,112,116,105,109,105,122,97,116,105,111,110,39,32, - 116,111,32,116,104,101,32,101,109,112,116,121,32,115,116,114, - 105,110,103,10,32,32,32,32,119,104,105,108,101,32,97,32, - 70,97,108,115,101,32,118,97,108,117,101,32,105,115,32,101, - 113,117,105,118,97,108,101,110,116,32,116,111,32,115,101,116, - 116,105,110,103,32,39,111,112,116,105,109,105,122,97,116,105, - 111,110,39,32,116,111,32,39,49,39,46,10,10,32,32,32, - 32,73,102,32,115,121,115,46,105,109,112,108,101,109,101,110, - 116,97,116,105,111,110,46,99,97,99,104,101,95,116,97,103, - 32,105,115,32,78,111,110,101,32,116,104,101,110,32,78,111, - 116,73,109,112,108,101,109,101,110,116,101,100,69,114,114,111, - 114,32,105,115,32,114,97,105,115,101,100,46,10,10,32,32, - 32,32,78,122,70,116,104,101,32,100,101,98,117,103,95,111, - 118,101,114,114,105,100,101,32,112,97,114,97,109,101,116,101, - 114,32,105,115,32,100,101,112,114,101,99,97,116,101,100,59, - 32,117,115,101,32,39,111,112,116,105,109,105,122,97,116,105, - 111,110,39,32,105,110,115,116,101,97,100,122,50,100,101,98, - 117,103,95,111,118,101,114,114,105,100,101,32,111,114,32,111, - 112,116,105,109,105,122,97,116,105,111,110,32,109,117,115,116, - 32,98,101,32,115,101,116,32,116,111,32,78,111,110,101,114, - 10,0,0,0,114,3,0,0,0,218,1,46,250,36,115,121, - 115,46,105,109,112,108,101,109,101,110,116,97,116,105,111,110, - 46,99,97,99,104,101,95,116,97,103,32,105,115,32,78,111, - 110,101,114,0,0,0,0,122,24,123,33,114,125,32,105,115, - 32,110,111,116,32,97,108,112,104,97,110,117,109,101,114,105, - 99,122,7,123,125,46,123,125,123,125,114,11,0,0,0,114, - 39,0,0,0,41,28,218,9,95,119,97,114,110,105,110,103, - 115,218,4,119,97,114,110,218,18,68,101,112,114,101,99,97, - 116,105,111,110,87,97,114,110,105,110,103,218,9,84,121,112, - 101,69,114,114,111,114,114,18,0,0,0,218,6,102,115,112, - 97,116,104,114,55,0,0,0,114,49,0,0,0,114,15,0, - 0,0,218,14,105,109,112,108,101,109,101,110,116,97,116,105, - 111,110,218,9,99,97,99,104,101,95,116,97,103,218,19,78, - 111,116,73,109,112,108,101,109,101,110,116,101,100,69,114,114, - 111,114,114,46,0,0,0,114,16,0,0,0,218,8,111,112, - 116,105,109,105,122,101,218,3,115,116,114,218,7,105,115,97, - 108,110,117,109,218,10,86,97,108,117,101,69,114,114,111,114, - 114,70,0,0,0,218,4,95,79,80,84,218,17,66,89,84, - 69,67,79,68,69,95,83,85,70,70,73,88,69,83,218,14, - 112,121,99,97,99,104,101,95,112,114,101,102,105,120,114,67, - 0,0,0,114,48,0,0,0,114,63,0,0,0,114,42,0, - 0,0,218,6,108,115,116,114,105,112,218,8,95,80,89,67, - 65,67,72,69,41,12,114,52,0,0,0,90,14,100,101,98, - 117,103,95,111,118,101,114,114,105,100,101,114,78,0,0,0, - 218,7,109,101,115,115,97,103,101,218,4,104,101,97,100,114, - 54,0,0,0,90,4,98,97,115,101,114,6,0,0,0,218, - 4,114,101,115,116,90,3,116,97,103,90,15,97,108,109,111, - 115,116,95,102,105,108,101,110,97,109,101,218,8,102,105,108, - 101,110,97,109,101,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,218,17,99,97,99,104,101,95,102,114,111,109, - 95,115,111,117,114,99,101,85,1,0,0,115,74,0,0,0, - 8,18,6,1,2,1,4,255,8,2,4,1,8,1,12,1, - 10,1,12,1,16,1,8,1,8,1,8,1,24,1,8,1, - 12,1,6,1,8,2,8,1,8,1,8,1,14,1,14,1, - 12,1,12,1,10,9,14,1,28,5,12,1,2,4,4,1, - 8,1,2,1,4,253,12,5,255,128,114,102,0,0,0,99, - 1,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0, - 5,0,0,0,67,0,0,0,115,44,1,0,0,116,0,106, - 1,106,2,100,1,117,0,114,20,116,3,100,2,131,1,130, - 1,116,4,160,5,124,0,161,1,125,0,116,6,124,0,131, - 1,92,2,125,1,125,2,100,3,125,3,116,0,106,7,100, - 1,117,1,114,102,116,0,106,7,160,8,116,9,161,1,125, - 4,124,1,160,10,124,4,116,11,23,0,161,1,114,102,124, - 1,116,12,124,4,131,1,100,1,133,2,25,0,125,1,100, - 4,125,3,124,3,115,144,116,6,124,1,131,1,92,2,125, - 1,125,5,124,5,116,13,107,3,114,144,116,14,116,13,155, - 0,100,5,124,0,155,2,157,3,131,1,130,1,124,2,160, - 15,100,6,161,1,125,6,124,6,100,7,118,1,114,176,116, - 14,100,8,124,2,155,2,157,2,131,1,130,1,124,6,100, - 9,107,2,144,1,114,12,124,2,160,16,100,6,100,10,161, - 2,100,11,25,0,125,7,124,7,160,10,116,17,161,1,115, - 226,116,14,100,12,116,17,155,2,157,2,131,1,130,1,124, - 7,116,12,116,17,131,1,100,1,133,2,25,0,125,8,124, - 8,160,18,161,0,144,1,115,12,116,14,100,13,124,7,155, - 2,100,14,157,3,131,1,130,1,124,2,160,19,100,6,161, - 1,100,15,25,0,125,9,116,20,124,1,124,9,116,21,100, - 15,25,0,23,0,131,2,83,0,41,16,97,110,1,0,0, + 0,1,0,1,0,89,0,130,0,119,0,119,0,41,5,122, + 162,66,101,115,116,45,101,102,102,111,114,116,32,102,117,110, + 99,116,105,111,110,32,116,111,32,119,114,105,116,101,32,100, + 97,116,97,32,116,111,32,97,32,112,97,116,104,32,97,116, + 111,109,105,99,97,108,108,121,46,10,32,32,32,32,66,101, + 32,112,114,101,112,97,114,101,100,32,116,111,32,104,97,110, + 100,108,101,32,97,32,70,105,108,101,69,120,105,115,116,115, + 69,114,114,111,114,32,105,102,32,99,111,110,99,117,114,114, + 101,110,116,32,119,114,105,116,105,110,103,32,111,102,32,116, + 104,101,10,32,32,32,32,116,101,109,112,111,114,97,114,121, + 32,102,105,108,101,32,105,115,32,97,116,116,101,109,112,116, + 101,100,46,250,5,123,125,46,123,125,114,68,0,0,0,90, + 2,119,98,78,41,13,218,6,102,111,114,109,97,116,218,2, + 105,100,114,18,0,0,0,90,4,111,112,101,110,90,6,79, + 95,69,88,67,76,90,7,79,95,67,82,69,65,84,90,8, + 79,95,87,82,79,78,76,89,218,3,95,105,111,218,6,70, + 105,108,101,73,79,218,5,119,114,105,116,101,218,7,114,101, + 112,108,97,99,101,114,58,0,0,0,90,6,117,110,108,105, + 110,107,41,6,114,52,0,0,0,114,37,0,0,0,114,60, + 0,0,0,90,8,112,97,116,104,95,116,109,112,90,2,102, + 100,218,4,102,105,108,101,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,13,95,119,114,105,116,101,95,97, + 116,111,109,105,99,152,0,0,0,115,38,0,0,0,16,5, + 6,1,22,1,4,255,2,2,14,3,24,1,16,128,18,1, + 12,1,2,1,12,1,2,3,12,254,2,1,2,1,2,254, + 2,253,255,128,114,77,0,0,0,105,105,13,0,0,114,39, + 0,0,0,114,29,0,0,0,115,2,0,0,0,13,10,90, + 11,95,95,112,121,99,97,99,104,101,95,95,122,4,111,112, + 116,45,122,3,46,112,121,122,4,46,112,121,119,122,4,46, + 112,121,99,41,1,218,12,111,112,116,105,109,105,122,97,116, + 105,111,110,99,2,0,0,0,0,0,0,0,1,0,0,0, + 12,0,0,0,5,0,0,0,67,0,0,0,115,88,1,0, + 0,124,1,100,1,117,1,114,52,116,0,160,1,100,2,116, + 2,161,2,1,0,124,2,100,1,117,1,114,40,100,3,125, + 3,116,3,124,3,131,1,130,1,124,1,114,48,100,4,110, + 2,100,5,125,2,116,4,160,5,124,0,161,1,125,0,116, + 6,124,0,131,1,92,2,125,4,125,5,124,5,160,7,100, + 6,161,1,92,3,125,6,125,7,125,8,116,8,106,9,106, + 10,125,9,124,9,100,1,117,0,114,114,116,11,100,7,131, + 1,130,1,100,4,160,12,124,6,114,126,124,6,110,2,124, + 8,124,7,124,9,103,3,161,1,125,10,124,2,100,1,117, + 0,114,172,116,8,106,13,106,14,100,8,107,2,114,164,100, + 4,125,2,110,8,116,8,106,13,106,14,125,2,116,15,124, + 2,131,1,125,2,124,2,100,4,107,3,114,224,124,2,160, + 16,161,0,115,210,116,17,100,9,160,18,124,2,161,1,131, + 1,130,1,100,10,160,18,124,10,116,19,124,2,161,3,125, + 10,124,10,116,20,100,8,25,0,23,0,125,11,116,8,106, + 21,100,1,117,1,144,1,114,76,116,22,124,4,131,1,144, + 1,115,16,116,23,116,4,160,24,161,0,124,4,131,2,125, + 4,124,4,100,5,25,0,100,11,107,2,144,1,114,56,124, + 4,100,8,25,0,116,25,118,1,144,1,114,56,124,4,100, + 12,100,1,133,2,25,0,125,4,116,23,116,8,106,21,124, + 4,160,26,116,25,161,1,124,11,131,3,83,0,116,23,124, + 4,116,27,124,11,131,3,83,0,41,13,97,254,2,0,0, 71,105,118,101,110,32,116,104,101,32,112,97,116,104,32,116, - 111,32,97,32,46,112,121,99,46,32,102,105,108,101,44,32, - 114,101,116,117,114,110,32,116,104,101,32,112,97,116,104,32, - 116,111,32,105,116,115,32,46,112,121,32,102,105,108,101,46, - 10,10,32,32,32,32,84,104,101,32,46,112,121,99,32,102, - 105,108,101,32,100,111,101,115,32,110,111,116,32,110,101,101, - 100,32,116,111,32,101,120,105,115,116,59,32,116,104,105,115, - 32,115,105,109,112,108,121,32,114,101,116,117,114,110,115,32, - 116,104,101,32,112,97,116,104,32,116,111,10,32,32,32,32, - 116,104,101,32,46,112,121,32,102,105,108,101,32,99,97,108, - 99,117,108,97,116,101,100,32,116,111,32,99,111,114,114,101, - 115,112,111,110,100,32,116,111,32,116,104,101,32,46,112,121, - 99,32,102,105,108,101,46,32,32,73,102,32,112,97,116,104, - 32,100,111,101,115,10,32,32,32,32,110,111,116,32,99,111, - 110,102,111,114,109,32,116,111,32,80,69,80,32,51,49,52, - 55,47,52,56,56,32,102,111,114,109,97,116,44,32,86,97, - 108,117,101,69,114,114,111,114,32,119,105,108,108,32,98,101, - 32,114,97,105,115,101,100,46,32,73,102,10,32,32,32,32, + 111,32,97,32,46,112,121,32,102,105,108,101,44,32,114,101, + 116,117,114,110,32,116,104,101,32,112,97,116,104,32,116,111, + 32,105,116,115,32,46,112,121,99,32,102,105,108,101,46,10, + 10,32,32,32,32,84,104,101,32,46,112,121,32,102,105,108, + 101,32,100,111,101,115,32,110,111,116,32,110,101,101,100,32, + 116,111,32,101,120,105,115,116,59,32,116,104,105,115,32,115, + 105,109,112,108,121,32,114,101,116,117,114,110,115,32,116,104, + 101,32,112,97,116,104,32,116,111,32,116,104,101,10,32,32, + 32,32,46,112,121,99,32,102,105,108,101,32,99,97,108,99, + 117,108,97,116,101,100,32,97,115,32,105,102,32,116,104,101, + 32,46,112,121,32,102,105,108,101,32,119,101,114,101,32,105, + 109,112,111,114,116,101,100,46,10,10,32,32,32,32,84,104, + 101,32,39,111,112,116,105,109,105,122,97,116,105,111,110,39, + 32,112,97,114,97,109,101,116,101,114,32,99,111,110,116,114, + 111,108,115,32,116,104,101,32,112,114,101,115,117,109,101,100, + 32,111,112,116,105,109,105,122,97,116,105,111,110,32,108,101, + 118,101,108,32,111,102,10,32,32,32,32,116,104,101,32,98, + 121,116,101,99,111,100,101,32,102,105,108,101,46,32,73,102, + 32,39,111,112,116,105,109,105,122,97,116,105,111,110,39,32, + 105,115,32,110,111,116,32,78,111,110,101,44,32,116,104,101, + 32,115,116,114,105,110,103,32,114,101,112,114,101,115,101,110, + 116,97,116,105,111,110,10,32,32,32,32,111,102,32,116,104, + 101,32,97,114,103,117,109,101,110,116,32,105,115,32,116,97, + 107,101,110,32,97,110,100,32,118,101,114,105,102,105,101,100, + 32,116,111,32,98,101,32,97,108,112,104,97,110,117,109,101, + 114,105,99,32,40,101,108,115,101,32,86,97,108,117,101,69, + 114,114,111,114,10,32,32,32,32,105,115,32,114,97,105,115, + 101,100,41,46,10,10,32,32,32,32,84,104,101,32,100,101, + 98,117,103,95,111,118,101,114,114,105,100,101,32,112,97,114, + 97,109,101,116,101,114,32,105,115,32,100,101,112,114,101,99, + 97,116,101,100,46,32,73,102,32,100,101,98,117,103,95,111, + 118,101,114,114,105,100,101,32,105,115,32,110,111,116,32,78, + 111,110,101,44,10,32,32,32,32,97,32,84,114,117,101,32, + 118,97,108,117,101,32,105,115,32,116,104,101,32,115,97,109, + 101,32,97,115,32,115,101,116,116,105,110,103,32,39,111,112, + 116,105,109,105,122,97,116,105,111,110,39,32,116,111,32,116, + 104,101,32,101,109,112,116,121,32,115,116,114,105,110,103,10, + 32,32,32,32,119,104,105,108,101,32,97,32,70,97,108,115, + 101,32,118,97,108,117,101,32,105,115,32,101,113,117,105,118, + 97,108,101,110,116,32,116,111,32,115,101,116,116,105,110,103, + 32,39,111,112,116,105,109,105,122,97,116,105,111,110,39,32, + 116,111,32,39,49,39,46,10,10,32,32,32,32,73,102,32, 115,121,115,46,105,109,112,108,101,109,101,110,116,97,116,105, 111,110,46,99,97,99,104,101,95,116,97,103,32,105,115,32, 78,111,110,101,32,116,104,101,110,32,78,111,116,73,109,112, 108,101,109,101,110,116,101,100,69,114,114,111,114,32,105,115, - 32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,114, - 80,0,0,0,70,84,122,31,32,110,111,116,32,98,111,116, - 116,111,109,45,108,101,118,101,108,32,100,105,114,101,99,116, - 111,114,121,32,105,110,32,114,79,0,0,0,62,2,0,0, - 0,114,39,0,0,0,114,65,0,0,0,122,29,101,120,112, - 101,99,116,101,100,32,111,110,108,121,32,50,32,111,114,32, - 51,32,100,111,116,115,32,105,110,32,114,65,0,0,0,114, - 39,0,0,0,233,254,255,255,255,122,53,111,112,116,105,109, - 105,122,97,116,105,111,110,32,112,111,114,116,105,111,110,32, - 111,102,32,102,105,108,101,110,97,109,101,32,100,111,101,115, - 32,110,111,116,32,115,116,97,114,116,32,119,105,116,104,32, - 122,19,111,112,116,105,109,105,122,97,116,105,111,110,32,108, - 101,118,101,108,32,122,29,32,105,115,32,110,111,116,32,97, - 110,32,97,108,112,104,97,110,117,109,101,114,105,99,32,118, - 97,108,117,101,114,0,0,0,0,41,22,114,15,0,0,0, - 114,86,0,0,0,114,87,0,0,0,114,88,0,0,0,114, - 18,0,0,0,114,85,0,0,0,114,55,0,0,0,114,95, - 0,0,0,114,41,0,0,0,114,42,0,0,0,114,23,0, - 0,0,114,45,0,0,0,114,4,0,0,0,114,97,0,0, - 0,114,92,0,0,0,218,5,99,111,117,110,116,114,51,0, - 0,0,114,93,0,0,0,114,91,0,0,0,218,9,112,97, - 114,116,105,116,105,111,110,114,48,0,0,0,218,15,83,79, - 85,82,67,69,95,83,85,70,70,73,88,69,83,41,10,114, - 52,0,0,0,114,99,0,0,0,90,16,112,121,99,97,99, - 104,101,95,102,105,108,101,110,97,109,101,90,23,102,111,117, - 110,100,95,105,110,95,112,121,99,97,99,104,101,95,112,114, - 101,102,105,120,90,13,115,116,114,105,112,112,101,100,95,112, - 97,116,104,90,7,112,121,99,97,99,104,101,90,9,100,111, - 116,95,99,111,117,110,116,114,78,0,0,0,90,9,111,112, - 116,95,108,101,118,101,108,90,13,98,97,115,101,95,102,105, - 108,101,110,97,109,101,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,17,115,111,117,114,99,101,95,102,114, - 111,109,95,99,97,99,104,101,156,1,0,0,115,62,0,0, - 0,12,9,8,1,10,1,12,1,4,1,10,1,12,1,14, - 1,16,1,4,1,4,1,12,1,8,1,8,1,2,1,8, - 255,10,2,8,1,14,1,10,1,16,1,10,1,4,1,2, - 1,8,255,16,2,10,1,16,1,14,2,18,1,255,128,114, - 107,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, - 0,5,0,0,0,9,0,0,0,67,0,0,0,115,122,0, - 0,0,116,0,124,0,131,1,100,1,107,2,114,16,100,2, - 83,0,124,0,160,1,100,3,161,1,92,3,125,1,125,2, - 125,3,124,1,114,56,124,3,160,2,161,0,100,4,100,5, - 133,2,25,0,100,6,107,3,114,60,124,0,83,0,122,12, - 116,3,124,0,131,1,125,4,87,0,110,30,4,0,116,4, - 116,5,102,2,121,120,1,0,1,0,1,0,124,0,100,2, - 100,5,133,2,25,0,125,4,89,0,116,6,124,4,131,1, - 114,116,124,4,83,0,124,0,83,0,119,0,41,7,122,188, - 67,111,110,118,101,114,116,32,97,32,98,121,116,101,99,111, - 100,101,32,102,105,108,101,32,112,97,116,104,32,116,111,32, - 97,32,115,111,117,114,99,101,32,112,97,116,104,32,40,105, - 102,32,112,111,115,115,105,98,108,101,41,46,10,10,32,32, - 32,32,84,104,105,115,32,102,117,110,99,116,105,111,110,32, - 101,120,105,115,116,115,32,112,117,114,101,108,121,32,102,111, - 114,32,98,97,99,107,119,97,114,100,115,45,99,111,109,112, - 97,116,105,98,105,108,105,116,121,32,102,111,114,10,32,32, - 32,32,80,121,73,109,112,111,114,116,95,69,120,101,99,67, - 111,100,101,77,111,100,117,108,101,87,105,116,104,70,105,108, - 101,110,97,109,101,115,40,41,32,105,110,32,116,104,101,32, - 67,32,65,80,73,46,10,10,32,32,32,32,114,0,0,0, - 0,78,114,79,0,0,0,233,253,255,255,255,233,255,255,255, - 255,90,2,112,121,41,7,114,4,0,0,0,114,49,0,0, - 0,218,5,108,111,119,101,114,114,107,0,0,0,114,88,0, - 0,0,114,92,0,0,0,114,62,0,0,0,41,5,218,13, - 98,121,116,101,99,111,100,101,95,112,97,116,104,114,100,0, - 0,0,114,53,0,0,0,90,9,101,120,116,101,110,115,105, - 111,110,218,11,115,111,117,114,99,101,95,112,97,116,104,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,15, - 95,103,101,116,95,115,111,117,114,99,101,102,105,108,101,196, - 1,0,0,115,24,0,0,0,12,7,4,1,16,1,24,1, - 4,1,2,1,12,1,16,1,14,1,16,1,2,254,255,128, - 114,113,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,68, - 0,0,0,124,0,160,0,116,1,116,2,131,1,161,1,114, - 44,122,10,116,3,124,0,131,1,87,0,83,0,4,0,116, - 4,121,66,1,0,1,0,1,0,89,0,100,0,83,0,124, - 0,160,0,116,1,116,5,131,1,161,1,114,62,124,0,83, - 0,100,0,83,0,119,0,169,1,78,41,6,218,8,101,110, - 100,115,119,105,116,104,218,5,116,117,112,108,101,114,106,0, - 0,0,114,102,0,0,0,114,88,0,0,0,114,94,0,0, - 0,41,1,114,101,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,11,95,103,101,116,95,99,97, - 99,104,101,100,215,1,0,0,115,20,0,0,0,14,1,2, - 1,10,1,12,1,6,1,14,1,4,1,4,2,2,251,255, - 128,114,117,0,0,0,99,1,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,8,0,0,0,67,0,0,0,115, - 48,0,0,0,122,14,116,0,124,0,131,1,106,1,125,1, - 87,0,110,18,4,0,116,2,121,46,1,0,1,0,1,0, - 100,1,125,1,89,0,124,1,100,2,79,0,125,1,124,1, - 83,0,119,0,41,4,122,51,67,97,108,99,117,108,97,116, - 101,32,116,104,101,32,109,111,100,101,32,112,101,114,109,105, - 115,115,105,111,110,115,32,102,111,114,32,97,32,98,121,116, - 101,99,111,100,101,32,102,105,108,101,46,114,68,0,0,0, - 233,128,0,0,0,78,41,3,114,57,0,0,0,114,59,0, - 0,0,114,58,0,0,0,41,2,114,52,0,0,0,114,60, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,10,95,99,97,108,99,95,109,111,100,101,227,1, - 0,0,115,16,0,0,0,2,2,14,1,12,1,6,1,8, - 3,4,1,2,251,255,128,114,119,0,0,0,99,1,0,0, - 0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0, - 0,3,0,0,0,115,52,0,0,0,100,6,135,0,102,1, - 100,2,100,3,132,9,125,1,116,0,100,1,117,1,114,30, - 116,0,106,1,125,2,110,8,100,4,100,5,132,0,125,2, - 124,2,124,1,136,0,131,2,1,0,124,1,83,0,41,7, - 122,252,68,101,99,111,114,97,116,111,114,32,116,111,32,118, - 101,114,105,102,121,32,116,104,97,116,32,116,104,101,32,109, - 111,100,117,108,101,32,98,101,105,110,103,32,114,101,113,117, - 101,115,116,101,100,32,109,97,116,99,104,101,115,32,116,104, - 101,32,111,110,101,32,116,104,101,10,32,32,32,32,108,111, - 97,100,101,114,32,99,97,110,32,104,97,110,100,108,101,46, - 10,10,32,32,32,32,84,104,101,32,102,105,114,115,116,32, - 97,114,103,117,109,101,110,116,32,40,115,101,108,102,41,32, - 109,117,115,116,32,100,101,102,105,110,101,32,95,110,97,109, - 101,32,119,104,105,99,104,32,116,104,101,32,115,101,99,111, - 110,100,32,97,114,103,117,109,101,110,116,32,105,115,10,32, - 32,32,32,99,111,109,112,97,114,101,100,32,97,103,97,105, - 110,115,116,46,32,73,102,32,116,104,101,32,99,111,109,112, - 97,114,105,115,111,110,32,102,97,105,108,115,32,116,104,101, - 110,32,73,109,112,111,114,116,69,114,114,111,114,32,105,115, - 32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,99, - 2,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, - 4,0,0,0,31,0,0,0,115,72,0,0,0,124,1,100, - 0,117,0,114,16,124,0,106,0,125,1,110,32,124,0,106, - 0,124,1,107,3,114,48,116,1,100,1,124,0,106,0,124, - 1,102,2,22,0,124,1,100,2,141,2,130,1,136,0,124, - 0,124,1,103,2,124,2,162,1,82,0,105,0,124,3,164, - 1,142,1,83,0,41,3,78,122,30,108,111,97,100,101,114, - 32,102,111,114,32,37,115,32,99,97,110,110,111,116,32,104, - 97,110,100,108,101,32,37,115,169,1,218,4,110,97,109,101, - 41,2,114,121,0,0,0,218,11,73,109,112,111,114,116,69, - 114,114,111,114,41,4,218,4,115,101,108,102,114,121,0,0, - 0,218,4,97,114,103,115,218,6,107,119,97,114,103,115,169, - 1,218,6,109,101,116,104,111,100,114,7,0,0,0,114,8, - 0,0,0,218,19,95,99,104,101,99,107,95,110,97,109,101, - 95,119,114,97,112,112,101,114,247,1,0,0,115,20,0,0, - 0,8,1,8,1,10,1,4,1,8,1,2,255,2,1,6, - 255,24,2,255,128,122,40,95,99,104,101,99,107,95,110,97, - 109,101,46,60,108,111,99,97,108,115,62,46,95,99,104,101, - 99,107,95,110,97,109,101,95,119,114,97,112,112,101,114,99, - 2,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, - 7,0,0,0,83,0,0,0,115,56,0,0,0,100,1,68, - 0,93,32,125,2,116,0,124,1,124,2,131,2,114,36,116, - 1,124,0,124,2,116,2,124,1,124,2,131,2,131,3,1, - 0,113,4,124,0,106,3,160,4,124,1,106,3,161,1,1, - 0,100,0,83,0,41,2,78,41,4,218,10,95,95,109,111, - 100,117,108,101,95,95,218,8,95,95,110,97,109,101,95,95, - 218,12,95,95,113,117,97,108,110,97,109,101,95,95,218,7, - 95,95,100,111,99,95,95,41,5,218,7,104,97,115,97,116, - 116,114,218,7,115,101,116,97,116,116,114,218,7,103,101,116, - 97,116,116,114,218,8,95,95,100,105,99,116,95,95,218,6, - 117,112,100,97,116,101,41,3,90,3,110,101,119,90,3,111, - 108,100,114,75,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,5,95,119,114,97,112,4,2,0, - 0,115,12,0,0,0,8,1,10,1,18,1,2,128,18,1, - 255,128,122,26,95,99,104,101,99,107,95,110,97,109,101,46, - 60,108,111,99,97,108,115,62,46,95,119,114,97,112,41,1, - 78,41,2,218,10,95,98,111,111,116,115,116,114,97,112,114, - 138,0,0,0,41,3,114,127,0,0,0,114,128,0,0,0, - 114,138,0,0,0,114,7,0,0,0,114,126,0,0,0,114, - 8,0,0,0,218,11,95,99,104,101,99,107,95,110,97,109, - 101,239,1,0,0,115,14,0,0,0,14,8,8,10,8,1, - 8,2,10,6,4,1,255,128,114,140,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,5,0,0,0,6,0, - 0,0,67,0,0,0,115,60,0,0,0,124,0,160,0,124, - 1,161,1,92,2,125,2,125,3,124,2,100,1,117,0,114, - 56,116,1,124,3,131,1,114,56,100,2,125,4,116,2,160, - 3,124,4,160,4,124,3,100,3,25,0,161,1,116,5,161, - 2,1,0,124,2,83,0,41,4,122,155,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,32,98,121,32,100,101,108,101, - 103,97,116,105,110,103,32,116,111,10,32,32,32,32,115,101, - 108,102,46,102,105,110,100,95,108,111,97,100,101,114,40,41, - 46,10,10,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, - 32,105,110,32,102,97,118,111,114,32,111,102,32,102,105,110, - 100,101,114,46,102,105,110,100,95,115,112,101,99,40,41,46, - 10,10,32,32,32,32,78,122,44,78,111,116,32,105,109,112, - 111,114,116,105,110,103,32,100,105,114,101,99,116,111,114,121, - 32,123,125,58,32,109,105,115,115,105,110,103,32,95,95,105, - 110,105,116,95,95,114,0,0,0,0,41,6,218,11,102,105, - 110,100,95,108,111,97,100,101,114,114,4,0,0,0,114,81, - 0,0,0,114,82,0,0,0,114,70,0,0,0,218,13,73, - 109,112,111,114,116,87,97,114,110,105,110,103,41,5,114,123, - 0,0,0,218,8,102,117,108,108,110,97,109,101,218,6,108, - 111,97,100,101,114,218,8,112,111,114,116,105,111,110,115,218, - 3,109,115,103,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,17,95,102,105,110,100,95,109,111,100,117,108, - 101,95,115,104,105,109,14,2,0,0,115,12,0,0,0,14, - 10,16,1,4,1,22,1,4,1,255,128,114,147,0,0,0, - 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,166,0,0,0,124,0, - 100,1,100,2,133,2,25,0,125,3,124,3,116,0,107,3, - 114,64,100,3,124,1,155,2,100,4,124,3,155,2,157,4, - 125,4,116,1,160,2,100,5,124,4,161,2,1,0,116,3, - 124,4,102,1,105,0,124,2,164,1,142,1,130,1,116,4, - 124,0,131,1,100,6,107,0,114,106,100,7,124,1,155,2, - 157,2,125,4,116,1,160,2,100,5,124,4,161,2,1,0, - 116,5,124,4,131,1,130,1,116,6,124,0,100,2,100,8, - 133,2,25,0,131,1,125,5,124,5,100,9,64,0,114,162, - 100,10,124,5,155,2,100,11,124,1,155,2,157,4,125,4, - 116,3,124,4,102,1,105,0,124,2,164,1,142,1,130,1, - 124,5,83,0,41,12,97,84,2,0,0,80,101,114,102,111, - 114,109,32,98,97,115,105,99,32,118,97,108,105,100,105,116, - 121,32,99,104,101,99,107,105,110,103,32,111,102,32,97,32, - 112,121,99,32,104,101,97,100,101,114,32,97,110,100,32,114, - 101,116,117,114,110,32,116,104,101,32,102,108,97,103,115,32, - 102,105,101,108,100,44,10,32,32,32,32,119,104,105,99,104, - 32,100,101,116,101,114,109,105,110,101,115,32,104,111,119,32, - 116,104,101,32,112,121,99,32,115,104,111,117,108,100,32,98, - 101,32,102,117,114,116,104,101,114,32,118,97,108,105,100,97, - 116,101,100,32,97,103,97,105,110,115,116,32,116,104,101,32, - 115,111,117,114,99,101,46,10,10,32,32,32,32,42,100,97, - 116,97,42,32,105,115,32,116,104,101,32,99,111,110,116,101, - 110,116,115,32,111,102,32,116,104,101,32,112,121,99,32,102, - 105,108,101,46,32,40,79,110,108,121,32,116,104,101,32,102, - 105,114,115,116,32,49,54,32,98,121,116,101,115,32,97,114, - 101,10,32,32,32,32,114,101,113,117,105,114,101,100,44,32, - 116,104,111,117,103,104,46,41,10,10,32,32,32,32,42,110, - 97,109,101,42,32,105,115,32,116,104,101,32,110,97,109,101, - 32,111,102,32,116,104,101,32,109,111,100,117,108,101,32,98, - 101,105,110,103,32,105,109,112,111,114,116,101,100,46,32,73, - 116,32,105,115,32,117,115,101,100,32,102,111,114,32,108,111, - 103,103,105,110,103,46,10,10,32,32,32,32,42,101,120,99, - 95,100,101,116,97,105,108,115,42,32,105,115,32,97,32,100, - 105,99,116,105,111,110,97,114,121,32,112,97,115,115,101,100, - 32,116,111,32,73,109,112,111,114,116,69,114,114,111,114,32, - 105,102,32,105,116,32,114,97,105,115,101,100,32,102,111,114, - 10,32,32,32,32,105,109,112,114,111,118,101,100,32,100,101, - 98,117,103,103,105,110,103,46,10,10,32,32,32,32,73,109, - 112,111,114,116,69,114,114,111,114,32,105,115,32,114,97,105, - 115,101,100,32,119,104,101,110,32,116,104,101,32,109,97,103, - 105,99,32,110,117,109,98,101,114,32,105,115,32,105,110,99, - 111,114,114,101,99,116,32,111,114,32,119,104,101,110,32,116, - 104,101,32,102,108,97,103,115,10,32,32,32,32,102,105,101, - 108,100,32,105,115,32,105,110,118,97,108,105,100,46,32,69, - 79,70,69,114,114,111,114,32,105,115,32,114,97,105,115,101, - 100,32,119,104,101,110,32,116,104,101,32,100,97,116,97,32, - 105,115,32,102,111,117,110,100,32,116,111,32,98,101,32,116, - 114,117,110,99,97,116,101,100,46,10,10,32,32,32,32,78, - 114,28,0,0,0,122,20,98,97,100,32,109,97,103,105,99, - 32,110,117,109,98,101,114,32,105,110,32,122,2,58,32,250, - 2,123,125,233,16,0,0,0,122,40,114,101,97,99,104,101, - 100,32,69,79,70,32,119,104,105,108,101,32,114,101,97,100, - 105,110,103,32,112,121,99,32,104,101,97,100,101,114,32,111, - 102,32,233,8,0,0,0,233,252,255,255,255,122,14,105,110, - 118,97,108,105,100,32,102,108,97,103,115,32,122,4,32,105, - 110,32,41,7,218,12,77,65,71,73,67,95,78,85,77,66, - 69,82,114,139,0,0,0,218,16,95,118,101,114,98,111,115, - 101,95,109,101,115,115,97,103,101,114,122,0,0,0,114,4, - 0,0,0,218,8,69,79,70,69,114,114,111,114,114,38,0, - 0,0,41,6,114,37,0,0,0,114,121,0,0,0,218,11, - 101,120,99,95,100,101,116,97,105,108,115,90,5,109,97,103, - 105,99,114,98,0,0,0,114,16,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,13,95,99,108, - 97,115,115,105,102,121,95,112,121,99,31,2,0,0,115,30, - 0,0,0,12,16,8,1,16,1,12,1,16,1,12,1,10, - 1,12,1,8,1,16,1,8,2,16,1,16,1,4,1,255, - 128,114,156,0,0,0,99,5,0,0,0,0,0,0,0,0, - 0,0,0,6,0,0,0,4,0,0,0,67,0,0,0,115, - 124,0,0,0,116,0,124,0,100,1,100,2,133,2,25,0, - 131,1,124,1,100,3,64,0,107,3,114,62,100,4,124,3, - 155,2,157,2,125,5,116,1,160,2,100,5,124,5,161,2, - 1,0,116,3,124,5,102,1,105,0,124,4,164,1,142,1, - 130,1,124,2,100,6,117,1,114,120,116,0,124,0,100,2, - 100,7,133,2,25,0,131,1,124,2,100,3,64,0,107,3, - 114,116,116,3,100,4,124,3,155,2,157,2,102,1,105,0, - 124,4,164,1,142,1,130,1,100,6,83,0,100,6,83,0, - 41,8,97,7,2,0,0,86,97,108,105,100,97,116,101,32, - 97,32,112,121,99,32,97,103,97,105,110,115,116,32,116,104, - 101,32,115,111,117,114,99,101,32,108,97,115,116,45,109,111, - 100,105,102,105,101,100,32,116,105,109,101,46,10,10,32,32, - 32,32,42,100,97,116,97,42,32,105,115,32,116,104,101,32, - 99,111,110,116,101,110,116,115,32,111,102,32,116,104,101,32, - 112,121,99,32,102,105,108,101,46,32,40,79,110,108,121,32, - 116,104,101,32,102,105,114,115,116,32,49,54,32,98,121,116, - 101,115,32,97,114,101,10,32,32,32,32,114,101,113,117,105, - 114,101,100,46,41,10,10,32,32,32,32,42,115,111,117,114, - 99,101,95,109,116,105,109,101,42,32,105,115,32,116,104,101, - 32,108,97,115,116,32,109,111,100,105,102,105,101,100,32,116, - 105,109,101,115,116,97,109,112,32,111,102,32,116,104,101,32, - 115,111,117,114,99,101,32,102,105,108,101,46,10,10,32,32, - 32,32,42,115,111,117,114,99,101,95,115,105,122,101,42,32, - 105,115,32,78,111,110,101,32,111,114,32,116,104,101,32,115, - 105,122,101,32,111,102,32,116,104,101,32,115,111,117,114,99, - 101,32,102,105,108,101,32,105,110,32,98,121,116,101,115,46, - 10,10,32,32,32,32,42,110,97,109,101,42,32,105,115,32, - 116,104,101,32,110,97,109,101,32,111,102,32,116,104,101,32, - 109,111,100,117,108,101,32,98,101,105,110,103,32,105,109,112, - 111,114,116,101,100,46,32,73,116,32,105,115,32,117,115,101, - 100,32,102,111,114,32,108,111,103,103,105,110,103,46,10,10, - 32,32,32,32,42,101,120,99,95,100,101,116,97,105,108,115, - 42,32,105,115,32,97,32,100,105,99,116,105,111,110,97,114, - 121,32,112,97,115,115,101,100,32,116,111,32,73,109,112,111, - 114,116,69,114,114,111,114,32,105,102,32,105,116,32,114,97, - 105,115,101,100,32,102,111,114,10,32,32,32,32,105,109,112, - 114,111,118,101,100,32,100,101,98,117,103,103,105,110,103,46, - 10,10,32,32,32,32,65,110,32,73,109,112,111,114,116,69, - 114,114,111,114,32,105,115,32,114,97,105,115,101,100,32,105, - 102,32,116,104,101,32,98,121,116,101,99,111,100,101,32,105, - 115,32,115,116,97,108,101,46,10,10,32,32,32,32,114,150, - 0,0,0,233,12,0,0,0,114,27,0,0,0,122,22,98, - 121,116,101,99,111,100,101,32,105,115,32,115,116,97,108,101, - 32,102,111,114,32,114,148,0,0,0,78,114,149,0,0,0, - 41,4,114,38,0,0,0,114,139,0,0,0,114,153,0,0, - 0,114,122,0,0,0,41,6,114,37,0,0,0,218,12,115, - 111,117,114,99,101,95,109,116,105,109,101,218,11,115,111,117, - 114,99,101,95,115,105,122,101,114,121,0,0,0,114,155,0, - 0,0,114,98,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,23,95,118,97,108,105,100,97,116, - 101,95,116,105,109,101,115,116,97,109,112,95,112,121,99,64, - 2,0,0,115,20,0,0,0,24,19,10,1,12,1,16,1, - 8,1,22,1,2,255,22,2,8,254,255,128,114,160,0,0, - 0,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,42,0,0,0,124, - 0,100,1,100,2,133,2,25,0,124,1,107,3,114,38,116, - 0,100,3,124,2,155,2,157,2,102,1,105,0,124,3,164, - 1,142,1,130,1,100,4,83,0,41,5,97,243,1,0,0, - 86,97,108,105,100,97,116,101,32,97,32,104,97,115,104,45, - 98,97,115,101,100,32,112,121,99,32,98,121,32,99,104,101, - 99,107,105,110,103,32,116,104,101,32,114,101,97,108,32,115, - 111,117,114,99,101,32,104,97,115,104,32,97,103,97,105,110, - 115,116,32,116,104,101,32,111,110,101,32,105,110,10,32,32, - 32,32,116,104,101,32,112,121,99,32,104,101,97,100,101,114, - 46,10,10,32,32,32,32,42,100,97,116,97,42,32,105,115, - 32,116,104,101,32,99,111,110,116,101,110,116,115,32,111,102, - 32,116,104,101,32,112,121,99,32,102,105,108,101,46,32,40, - 79,110,108,121,32,116,104,101,32,102,105,114,115,116,32,49, - 54,32,98,121,116,101,115,32,97,114,101,10,32,32,32,32, - 114,101,113,117,105,114,101,100,46,41,10,10,32,32,32,32, - 42,115,111,117,114,99,101,95,104,97,115,104,42,32,105,115, - 32,116,104,101,32,105,109,112,111,114,116,108,105,98,46,117, - 116,105,108,46,115,111,117,114,99,101,95,104,97,115,104,40, - 41,32,111,102,32,116,104,101,32,115,111,117,114,99,101,32, - 102,105,108,101,46,10,10,32,32,32,32,42,110,97,109,101, - 42,32,105,115,32,116,104,101,32,110,97,109,101,32,111,102, - 32,116,104,101,32,109,111,100,117,108,101,32,98,101,105,110, - 103,32,105,109,112,111,114,116,101,100,46,32,73,116,32,105, - 115,32,117,115,101,100,32,102,111,114,32,108,111,103,103,105, - 110,103,46,10,10,32,32,32,32,42,101,120,99,95,100,101, - 116,97,105,108,115,42,32,105,115,32,97,32,100,105,99,116, - 105,111,110,97,114,121,32,112,97,115,115,101,100,32,116,111, - 32,73,109,112,111,114,116,69,114,114,111,114,32,105,102,32, - 105,116,32,114,97,105,115,101,100,32,102,111,114,10,32,32, - 32,32,105,109,112,114,111,118,101,100,32,100,101,98,117,103, - 103,105,110,103,46,10,10,32,32,32,32,65,110,32,73,109, + 32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,122, + 70,116,104,101,32,100,101,98,117,103,95,111,118,101,114,114, + 105,100,101,32,112,97,114,97,109,101,116,101,114,32,105,115, + 32,100,101,112,114,101,99,97,116,101,100,59,32,117,115,101, + 32,39,111,112,116,105,109,105,122,97,116,105,111,110,39,32, + 105,110,115,116,101,97,100,122,50,100,101,98,117,103,95,111, + 118,101,114,114,105,100,101,32,111,114,32,111,112,116,105,109, + 105,122,97,116,105,111,110,32,109,117,115,116,32,98,101,32, + 115,101,116,32,116,111,32,78,111,110,101,114,10,0,0,0, + 114,3,0,0,0,218,1,46,250,36,115,121,115,46,105,109, + 112,108,101,109,101,110,116,97,116,105,111,110,46,99,97,99, + 104,101,95,116,97,103,32,105,115,32,78,111,110,101,114,0, + 0,0,0,122,24,123,33,114,125,32,105,115,32,110,111,116, + 32,97,108,112,104,97,110,117,109,101,114,105,99,122,7,123, + 125,46,123,125,123,125,114,11,0,0,0,114,39,0,0,0, + 41,28,218,9,95,119,97,114,110,105,110,103,115,218,4,119, + 97,114,110,218,18,68,101,112,114,101,99,97,116,105,111,110, + 87,97,114,110,105,110,103,218,9,84,121,112,101,69,114,114, + 111,114,114,18,0,0,0,218,6,102,115,112,97,116,104,114, + 55,0,0,0,114,49,0,0,0,114,15,0,0,0,218,14, + 105,109,112,108,101,109,101,110,116,97,116,105,111,110,218,9, + 99,97,99,104,101,95,116,97,103,218,19,78,111,116,73,109, + 112,108,101,109,101,110,116,101,100,69,114,114,111,114,114,46, + 0,0,0,114,16,0,0,0,218,8,111,112,116,105,109,105, + 122,101,218,3,115,116,114,218,7,105,115,97,108,110,117,109, + 218,10,86,97,108,117,101,69,114,114,111,114,114,70,0,0, + 0,218,4,95,79,80,84,218,17,66,89,84,69,67,79,68, + 69,95,83,85,70,70,73,88,69,83,218,14,112,121,99,97, + 99,104,101,95,112,114,101,102,105,120,114,67,0,0,0,114, + 48,0,0,0,114,63,0,0,0,114,42,0,0,0,218,6, + 108,115,116,114,105,112,218,8,95,80,89,67,65,67,72,69, + 41,12,114,52,0,0,0,90,14,100,101,98,117,103,95,111, + 118,101,114,114,105,100,101,114,78,0,0,0,218,7,109,101, + 115,115,97,103,101,218,4,104,101,97,100,114,54,0,0,0, + 90,4,98,97,115,101,114,6,0,0,0,218,4,114,101,115, + 116,90,3,116,97,103,90,15,97,108,109,111,115,116,95,102, + 105,108,101,110,97,109,101,218,8,102,105,108,101,110,97,109, + 101,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 218,17,99,97,99,104,101,95,102,114,111,109,95,115,111,117, + 114,99,101,85,1,0,0,115,74,0,0,0,8,18,6,1, + 2,1,4,255,8,2,4,1,8,1,12,1,10,1,12,1, + 16,1,8,1,8,1,8,1,24,1,8,1,12,1,6,1, + 8,2,8,1,8,1,8,1,14,1,14,1,12,1,12,1, + 10,9,14,1,28,5,12,1,2,4,4,1,8,1,2,1, + 4,253,12,5,255,128,114,102,0,0,0,99,1,0,0,0, + 0,0,0,0,0,0,0,0,10,0,0,0,5,0,0,0, + 67,0,0,0,115,44,1,0,0,116,0,106,1,106,2,100, + 1,117,0,114,20,116,3,100,2,131,1,130,1,116,4,160, + 5,124,0,161,1,125,0,116,6,124,0,131,1,92,2,125, + 1,125,2,100,3,125,3,116,0,106,7,100,1,117,1,114, + 102,116,0,106,7,160,8,116,9,161,1,125,4,124,1,160, + 10,124,4,116,11,23,0,161,1,114,102,124,1,116,12,124, + 4,131,1,100,1,133,2,25,0,125,1,100,4,125,3,124, + 3,115,144,116,6,124,1,131,1,92,2,125,1,125,5,124, + 5,116,13,107,3,114,144,116,14,116,13,155,0,100,5,124, + 0,155,2,157,3,131,1,130,1,124,2,160,15,100,6,161, + 1,125,6,124,6,100,7,118,1,114,176,116,14,100,8,124, + 2,155,2,157,2,131,1,130,1,124,6,100,9,107,2,144, + 1,114,12,124,2,160,16,100,6,100,10,161,2,100,11,25, + 0,125,7,124,7,160,10,116,17,161,1,115,226,116,14,100, + 12,116,17,155,2,157,2,131,1,130,1,124,7,116,12,116, + 17,131,1,100,1,133,2,25,0,125,8,124,8,160,18,161, + 0,144,1,115,12,116,14,100,13,124,7,155,2,100,14,157, + 3,131,1,130,1,124,2,160,19,100,6,161,1,100,15,25, + 0,125,9,116,20,124,1,124,9,116,21,100,15,25,0,23, + 0,131,2,83,0,41,16,97,110,1,0,0,71,105,118,101, + 110,32,116,104,101,32,112,97,116,104,32,116,111,32,97,32, + 46,112,121,99,46,32,102,105,108,101,44,32,114,101,116,117, + 114,110,32,116,104,101,32,112,97,116,104,32,116,111,32,105, + 116,115,32,46,112,121,32,102,105,108,101,46,10,10,32,32, + 32,32,84,104,101,32,46,112,121,99,32,102,105,108,101,32, + 100,111,101,115,32,110,111,116,32,110,101,101,100,32,116,111, + 32,101,120,105,115,116,59,32,116,104,105,115,32,115,105,109, + 112,108,121,32,114,101,116,117,114,110,115,32,116,104,101,32, + 112,97,116,104,32,116,111,10,32,32,32,32,116,104,101,32, + 46,112,121,32,102,105,108,101,32,99,97,108,99,117,108,97, + 116,101,100,32,116,111,32,99,111,114,114,101,115,112,111,110, + 100,32,116,111,32,116,104,101,32,46,112,121,99,32,102,105, + 108,101,46,32,32,73,102,32,112,97,116,104,32,100,111,101, + 115,10,32,32,32,32,110,111,116,32,99,111,110,102,111,114, + 109,32,116,111,32,80,69,80,32,51,49,52,55,47,52,56, + 56,32,102,111,114,109,97,116,44,32,86,97,108,117,101,69, + 114,114,111,114,32,119,105,108,108,32,98,101,32,114,97,105, + 115,101,100,46,32,73,102,10,32,32,32,32,115,121,115,46, + 105,109,112,108,101,109,101,110,116,97,116,105,111,110,46,99, + 97,99,104,101,95,116,97,103,32,105,115,32,78,111,110,101, + 32,116,104,101,110,32,78,111,116,73,109,112,108,101,109,101, + 110,116,101,100,69,114,114,111,114,32,105,115,32,114,97,105, + 115,101,100,46,10,10,32,32,32,32,78,114,80,0,0,0, + 70,84,122,31,32,110,111,116,32,98,111,116,116,111,109,45, + 108,101,118,101,108,32,100,105,114,101,99,116,111,114,121,32, + 105,110,32,114,79,0,0,0,62,2,0,0,0,114,39,0, + 0,0,114,65,0,0,0,122,29,101,120,112,101,99,116,101, + 100,32,111,110,108,121,32,50,32,111,114,32,51,32,100,111, + 116,115,32,105,110,32,114,65,0,0,0,114,39,0,0,0, + 233,254,255,255,255,122,53,111,112,116,105,109,105,122,97,116, + 105,111,110,32,112,111,114,116,105,111,110,32,111,102,32,102, + 105,108,101,110,97,109,101,32,100,111,101,115,32,110,111,116, + 32,115,116,97,114,116,32,119,105,116,104,32,122,19,111,112, + 116,105,109,105,122,97,116,105,111,110,32,108,101,118,101,108, + 32,122,29,32,105,115,32,110,111,116,32,97,110,32,97,108, + 112,104,97,110,117,109,101,114,105,99,32,118,97,108,117,101, + 114,0,0,0,0,41,22,114,15,0,0,0,114,86,0,0, + 0,114,87,0,0,0,114,88,0,0,0,114,18,0,0,0, + 114,85,0,0,0,114,55,0,0,0,114,95,0,0,0,114, + 41,0,0,0,114,42,0,0,0,114,23,0,0,0,114,45, + 0,0,0,114,4,0,0,0,114,97,0,0,0,114,92,0, + 0,0,218,5,99,111,117,110,116,114,51,0,0,0,114,93, + 0,0,0,114,91,0,0,0,218,9,112,97,114,116,105,116, + 105,111,110,114,48,0,0,0,218,15,83,79,85,82,67,69, + 95,83,85,70,70,73,88,69,83,41,10,114,52,0,0,0, + 114,99,0,0,0,90,16,112,121,99,97,99,104,101,95,102, + 105,108,101,110,97,109,101,90,23,102,111,117,110,100,95,105, + 110,95,112,121,99,97,99,104,101,95,112,114,101,102,105,120, + 90,13,115,116,114,105,112,112,101,100,95,112,97,116,104,90, + 7,112,121,99,97,99,104,101,90,9,100,111,116,95,99,111, + 117,110,116,114,78,0,0,0,90,9,111,112,116,95,108,101, + 118,101,108,90,13,98,97,115,101,95,102,105,108,101,110,97, + 109,101,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,17,115,111,117,114,99,101,95,102,114,111,109,95,99, + 97,99,104,101,156,1,0,0,115,62,0,0,0,12,9,8, + 1,10,1,12,1,4,1,10,1,12,1,14,1,16,1,4, + 1,4,1,12,1,8,1,8,1,2,1,8,255,10,2,8, + 1,14,1,10,1,16,1,10,1,4,1,2,1,8,255,16, + 2,10,1,16,1,14,2,18,1,255,128,114,107,0,0,0, + 99,1,0,0,0,0,0,0,0,0,0,0,0,5,0,0, + 0,9,0,0,0,67,0,0,0,115,122,0,0,0,116,0, + 124,0,131,1,100,1,107,2,114,16,100,2,83,0,124,0, + 160,1,100,3,161,1,92,3,125,1,125,2,125,3,124,1, + 114,56,124,3,160,2,161,0,100,4,100,5,133,2,25,0, + 100,6,107,3,114,60,124,0,83,0,122,12,116,3,124,0, + 131,1,125,4,87,0,110,30,4,0,116,4,116,5,102,2, + 121,120,1,0,1,0,1,0,124,0,100,2,100,5,133,2, + 25,0,125,4,89,0,116,6,124,4,131,1,114,116,124,4, + 83,0,124,0,83,0,119,0,41,7,122,188,67,111,110,118, + 101,114,116,32,97,32,98,121,116,101,99,111,100,101,32,102, + 105,108,101,32,112,97,116,104,32,116,111,32,97,32,115,111, + 117,114,99,101,32,112,97,116,104,32,40,105,102,32,112,111, + 115,115,105,98,108,101,41,46,10,10,32,32,32,32,84,104, + 105,115,32,102,117,110,99,116,105,111,110,32,101,120,105,115, + 116,115,32,112,117,114,101,108,121,32,102,111,114,32,98,97, + 99,107,119,97,114,100,115,45,99,111,109,112,97,116,105,98, + 105,108,105,116,121,32,102,111,114,10,32,32,32,32,80,121, + 73,109,112,111,114,116,95,69,120,101,99,67,111,100,101,77, + 111,100,117,108,101,87,105,116,104,70,105,108,101,110,97,109, + 101,115,40,41,32,105,110,32,116,104,101,32,67,32,65,80, + 73,46,10,10,32,32,32,32,114,0,0,0,0,78,114,79, + 0,0,0,233,253,255,255,255,233,255,255,255,255,90,2,112, + 121,41,7,114,4,0,0,0,114,49,0,0,0,218,5,108, + 111,119,101,114,114,107,0,0,0,114,88,0,0,0,114,92, + 0,0,0,114,62,0,0,0,41,5,218,13,98,121,116,101, + 99,111,100,101,95,112,97,116,104,114,100,0,0,0,114,53, + 0,0,0,90,9,101,120,116,101,110,115,105,111,110,218,11, + 115,111,117,114,99,101,95,112,97,116,104,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,15,95,103,101,116, + 95,115,111,117,114,99,101,102,105,108,101,196,1,0,0,115, + 24,0,0,0,12,7,4,1,16,1,24,1,4,1,2,1, + 12,1,16,1,14,1,16,1,2,254,255,128,114,113,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,68,0,0,0,124, + 0,160,0,116,1,116,2,131,1,161,1,114,44,122,10,116, + 3,124,0,131,1,87,0,83,0,4,0,116,4,121,66,1, + 0,1,0,1,0,89,0,100,0,83,0,124,0,160,0,116, + 1,116,5,131,1,161,1,114,62,124,0,83,0,100,0,83, + 0,119,0,169,1,78,41,6,218,8,101,110,100,115,119,105, + 116,104,218,5,116,117,112,108,101,114,106,0,0,0,114,102, + 0,0,0,114,88,0,0,0,114,94,0,0,0,41,1,114, + 101,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,11,95,103,101,116,95,99,97,99,104,101,100, + 215,1,0,0,115,20,0,0,0,14,1,2,1,10,1,12, + 1,6,1,14,1,4,1,4,2,2,251,255,128,114,117,0, + 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,2, + 0,0,0,8,0,0,0,67,0,0,0,115,48,0,0,0, + 122,14,116,0,124,0,131,1,106,1,125,1,87,0,110,18, + 4,0,116,2,121,46,1,0,1,0,1,0,100,1,125,1, + 89,0,124,1,100,2,79,0,125,1,124,1,83,0,119,0, + 41,4,122,51,67,97,108,99,117,108,97,116,101,32,116,104, + 101,32,109,111,100,101,32,112,101,114,109,105,115,115,105,111, + 110,115,32,102,111,114,32,97,32,98,121,116,101,99,111,100, + 101,32,102,105,108,101,46,114,68,0,0,0,233,128,0,0, + 0,78,41,3,114,57,0,0,0,114,59,0,0,0,114,58, + 0,0,0,41,2,114,52,0,0,0,114,60,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,10, + 95,99,97,108,99,95,109,111,100,101,227,1,0,0,115,16, + 0,0,0,2,2,14,1,12,1,6,1,8,3,4,1,2, + 251,255,128,114,119,0,0,0,99,1,0,0,0,0,0,0, + 0,0,0,0,0,3,0,0,0,4,0,0,0,3,0,0, + 0,115,52,0,0,0,100,6,135,0,102,1,100,2,100,3, + 132,9,125,1,116,0,100,1,117,1,114,30,116,0,106,1, + 125,2,110,8,100,4,100,5,132,0,125,2,124,2,124,1, + 136,0,131,2,1,0,124,1,83,0,41,7,122,252,68,101, + 99,111,114,97,116,111,114,32,116,111,32,118,101,114,105,102, + 121,32,116,104,97,116,32,116,104,101,32,109,111,100,117,108, + 101,32,98,101,105,110,103,32,114,101,113,117,101,115,116,101, + 100,32,109,97,116,99,104,101,115,32,116,104,101,32,111,110, + 101,32,116,104,101,10,32,32,32,32,108,111,97,100,101,114, + 32,99,97,110,32,104,97,110,100,108,101,46,10,10,32,32, + 32,32,84,104,101,32,102,105,114,115,116,32,97,114,103,117, + 109,101,110,116,32,40,115,101,108,102,41,32,109,117,115,116, + 32,100,101,102,105,110,101,32,95,110,97,109,101,32,119,104, + 105,99,104,32,116,104,101,32,115,101,99,111,110,100,32,97, + 114,103,117,109,101,110,116,32,105,115,10,32,32,32,32,99, + 111,109,112,97,114,101,100,32,97,103,97,105,110,115,116,46, + 32,73,102,32,116,104,101,32,99,111,109,112,97,114,105,115, + 111,110,32,102,97,105,108,115,32,116,104,101,110,32,73,109, 112,111,114,116,69,114,114,111,114,32,105,115,32,114,97,105, - 115,101,100,32,105,102,32,116,104,101,32,98,121,116,101,99, - 111,100,101,32,105,115,32,115,116,97,108,101,46,10,10,32, - 32,32,32,114,150,0,0,0,114,149,0,0,0,122,46,104, - 97,115,104,32,105,110,32,98,121,116,101,99,111,100,101,32, - 100,111,101,115,110,39,116,32,109,97,116,99,104,32,104,97, - 115,104,32,111,102,32,115,111,117,114,99,101,32,78,41,1, - 114,122,0,0,0,41,4,114,37,0,0,0,218,11,115,111, - 117,114,99,101,95,104,97,115,104,114,121,0,0,0,114,155, + 115,101,100,46,10,10,32,32,32,32,78,99,2,0,0,0, + 0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0, + 31,0,0,0,115,72,0,0,0,124,1,100,0,117,0,114, + 16,124,0,106,0,125,1,110,32,124,0,106,0,124,1,107, + 3,114,48,116,1,100,1,124,0,106,0,124,1,102,2,22, + 0,124,1,100,2,141,2,130,1,136,0,124,0,124,1,103, + 2,124,2,162,1,82,0,105,0,124,3,164,1,142,1,83, + 0,41,3,78,122,30,108,111,97,100,101,114,32,102,111,114, + 32,37,115,32,99,97,110,110,111,116,32,104,97,110,100,108, + 101,32,37,115,169,1,218,4,110,97,109,101,41,2,114,121, + 0,0,0,218,11,73,109,112,111,114,116,69,114,114,111,114, + 41,4,218,4,115,101,108,102,114,121,0,0,0,218,4,97, + 114,103,115,218,6,107,119,97,114,103,115,169,1,218,6,109, + 101,116,104,111,100,114,7,0,0,0,114,8,0,0,0,218, + 19,95,99,104,101,99,107,95,110,97,109,101,95,119,114,97, + 112,112,101,114,247,1,0,0,115,20,0,0,0,8,1,8, + 1,10,1,4,1,8,1,2,255,2,1,6,255,24,2,255, + 128,122,40,95,99,104,101,99,107,95,110,97,109,101,46,60, + 108,111,99,97,108,115,62,46,95,99,104,101,99,107,95,110, + 97,109,101,95,119,114,97,112,112,101,114,99,2,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,7,0,0,0, + 83,0,0,0,115,56,0,0,0,100,1,68,0,93,32,125, + 2,116,0,124,1,124,2,131,2,114,36,116,1,124,0,124, + 2,116,2,124,1,124,2,131,2,131,3,1,0,113,4,124, + 0,106,3,160,4,124,1,106,3,161,1,1,0,100,0,83, + 0,41,2,78,41,4,218,10,95,95,109,111,100,117,108,101, + 95,95,218,8,95,95,110,97,109,101,95,95,218,12,95,95, + 113,117,97,108,110,97,109,101,95,95,218,7,95,95,100,111, + 99,95,95,41,5,218,7,104,97,115,97,116,116,114,218,7, + 115,101,116,97,116,116,114,218,7,103,101,116,97,116,116,114, + 218,8,95,95,100,105,99,116,95,95,218,6,117,112,100,97, + 116,101,41,3,90,3,110,101,119,90,3,111,108,100,114,75, 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,18,95,118,97,108,105,100,97,116,101,95,104,97, - 115,104,95,112,121,99,92,2,0,0,115,16,0,0,0,16, - 17,2,1,8,1,4,255,2,2,6,254,4,255,255,128,114, - 162,0,0,0,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,76,0, - 0,0,116,0,160,1,124,0,161,1,125,4,116,2,124,4, - 116,3,131,2,114,56,116,4,160,5,100,1,124,2,161,2, - 1,0,124,3,100,2,117,1,114,52,116,6,160,7,124,4, - 124,3,161,2,1,0,124,4,83,0,116,8,100,3,160,9, - 124,2,161,1,124,1,124,2,100,4,141,3,130,1,41,5, - 122,35,67,111,109,112,105,108,101,32,98,121,116,101,99,111, - 100,101,32,97,115,32,102,111,117,110,100,32,105,110,32,97, - 32,112,121,99,46,122,21,99,111,100,101,32,111,98,106,101, - 99,116,32,102,114,111,109,32,123,33,114,125,78,122,23,78, - 111,110,45,99,111,100,101,32,111,98,106,101,99,116,32,105, - 110,32,123,33,114,125,169,2,114,121,0,0,0,114,52,0, - 0,0,41,10,218,7,109,97,114,115,104,97,108,90,5,108, - 111,97,100,115,218,10,105,115,105,110,115,116,97,110,99,101, - 218,10,95,99,111,100,101,95,116,121,112,101,114,139,0,0, - 0,114,153,0,0,0,218,4,95,105,109,112,90,16,95,102, - 105,120,95,99,111,95,102,105,108,101,110,97,109,101,114,122, - 0,0,0,114,70,0,0,0,41,5,114,37,0,0,0,114, - 121,0,0,0,114,111,0,0,0,114,112,0,0,0,218,4, - 99,111,100,101,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,17,95,99,111,109,112,105,108,101,95,98,121, - 116,101,99,111,100,101,116,2,0,0,115,20,0,0,0,10, - 2,10,1,12,1,8,1,12,1,4,1,10,2,4,1,6, - 255,255,128,114,169,0,0,0,99,3,0,0,0,0,0,0, - 0,0,0,0,0,4,0,0,0,5,0,0,0,67,0,0, - 0,115,70,0,0,0,116,0,116,1,131,1,125,3,124,3, - 160,2,116,3,100,1,131,1,161,1,1,0,124,3,160,2, - 116,3,124,1,131,1,161,1,1,0,124,3,160,2,116,3, - 124,2,131,1,161,1,1,0,124,3,160,2,116,4,160,5, - 124,0,161,1,161,1,1,0,124,3,83,0,41,3,122,43, - 80,114,111,100,117,99,101,32,116,104,101,32,100,97,116,97, - 32,102,111,114,32,97,32,116,105,109,101,115,116,97,109,112, - 45,98,97,115,101,100,32,112,121,99,46,114,0,0,0,0, - 78,41,6,218,9,98,121,116,101,97,114,114,97,121,114,152, - 0,0,0,218,6,101,120,116,101,110,100,114,33,0,0,0, - 114,164,0,0,0,218,5,100,117,109,112,115,41,4,114,168, - 0,0,0,218,5,109,116,105,109,101,114,159,0,0,0,114, - 37,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,22,95,99,111,100,101,95,116,111,95,116,105, - 109,101,115,116,97,109,112,95,112,121,99,129,2,0,0,115, - 14,0,0,0,8,2,14,1,14,1,14,1,16,1,4,1, - 255,128,114,174,0,0,0,84,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,80,0,0,0,116,0,116,1,131,1,125,3,100,1, - 124,2,100,1,62,0,66,0,125,4,124,3,160,2,116,3, - 124,4,131,1,161,1,1,0,116,4,124,1,131,1,100,2, - 107,2,115,50,74,0,130,1,124,3,160,2,124,1,161,1, - 1,0,124,3,160,2,116,5,160,6,124,0,161,1,161,1, - 1,0,124,3,83,0,41,4,122,38,80,114,111,100,117,99, - 101,32,116,104,101,32,100,97,116,97,32,102,111,114,32,97, - 32,104,97,115,104,45,98,97,115,101,100,32,112,121,99,46, - 114,3,0,0,0,114,150,0,0,0,78,41,7,114,170,0, - 0,0,114,152,0,0,0,114,171,0,0,0,114,33,0,0, - 0,114,4,0,0,0,114,164,0,0,0,114,172,0,0,0, - 41,5,114,168,0,0,0,114,161,0,0,0,90,7,99,104, - 101,99,107,101,100,114,37,0,0,0,114,16,0,0,0,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,17, - 95,99,111,100,101,95,116,111,95,104,97,115,104,95,112,121, - 99,139,2,0,0,115,16,0,0,0,8,2,12,1,14,1, - 16,1,10,1,16,1,4,1,255,128,114,175,0,0,0,99, - 1,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0, - 6,0,0,0,67,0,0,0,115,62,0,0,0,100,1,100, - 2,108,0,125,1,116,1,160,2,124,0,161,1,106,3,125, - 2,124,1,160,4,124,2,161,1,125,3,116,1,160,5,100, - 2,100,3,161,2,125,4,124,4,160,6,124,0,160,6,124, - 3,100,1,25,0,161,1,161,1,83,0,41,4,122,121,68, - 101,99,111,100,101,32,98,121,116,101,115,32,114,101,112,114, - 101,115,101,110,116,105,110,103,32,115,111,117,114,99,101,32, - 99,111,100,101,32,97,110,100,32,114,101,116,117,114,110,32, - 116,104,101,32,115,116,114,105,110,103,46,10,10,32,32,32, - 32,85,110,105,118,101,114,115,97,108,32,110,101,119,108,105, - 110,101,32,115,117,112,112,111,114,116,32,105,115,32,117,115, - 101,100,32,105,110,32,116,104,101,32,100,101,99,111,100,105, - 110,103,46,10,32,32,32,32,114,0,0,0,0,78,84,41, - 7,218,8,116,111,107,101,110,105,122,101,114,72,0,0,0, - 90,7,66,121,116,101,115,73,79,90,8,114,101,97,100,108, - 105,110,101,90,15,100,101,116,101,99,116,95,101,110,99,111, - 100,105,110,103,90,25,73,110,99,114,101,109,101,110,116,97, - 108,78,101,119,108,105,110,101,68,101,99,111,100,101,114,218, - 6,100,101,99,111,100,101,41,5,218,12,115,111,117,114,99, - 101,95,98,121,116,101,115,114,176,0,0,0,90,21,115,111, - 117,114,99,101,95,98,121,116,101,115,95,114,101,97,100,108, - 105,110,101,218,8,101,110,99,111,100,105,110,103,90,15,110, - 101,119,108,105,110,101,95,100,101,99,111,100,101,114,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,13,100, - 101,99,111,100,101,95,115,111,117,114,99,101,150,2,0,0, - 115,12,0,0,0,8,5,12,1,10,1,12,1,20,1,255, - 128,114,180,0,0,0,169,2,114,144,0,0,0,218,26,115, - 117,98,109,111,100,117,108,101,95,115,101,97,114,99,104,95, - 108,111,99,97,116,105,111,110,115,99,2,0,0,0,0,0, - 0,0,2,0,0,0,9,0,0,0,8,0,0,0,67,0, - 0,0,115,16,1,0,0,124,1,100,1,117,0,114,58,100, - 2,125,1,116,0,124,2,100,3,131,2,114,56,122,14,124, - 2,160,1,124,0,161,1,125,1,87,0,110,30,4,0,116, - 2,144,1,121,14,1,0,1,0,1,0,89,0,110,12,110, - 10,116,3,160,4,124,1,161,1,125,1,116,5,106,6,124, - 0,124,2,124,1,100,4,141,3,125,4,100,5,124,4,95, - 7,124,2,100,1,117,0,114,152,116,8,131,0,68,0,93, - 42,92,2,125,5,125,6,124,1,160,9,116,10,124,6,131, - 1,161,1,114,146,124,5,124,0,124,1,131,2,125,2,124, - 2,124,4,95,11,1,0,113,152,113,104,100,1,83,0,124, - 3,116,12,117,0,114,216,116,0,124,2,100,6,131,2,114, - 214,122,14,124,2,160,13,124,0,161,1,125,7,87,0,110, - 18,4,0,116,2,144,1,121,12,1,0,1,0,1,0,89, - 0,110,18,124,7,114,214,103,0,124,4,95,14,110,6,124, - 3,124,4,95,14,124,4,106,14,103,0,107,2,144,1,114, - 8,124,1,144,1,114,8,116,15,124,1,131,1,100,7,25, - 0,125,8,124,4,106,14,160,16,124,8,161,1,1,0,124, - 4,83,0,119,0,119,0,41,8,97,61,1,0,0,82,101, - 116,117,114,110,32,97,32,109,111,100,117,108,101,32,115,112, - 101,99,32,98,97,115,101,100,32,111,110,32,97,32,102,105, - 108,101,32,108,111,99,97,116,105,111,110,46,10,10,32,32, - 32,32,84,111,32,105,110,100,105,99,97,116,101,32,116,104, - 97,116,32,116,104,101,32,109,111,100,117,108,101,32,105,115, - 32,97,32,112,97,99,107,97,103,101,44,32,115,101,116,10, - 32,32,32,32,115,117,98,109,111,100,117,108,101,95,115,101, - 97,114,99,104,95,108,111,99,97,116,105,111,110,115,32,116, - 111,32,97,32,108,105,115,116,32,111,102,32,100,105,114,101, - 99,116,111,114,121,32,112,97,116,104,115,46,32,32,65,110, - 10,32,32,32,32,101,109,112,116,121,32,108,105,115,116,32, - 105,115,32,115,117,102,102,105,99,105,101,110,116,44,32,116, - 104,111,117,103,104,32,105,116,115,32,110,111,116,32,111,116, - 104,101,114,119,105,115,101,32,117,115,101,102,117,108,32,116, - 111,32,116,104,101,10,32,32,32,32,105,109,112,111,114,116, - 32,115,121,115,116,101,109,46,10,10,32,32,32,32,84,104, - 101,32,108,111,97,100,101,114,32,109,117,115,116,32,116,97, - 107,101,32,97,32,115,112,101,99,32,97,115,32,105,116,115, - 32,111,110,108,121,32,95,95,105,110,105,116,95,95,40,41, - 32,97,114,103,46,10,10,32,32,32,32,78,122,9,60,117, - 110,107,110,111,119,110,62,218,12,103,101,116,95,102,105,108, - 101,110,97,109,101,169,1,218,6,111,114,105,103,105,110,84, - 218,10,105,115,95,112,97,99,107,97,103,101,114,0,0,0, - 0,41,17,114,133,0,0,0,114,183,0,0,0,114,122,0, - 0,0,114,18,0,0,0,114,85,0,0,0,114,139,0,0, - 0,218,10,77,111,100,117,108,101,83,112,101,99,90,13,95, - 115,101,116,95,102,105,108,101,97,116,116,114,218,27,95,103, - 101,116,95,115,117,112,112,111,114,116,101,100,95,102,105,108, - 101,95,108,111,97,100,101,114,115,114,115,0,0,0,114,116, - 0,0,0,114,144,0,0,0,218,9,95,80,79,80,85,76, - 65,84,69,114,186,0,0,0,114,182,0,0,0,114,55,0, - 0,0,218,6,97,112,112,101,110,100,41,9,114,121,0,0, - 0,90,8,108,111,99,97,116,105,111,110,114,144,0,0,0, - 114,182,0,0,0,218,4,115,112,101,99,218,12,108,111,97, - 100,101,114,95,99,108,97,115,115,218,8,115,117,102,102,105, - 120,101,115,114,186,0,0,0,90,7,100,105,114,110,97,109, - 101,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,23,115,112,101,99,95,102,114,111,109,95,102,105,108,101, - 95,108,111,99,97,116,105,111,110,167,2,0,0,115,74,0, - 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,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, - 0,90,1,100,0,90,2,100,1,90,3,100,2,90,4,100, - 3,90,5,101,6,111,30,100,4,101,7,118,0,90,8,101, - 9,100,5,100,6,132,0,131,1,90,10,101,11,100,7,100, - 8,132,0,131,1,90,12,101,11,100,14,100,10,100,11,132, - 1,131,1,90,13,101,11,100,15,100,12,100,13,132,1,131, - 1,90,14,100,9,83,0,41,16,218,21,87,105,110,100,111, - 119,115,82,101,103,105,115,116,114,121,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,109,111,100,117,108,101,115,32,100, - 101,99,108,97,114,101,100,32,105,110,32,116,104,101,32,87, - 105,110,100,111,119,115,32,114,101,103,105,115,116,114,121,46, - 122,59,83,111,102,116,119,97,114,101,92,80,121,116,104,111, - 110,92,80,121,116,104,111,110,67,111,114,101,92,123,115,121, - 115,95,118,101,114,115,105,111,110,125,92,77,111,100,117,108, - 101,115,92,123,102,117,108,108,110,97,109,101,125,122,65,83, - 111,102,116,119,97,114,101,92,80,121,116,104,111,110,92,80, - 121,116,104,111,110,67,111,114,101,92,123,115,121,115,95,118, - 101,114,115,105,111,110,125,92,77,111,100,117,108,101,115,92, - 123,102,117,108,108,110,97,109,101,125,92,68,101,98,117,103, - 122,6,95,100,46,112,121,100,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,50,0,0,0,122,16,116,0,160,1,116,0,106,2, - 124,0,161,2,87,0,83,0,4,0,116,3,121,48,1,0, - 1,0,1,0,116,0,160,1,116,0,106,4,124,0,161,2, - 6,0,89,0,83,0,119,0,114,114,0,0,0,41,5,218, - 6,119,105,110,114,101,103,90,7,79,112,101,110,75,101,121, - 90,17,72,75,69,89,95,67,85,82,82,69,78,84,95,85, - 83,69,82,114,58,0,0,0,90,18,72,75,69,89,95,76, - 79,67,65,76,95,77,65,67,72,73,78,69,114,19,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,14,95,111,112,101,110,95,114,101,103,105,115,116,114,121, - 247,2,0,0,115,12,0,0,0,2,2,16,1,12,1,18, - 1,2,255,255,128,122,36,87,105,110,100,111,119,115,82,101, - 103,105,115,116,114,121,70,105,110,100,101,114,46,95,111,112, - 101,110,95,114,101,103,105,115,116,114,121,99,2,0,0,0, - 0,0,0,0,0,0,0,0,6,0,0,0,8,0,0,0, - 67,0,0,0,115,130,0,0,0,124,0,106,0,114,14,124, - 0,106,1,125,2,110,6,124,0,106,2,125,2,124,2,106, - 3,124,1,100,1,116,4,106,5,100,0,100,2,133,2,25, - 0,22,0,100,3,141,2,125,3,122,60,124,0,160,6,124, - 3,161,1,143,28,125,4,116,7,160,8,124,4,100,4,161, - 2,125,5,87,0,100,0,4,0,4,0,131,3,1,0,110, - 16,49,0,115,94,119,1,1,0,1,0,1,0,89,0,1, - 0,87,0,124,5,83,0,4,0,116,9,121,128,1,0,1, - 0,1,0,89,0,100,0,83,0,119,0,41,5,78,122,5, - 37,100,46,37,100,114,39,0,0,0,41,2,114,143,0,0, - 0,90,11,115,121,115,95,118,101,114,115,105,111,110,114,10, - 0,0,0,41,10,218,11,68,69,66,85,71,95,66,85,73, - 76,68,218,18,82,69,71,73,83,84,82,89,95,75,69,89, - 95,68,69,66,85,71,218,12,82,69,71,73,83,84,82,89, - 95,75,69,89,114,70,0,0,0,114,15,0,0,0,218,12, - 118,101,114,115,105,111,110,95,105,110,102,111,114,197,0,0, - 0,114,196,0,0,0,90,10,81,117,101,114,121,86,97,108, - 117,101,114,58,0,0,0,41,6,218,3,99,108,115,114,143, - 0,0,0,90,12,114,101,103,105,115,116,114,121,95,107,101, - 121,114,20,0,0,0,90,4,104,107,101,121,218,8,102,105, - 108,101,112,97,116,104,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,16,95,115,101,97,114,99,104,95,114, - 101,103,105,115,116,114,121,254,2,0,0,115,28,0,0,0, - 6,2,8,1,6,2,6,1,16,1,6,255,2,2,12,1, - 44,1,4,3,12,254,6,1,2,255,255,128,122,38,87,105, + 0,0,218,5,95,119,114,97,112,4,2,0,0,115,12,0, + 0,0,8,1,10,1,18,1,2,128,18,1,255,128,122,26, + 95,99,104,101,99,107,95,110,97,109,101,46,60,108,111,99, + 97,108,115,62,46,95,119,114,97,112,41,1,78,41,2,218, + 10,95,98,111,111,116,115,116,114,97,112,114,138,0,0,0, + 41,3,114,127,0,0,0,114,128,0,0,0,114,138,0,0, + 0,114,7,0,0,0,114,126,0,0,0,114,8,0,0,0, + 218,11,95,99,104,101,99,107,95,110,97,109,101,239,1,0, + 0,115,14,0,0,0,14,8,8,10,8,1,8,2,10,6, + 4,1,255,128,114,140,0,0,0,99,2,0,0,0,0,0, + 0,0,0,0,0,0,5,0,0,0,6,0,0,0,67,0, + 0,0,115,60,0,0,0,124,0,160,0,124,1,161,1,92, + 2,125,2,125,3,124,2,100,1,117,0,114,56,116,1,124, + 3,131,1,114,56,100,2,125,4,116,2,160,3,124,4,160, + 4,124,3,100,3,25,0,161,1,116,5,161,2,1,0,124, + 2,83,0,41,4,122,155,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,32,98,121,32,100,101,108,101,103,97,116,105, + 110,103,32,116,111,10,32,32,32,32,115,101,108,102,46,102, + 105,110,100,95,108,111,97,100,101,114,40,41,46,10,10,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,32,105,110,32, + 102,97,118,111,114,32,111,102,32,102,105,110,100,101,114,46, + 102,105,110,100,95,115,112,101,99,40,41,46,10,10,32,32, + 32,32,78,122,44,78,111,116,32,105,109,112,111,114,116,105, + 110,103,32,100,105,114,101,99,116,111,114,121,32,123,125,58, + 32,109,105,115,115,105,110,103,32,95,95,105,110,105,116,95, + 95,114,0,0,0,0,41,6,218,11,102,105,110,100,95,108, + 111,97,100,101,114,114,4,0,0,0,114,81,0,0,0,114, + 82,0,0,0,114,70,0,0,0,218,13,73,109,112,111,114, + 116,87,97,114,110,105,110,103,41,5,114,123,0,0,0,218, + 8,102,117,108,108,110,97,109,101,218,6,108,111,97,100,101, + 114,218,8,112,111,114,116,105,111,110,115,218,3,109,115,103, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 17,95,102,105,110,100,95,109,111,100,117,108,101,95,115,104, + 105,109,14,2,0,0,115,12,0,0,0,14,10,16,1,4, + 1,22,1,4,1,255,128,114,147,0,0,0,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,166,0,0,0,124,0,100,1,100,2, + 133,2,25,0,125,3,124,3,116,0,107,3,114,64,100,3, + 124,1,155,2,100,4,124,3,155,2,157,4,125,4,116,1, + 160,2,100,5,124,4,161,2,1,0,116,3,124,4,102,1, + 105,0,124,2,164,1,142,1,130,1,116,4,124,0,131,1, + 100,6,107,0,114,106,100,7,124,1,155,2,157,2,125,4, + 116,1,160,2,100,5,124,4,161,2,1,0,116,5,124,4, + 131,1,130,1,116,6,124,0,100,2,100,8,133,2,25,0, + 131,1,125,5,124,5,100,9,64,0,114,162,100,10,124,5, + 155,2,100,11,124,1,155,2,157,4,125,4,116,3,124,4, + 102,1,105,0,124,2,164,1,142,1,130,1,124,5,83,0, + 41,12,97,84,2,0,0,80,101,114,102,111,114,109,32,98, + 97,115,105,99,32,118,97,108,105,100,105,116,121,32,99,104, + 101,99,107,105,110,103,32,111,102,32,97,32,112,121,99,32, + 104,101,97,100,101,114,32,97,110,100,32,114,101,116,117,114, + 110,32,116,104,101,32,102,108,97,103,115,32,102,105,101,108, + 100,44,10,32,32,32,32,119,104,105,99,104,32,100,101,116, + 101,114,109,105,110,101,115,32,104,111,119,32,116,104,101,32, + 112,121,99,32,115,104,111,117,108,100,32,98,101,32,102,117, + 114,116,104,101,114,32,118,97,108,105,100,97,116,101,100,32, + 97,103,97,105,110,115,116,32,116,104,101,32,115,111,117,114, + 99,101,46,10,10,32,32,32,32,42,100,97,116,97,42,32, + 105,115,32,116,104,101,32,99,111,110,116,101,110,116,115,32, + 111,102,32,116,104,101,32,112,121,99,32,102,105,108,101,46, + 32,40,79,110,108,121,32,116,104,101,32,102,105,114,115,116, + 32,49,54,32,98,121,116,101,115,32,97,114,101,10,32,32, + 32,32,114,101,113,117,105,114,101,100,44,32,116,104,111,117, + 103,104,46,41,10,10,32,32,32,32,42,110,97,109,101,42, + 32,105,115,32,116,104,101,32,110,97,109,101,32,111,102,32, + 116,104,101,32,109,111,100,117,108,101,32,98,101,105,110,103, + 32,105,109,112,111,114,116,101,100,46,32,73,116,32,105,115, + 32,117,115,101,100,32,102,111,114,32,108,111,103,103,105,110, + 103,46,10,10,32,32,32,32,42,101,120,99,95,100,101,116, + 97,105,108,115,42,32,105,115,32,97,32,100,105,99,116,105, + 111,110,97,114,121,32,112,97,115,115,101,100,32,116,111,32, + 73,109,112,111,114,116,69,114,114,111,114,32,105,102,32,105, + 116,32,114,97,105,115,101,100,32,102,111,114,10,32,32,32, + 32,105,109,112,114,111,118,101,100,32,100,101,98,117,103,103, + 105,110,103,46,10,10,32,32,32,32,73,109,112,111,114,116, + 69,114,114,111,114,32,105,115,32,114,97,105,115,101,100,32, + 119,104,101,110,32,116,104,101,32,109,97,103,105,99,32,110, + 117,109,98,101,114,32,105,115,32,105,110,99,111,114,114,101, + 99,116,32,111,114,32,119,104,101,110,32,116,104,101,32,102, + 108,97,103,115,10,32,32,32,32,102,105,101,108,100,32,105, + 115,32,105,110,118,97,108,105,100,46,32,69,79,70,69,114, + 114,111,114,32,105,115,32,114,97,105,115,101,100,32,119,104, + 101,110,32,116,104,101,32,100,97,116,97,32,105,115,32,102, + 111,117,110,100,32,116,111,32,98,101,32,116,114,117,110,99, + 97,116,101,100,46,10,10,32,32,32,32,78,114,28,0,0, + 0,122,20,98,97,100,32,109,97,103,105,99,32,110,117,109, + 98,101,114,32,105,110,32,122,2,58,32,250,2,123,125,233, + 16,0,0,0,122,40,114,101,97,99,104,101,100,32,69,79, + 70,32,119,104,105,108,101,32,114,101,97,100,105,110,103,32, + 112,121,99,32,104,101,97,100,101,114,32,111,102,32,233,8, + 0,0,0,233,252,255,255,255,122,14,105,110,118,97,108,105, + 100,32,102,108,97,103,115,32,122,4,32,105,110,32,41,7, + 218,12,77,65,71,73,67,95,78,85,77,66,69,82,114,139, + 0,0,0,218,16,95,118,101,114,98,111,115,101,95,109,101, + 115,115,97,103,101,114,122,0,0,0,114,4,0,0,0,218, + 8,69,79,70,69,114,114,111,114,114,38,0,0,0,41,6, + 114,37,0,0,0,114,121,0,0,0,218,11,101,120,99,95, + 100,101,116,97,105,108,115,90,5,109,97,103,105,99,114,98, + 0,0,0,114,16,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,218,13,95,99,108,97,115,115,105, + 102,121,95,112,121,99,31,2,0,0,115,30,0,0,0,12, + 16,8,1,16,1,12,1,16,1,12,1,10,1,12,1,8, + 1,16,1,8,2,16,1,16,1,4,1,255,128,114,156,0, + 0,0,99,5,0,0,0,0,0,0,0,0,0,0,0,6, + 0,0,0,4,0,0,0,67,0,0,0,115,124,0,0,0, + 116,0,124,0,100,1,100,2,133,2,25,0,131,1,124,1, + 100,3,64,0,107,3,114,62,100,4,124,3,155,2,157,2, + 125,5,116,1,160,2,100,5,124,5,161,2,1,0,116,3, + 124,5,102,1,105,0,124,4,164,1,142,1,130,1,124,2, + 100,6,117,1,114,120,116,0,124,0,100,2,100,7,133,2, + 25,0,131,1,124,2,100,3,64,0,107,3,114,116,116,3, + 100,4,124,3,155,2,157,2,102,1,105,0,124,4,164,1, + 142,1,130,1,100,6,83,0,100,6,83,0,41,8,97,7, + 2,0,0,86,97,108,105,100,97,116,101,32,97,32,112,121, + 99,32,97,103,97,105,110,115,116,32,116,104,101,32,115,111, + 117,114,99,101,32,108,97,115,116,45,109,111,100,105,102,105, + 101,100,32,116,105,109,101,46,10,10,32,32,32,32,42,100, + 97,116,97,42,32,105,115,32,116,104,101,32,99,111,110,116, + 101,110,116,115,32,111,102,32,116,104,101,32,112,121,99,32, + 102,105,108,101,46,32,40,79,110,108,121,32,116,104,101,32, + 102,105,114,115,116,32,49,54,32,98,121,116,101,115,32,97, + 114,101,10,32,32,32,32,114,101,113,117,105,114,101,100,46, + 41,10,10,32,32,32,32,42,115,111,117,114,99,101,95,109, + 116,105,109,101,42,32,105,115,32,116,104,101,32,108,97,115, + 116,32,109,111,100,105,102,105,101,100,32,116,105,109,101,115, + 116,97,109,112,32,111,102,32,116,104,101,32,115,111,117,114, + 99,101,32,102,105,108,101,46,10,10,32,32,32,32,42,115, + 111,117,114,99,101,95,115,105,122,101,42,32,105,115,32,78, + 111,110,101,32,111,114,32,116,104,101,32,115,105,122,101,32, + 111,102,32,116,104,101,32,115,111,117,114,99,101,32,102,105, + 108,101,32,105,110,32,98,121,116,101,115,46,10,10,32,32, + 32,32,42,110,97,109,101,42,32,105,115,32,116,104,101,32, + 110,97,109,101,32,111,102,32,116,104,101,32,109,111,100,117, + 108,101,32,98,101,105,110,103,32,105,109,112,111,114,116,101, + 100,46,32,73,116,32,105,115,32,117,115,101,100,32,102,111, + 114,32,108,111,103,103,105,110,103,46,10,10,32,32,32,32, + 42,101,120,99,95,100,101,116,97,105,108,115,42,32,105,115, + 32,97,32,100,105,99,116,105,111,110,97,114,121,32,112,97, + 115,115,101,100,32,116,111,32,73,109,112,111,114,116,69,114, + 114,111,114,32,105,102,32,105,116,32,114,97,105,115,101,100, + 32,102,111,114,10,32,32,32,32,105,109,112,114,111,118,101, + 100,32,100,101,98,117,103,103,105,110,103,46,10,10,32,32, + 32,32,65,110,32,73,109,112,111,114,116,69,114,114,111,114, + 32,105,115,32,114,97,105,115,101,100,32,105,102,32,116,104, + 101,32,98,121,116,101,99,111,100,101,32,105,115,32,115,116, + 97,108,101,46,10,10,32,32,32,32,114,150,0,0,0,233, + 12,0,0,0,114,27,0,0,0,122,22,98,121,116,101,99, + 111,100,101,32,105,115,32,115,116,97,108,101,32,102,111,114, + 32,114,148,0,0,0,78,114,149,0,0,0,41,4,114,38, + 0,0,0,114,139,0,0,0,114,153,0,0,0,114,122,0, + 0,0,41,6,114,37,0,0,0,218,12,115,111,117,114,99, + 101,95,109,116,105,109,101,218,11,115,111,117,114,99,101,95, + 115,105,122,101,114,121,0,0,0,114,155,0,0,0,114,98, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,218,23,95,118,97,108,105,100,97,116,101,95,116,105, + 109,101,115,116,97,109,112,95,112,121,99,64,2,0,0,115, + 20,0,0,0,24,19,10,1,12,1,16,1,8,1,22,1, + 2,255,22,2,8,254,255,128,114,160,0,0,0,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,42,0,0,0,124,0,100,1,100, + 2,133,2,25,0,124,1,107,3,114,38,116,0,100,3,124, + 2,155,2,157,2,102,1,105,0,124,3,164,1,142,1,130, + 1,100,4,83,0,41,5,97,243,1,0,0,86,97,108,105, + 100,97,116,101,32,97,32,104,97,115,104,45,98,97,115,101, + 100,32,112,121,99,32,98,121,32,99,104,101,99,107,105,110, + 103,32,116,104,101,32,114,101,97,108,32,115,111,117,114,99, + 101,32,104,97,115,104,32,97,103,97,105,110,115,116,32,116, + 104,101,32,111,110,101,32,105,110,10,32,32,32,32,116,104, + 101,32,112,121,99,32,104,101,97,100,101,114,46,10,10,32, + 32,32,32,42,100,97,116,97,42,32,105,115,32,116,104,101, + 32,99,111,110,116,101,110,116,115,32,111,102,32,116,104,101, + 32,112,121,99,32,102,105,108,101,46,32,40,79,110,108,121, + 32,116,104,101,32,102,105,114,115,116,32,49,54,32,98,121, + 116,101,115,32,97,114,101,10,32,32,32,32,114,101,113,117, + 105,114,101,100,46,41,10,10,32,32,32,32,42,115,111,117, + 114,99,101,95,104,97,115,104,42,32,105,115,32,116,104,101, + 32,105,109,112,111,114,116,108,105,98,46,117,116,105,108,46, + 115,111,117,114,99,101,95,104,97,115,104,40,41,32,111,102, + 32,116,104,101,32,115,111,117,114,99,101,32,102,105,108,101, + 46,10,10,32,32,32,32,42,110,97,109,101,42,32,105,115, + 32,116,104,101,32,110,97,109,101,32,111,102,32,116,104,101, + 32,109,111,100,117,108,101,32,98,101,105,110,103,32,105,109, + 112,111,114,116,101,100,46,32,73,116,32,105,115,32,117,115, + 101,100,32,102,111,114,32,108,111,103,103,105,110,103,46,10, + 10,32,32,32,32,42,101,120,99,95,100,101,116,97,105,108, + 115,42,32,105,115,32,97,32,100,105,99,116,105,111,110,97, + 114,121,32,112,97,115,115,101,100,32,116,111,32,73,109,112, + 111,114,116,69,114,114,111,114,32,105,102,32,105,116,32,114, + 97,105,115,101,100,32,102,111,114,10,32,32,32,32,105,109, + 112,114,111,118,101,100,32,100,101,98,117,103,103,105,110,103, + 46,10,10,32,32,32,32,65,110,32,73,109,112,111,114,116, + 69,114,114,111,114,32,105,115,32,114,97,105,115,101,100,32, + 105,102,32,116,104,101,32,98,121,116,101,99,111,100,101,32, + 105,115,32,115,116,97,108,101,46,10,10,32,32,32,32,114, + 150,0,0,0,114,149,0,0,0,122,46,104,97,115,104,32, + 105,110,32,98,121,116,101,99,111,100,101,32,100,111,101,115, + 110,39,116,32,109,97,116,99,104,32,104,97,115,104,32,111, + 102,32,115,111,117,114,99,101,32,78,41,1,114,122,0,0, + 0,41,4,114,37,0,0,0,218,11,115,111,117,114,99,101, + 95,104,97,115,104,114,121,0,0,0,114,155,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,18, + 95,118,97,108,105,100,97,116,101,95,104,97,115,104,95,112, + 121,99,92,2,0,0,115,16,0,0,0,16,17,2,1,8, + 1,4,255,2,2,6,254,4,255,255,128,114,162,0,0,0, + 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,76,0,0,0,116,0, + 160,1,124,0,161,1,125,4,116,2,124,4,116,3,131,2, + 114,56,116,4,160,5,100,1,124,2,161,2,1,0,124,3, + 100,2,117,1,114,52,116,6,160,7,124,4,124,3,161,2, + 1,0,124,4,83,0,116,8,100,3,160,9,124,2,161,1, + 124,1,124,2,100,4,141,3,130,1,41,5,122,35,67,111, + 109,112,105,108,101,32,98,121,116,101,99,111,100,101,32,97, + 115,32,102,111,117,110,100,32,105,110,32,97,32,112,121,99, + 46,122,21,99,111,100,101,32,111,98,106,101,99,116,32,102, + 114,111,109,32,123,33,114,125,78,122,23,78,111,110,45,99, + 111,100,101,32,111,98,106,101,99,116,32,105,110,32,123,33, + 114,125,169,2,114,121,0,0,0,114,52,0,0,0,41,10, + 218,7,109,97,114,115,104,97,108,90,5,108,111,97,100,115, + 218,10,105,115,105,110,115,116,97,110,99,101,218,10,95,99, + 111,100,101,95,116,121,112,101,114,139,0,0,0,114,153,0, + 0,0,218,4,95,105,109,112,90,16,95,102,105,120,95,99, + 111,95,102,105,108,101,110,97,109,101,114,122,0,0,0,114, + 70,0,0,0,41,5,114,37,0,0,0,114,121,0,0,0, + 114,111,0,0,0,114,112,0,0,0,218,4,99,111,100,101, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 17,95,99,111,109,112,105,108,101,95,98,121,116,101,99,111, + 100,101,116,2,0,0,115,20,0,0,0,10,2,10,1,12, + 1,8,1,12,1,4,1,10,2,4,1,6,255,255,128,114, + 169,0,0,0,99,3,0,0,0,0,0,0,0,0,0,0, + 0,4,0,0,0,5,0,0,0,67,0,0,0,115,70,0, + 0,0,116,0,116,1,131,1,125,3,124,3,160,2,116,3, + 100,1,131,1,161,1,1,0,124,3,160,2,116,3,124,1, + 131,1,161,1,1,0,124,3,160,2,116,3,124,2,131,1, + 161,1,1,0,124,3,160,2,116,4,160,5,124,0,161,1, + 161,1,1,0,124,3,83,0,41,3,122,43,80,114,111,100, + 117,99,101,32,116,104,101,32,100,97,116,97,32,102,111,114, + 32,97,32,116,105,109,101,115,116,97,109,112,45,98,97,115, + 101,100,32,112,121,99,46,114,0,0,0,0,78,41,6,218, + 9,98,121,116,101,97,114,114,97,121,114,152,0,0,0,218, + 6,101,120,116,101,110,100,114,33,0,0,0,114,164,0,0, + 0,218,5,100,117,109,112,115,41,4,114,168,0,0,0,218, + 5,109,116,105,109,101,114,159,0,0,0,114,37,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, + 22,95,99,111,100,101,95,116,111,95,116,105,109,101,115,116, + 97,109,112,95,112,121,99,129,2,0,0,115,14,0,0,0, + 8,2,14,1,14,1,14,1,16,1,4,1,255,128,114,174, + 0,0,0,84,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,80,0, + 0,0,116,0,116,1,131,1,125,3,100,1,124,2,100,1, + 62,0,66,0,125,4,124,3,160,2,116,3,124,4,131,1, + 161,1,1,0,116,4,124,1,131,1,100,2,107,2,115,50, + 74,0,130,1,124,3,160,2,124,1,161,1,1,0,124,3, + 160,2,116,5,160,6,124,0,161,1,161,1,1,0,124,3, + 83,0,41,4,122,38,80,114,111,100,117,99,101,32,116,104, + 101,32,100,97,116,97,32,102,111,114,32,97,32,104,97,115, + 104,45,98,97,115,101,100,32,112,121,99,46,114,3,0,0, + 0,114,150,0,0,0,78,41,7,114,170,0,0,0,114,152, + 0,0,0,114,171,0,0,0,114,33,0,0,0,114,4,0, + 0,0,114,164,0,0,0,114,172,0,0,0,41,5,114,168, + 0,0,0,114,161,0,0,0,90,7,99,104,101,99,107,101, + 100,114,37,0,0,0,114,16,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,17,95,99,111,100, + 101,95,116,111,95,104,97,115,104,95,112,121,99,139,2,0, + 0,115,16,0,0,0,8,2,12,1,14,1,16,1,10,1, + 16,1,4,1,255,128,114,175,0,0,0,99,1,0,0,0, + 0,0,0,0,0,0,0,0,5,0,0,0,6,0,0,0, + 67,0,0,0,115,62,0,0,0,100,1,100,2,108,0,125, + 1,116,1,160,2,124,0,161,1,106,3,125,2,124,1,160, + 4,124,2,161,1,125,3,116,1,160,5,100,2,100,3,161, + 2,125,4,124,4,160,6,124,0,160,6,124,3,100,1,25, + 0,161,1,161,1,83,0,41,4,122,121,68,101,99,111,100, + 101,32,98,121,116,101,115,32,114,101,112,114,101,115,101,110, + 116,105,110,103,32,115,111,117,114,99,101,32,99,111,100,101, + 32,97,110,100,32,114,101,116,117,114,110,32,116,104,101,32, + 115,116,114,105,110,103,46,10,10,32,32,32,32,85,110,105, + 118,101,114,115,97,108,32,110,101,119,108,105,110,101,32,115, + 117,112,112,111,114,116,32,105,115,32,117,115,101,100,32,105, + 110,32,116,104,101,32,100,101,99,111,100,105,110,103,46,10, + 32,32,32,32,114,0,0,0,0,78,84,41,7,218,8,116, + 111,107,101,110,105,122,101,114,72,0,0,0,90,7,66,121, + 116,101,115,73,79,90,8,114,101,97,100,108,105,110,101,90, + 15,100,101,116,101,99,116,95,101,110,99,111,100,105,110,103, + 90,25,73,110,99,114,101,109,101,110,116,97,108,78,101,119, + 108,105,110,101,68,101,99,111,100,101,114,218,6,100,101,99, + 111,100,101,41,5,218,12,115,111,117,114,99,101,95,98,121, + 116,101,115,114,176,0,0,0,90,21,115,111,117,114,99,101, + 95,98,121,116,101,115,95,114,101,97,100,108,105,110,101,218, + 8,101,110,99,111,100,105,110,103,90,15,110,101,119,108,105, + 110,101,95,100,101,99,111,100,101,114,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,13,100,101,99,111,100, + 101,95,115,111,117,114,99,101,150,2,0,0,115,12,0,0, + 0,8,5,12,1,10,1,12,1,20,1,255,128,114,180,0, + 0,0,169,2,114,144,0,0,0,218,26,115,117,98,109,111, + 100,117,108,101,95,115,101,97,114,99,104,95,108,111,99,97, + 116,105,111,110,115,99,2,0,0,0,0,0,0,0,2,0, + 0,0,9,0,0,0,8,0,0,0,67,0,0,0,115,16, + 1,0,0,124,1,100,1,117,0,114,58,100,2,125,1,116, + 0,124,2,100,3,131,2,114,56,122,14,124,2,160,1,124, + 0,161,1,125,1,87,0,110,30,4,0,116,2,144,1,121, + 14,1,0,1,0,1,0,89,0,110,12,110,10,116,3,160, + 4,124,1,161,1,125,1,116,5,106,6,124,0,124,2,124, + 1,100,4,141,3,125,4,100,5,124,4,95,7,124,2,100, + 1,117,0,114,152,116,8,131,0,68,0,93,42,92,2,125, + 5,125,6,124,1,160,9,116,10,124,6,131,1,161,1,114, + 146,124,5,124,0,124,1,131,2,125,2,124,2,124,4,95, + 11,1,0,113,152,113,104,100,1,83,0,124,3,116,12,117, + 0,114,216,116,0,124,2,100,6,131,2,114,214,122,14,124, + 2,160,13,124,0,161,1,125,7,87,0,110,18,4,0,116, + 2,144,1,121,12,1,0,1,0,1,0,89,0,110,18,124, + 7,114,214,103,0,124,4,95,14,110,6,124,3,124,4,95, + 14,124,4,106,14,103,0,107,2,144,1,114,8,124,1,144, + 1,114,8,116,15,124,1,131,1,100,7,25,0,125,8,124, + 4,106,14,160,16,124,8,161,1,1,0,124,4,83,0,119, + 0,119,0,41,8,97,61,1,0,0,82,101,116,117,114,110, + 32,97,32,109,111,100,117,108,101,32,115,112,101,99,32,98, + 97,115,101,100,32,111,110,32,97,32,102,105,108,101,32,108, + 111,99,97,116,105,111,110,46,10,10,32,32,32,32,84,111, + 32,105,110,100,105,99,97,116,101,32,116,104,97,116,32,116, + 104,101,32,109,111,100,117,108,101,32,105,115,32,97,32,112, + 97,99,107,97,103,101,44,32,115,101,116,10,32,32,32,32, + 115,117,98,109,111,100,117,108,101,95,115,101,97,114,99,104, + 95,108,111,99,97,116,105,111,110,115,32,116,111,32,97,32, + 108,105,115,116,32,111,102,32,100,105,114,101,99,116,111,114, + 121,32,112,97,116,104,115,46,32,32,65,110,10,32,32,32, + 32,101,109,112,116,121,32,108,105,115,116,32,105,115,32,115, + 117,102,102,105,99,105,101,110,116,44,32,116,104,111,117,103, + 104,32,105,116,115,32,110,111,116,32,111,116,104,101,114,119, + 105,115,101,32,117,115,101,102,117,108,32,116,111,32,116,104, + 101,10,32,32,32,32,105,109,112,111,114,116,32,115,121,115, + 116,101,109,46,10,10,32,32,32,32,84,104,101,32,108,111, + 97,100,101,114,32,109,117,115,116,32,116,97,107,101,32,97, + 32,115,112,101,99,32,97,115,32,105,116,115,32,111,110,108, + 121,32,95,95,105,110,105,116,95,95,40,41,32,97,114,103, + 46,10,10,32,32,32,32,78,122,9,60,117,110,107,110,111, + 119,110,62,218,12,103,101,116,95,102,105,108,101,110,97,109, + 101,169,1,218,6,111,114,105,103,105,110,84,218,10,105,115, + 95,112,97,99,107,97,103,101,114,0,0,0,0,41,17,114, + 133,0,0,0,114,183,0,0,0,114,122,0,0,0,114,18, + 0,0,0,114,85,0,0,0,114,139,0,0,0,218,10,77, + 111,100,117,108,101,83,112,101,99,90,13,95,115,101,116,95, + 102,105,108,101,97,116,116,114,218,27,95,103,101,116,95,115, + 117,112,112,111,114,116,101,100,95,102,105,108,101,95,108,111, + 97,100,101,114,115,114,115,0,0,0,114,116,0,0,0,114, + 144,0,0,0,218,9,95,80,79,80,85,76,65,84,69,114, + 186,0,0,0,114,182,0,0,0,114,55,0,0,0,218,6, + 97,112,112,101,110,100,41,9,114,121,0,0,0,90,8,108, + 111,99,97,116,105,111,110,114,144,0,0,0,114,182,0,0, + 0,218,4,115,112,101,99,218,12,108,111,97,100,101,114,95, + 99,108,97,115,115,218,8,115,117,102,102,105,120,101,115,114, + 186,0,0,0,90,7,100,105,114,110,97,109,101,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,23,115,112, + 101,99,95,102,114,111,109,95,102,105,108,101,95,108,111,99, + 97,116,105,111,110,167,2,0,0,115,74,0,0,0,8,12, + 4,4,10,1,2,2,14,1,14,1,4,1,2,251,10,7, + 16,8,6,1,8,3,14,1,14,1,10,1,6,1,4,1, + 2,253,4,5,8,3,10,2,2,1,14,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,0,90,1,100, + 0,90,2,100,1,90,3,100,2,90,4,100,3,90,5,101, + 6,111,30,100,4,101,7,118,0,90,8,101,9,100,5,100, + 6,132,0,131,1,90,10,101,11,100,7,100,8,132,0,131, + 1,90,12,101,11,100,14,100,10,100,11,132,1,131,1,90, + 13,101,11,100,15,100,12,100,13,132,1,131,1,90,14,100, + 9,83,0,41,16,218,21,87,105,110,100,111,119,115,82,101, + 103,105,115,116,114,121,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,109,111,100,117,108,101,115,32,100,101,99,108,97, + 114,101,100,32,105,110,32,116,104,101,32,87,105,110,100,111, + 119,115,32,114,101,103,105,115,116,114,121,46,122,59,83,111, + 102,116,119,97,114,101,92,80,121,116,104,111,110,92,80,121, + 116,104,111,110,67,111,114,101,92,123,115,121,115,95,118,101, + 114,115,105,111,110,125,92,77,111,100,117,108,101,115,92,123, + 102,117,108,108,110,97,109,101,125,122,65,83,111,102,116,119, + 97,114,101,92,80,121,116,104,111,110,92,80,121,116,104,111, + 110,67,111,114,101,92,123,115,121,115,95,118,101,114,115,105, + 111,110,125,92,77,111,100,117,108,101,115,92,123,102,117,108, + 108,110,97,109,101,125,92,68,101,98,117,103,122,6,95,100, + 46,112,121,100,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,50,0, + 0,0,122,16,116,0,160,1,116,0,106,2,124,0,161,2, + 87,0,83,0,4,0,116,3,121,48,1,0,1,0,1,0, + 116,0,160,1,116,0,106,4,124,0,161,2,6,0,89,0, + 83,0,119,0,114,114,0,0,0,41,5,218,6,119,105,110, + 114,101,103,90,7,79,112,101,110,75,101,121,90,17,72,75, + 69,89,95,67,85,82,82,69,78,84,95,85,83,69,82,114, + 58,0,0,0,90,18,72,75,69,89,95,76,79,67,65,76, + 95,77,65,67,72,73,78,69,114,19,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,14,95,111, + 112,101,110,95,114,101,103,105,115,116,114,121,247,2,0,0, + 115,12,0,0,0,2,2,16,1,12,1,18,1,2,255,255, + 128,122,36,87,105,110,100,111,119,115,82,101,103,105,115,116, + 114,121,70,105,110,100,101,114,46,95,111,112,101,110,95,114, + 101,103,105,115,116,114,121,99,2,0,0,0,0,0,0,0, + 0,0,0,0,6,0,0,0,8,0,0,0,67,0,0,0, + 115,130,0,0,0,124,0,106,0,114,14,124,0,106,1,125, + 2,110,6,124,0,106,2,125,2,124,2,106,3,124,1,100, + 1,116,4,106,5,100,0,100,2,133,2,25,0,22,0,100, + 3,141,2,125,3,122,60,124,0,160,6,124,3,161,1,143, + 28,125,4,116,7,160,8,124,4,100,4,161,2,125,5,87, + 0,100,0,4,0,4,0,131,3,1,0,110,16,49,0,115, + 94,119,1,1,0,1,0,1,0,89,0,1,0,87,0,124, + 5,83,0,4,0,116,9,121,128,1,0,1,0,1,0,89, + 0,100,0,83,0,119,0,41,5,78,122,5,37,100,46,37, + 100,114,39,0,0,0,41,2,114,143,0,0,0,90,11,115, + 121,115,95,118,101,114,115,105,111,110,114,10,0,0,0,41, + 10,218,11,68,69,66,85,71,95,66,85,73,76,68,218,18, + 82,69,71,73,83,84,82,89,95,75,69,89,95,68,69,66, + 85,71,218,12,82,69,71,73,83,84,82,89,95,75,69,89, + 114,70,0,0,0,114,15,0,0,0,218,12,118,101,114,115, + 105,111,110,95,105,110,102,111,114,197,0,0,0,114,196,0, + 0,0,90,10,81,117,101,114,121,86,97,108,117,101,114,58, + 0,0,0,41,6,218,3,99,108,115,114,143,0,0,0,90, + 12,114,101,103,105,115,116,114,121,95,107,101,121,114,20,0, + 0,0,90,4,104,107,101,121,218,8,102,105,108,101,112,97, + 116,104,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,16,95,115,101,97,114,99,104,95,114,101,103,105,115, + 116,114,121,254,2,0,0,115,30,0,0,0,6,2,8,1, + 6,2,6,1,16,1,6,255,2,2,12,1,26,1,18,128, + 4,3,12,254,6,1,2,255,255,128,122,38,87,105,110,100, + 111,119,115,82,101,103,105,115,116,114,121,70,105,110,100,101, + 114,46,95,115,101,97,114,99,104,95,114,101,103,105,115,116, + 114,121,78,99,4,0,0,0,0,0,0,0,0,0,0,0, + 8,0,0,0,8,0,0,0,67,0,0,0,115,120,0,0, + 0,124,0,160,0,124,1,161,1,125,4,124,4,100,0,117, + 0,114,22,100,0,83,0,122,12,116,1,124,4,131,1,1, + 0,87,0,110,18,4,0,116,2,121,118,1,0,1,0,1, + 0,89,0,100,0,83,0,116,3,131,0,68,0,93,52,92, + 2,125,5,125,6,124,4,160,4,116,5,124,6,131,1,161, + 1,114,112,116,6,106,7,124,1,124,5,124,1,124,4,131, + 2,124,4,100,1,141,3,125,7,124,7,2,0,1,0,83, + 0,113,60,100,0,83,0,119,0,41,2,78,114,184,0,0, + 0,41,8,114,204,0,0,0,114,57,0,0,0,114,58,0, + 0,0,114,188,0,0,0,114,115,0,0,0,114,116,0,0, + 0,114,139,0,0,0,218,16,115,112,101,99,95,102,114,111, + 109,95,108,111,97,100,101,114,41,8,114,202,0,0,0,114, + 143,0,0,0,114,52,0,0,0,218,6,116,97,114,103,101, + 116,114,203,0,0,0,114,144,0,0,0,114,193,0,0,0, + 114,191,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,9,102,105,110,100,95,115,112,101,99,13, + 3,0,0,115,36,0,0,0,10,2,8,1,4,1,2,1, + 12,1,12,1,6,1,14,1,14,1,6,1,8,1,2,1, + 6,254,8,3,2,252,4,255,2,254,255,128,122,31,87,105, 110,100,111,119,115,82,101,103,105,115,116,114,121,70,105,110, - 100,101,114,46,95,115,101,97,114,99,104,95,114,101,103,105, - 115,116,114,121,78,99,4,0,0,0,0,0,0,0,0,0, - 0,0,8,0,0,0,8,0,0,0,67,0,0,0,115,120, - 0,0,0,124,0,160,0,124,1,161,1,125,4,124,4,100, - 0,117,0,114,22,100,0,83,0,122,12,116,1,124,4,131, - 1,1,0,87,0,110,18,4,0,116,2,121,118,1,0,1, - 0,1,0,89,0,100,0,83,0,116,3,131,0,68,0,93, - 52,92,2,125,5,125,6,124,4,160,4,116,5,124,6,131, - 1,161,1,114,112,116,6,106,7,124,1,124,5,124,1,124, - 4,131,2,124,4,100,1,141,3,125,7,124,7,2,0,1, - 0,83,0,113,60,100,0,83,0,119,0,41,2,78,114,184, - 0,0,0,41,8,114,204,0,0,0,114,57,0,0,0,114, - 58,0,0,0,114,188,0,0,0,114,115,0,0,0,114,116, - 0,0,0,114,139,0,0,0,218,16,115,112,101,99,95,102, - 114,111,109,95,108,111,97,100,101,114,41,8,114,202,0,0, - 0,114,143,0,0,0,114,52,0,0,0,218,6,116,97,114, - 103,101,116,114,203,0,0,0,114,144,0,0,0,114,193,0, + 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,1,114,26,124, + 3,106,1,83,0,100,1,83,0,41,2,122,108,70,105,110, + 100,32,109,111,100,117,108,101,32,110,97,109,101,100,32,105, + 110,32,116,104,101,32,114,101,103,105,115,116,114,121,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,169,2,114,207,0,0, + 0,114,144,0,0,0,169,4,114,202,0,0,0,114,143,0, + 0,0,114,52,0,0,0,114,191,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,11,102,105,110, + 100,95,109,111,100,117,108,101,29,3,0,0,115,10,0,0, + 0,12,7,8,1,6,1,4,2,255,128,122,33,87,105,110, + 100,111,119,115,82,101,103,105,115,116,114,121,70,105,110,100, + 101,114,46,102,105,110,100,95,109,111,100,117,108,101,41,2, + 78,78,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,200,0,0,0, + 114,199,0,0,0,218,11,95,77,83,95,87,73,78,68,79, + 87,83,218,18,69,88,84,69,78,83,73,79,78,95,83,85, + 70,70,73,88,69,83,114,198,0,0,0,218,12,115,116,97, + 116,105,99,109,101,116,104,111,100,114,197,0,0,0,218,11, + 99,108,97,115,115,109,101,116,104,111,100,114,204,0,0,0, + 114,207,0,0,0,114,210,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,195, + 0,0,0,235,2,0,0,115,32,0,0,0,8,0,4,2, + 2,3,2,255,2,4,2,255,12,3,2,2,10,1,2,6, + 10,1,2,14,12,1,2,15,16,1,255,128,114,195,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,48,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,83,0,41, + 11,218,13,95,76,111,97,100,101,114,66,97,115,105,99,115, + 122,83,66,97,115,101,32,99,108,97,115,115,32,111,102,32, + 99,111,109,109,111,110,32,99,111,100,101,32,110,101,101,100, + 101,100,32,98,121,32,98,111,116,104,32,83,111,117,114,99, + 101,76,111,97,100,101,114,32,97,110,100,10,32,32,32,32, + 83,111,117,114,99,101,108,101,115,115,70,105,108,101,76,111, + 97,100,101,114,46,99,2,0,0,0,0,0,0,0,0,0, + 0,0,5,0,0,0,4,0,0,0,67,0,0,0,115,64, + 0,0,0,116,0,124,0,160,1,124,1,161,1,131,1,100, + 1,25,0,125,2,124,2,160,2,100,2,100,1,161,2,100, + 3,25,0,125,3,124,1,160,3,100,2,161,1,100,4,25, + 0,125,4,124,3,100,5,107,2,111,62,124,4,100,5,107, + 3,83,0,41,7,122,141,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,73,110,115,112,101,99,116,76,111,97,100,101,114,46, + 105,115,95,112,97,99,107,97,103,101,32,98,121,32,99,104, + 101,99,107,105,110,103,32,105,102,10,32,32,32,32,32,32, + 32,32,116,104,101,32,112,97,116,104,32,114,101,116,117,114, + 110,101,100,32,98,121,32,103,101,116,95,102,105,108,101,110, + 97,109,101,32,104,97,115,32,97,32,102,105,108,101,110,97, + 109,101,32,111,102,32,39,95,95,105,110,105,116,95,95,46, + 112,121,39,46,114,3,0,0,0,114,79,0,0,0,114,0, + 0,0,0,114,39,0,0,0,218,8,95,95,105,110,105,116, + 95,95,78,41,4,114,55,0,0,0,114,183,0,0,0,114, + 51,0,0,0,114,49,0,0,0,41,5,114,123,0,0,0, + 114,143,0,0,0,114,101,0,0,0,90,13,102,105,108,101, + 110,97,109,101,95,98,97,115,101,90,9,116,97,105,108,95, + 110,97,109,101,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,186,0,0,0,48,3,0,0,115,10,0,0, + 0,18,3,16,1,14,1,16,1,255,128,122,24,95,76,111, + 97,100,101,114,66,97,115,105,99,115,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,169,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,7,0,0,0,169,2,114,123,0, 0,0,114,191,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,9,102,105,110,100,95,115,112,101, - 99,13,3,0,0,115,36,0,0,0,10,2,8,1,4,1, - 2,1,12,1,12,1,6,1,14,1,14,1,6,1,8,1, - 2,1,6,254,8,3,2,128,4,251,2,254,255,128,122,31, - 87,105,110,100,111,119,115,82,101,103,105,115,116,114,121,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,1,114, - 26,124,3,106,1,83,0,100,1,83,0,41,2,122,108,70, - 105,110,100,32,109,111,100,117,108,101,32,110,97,109,101,100, - 32,105,110,32,116,104,101,32,114,101,103,105,115,116,114,121, - 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,169,2,114,207, - 0,0,0,114,144,0,0,0,169,4,114,202,0,0,0,114, - 143,0,0,0,114,52,0,0,0,114,191,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,11,102, - 105,110,100,95,109,111,100,117,108,101,29,3,0,0,115,10, - 0,0,0,12,7,8,1,6,1,4,2,255,128,122,33,87, - 105,110,100,111,119,115,82,101,103,105,115,116,114,121,70,105, - 110,100,101,114,46,102,105,110,100,95,109,111,100,117,108,101, - 41,2,78,78,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,200,0, - 0,0,114,199,0,0,0,218,11,95,77,83,95,87,73,78, - 68,79,87,83,218,18,69,88,84,69,78,83,73,79,78,95, - 83,85,70,70,73,88,69,83,114,198,0,0,0,218,12,115, - 116,97,116,105,99,109,101,116,104,111,100,114,197,0,0,0, - 218,11,99,108,97,115,115,109,101,116,104,111,100,114,204,0, - 0,0,114,207,0,0,0,114,210,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,195,0,0,0,235,2,0,0,115,32,0,0,0,8,0, - 4,2,2,3,2,255,2,4,2,255,12,3,2,2,10,1, - 2,6,10,1,2,14,12,1,2,15,16,1,255,128,114,195, - 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,48,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,83, - 0,41,11,218,13,95,76,111,97,100,101,114,66,97,115,105, - 99,115,122,83,66,97,115,101,32,99,108,97,115,115,32,111, - 102,32,99,111,109,109,111,110,32,99,111,100,101,32,110,101, - 101,100,101,100,32,98,121,32,98,111,116,104,32,83,111,117, - 114,99,101,76,111,97,100,101,114,32,97,110,100,10,32,32, - 32,32,83,111,117,114,99,101,108,101,115,115,70,105,108,101, - 76,111,97,100,101,114,46,99,2,0,0,0,0,0,0,0, - 0,0,0,0,5,0,0,0,4,0,0,0,67,0,0,0, - 115,64,0,0,0,116,0,124,0,160,1,124,1,161,1,131, - 1,100,1,25,0,125,2,124,2,160,2,100,2,100,1,161, - 2,100,3,25,0,125,3,124,1,160,3,100,2,161,1,100, - 4,25,0,125,4,124,3,100,5,107,2,111,62,124,4,100, - 5,107,3,83,0,41,7,122,141,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,73,110,115,112,101,99,116,76,111,97,100,101, - 114,46,105,115,95,112,97,99,107,97,103,101,32,98,121,32, - 99,104,101,99,107,105,110,103,32,105,102,10,32,32,32,32, - 32,32,32,32,116,104,101,32,112,97,116,104,32,114,101,116, - 117,114,110,101,100,32,98,121,32,103,101,116,95,102,105,108, - 101,110,97,109,101,32,104,97,115,32,97,32,102,105,108,101, - 110,97,109,101,32,111,102,32,39,95,95,105,110,105,116,95, - 95,46,112,121,39,46,114,3,0,0,0,114,79,0,0,0, - 114,0,0,0,0,114,39,0,0,0,218,8,95,95,105,110, - 105,116,95,95,78,41,4,114,55,0,0,0,114,183,0,0, - 0,114,51,0,0,0,114,49,0,0,0,41,5,114,123,0, - 0,0,114,143,0,0,0,114,101,0,0,0,90,13,102,105, - 108,101,110,97,109,101,95,98,97,115,101,90,9,116,97,105, - 108,95,110,97,109,101,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,186,0,0,0,48,3,0,0,115,10, - 0,0,0,18,3,16,1,14,1,16,1,255,128,122,24,95, - 76,111,97,100,101,114,66,97,115,105,99,115,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,169,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,7,0,0,0,169,2,114, - 123,0,0,0,114,191,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,218,13,99,114,101,97,116,101, - 95,109,111,100,117,108,101,56,3,0,0,115,4,0,0,0, - 4,0,255,128,122,27,95,76,111,97,100,101,114,66,97,115, - 105,99,115,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,3,0, - 0,0,5,0,0,0,67,0,0,0,115,56,0,0,0,124, - 0,160,0,124,1,106,1,161,1,125,2,124,2,100,1,117, - 0,114,36,116,2,100,2,160,3,124,1,106,1,161,1,131, - 1,130,1,116,4,160,5,116,6,124,2,124,1,106,7,161, - 3,1,0,100,1,83,0,41,3,122,19,69,120,101,99,117, - 116,101,32,116,104,101,32,109,111,100,117,108,101,46,78,122, - 52,99,97,110,110,111,116,32,108,111,97,100,32,109,111,100, - 117,108,101,32,123,33,114,125,32,119,104,101,110,32,103,101, - 116,95,99,111,100,101,40,41,32,114,101,116,117,114,110,115, - 32,78,111,110,101,41,8,218,8,103,101,116,95,99,111,100, - 101,114,130,0,0,0,114,122,0,0,0,114,70,0,0,0, - 114,139,0,0,0,218,25,95,99,97,108,108,95,119,105,116, - 104,95,102,114,97,109,101,115,95,114,101,109,111,118,101,100, - 218,4,101,120,101,99,114,136,0,0,0,41,3,114,123,0, - 0,0,218,6,109,111,100,117,108,101,114,168,0,0,0,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,11, - 101,120,101,99,95,109,111,100,117,108,101,59,3,0,0,115, - 14,0,0,0,12,2,8,1,6,1,4,1,6,255,20,2, - 255,128,122,25,95,76,111,97,100,101,114,66,97,115,105,99, - 115,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,12,0,0,0,116,0,160,1,124, - 0,124,1,161,2,83,0,41,2,122,26,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,78,41,2,114,139,0,0,0,218,17,95, - 108,111,97,100,95,109,111,100,117,108,101,95,115,104,105,109, - 169,2,114,123,0,0,0,114,143,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,11,108,111,97, - 100,95,109,111,100,117,108,101,67,3,0,0,115,4,0,0, - 0,12,3,255,128,122,25,95,76,111,97,100,101,114,66,97, - 115,105,99,115,46,108,111,97,100,95,109,111,100,117,108,101, - 78,41,8,114,130,0,0,0,114,129,0,0,0,114,131,0, - 0,0,114,132,0,0,0,114,186,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, - 215,0,0,0,43,3,0,0,115,14,0,0,0,8,0,4, - 2,8,3,8,8,8,3,12,8,255,128,114,215,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,74,0,0,0,101,0, - 90,1,100,0,90,2,100,1,100,2,132,0,90,3,100,3, - 100,4,132,0,90,4,100,5,100,6,132,0,90,5,100,7, - 100,8,132,0,90,6,100,9,100,10,132,0,90,7,100,11, - 100,12,156,1,100,13,100,14,132,2,90,8,100,15,100,16, - 132,0,90,9,100,17,83,0,41,18,218,12,83,111,117,114, - 99,101,76,111,97,100,101,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,116,0,130,1,41,2,122,165,79,112, - 116,105,111,110,97,108,32,109,101,116,104,111,100,32,116,104, - 97,116,32,114,101,116,117,114,110,115,32,116,104,101,32,109, - 111,100,105,102,105,99,97,116,105,111,110,32,116,105,109,101, - 32,40,97,110,32,105,110,116,41,32,102,111,114,32,116,104, - 101,10,32,32,32,32,32,32,32,32,115,112,101,99,105,102, - 105,101,100,32,112,97,116,104,32,40,97,32,115,116,114,41, - 46,10,10,32,32,32,32,32,32,32,32,82,97,105,115,101, - 115,32,79,83,69,114,114,111,114,32,119,104,101,110,32,116, - 104,101,32,112,97,116,104,32,99,97,110,110,111,116,32,98, - 101,32,104,97,110,100,108,101,100,46,10,32,32,32,32,32, - 32,32,32,78,41,1,114,58,0,0,0,169,2,114,123,0, - 0,0,114,52,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,10,112,97,116,104,95,109,116,105, - 109,101,75,3,0,0,115,4,0,0,0,4,6,255,128,122, - 23,83,111,117,114,99,101,76,111,97,100,101,114,46,112,97, - 116,104,95,109,116,105,109,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,14,0,0,0,100,1,124,0,160,0,124,1,161,1, - 105,1,83,0,41,3,97,158,1,0,0,79,112,116,105,111, - 110,97,108,32,109,101,116,104,111,100,32,114,101,116,117,114, - 110,105,110,103,32,97,32,109,101,116,97,100,97,116,97,32, - 100,105,99,116,32,102,111,114,32,116,104,101,32,115,112,101, - 99,105,102,105,101,100,10,32,32,32,32,32,32,32,32,112, - 97,116,104,32,40,97,32,115,116,114,41,46,10,10,32,32, - 32,32,32,32,32,32,80,111,115,115,105,98,108,101,32,107, - 101,121,115,58,10,32,32,32,32,32,32,32,32,45,32,39, - 109,116,105,109,101,39,32,40,109,97,110,100,97,116,111,114, - 121,41,32,105,115,32,116,104,101,32,110,117,109,101,114,105, - 99,32,116,105,109,101,115,116,97,109,112,32,111,102,32,108, - 97,115,116,32,115,111,117,114,99,101,10,32,32,32,32,32, - 32,32,32,32,32,99,111,100,101,32,109,111,100,105,102,105, - 99,97,116,105,111,110,59,10,32,32,32,32,32,32,32,32, - 45,32,39,115,105,122,101,39,32,40,111,112,116,105,111,110, - 97,108,41,32,105,115,32,116,104,101,32,115,105,122,101,32, - 105,110,32,98,121,116,101,115,32,111,102,32,116,104,101,32, - 115,111,117,114,99,101,32,99,111,100,101,46,10,10,32,32, - 32,32,32,32,32,32,73,109,112,108,101,109,101,110,116,105, - 110,103,32,116,104,105,115,32,109,101,116,104,111,100,32,97, - 108,108,111,119,115,32,116,104,101,32,108,111,97,100,101,114, - 32,116,111,32,114,101,97,100,32,98,121,116,101,99,111,100, - 101,32,102,105,108,101,115,46,10,32,32,32,32,32,32,32, - 32,82,97,105,115,101,115,32,79,83,69,114,114,111,114,32, - 119,104,101,110,32,116,104,101,32,112,97,116,104,32,99,97, - 110,110,111,116,32,98,101,32,104,97,110,100,108,101,100,46, - 10,32,32,32,32,32,32,32,32,114,173,0,0,0,78,41, - 1,114,230,0,0,0,114,229,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,218,10,112,97,116,104, - 95,115,116,97,116,115,83,3,0,0,115,4,0,0,0,14, - 12,255,128,122,23,83,111,117,114,99,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,4,0,0,0,4,0,0, - 0,67,0,0,0,115,12,0,0,0,124,0,160,0,124,2, - 124,3,161,2,83,0,41,2,122,228,79,112,116,105,111,110, - 97,108,32,109,101,116,104,111,100,32,119,104,105,99,104,32, - 119,114,105,116,101,115,32,100,97,116,97,32,40,98,121,116, - 101,115,41,32,116,111,32,97,32,102,105,108,101,32,112,97, - 116,104,32,40,97,32,115,116,114,41,46,10,10,32,32,32, - 32,32,32,32,32,73,109,112,108,101,109,101,110,116,105,110, - 103,32,116,104,105,115,32,109,101,116,104,111,100,32,97,108, - 108,111,119,115,32,102,111,114,32,116,104,101,32,119,114,105, - 116,105,110,103,32,111,102,32,98,121,116,101,99,111,100,101, - 32,102,105,108,101,115,46,10,10,32,32,32,32,32,32,32, - 32,84,104,101,32,115,111,117,114,99,101,32,112,97,116,104, - 32,105,115,32,110,101,101,100,101,100,32,105,110,32,111,114, - 100,101,114,32,116,111,32,99,111,114,114,101,99,116,108,121, - 32,116,114,97,110,115,102,101,114,32,112,101,114,109,105,115, - 115,105,111,110,115,10,32,32,32,32,32,32,32,32,78,41, - 1,218,8,115,101,116,95,100,97,116,97,41,4,114,123,0, - 0,0,114,112,0,0,0,90,10,99,97,99,104,101,95,112, - 97,116,104,114,37,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,15,95,99,97,99,104,101,95, - 98,121,116,101,99,111,100,101,97,3,0,0,115,4,0,0, - 0,12,8,255,128,122,28,83,111,117,114,99,101,76,111,97, - 100,101,114,46,95,99,97,99,104,101,95,98,121,116,101,99, - 111,100,101,99,3,0,0,0,0,0,0,0,0,0,0,0, - 3,0,0,0,1,0,0,0,67,0,0,0,115,4,0,0, - 0,100,1,83,0,41,2,122,150,79,112,116,105,111,110,97, - 108,32,109,101,116,104,111,100,32,119,104,105,99,104,32,119, - 114,105,116,101,115,32,100,97,116,97,32,40,98,121,116,101, - 115,41,32,116,111,32,97,32,102,105,108,101,32,112,97,116, + 0,114,8,0,0,0,218,13,99,114,101,97,116,101,95,109, + 111,100,117,108,101,56,3,0,0,115,4,0,0,0,4,0, + 255,128,122,27,95,76,111,97,100,101,114,66,97,115,105,99, + 115,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,3,0,0,0, + 5,0,0,0,67,0,0,0,115,56,0,0,0,124,0,160, + 0,124,1,106,1,161,1,125,2,124,2,100,1,117,0,114, + 36,116,2,100,2,160,3,124,1,106,1,161,1,131,1,130, + 1,116,4,160,5,116,6,124,2,124,1,106,7,161,3,1, + 0,100,1,83,0,41,3,122,19,69,120,101,99,117,116,101, + 32,116,104,101,32,109,111,100,117,108,101,46,78,122,52,99, + 97,110,110,111,116,32,108,111,97,100,32,109,111,100,117,108, + 101,32,123,33,114,125,32,119,104,101,110,32,103,101,116,95, + 99,111,100,101,40,41,32,114,101,116,117,114,110,115,32,78, + 111,110,101,41,8,218,8,103,101,116,95,99,111,100,101,114, + 130,0,0,0,114,122,0,0,0,114,70,0,0,0,114,139, + 0,0,0,218,25,95,99,97,108,108,95,119,105,116,104,95, + 102,114,97,109,101,115,95,114,101,109,111,118,101,100,218,4, + 101,120,101,99,114,136,0,0,0,41,3,114,123,0,0,0, + 218,6,109,111,100,117,108,101,114,168,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,11,101,120, + 101,99,95,109,111,100,117,108,101,59,3,0,0,115,14,0, + 0,0,12,2,8,1,6,1,4,1,6,255,20,2,255,128, + 122,25,95,76,111,97,100,101,114,66,97,115,105,99,115,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,12,0,0,0,116,0,160,1,124,0,124, + 1,161,2,83,0,41,2,122,26,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,78,41,2,114,139,0,0,0,218,17,95,108,111, + 97,100,95,109,111,100,117,108,101,95,115,104,105,109,169,2, + 114,123,0,0,0,114,143,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,11,108,111,97,100,95, + 109,111,100,117,108,101,67,3,0,0,115,4,0,0,0,12, + 3,255,128,122,25,95,76,111,97,100,101,114,66,97,115,105, + 99,115,46,108,111,97,100,95,109,111,100,117,108,101,78,41, + 8,114,130,0,0,0,114,129,0,0,0,114,131,0,0,0, + 114,132,0,0,0,114,186,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,215,0, + 0,0,43,3,0,0,115,14,0,0,0,8,0,4,2,8, + 3,8,8,8,3,12,8,255,128,114,215,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,74,0,0,0,101,0,90,1, + 100,0,90,2,100,1,100,2,132,0,90,3,100,3,100,4, + 132,0,90,4,100,5,100,6,132,0,90,5,100,7,100,8, + 132,0,90,6,100,9,100,10,132,0,90,7,100,11,100,12, + 156,1,100,13,100,14,132,2,90,8,100,15,100,16,132,0, + 90,9,100,17,83,0,41,18,218,12,83,111,117,114,99,101, + 76,111,97,100,101,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,116,0,130,1,41,2,122,165,79,112,116,105, + 111,110,97,108,32,109,101,116,104,111,100,32,116,104,97,116, + 32,114,101,116,117,114,110,115,32,116,104,101,32,109,111,100, + 105,102,105,99,97,116,105,111,110,32,116,105,109,101,32,40, + 97,110,32,105,110,116,41,32,102,111,114,32,116,104,101,10, + 32,32,32,32,32,32,32,32,115,112,101,99,105,102,105,101, + 100,32,112,97,116,104,32,40,97,32,115,116,114,41,46,10, + 10,32,32,32,32,32,32,32,32,82,97,105,115,101,115,32, + 79,83,69,114,114,111,114,32,119,104,101,110,32,116,104,101, + 32,112,97,116,104,32,99,97,110,110,111,116,32,98,101,32, + 104,97,110,100,108,101,100,46,10,32,32,32,32,32,32,32, + 32,78,41,1,114,58,0,0,0,169,2,114,123,0,0,0, + 114,52,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,10,112,97,116,104,95,109,116,105,109,101, + 75,3,0,0,115,4,0,0,0,4,6,255,128,122,23,83, + 111,117,114,99,101,76,111,97,100,101,114,46,112,97,116,104, + 95,109,116,105,109,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, + 14,0,0,0,100,1,124,0,160,0,124,1,161,1,105,1, + 83,0,41,3,97,158,1,0,0,79,112,116,105,111,110,97, + 108,32,109,101,116,104,111,100,32,114,101,116,117,114,110,105, + 110,103,32,97,32,109,101,116,97,100,97,116,97,32,100,105, + 99,116,32,102,111,114,32,116,104,101,32,115,112,101,99,105, + 102,105,101,100,10,32,32,32,32,32,32,32,32,112,97,116, 104,32,40,97,32,115,116,114,41,46,10,10,32,32,32,32, + 32,32,32,32,80,111,115,115,105,98,108,101,32,107,101,121, + 115,58,10,32,32,32,32,32,32,32,32,45,32,39,109,116, + 105,109,101,39,32,40,109,97,110,100,97,116,111,114,121,41, + 32,105,115,32,116,104,101,32,110,117,109,101,114,105,99,32, + 116,105,109,101,115,116,97,109,112,32,111,102,32,108,97,115, + 116,32,115,111,117,114,99,101,10,32,32,32,32,32,32,32, + 32,32,32,99,111,100,101,32,109,111,100,105,102,105,99,97, + 116,105,111,110,59,10,32,32,32,32,32,32,32,32,45,32, + 39,115,105,122,101,39,32,40,111,112,116,105,111,110,97,108, + 41,32,105,115,32,116,104,101,32,115,105,122,101,32,105,110, + 32,98,121,116,101,115,32,111,102,32,116,104,101,32,115,111, + 117,114,99,101,32,99,111,100,101,46,10,10,32,32,32,32, 32,32,32,32,73,109,112,108,101,109,101,110,116,105,110,103, 32,116,104,105,115,32,109,101,116,104,111,100,32,97,108,108, - 111,119,115,32,102,111,114,32,116,104,101,32,119,114,105,116, - 105,110,103,32,111,102,32,98,121,116,101,99,111,100,101,32, - 102,105,108,101,115,46,10,32,32,32,32,32,32,32,32,78, - 114,7,0,0,0,41,3,114,123,0,0,0,114,52,0,0, - 0,114,37,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,232,0,0,0,107,3,0,0,115,4, - 0,0,0,4,0,255,128,122,21,83,111,117,114,99,101,76, - 111,97,100,101,114,46,115,101,116,95,100,97,116,97,99,2, - 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,10, - 0,0,0,67,0,0,0,115,70,0,0,0,124,0,160,0, - 124,1,161,1,125,2,122,20,124,0,160,1,124,2,161,1, - 125,3,87,0,116,4,124,3,131,1,83,0,4,0,116,2, - 121,68,1,0,125,4,1,0,122,14,116,3,100,1,124,1, - 100,2,141,2,124,4,130,2,100,3,125,4,126,4,119,1, - 119,0,41,4,122,52,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,73,110,115,112,101,99,116,76,111,97,100,101,114,46,103, - 101,116,95,115,111,117,114,99,101,46,122,39,115,111,117,114, - 99,101,32,110,111,116,32,97,118,97,105,108,97,98,108,101, - 32,116,104,114,111,117,103,104,32,103,101,116,95,100,97,116, - 97,40,41,114,120,0,0,0,78,41,5,114,183,0,0,0, - 218,8,103,101,116,95,100,97,116,97,114,58,0,0,0,114, - 122,0,0,0,114,180,0,0,0,41,5,114,123,0,0,0, - 114,143,0,0,0,114,52,0,0,0,114,178,0,0,0,218, - 3,101,120,99,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,10,103,101,116,95,115,111,117,114,99,101,114, - 3,0,0,115,26,0,0,0,10,2,2,1,12,1,8,4, - 14,253,4,1,2,1,4,255,2,1,2,255,8,128,2,255, - 255,128,122,23,83,111,117,114,99,101,76,111,97,100,101,114, - 46,103,101,116,95,115,111,117,114,99,101,114,109,0,0,0, - 41,1,218,9,95,111,112,116,105,109,105,122,101,99,3,0, - 0,0,0,0,0,0,1,0,0,0,4,0,0,0,8,0, - 0,0,67,0,0,0,115,22,0,0,0,116,0,106,1,116, - 2,124,1,124,2,100,1,100,2,124,3,100,3,141,6,83, - 0,41,5,122,130,82,101,116,117,114,110,32,116,104,101,32, - 99,111,100,101,32,111,98,106,101,99,116,32,99,111,109,112, - 105,108,101,100,32,102,114,111,109,32,115,111,117,114,99,101, - 46,10,10,32,32,32,32,32,32,32,32,84,104,101,32,39, - 100,97,116,97,39,32,97,114,103,117,109,101,110,116,32,99, - 97,110,32,98,101,32,97,110,121,32,111,98,106,101,99,116, - 32,116,121,112,101,32,116,104,97,116,32,99,111,109,112,105, - 108,101,40,41,32,115,117,112,112,111,114,116,115,46,10,32, - 32,32,32,32,32,32,32,114,222,0,0,0,84,41,2,218, - 12,100,111,110,116,95,105,110,104,101,114,105,116,114,89,0, - 0,0,78,41,3,114,139,0,0,0,114,221,0,0,0,218, - 7,99,111,109,112,105,108,101,41,4,114,123,0,0,0,114, - 37,0,0,0,114,52,0,0,0,114,237,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,14,115, - 111,117,114,99,101,95,116,111,95,99,111,100,101,124,3,0, - 0,115,8,0,0,0,12,5,4,1,6,255,255,128,122,27, - 83,111,117,114,99,101,76,111,97,100,101,114,46,115,111,117, - 114,99,101,95,116,111,95,99,111,100,101,99,2,0,0,0, - 0,0,0,0,0,0,0,0,15,0,0,0,9,0,0,0, - 67,0,0,0,115,34,2,0,0,124,0,160,0,124,1,161, - 1,125,2,100,1,125,3,100,1,125,4,100,1,125,5,100, - 2,125,6,100,3,125,7,122,12,116,1,124,2,131,1,125, - 8,87,0,110,24,4,0,116,2,144,2,121,32,1,0,1, - 0,1,0,100,1,125,8,89,0,144,1,110,38,122,14,124, - 0,160,3,124,2,161,1,125,9,87,0,110,20,4,0,116, - 4,144,2,121,30,1,0,1,0,1,0,89,0,144,1,110, - 2,116,5,124,9,100,4,25,0,131,1,125,3,122,14,124, - 0,160,6,124,8,161,1,125,10,87,0,110,18,4,0,116, - 4,144,2,121,28,1,0,1,0,1,0,89,0,110,212,124, - 1,124,8,100,5,156,2,125,11,122,148,116,7,124,10,124, - 1,124,11,131,3,125,12,116,8,124,10,131,1,100,6,100, - 1,133,2,25,0,125,13,124,12,100,7,64,0,100,8,107, - 3,125,6,124,6,144,1,114,30,124,12,100,9,64,0,100, - 8,107,3,125,7,116,9,106,10,100,10,107,3,144,1,114, - 28,124,7,115,248,116,9,106,10,100,11,107,2,144,1,114, - 28,124,0,160,6,124,2,161,1,125,4,116,9,160,11,116, - 12,124,4,161,2,125,5,116,13,124,10,124,5,124,1,124, - 11,131,4,1,0,110,20,116,14,124,10,124,3,124,9,100, - 12,25,0,124,1,124,11,131,5,1,0,87,0,110,22,4, - 0,116,15,116,16,102,2,144,2,121,26,1,0,1,0,1, - 0,89,0,110,30,116,17,160,18,100,13,124,8,124,2,161, - 3,1,0,116,19,124,13,124,1,124,8,124,2,100,14,141, - 4,83,0,124,4,100,1,117,0,144,1,114,126,124,0,160, - 6,124,2,161,1,125,4,124,0,160,20,124,4,124,2,161, - 2,125,14,116,17,160,18,100,15,124,2,161,2,1,0,116, - 21,106,22,144,2,115,20,124,8,100,1,117,1,144,2,114, - 20,124,3,100,1,117,1,144,2,114,20,124,6,144,1,114, - 218,124,5,100,1,117,0,144,1,114,204,116,9,160,11,124, - 4,161,1,125,5,116,23,124,14,124,5,124,7,131,3,125, - 10,110,16,116,24,124,14,124,3,116,25,124,4,131,1,131, - 3,125,10,122,20,124,0,160,26,124,2,124,8,124,10,161, - 3,1,0,87,0,124,14,83,0,4,0,116,2,144,2,121, - 24,1,0,1,0,1,0,89,0,124,14,83,0,124,14,83, - 0,119,0,119,0,119,0,119,0,119,0,41,16,122,190,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,73,110,115,112,101,99, - 116,76,111,97,100,101,114,46,103,101,116,95,99,111,100,101, - 46,10,10,32,32,32,32,32,32,32,32,82,101,97,100,105, - 110,103,32,111,102,32,98,121,116,101,99,111,100,101,32,114, - 101,113,117,105,114,101,115,32,112,97,116,104,95,115,116,97, - 116,115,32,116,111,32,98,101,32,105,109,112,108,101,109,101, - 110,116,101,100,46,32,84,111,32,119,114,105,116,101,10,32, - 32,32,32,32,32,32,32,98,121,116,101,99,111,100,101,44, - 32,115,101,116,95,100,97,116,97,32,109,117,115,116,32,97, - 108,115,111,32,98,101,32,105,109,112,108,101,109,101,110,116, - 101,100,46,10,10,32,32,32,32,32,32,32,32,78,70,84, - 114,173,0,0,0,114,163,0,0,0,114,149,0,0,0,114, - 3,0,0,0,114,0,0,0,0,114,39,0,0,0,90,5, - 110,101,118,101,114,90,6,97,108,119,97,121,115,218,4,115, - 105,122,101,122,13,123,125,32,109,97,116,99,104,101,115,32, - 123,125,41,3,114,121,0,0,0,114,111,0,0,0,114,112, - 0,0,0,122,19,99,111,100,101,32,111,98,106,101,99,116, - 32,102,114,111,109,32,123,125,41,27,114,183,0,0,0,114, - 102,0,0,0,114,88,0,0,0,114,231,0,0,0,114,58, - 0,0,0,114,30,0,0,0,114,234,0,0,0,114,156,0, - 0,0,218,10,109,101,109,111,114,121,118,105,101,119,114,167, - 0,0,0,90,21,99,104,101,99,107,95,104,97,115,104,95, - 98,97,115,101,100,95,112,121,99,115,114,161,0,0,0,218, - 17,95,82,65,87,95,77,65,71,73,67,95,78,85,77,66, - 69,82,114,162,0,0,0,114,160,0,0,0,114,122,0,0, - 0,114,154,0,0,0,114,139,0,0,0,114,153,0,0,0, - 114,169,0,0,0,114,240,0,0,0,114,15,0,0,0,218, - 19,100,111,110,116,95,119,114,105,116,101,95,98,121,116,101, - 99,111,100,101,114,175,0,0,0,114,174,0,0,0,114,4, - 0,0,0,114,233,0,0,0,41,15,114,123,0,0,0,114, - 143,0,0,0,114,112,0,0,0,114,158,0,0,0,114,178, - 0,0,0,114,161,0,0,0,90,10,104,97,115,104,95,98, - 97,115,101,100,90,12,99,104,101,99,107,95,115,111,117,114, - 99,101,114,111,0,0,0,218,2,115,116,114,37,0,0,0, - 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,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, - 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, + 111,119,115,32,116,104,101,32,108,111,97,100,101,114,32,116, + 111,32,114,101,97,100,32,98,121,116,101,99,111,100,101,32, + 102,105,108,101,115,46,10,32,32,32,32,32,32,32,32,82, + 97,105,115,101,115,32,79,83,69,114,114,111,114,32,119,104, + 101,110,32,116,104,101,32,112,97,116,104,32,99,97,110,110, + 111,116,32,98,101,32,104,97,110,100,108,101,100,46,10,32, + 32,32,32,32,32,32,32,114,173,0,0,0,78,41,1,114, + 230,0,0,0,114,229,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,218,10,112,97,116,104,95,115, + 116,97,116,115,83,3,0,0,115,4,0,0,0,14,12,255, + 128,122,23,83,111,117,114,99,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,4,0,0,0,4,0,0,0,67, + 0,0,0,115,12,0,0,0,124,0,160,0,124,2,124,3, + 161,2,83,0,41,2,122,228,79,112,116,105,111,110,97,108, + 32,109,101,116,104,111,100,32,119,104,105,99,104,32,119,114, + 105,116,101,115,32,100,97,116,97,32,40,98,121,116,101,115, + 41,32,116,111,32,97,32,102,105,108,101,32,112,97,116,104, + 32,40,97,32,115,116,114,41,46,10,10,32,32,32,32,32, + 32,32,32,73,109,112,108,101,109,101,110,116,105,110,103,32, + 116,104,105,115,32,109,101,116,104,111,100,32,97,108,108,111, + 119,115,32,102,111,114,32,116,104,101,32,119,114,105,116,105, + 110,103,32,111,102,32,98,121,116,101,99,111,100,101,32,102, + 105,108,101,115,46,10,10,32,32,32,32,32,32,32,32,84, + 104,101,32,115,111,117,114,99,101,32,112,97,116,104,32,105, + 115,32,110,101,101,100,101,100,32,105,110,32,111,114,100,101, + 114,32,116,111,32,99,111,114,114,101,99,116,108,121,32,116, + 114,97,110,115,102,101,114,32,112,101,114,109,105,115,115,105, + 111,110,115,10,32,32,32,32,32,32,32,32,78,41,1,218, + 8,115,101,116,95,100,97,116,97,41,4,114,123,0,0,0, + 114,112,0,0,0,90,10,99,97,99,104,101,95,112,97,116, + 104,114,37,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,15,95,99,97,99,104,101,95,98,121, + 116,101,99,111,100,101,97,3,0,0,115,4,0,0,0,12, + 8,255,128,122,28,83,111,117,114,99,101,76,111,97,100,101, + 114,46,95,99,97,99,104,101,95,98,121,116,101,99,111,100, + 101,99,3,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,1,0,0,0,67,0,0,0,115,4,0,0,0,100, + 1,83,0,41,2,122,150,79,112,116,105,111,110,97,108,32, + 109,101,116,104,111,100,32,119,104,105,99,104,32,119,114,105, + 116,101,115,32,100,97,116,97,32,40,98,121,116,101,115,41, + 32,116,111,32,97,32,102,105,108,101,32,112,97,116,104,32, + 40,97,32,115,116,114,41,46,10,10,32,32,32,32,32,32, + 32,32,73,109,112,108,101,109,101,110,116,105,110,103,32,116, + 104,105,115,32,109,101,116,104,111,100,32,97,108,108,111,119, + 115,32,102,111,114,32,116,104,101,32,119,114,105,116,105,110, + 103,32,111,102,32,98,121,116,101,99,111,100,101,32,102,105, + 108,101,115,46,10,32,32,32,32,32,32,32,32,78,114,7, + 0,0,0,41,3,114,123,0,0,0,114,52,0,0,0,114, + 37,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,232,0,0,0,107,3,0,0,115,4,0,0, + 0,4,0,255,128,122,21,83,111,117,114,99,101,76,111,97, + 100,101,114,46,115,101,116,95,100,97,116,97,99,2,0,0, + 0,0,0,0,0,0,0,0,0,5,0,0,0,10,0,0, + 0,67,0,0,0,115,70,0,0,0,124,0,160,0,124,1, + 161,1,125,2,122,20,124,0,160,1,124,2,161,1,125,3, + 87,0,116,4,124,3,131,1,83,0,4,0,116,2,121,68, + 1,0,125,4,1,0,122,14,116,3,100,1,124,1,100,2, + 141,2,124,4,130,2,100,3,125,4,126,4,119,1,119,0, + 41,4,122,52,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,73, + 110,115,112,101,99,116,76,111,97,100,101,114,46,103,101,116, + 95,115,111,117,114,99,101,46,122,39,115,111,117,114,99,101, + 32,110,111,116,32,97,118,97,105,108,97,98,108,101,32,116, + 104,114,111,117,103,104,32,103,101,116,95,100,97,116,97,40, + 41,114,120,0,0,0,78,41,5,114,183,0,0,0,218,8, + 103,101,116,95,100,97,116,97,114,58,0,0,0,114,122,0, + 0,0,114,180,0,0,0,41,5,114,123,0,0,0,114,143, + 0,0,0,114,52,0,0,0,114,178,0,0,0,218,3,101, + 120,99,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,10,103,101,116,95,115,111,117,114,99,101,114,3,0, + 0,115,26,0,0,0,10,2,2,1,12,1,8,4,14,253, + 4,1,2,1,4,255,2,1,2,255,8,128,2,255,255,128, + 122,23,83,111,117,114,99,101,76,111,97,100,101,114,46,103, + 101,116,95,115,111,117,114,99,101,114,109,0,0,0,41,1, + 218,9,95,111,112,116,105,109,105,122,101,99,3,0,0,0, + 0,0,0,0,1,0,0,0,4,0,0,0,8,0,0,0, + 67,0,0,0,115,22,0,0,0,116,0,106,1,116,2,124, + 1,124,2,100,1,100,2,124,3,100,3,141,6,83,0,41, + 5,122,130,82,101,116,117,114,110,32,116,104,101,32,99,111, + 100,101,32,111,98,106,101,99,116,32,99,111,109,112,105,108, + 101,100,32,102,114,111,109,32,115,111,117,114,99,101,46,10, + 10,32,32,32,32,32,32,32,32,84,104,101,32,39,100,97, + 116,97,39,32,97,114,103,117,109,101,110,116,32,99,97,110, + 32,98,101,32,97,110,121,32,111,98,106,101,99,116,32,116, + 121,112,101,32,116,104,97,116,32,99,111,109,112,105,108,101, + 40,41,32,115,117,112,112,111,114,116,115,46,10,32,32,32, + 32,32,32,32,32,114,222,0,0,0,84,41,2,218,12,100, + 111,110,116,95,105,110,104,101,114,105,116,114,89,0,0,0, + 78,41,3,114,139,0,0,0,114,221,0,0,0,218,7,99, + 111,109,112,105,108,101,41,4,114,123,0,0,0,114,37,0, + 0,0,114,52,0,0,0,114,237,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,14,115,111,117, + 114,99,101,95,116,111,95,99,111,100,101,124,3,0,0,115, + 8,0,0,0,12,5,4,1,6,255,255,128,122,27,83,111, + 117,114,99,101,76,111,97,100,101,114,46,115,111,117,114,99, + 101,95,116,111,95,99,111,100,101,99,2,0,0,0,0,0, + 0,0,0,0,0,0,15,0,0,0,9,0,0,0,67,0, + 0,0,115,34,2,0,0,124,0,160,0,124,1,161,1,125, + 2,100,1,125,3,100,1,125,4,100,1,125,5,100,2,125, + 6,100,3,125,7,122,12,116,1,124,2,131,1,125,8,87, + 0,110,24,4,0,116,2,144,2,121,32,1,0,1,0,1, + 0,100,1,125,8,89,0,144,1,110,38,122,14,124,0,160, + 3,124,2,161,1,125,9,87,0,110,20,4,0,116,4,144, + 2,121,30,1,0,1,0,1,0,89,0,144,1,110,2,116, + 5,124,9,100,4,25,0,131,1,125,3,122,14,124,0,160, + 6,124,8,161,1,125,10,87,0,110,18,4,0,116,4,144, + 2,121,28,1,0,1,0,1,0,89,0,110,212,124,1,124, + 8,100,5,156,2,125,11,122,148,116,7,124,10,124,1,124, + 11,131,3,125,12,116,8,124,10,131,1,100,6,100,1,133, + 2,25,0,125,13,124,12,100,7,64,0,100,8,107,3,125, + 6,124,6,144,1,114,30,124,12,100,9,64,0,100,8,107, + 3,125,7,116,9,106,10,100,10,107,3,144,1,114,28,124, + 7,115,248,116,9,106,10,100,11,107,2,144,1,114,28,124, + 0,160,6,124,2,161,1,125,4,116,9,160,11,116,12,124, + 4,161,2,125,5,116,13,124,10,124,5,124,1,124,11,131, + 4,1,0,110,20,116,14,124,10,124,3,124,9,100,12,25, + 0,124,1,124,11,131,5,1,0,87,0,110,22,4,0,116, + 15,116,16,102,2,144,2,121,26,1,0,1,0,1,0,89, + 0,110,30,116,17,160,18,100,13,124,8,124,2,161,3,1, + 0,116,19,124,13,124,1,124,8,124,2,100,14,141,4,83, + 0,124,4,100,1,117,0,144,1,114,126,124,0,160,6,124, + 2,161,1,125,4,124,0,160,20,124,4,124,2,161,2,125, + 14,116,17,160,18,100,15,124,2,161,2,1,0,116,21,106, + 22,144,2,115,20,124,8,100,1,117,1,144,2,114,20,124, + 3,100,1,117,1,144,2,114,20,124,6,144,1,114,218,124, + 5,100,1,117,0,144,1,114,204,116,9,160,11,124,4,161, + 1,125,5,116,23,124,14,124,5,124,7,131,3,125,10,110, + 16,116,24,124,14,124,3,116,25,124,4,131,1,131,3,125, + 10,122,20,124,0,160,26,124,2,124,8,124,10,161,3,1, + 0,87,0,124,14,83,0,4,0,116,2,144,2,121,24,1, + 0,1,0,1,0,89,0,124,14,83,0,124,14,83,0,119, + 0,119,0,119,0,119,0,119,0,41,16,122,190,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,73,110,115,112,101,99,116,76, + 111,97,100,101,114,46,103,101,116,95,99,111,100,101,46,10, + 10,32,32,32,32,32,32,32,32,82,101,97,100,105,110,103, + 32,111,102,32,98,121,116,101,99,111,100,101,32,114,101,113, + 117,105,114,101,115,32,112,97,116,104,95,115,116,97,116,115, + 32,116,111,32,98,101,32,105,109,112,108,101,109,101,110,116, + 101,100,46,32,84,111,32,119,114,105,116,101,10,32,32,32, + 32,32,32,32,32,98,121,116,101,99,111,100,101,44,32,115, + 101,116,95,100,97,116,97,32,109,117,115,116,32,97,108,115, + 111,32,98,101,32,105,109,112,108,101,109,101,110,116,101,100, + 46,10,10,32,32,32,32,32,32,32,32,78,70,84,114,173, + 0,0,0,114,163,0,0,0,114,149,0,0,0,114,3,0, + 0,0,114,0,0,0,0,114,39,0,0,0,90,5,110,101, + 118,101,114,90,6,97,108,119,97,121,115,218,4,115,105,122, + 101,122,13,123,125,32,109,97,116,99,104,101,115,32,123,125, + 41,3,114,121,0,0,0,114,111,0,0,0,114,112,0,0, + 0,122,19,99,111,100,101,32,111,98,106,101,99,116,32,102, + 114,111,109,32,123,125,41,27,114,183,0,0,0,114,102,0, + 0,0,114,88,0,0,0,114,231,0,0,0,114,58,0,0, + 0,114,30,0,0,0,114,234,0,0,0,114,156,0,0,0, + 218,10,109,101,109,111,114,121,118,105,101,119,114,167,0,0, + 0,90,21,99,104,101,99,107,95,104,97,115,104,95,98,97, + 115,101,100,95,112,121,99,115,114,161,0,0,0,218,17,95, + 82,65,87,95,77,65,71,73,67,95,78,85,77,66,69,82, + 114,162,0,0,0,114,160,0,0,0,114,122,0,0,0,114, + 154,0,0,0,114,139,0,0,0,114,153,0,0,0,114,169, + 0,0,0,114,240,0,0,0,114,15,0,0,0,218,19,100, + 111,110,116,95,119,114,105,116,101,95,98,121,116,101,99,111, + 100,101,114,175,0,0,0,114,174,0,0,0,114,4,0,0, + 0,114,233,0,0,0,41,15,114,123,0,0,0,114,143,0, + 0,0,114,112,0,0,0,114,158,0,0,0,114,178,0,0, + 0,114,161,0,0,0,90,10,104,97,115,104,95,98,97,115, + 101,100,90,12,99,104,101,99,107,95,115,111,117,114,99,101, + 114,111,0,0,0,218,2,115,116,114,37,0,0,0,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,170,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,4,255, + 2,128,2,3,2,1,2,1,6,1,2,1,2,1,4,251, + 4,128,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, @@ -1525,1150 +1525,1149 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 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,38,1,4,128, - 14,2,42,1,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, + 3,0,0,115,16,0,0,0,14,2,16,1,22,1,20,128, + 14,2,22,1,20,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,254,0,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,96, + 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, + 121,252,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, + 4,0,116,8,121,250,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, + 119,1,119,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,58,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,14,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,2,247,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,2,0,0,0,64,0,0,0,115,32,0,0,0,101,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,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, + 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,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, + 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, - 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, + 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,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, - 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,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, + 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,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, + 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,105,115,95,112,97,99,107,97,103,101, + 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,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, + 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, - 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,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, + 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,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,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,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, + 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,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,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, + 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,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,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, + 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,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, + 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, - 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,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, + 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,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, + 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,255,8,5,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,144,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,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,38,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,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, }; diff --git a/Python/importlib_zipimport.h b/Python/importlib_zipimport.h index 03f7b606fbda6..5b78adfb3353c 100644 --- a/Python/importlib_zipimport.h +++ b/Python/importlib_zipimport.h @@ -523,511 +523,512 @@ const unsigned char _Py_M__zipimport[] = { 3,114,32,0,0,0,114,38,0,0,0,114,83,0,0,0, 114,9,0,0,0,114,9,0,0,0,114,10,0,0,0,218, 19,103,101,116,95,114,101,115,111,117,114,99,101,95,114,101, - 97,100,101,114,53,1,0,0,115,18,0,0,0,2,6,10, - 1,10,1,12,1,6,1,12,1,10,1,2,253,255,128,122, - 31,122,105,112,105,109,112,111,114,116,101,114,46,103,101,116, - 95,114,101,115,111,117,114,99,101,95,114,101,97,100,101,114, - 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,24,0,0,0,100,1, - 124,0,106,0,155,0,116,1,155,0,124,0,106,2,155,0, - 100,2,157,5,83,0,41,3,78,122,21,60,122,105,112,105, - 109,112,111,114,116,101,114,32,111,98,106,101,99,116,32,34, - 122,2,34,62,41,3,114,29,0,0,0,114,20,0,0,0, - 114,31,0,0,0,41,1,114,32,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,218,8,95,95,114, - 101,112,114,95,95,68,1,0,0,115,4,0,0,0,24,1, - 255,128,122,20,122,105,112,105,109,112,111,114,116,101,114,46, - 95,95,114,101,112,114,95,95,41,1,78,41,1,78,41,1, - 78,41,16,114,6,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,7,95,95,100,111,99,95,95,114,34,0,0,0, - 114,41,0,0,0,114,42,0,0,0,114,46,0,0,0,114, - 52,0,0,0,114,59,0,0,0,114,60,0,0,0,114,67, - 0,0,0,114,43,0,0,0,114,82,0,0,0,114,84,0, - 0,0,114,85,0,0,0,114,9,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,114,4,0,0,0, - 46,0,0,0,115,30,0,0,0,8,0,4,1,8,17,10, - 46,10,34,10,13,8,27,8,10,8,21,8,12,8,26,8, - 13,8,43,12,15,255,128,122,12,95,95,105,110,105,116,95, - 95,46,112,121,99,84,114,63,0,0,0,70,41,3,122,4, - 46,112,121,99,84,70,41,3,114,64,0,0,0,70,70,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,20,0,0,0,124,0,106, - 0,124,1,160,1,100,1,161,1,100,2,25,0,23,0,83, - 0,41,3,78,218,1,46,233,2,0,0,0,41,2,114,31, - 0,0,0,218,10,114,112,97,114,116,105,116,105,111,110,41, - 2,114,32,0,0,0,114,38,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,114,36,0,0,0,86, - 1,0,0,115,4,0,0,0,20,1,255,128,114,36,0,0, - 0,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,18,0,0,0,124, - 1,116,0,23,0,125,2,124,2,124,0,106,1,118,0,83, - 0,169,1,78,41,2,114,20,0,0,0,114,28,0,0,0, - 41,3,114,32,0,0,0,114,13,0,0,0,90,7,100,105, - 114,112,97,116,104,114,9,0,0,0,114,9,0,0,0,114, - 10,0,0,0,114,37,0,0,0,90,1,0,0,115,6,0, - 0,0,8,4,10,2,255,128,114,37,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,7,0,0,0,4,0, - 0,0,67,0,0,0,115,56,0,0,0,116,0,124,0,124, - 1,131,2,125,2,116,1,68,0,93,36,92,3,125,3,125, - 4,125,5,124,2,124,3,23,0,125,6,124,6,124,0,106, - 2,118,0,114,50,124,5,2,0,1,0,83,0,113,14,100, - 0,83,0,114,90,0,0,0,41,3,114,36,0,0,0,218, - 16,95,122,105,112,95,115,101,97,114,99,104,111,114,100,101, - 114,114,28,0,0,0,41,7,114,32,0,0,0,114,38,0, - 0,0,114,13,0,0,0,218,6,115,117,102,102,105,120,218, - 10,105,115,98,121,116,101,99,111,100,101,114,51,0,0,0, - 114,66,0,0,0,114,9,0,0,0,114,9,0,0,0,114, - 10,0,0,0,114,35,0,0,0,99,1,0,0,115,16,0, - 0,0,10,1,14,1,8,1,10,1,8,1,2,128,4,1, - 255,128,114,35,0,0,0,99,1,0,0,0,0,0,0,0, - 0,0,0,0,26,0,0,0,9,0,0,0,67,0,0,0, - 115,236,4,0,0,122,14,116,0,160,1,124,0,161,1,125, - 1,87,0,110,32,4,0,116,2,144,4,121,234,1,0,1, - 0,1,0,116,3,100,1,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,124,1,144,4,143,130,1,0,122,36,124, - 1,160,4,116,5,11,0,100,3,161,2,1,0,124,1,160, - 6,161,0,125,2,124,1,160,7,116,5,161,1,125,3,87, - 0,110,32,4,0,116,2,144,4,121,232,1,0,1,0,1, - 0,116,3,100,4,124,0,155,2,157,2,124,0,100,2,141, - 2,130,1,116,8,124,3,131,1,116,5,107,3,114,156,116, - 3,100,4,124,0,155,2,157,2,124,0,100,2,141,2,130, - 1,124,3,100,0,100,5,133,2,25,0,116,9,107,3,144, - 1,114,152,122,24,124,1,160,4,100,6,100,3,161,2,1, - 0,124,1,160,6,161,0,125,4,87,0,110,32,4,0,116, - 2,144,4,121,230,1,0,1,0,1,0,116,3,100,4,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,116,10,124, - 4,116,11,24,0,116,5,24,0,100,6,131,2,125,5,122, - 22,124,1,160,4,124,5,161,1,1,0,124,1,160,7,161, - 0,125,6,87,0,110,32,4,0,116,2,144,4,121,228,1, - 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,124,6,160,12,116,9,161,1,125, - 7,124,7,100,6,107,0,144,1,114,88,116,3,100,7,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,124,6,124, - 7,124,7,116,5,23,0,133,2,25,0,125,3,116,8,124, - 3,131,1,116,5,107,3,144,1,114,136,116,3,100,8,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,124,4,116, - 8,124,6,131,1,24,0,124,7,23,0,125,2,116,13,124, - 3,100,9,100,10,133,2,25,0,131,1,125,8,116,13,124, - 3,100,10,100,11,133,2,25,0,131,1,125,9,124,2,124, - 8,107,0,144,1,114,212,116,3,100,12,124,0,155,2,157, - 2,124,0,100,2,141,2,130,1,124,2,124,9,107,0,144, - 1,114,240,116,3,100,13,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,124,2,124,8,56,0,125,2,124,2,124, - 9,24,0,125,10,124,10,100,6,107,0,144,2,114,28,116, - 3,100,14,124,0,155,2,157,2,124,0,100,2,141,2,130, - 1,105,0,125,11,100,6,125,12,122,14,124,1,160,4,124, - 2,161,1,1,0,87,0,110,32,4,0,116,2,144,4,121, - 226,1,0,1,0,1,0,116,3,100,4,124,0,155,2,157, - 2,124,0,100,2,141,2,130,1,9,0,124,1,160,7,100, - 16,161,1,125,3,116,8,124,3,131,1,100,5,107,0,144, - 2,114,118,116,14,100,17,131,1,130,1,124,3,100,0,100, - 5,133,2,25,0,100,18,107,3,144,2,114,140,144,4,113, - 170,116,8,124,3,131,1,100,16,107,3,144,2,114,162,116, - 14,100,17,131,1,130,1,116,15,124,3,100,19,100,20,133, - 2,25,0,131,1,125,13,116,15,124,3,100,20,100,9,133, - 2,25,0,131,1,125,14,116,15,124,3,100,9,100,21,133, - 2,25,0,131,1,125,15,116,15,124,3,100,21,100,10,133, - 2,25,0,131,1,125,16,116,13,124,3,100,10,100,11,133, - 2,25,0,131,1,125,17,116,13,124,3,100,11,100,22,133, - 2,25,0,131,1,125,18,116,13,124,3,100,22,100,23,133, - 2,25,0,131,1,125,4,116,15,124,3,100,23,100,24,133, - 2,25,0,131,1,125,19,116,15,124,3,100,24,100,25,133, - 2,25,0,131,1,125,20,116,15,124,3,100,25,100,26,133, - 2,25,0,131,1,125,21,116,13,124,3,100,27,100,16,133, - 2,25,0,131,1,125,22,124,19,124,20,23,0,124,21,23, - 0,125,8,124,22,124,9,107,4,144,3,114,122,116,3,100, - 28,124,0,155,2,157,2,124,0,100,2,141,2,130,1,124, - 22,124,10,55,0,125,22,122,14,124,1,160,7,124,19,161, - 1,125,23,87,0,110,32,4,0,116,2,144,4,121,224,1, - 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,116,8,124,23,131,1,124,19,107, - 3,144,3,114,210,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,122,50,116,8,124,1,160,7,124, - 8,124,19,24,0,161,1,131,1,124,8,124,19,24,0,107, - 3,144,4,114,2,116,3,100,4,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,87,0,110,32,4,0,116,2,144, - 4,121,222,1,0,1,0,1,0,116,3,100,4,124,0,155, - 2,157,2,124,0,100,2,141,2,130,1,124,13,100,29,64, - 0,144,4,114,58,124,23,160,16,161,0,125,23,110,48,122, - 14,124,23,160,16,100,30,161,1,125,23,87,0,110,32,4, - 0,116,17,144,4,121,220,1,0,1,0,1,0,124,23,160, - 16,100,31,161,1,160,18,116,19,161,1,125,23,89,0,124, - 23,160,20,100,32,116,21,161,2,125,23,116,22,160,23,124, - 0,124,23,161,2,125,24,124,24,124,14,124,18,124,4,124, - 22,124,15,124,16,124,17,102,8,125,25,124,25,124,11,124, - 23,60,0,124,12,100,33,55,0,125,12,144,2,113,86,87, - 0,100,0,4,0,4,0,131,3,1,0,110,18,49,0,144, - 4,115,192,119,1,1,0,1,0,1,0,89,0,1,0,116, - 24,160,25,100,34,124,12,124,0,161,3,1,0,124,11,83, - 0,119,0,119,0,119,0,119,0,119,0,119,0,119,0,119, - 0,41,35,78,122,21,99,97,110,39,116,32,111,112,101,110, - 32,90,105,112,32,102,105,108,101,58,32,114,12,0,0,0, - 114,88,0,0,0,250,21,99,97,110,39,116,32,114,101,97, - 100,32,90,105,112,32,102,105,108,101,58,32,233,4,0,0, - 0,114,0,0,0,0,122,16,110,111,116,32,97,32,90,105, - 112,32,102,105,108,101,58,32,122,18,99,111,114,114,117,112, - 116,32,90,105,112,32,102,105,108,101,58,32,233,12,0,0, - 0,233,16,0,0,0,233,20,0,0,0,122,28,98,97,100, + 97,100,101,114,53,1,0,0,115,20,0,0,0,2,6,10, + 1,6,1,4,255,12,2,6,1,12,1,10,1,2,253,255, + 128,122,31,122,105,112,105,109,112,111,114,116,101,114,46,103, + 101,116,95,114,101,115,111,117,114,99,101,95,114,101,97,100, + 101,114,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,24,0,0,0, + 100,1,124,0,106,0,155,0,116,1,155,0,124,0,106,2, + 155,0,100,2,157,5,83,0,41,3,78,122,21,60,122,105, + 112,105,109,112,111,114,116,101,114,32,111,98,106,101,99,116, + 32,34,122,2,34,62,41,3,114,29,0,0,0,114,20,0, + 0,0,114,31,0,0,0,41,1,114,32,0,0,0,114,9, + 0,0,0,114,9,0,0,0,114,10,0,0,0,218,8,95, + 95,114,101,112,114,95,95,68,1,0,0,115,4,0,0,0, + 24,1,255,128,122,20,122,105,112,105,109,112,111,114,116,101, + 114,46,95,95,114,101,112,114,95,95,41,1,78,41,1,78, + 41,1,78,41,16,114,6,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,7,95,95,100,111,99,95,95,114,34,0, + 0,0,114,41,0,0,0,114,42,0,0,0,114,46,0,0, + 0,114,52,0,0,0,114,59,0,0,0,114,60,0,0,0, + 114,67,0,0,0,114,43,0,0,0,114,82,0,0,0,114, + 84,0,0,0,114,85,0,0,0,114,9,0,0,0,114,9, + 0,0,0,114,9,0,0,0,114,10,0,0,0,114,4,0, + 0,0,46,0,0,0,115,30,0,0,0,8,0,4,1,8, + 17,10,46,10,34,10,13,8,27,8,10,8,21,8,12,8, + 26,8,13,8,43,12,15,255,128,122,12,95,95,105,110,105, + 116,95,95,46,112,121,99,84,114,63,0,0,0,70,41,3, + 122,4,46,112,121,99,84,70,41,3,114,64,0,0,0,70, + 70,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,20,0,0,0,124, + 0,106,0,124,1,160,1,100,1,161,1,100,2,25,0,23, + 0,83,0,41,3,78,218,1,46,233,2,0,0,0,41,2, + 114,31,0,0,0,218,10,114,112,97,114,116,105,116,105,111, + 110,41,2,114,32,0,0,0,114,38,0,0,0,114,9,0, + 0,0,114,9,0,0,0,114,10,0,0,0,114,36,0,0, + 0,86,1,0,0,115,4,0,0,0,20,1,255,128,114,36, + 0,0,0,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,18,0,0, + 0,124,1,116,0,23,0,125,2,124,2,124,0,106,1,118, + 0,83,0,169,1,78,41,2,114,20,0,0,0,114,28,0, + 0,0,41,3,114,32,0,0,0,114,13,0,0,0,90,7, + 100,105,114,112,97,116,104,114,9,0,0,0,114,9,0,0, + 0,114,10,0,0,0,114,37,0,0,0,90,1,0,0,115, + 6,0,0,0,8,4,10,2,255,128,114,37,0,0,0,99, + 2,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0, + 4,0,0,0,67,0,0,0,115,56,0,0,0,116,0,124, + 0,124,1,131,2,125,2,116,1,68,0,93,36,92,3,125, + 3,125,4,125,5,124,2,124,3,23,0,125,6,124,6,124, + 0,106,2,118,0,114,50,124,5,2,0,1,0,83,0,113, + 14,100,0,83,0,114,90,0,0,0,41,3,114,36,0,0, + 0,218,16,95,122,105,112,95,115,101,97,114,99,104,111,114, + 100,101,114,114,28,0,0,0,41,7,114,32,0,0,0,114, + 38,0,0,0,114,13,0,0,0,218,6,115,117,102,102,105, + 120,218,10,105,115,98,121,116,101,99,111,100,101,114,51,0, + 0,0,114,66,0,0,0,114,9,0,0,0,114,9,0,0, + 0,114,10,0,0,0,114,35,0,0,0,99,1,0,0,115, + 16,0,0,0,10,1,14,1,8,1,10,1,8,1,2,255, + 4,2,255,128,114,35,0,0,0,99,1,0,0,0,0,0, + 0,0,0,0,0,0,26,0,0,0,9,0,0,0,67,0, + 0,0,115,236,4,0,0,122,14,116,0,160,1,124,0,161, + 1,125,1,87,0,110,32,4,0,116,2,144,4,121,234,1, + 0,1,0,1,0,116,3,100,1,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,124,1,144,4,143,130,1,0,122, + 36,124,1,160,4,116,5,11,0,100,3,161,2,1,0,124, + 1,160,6,161,0,125,2,124,1,160,7,116,5,161,1,125, + 3,87,0,110,32,4,0,116,2,144,4,121,232,1,0,1, + 0,1,0,116,3,100,4,124,0,155,2,157,2,124,0,100, + 2,141,2,130,1,116,8,124,3,131,1,116,5,107,3,114, + 156,116,3,100,4,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,124,3,100,0,100,5,133,2,25,0,116,9,107, + 3,144,1,114,152,122,24,124,1,160,4,100,6,100,3,161, + 2,1,0,124,1,160,6,161,0,125,4,87,0,110,32,4, + 0,116,2,144,4,121,230,1,0,1,0,1,0,116,3,100, + 4,124,0,155,2,157,2,124,0,100,2,141,2,130,1,116, + 10,124,4,116,11,24,0,116,5,24,0,100,6,131,2,125, + 5,122,22,124,1,160,4,124,5,161,1,1,0,124,1,160, + 7,161,0,125,6,87,0,110,32,4,0,116,2,144,4,121, + 228,1,0,1,0,1,0,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,124,6,160,12,116,9,161, + 1,125,7,124,7,100,6,107,0,144,1,114,88,116,3,100, + 7,124,0,155,2,157,2,124,0,100,2,141,2,130,1,124, + 6,124,7,124,7,116,5,23,0,133,2,25,0,125,3,116, + 8,124,3,131,1,116,5,107,3,144,1,114,136,116,3,100, + 8,124,0,155,2,157,2,124,0,100,2,141,2,130,1,124, + 4,116,8,124,6,131,1,24,0,124,7,23,0,125,2,116, + 13,124,3,100,9,100,10,133,2,25,0,131,1,125,8,116, + 13,124,3,100,10,100,11,133,2,25,0,131,1,125,9,124, + 2,124,8,107,0,144,1,114,212,116,3,100,12,124,0,155, + 2,157,2,124,0,100,2,141,2,130,1,124,2,124,9,107, + 0,144,1,114,240,116,3,100,13,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,124,2,124,8,56,0,125,2,124, + 2,124,9,24,0,125,10,124,10,100,6,107,0,144,2,114, + 28,116,3,100,14,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,105,0,125,11,100,6,125,12,122,14,124,1,160, + 4,124,2,161,1,1,0,87,0,110,32,4,0,116,2,144, + 4,121,226,1,0,1,0,1,0,116,3,100,4,124,0,155, + 2,157,2,124,0,100,2,141,2,130,1,9,0,124,1,160, + 7,100,16,161,1,125,3,116,8,124,3,131,1,100,5,107, + 0,144,2,114,118,116,14,100,17,131,1,130,1,124,3,100, + 0,100,5,133,2,25,0,100,18,107,3,144,2,114,140,144, + 4,113,170,116,8,124,3,131,1,100,16,107,3,144,2,114, + 162,116,14,100,17,131,1,130,1,116,15,124,3,100,19,100, + 20,133,2,25,0,131,1,125,13,116,15,124,3,100,20,100, + 9,133,2,25,0,131,1,125,14,116,15,124,3,100,9,100, + 21,133,2,25,0,131,1,125,15,116,15,124,3,100,21,100, + 10,133,2,25,0,131,1,125,16,116,13,124,3,100,10,100, + 11,133,2,25,0,131,1,125,17,116,13,124,3,100,11,100, + 22,133,2,25,0,131,1,125,18,116,13,124,3,100,22,100, + 23,133,2,25,0,131,1,125,4,116,15,124,3,100,23,100, + 24,133,2,25,0,131,1,125,19,116,15,124,3,100,24,100, + 25,133,2,25,0,131,1,125,20,116,15,124,3,100,25,100, + 26,133,2,25,0,131,1,125,21,116,13,124,3,100,27,100, + 16,133,2,25,0,131,1,125,22,124,19,124,20,23,0,124, + 21,23,0,125,8,124,22,124,9,107,4,144,3,114,122,116, + 3,100,28,124,0,155,2,157,2,124,0,100,2,141,2,130, + 1,124,22,124,10,55,0,125,22,122,14,124,1,160,7,124, + 19,161,1,125,23,87,0,110,32,4,0,116,2,144,4,121, + 224,1,0,1,0,1,0,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,116,8,124,23,131,1,124, + 19,107,3,144,3,114,210,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,122,50,116,8,124,1,160, + 7,124,8,124,19,24,0,161,1,131,1,124,8,124,19,24, + 0,107,3,144,4,114,2,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,87,0,110,32,4,0,116, + 2,144,4,121,222,1,0,1,0,1,0,116,3,100,4,124, + 0,155,2,157,2,124,0,100,2,141,2,130,1,124,13,100, + 29,64,0,144,4,114,58,124,23,160,16,161,0,125,23,110, + 48,122,14,124,23,160,16,100,30,161,1,125,23,87,0,110, + 32,4,0,116,17,144,4,121,220,1,0,1,0,1,0,124, + 23,160,16,100,31,161,1,160,18,116,19,161,1,125,23,89, + 0,124,23,160,20,100,32,116,21,161,2,125,23,116,22,160, + 23,124,0,124,23,161,2,125,24,124,24,124,14,124,18,124, + 4,124,22,124,15,124,16,124,17,102,8,125,25,124,25,124, + 11,124,23,60,0,124,12,100,33,55,0,125,12,144,2,113, + 86,87,0,100,0,4,0,4,0,131,3,1,0,110,18,49, + 0,144,4,115,192,119,1,1,0,1,0,1,0,89,0,1, + 0,116,24,160,25,100,34,124,12,124,0,161,3,1,0,124, + 11,83,0,119,0,119,0,119,0,119,0,119,0,119,0,119, + 0,119,0,41,35,78,122,21,99,97,110,39,116,32,111,112, + 101,110,32,90,105,112,32,102,105,108,101,58,32,114,12,0, + 0,0,114,88,0,0,0,250,21,99,97,110,39,116,32,114, + 101,97,100,32,90,105,112,32,102,105,108,101,58,32,233,4, + 0,0,0,114,0,0,0,0,122,16,110,111,116,32,97,32, + 90,105,112,32,102,105,108,101,58,32,122,18,99,111,114,114, + 117,112,116,32,90,105,112,32,102,105,108,101,58,32,233,12, + 0,0,0,233,16,0,0,0,233,20,0,0,0,122,28,98, + 97,100,32,99,101,110,116,114,97,108,32,100,105,114,101,99, + 116,111,114,121,32,115,105,122,101,58,32,122,30,98,97,100, 32,99,101,110,116,114,97,108,32,100,105,114,101,99,116,111, - 114,121,32,115,105,122,101,58,32,122,30,98,97,100,32,99, - 101,110,116,114,97,108,32,100,105,114,101,99,116,111,114,121, - 32,111,102,102,115,101,116,58,32,122,38,98,97,100,32,99, - 101,110,116,114,97,108,32,100,105,114,101,99,116,111,114,121, - 32,115,105,122,101,32,111,114,32,111,102,102,115,101,116,58, - 32,84,233,46,0,0,0,250,27,69,79,70,32,114,101,97, - 100,32,119,104,101,114,101,32,110,111,116,32,101,120,112,101, - 99,116,101,100,115,4,0,0,0,80,75,1,2,233,8,0, - 0,0,233,10,0,0,0,233,14,0,0,0,233,24,0,0, - 0,233,28,0,0,0,233,30,0,0,0,233,32,0,0,0, - 233,34,0,0,0,233,42,0,0,0,122,25,98,97,100,32, - 108,111,99,97,108,32,104,101,97,100,101,114,32,111,102,102, - 115,101,116,58,32,105,0,8,0,0,218,5,97,115,99,105, - 105,90,6,108,97,116,105,110,49,250,1,47,114,5,0,0, - 0,122,33,122,105,112,105,109,112,111,114,116,58,32,102,111, - 117,110,100,32,123,125,32,110,97,109,101,115,32,105,110,32, - 123,33,114,125,41,26,218,3,95,105,111,218,9,111,112,101, - 110,95,99,111,100,101,114,22,0,0,0,114,3,0,0,0, - 218,4,115,101,101,107,218,20,69,78,68,95,67,69,78,84, - 82,65,76,95,68,73,82,95,83,73,90,69,90,4,116,101, - 108,108,218,4,114,101,97,100,114,55,0,0,0,218,18,83, - 84,82,73,78,71,95,69,78,68,95,65,82,67,72,73,86, - 69,218,3,109,97,120,218,15,77,65,88,95,67,79,77,77, - 69,78,84,95,76,69,78,218,5,114,102,105,110,100,114,2, - 0,0,0,218,8,69,79,70,69,114,114,111,114,114,1,0, - 0,0,114,65,0,0,0,218,18,85,110,105,99,111,100,101, - 68,101,99,111,100,101,69,114,114,111,114,218,9,116,114,97, - 110,115,108,97,116,101,218,11,99,112,52,51,55,95,116,97, - 98,108,101,114,19,0,0,0,114,20,0,0,0,114,21,0, - 0,0,114,30,0,0,0,114,45,0,0,0,114,80,0,0, - 0,41,26,114,29,0,0,0,218,2,102,112,90,15,104,101, - 97,100,101,114,95,112,111,115,105,116,105,111,110,218,6,98, - 117,102,102,101,114,218,9,102,105,108,101,95,115,105,122,101, - 90,17,109,97,120,95,99,111,109,109,101,110,116,95,115,116, - 97,114,116,218,4,100,97,116,97,90,3,112,111,115,218,11, - 104,101,97,100,101,114,95,115,105,122,101,90,13,104,101,97, - 100,101,114,95,111,102,102,115,101,116,90,10,97,114,99,95, - 111,102,102,115,101,116,114,33,0,0,0,218,5,99,111,117, - 110,116,218,5,102,108,97,103,115,218,8,99,111,109,112,114, - 101,115,115,218,4,116,105,109,101,218,4,100,97,116,101,218, - 3,99,114,99,218,9,100,97,116,97,95,115,105,122,101,218, - 9,110,97,109,101,95,115,105,122,101,218,10,101,120,116,114, - 97,95,115,105,122,101,90,12,99,111,109,109,101,110,116,95, - 115,105,122,101,218,11,102,105,108,101,95,111,102,102,115,101, - 116,114,44,0,0,0,114,13,0,0,0,218,1,116,114,9, - 0,0,0,114,9,0,0,0,114,10,0,0,0,114,27,0, - 0,0,130,1,0,0,115,234,0,0,0,2,1,14,1,14, - 1,18,1,8,2,2,1,14,1,8,1,14,1,14,1,18, - 1,12,1,18,1,18,1,2,3,12,1,12,1,14,1,10, - 1,2,1,6,255,8,2,2,1,2,255,2,1,4,255,2, - 2,10,1,12,1,14,1,10,1,2,1,6,255,10,2,10, - 1,10,1,2,1,6,255,16,2,14,1,10,1,2,1,6, - 255,16,2,16,2,16,1,10,1,18,1,10,1,18,1,8, - 1,8,1,10,1,18,1,4,2,4,2,2,1,14,1,14, - 1,18,1,2,1,10,1,14,1,8,1,18,2,4,1,14, - 1,8,1,16,1,16,1,16,1,16,1,16,1,16,1,16, - 1,16,1,16,1,16,1,16,1,12,1,10,1,18,1,8, - 1,2,2,14,1,14,1,18,1,14,1,18,1,2,4,28, - 1,22,1,14,1,18,1,10,2,10,2,2,3,14,1,14, - 1,18,1,12,2,12,1,20,1,8,1,8,1,36,202,14, - 55,4,1,2,247,2,246,2,246,2,227,2,227,2,248,2, - 246,2,248,255,128,114,27,0,0,0,117,190,1,0,0,0, - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, - 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32, - 33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48, - 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64, - 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80, - 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96, - 97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, - 113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,195, - 135,195,188,195,169,195,162,195,164,195,160,195,165,195,167,195, - 170,195,171,195,168,195,175,195,174,195,172,195,132,195,133,195, - 137,195,166,195,134,195,180,195,182,195,178,195,187,195,185,195, - 191,195,150,195,156,194,162,194,163,194,165,226,130,167,198,146, - 195,161,195,173,195,179,195,186,195,177,195,145,194,170,194,186, - 194,191,226,140,144,194,172,194,189,194,188,194,161,194,171,194, - 187,226,150,145,226,150,146,226,150,147,226,148,130,226,148,164, - 226,149,161,226,149,162,226,149,150,226,149,149,226,149,163,226, - 149,145,226,149,151,226,149,157,226,149,156,226,149,155,226,148, - 144,226,148,148,226,148,180,226,148,172,226,148,156,226,148,128, - 226,148,188,226,149,158,226,149,159,226,149,154,226,149,148,226, - 149,169,226,149,166,226,149,160,226,149,144,226,149,172,226,149, - 167,226,149,168,226,149,164,226,149,165,226,149,153,226,149,152, - 226,149,146,226,149,147,226,149,171,226,149,170,226,148,152,226, - 148,140,226,150,136,226,150,132,226,150,140,226,150,144,226,150, - 128,206,177,195,159,206,147,207,128,206,163,207,131,194,181,207, - 132,206,166,206,152,206,169,206,180,226,136,158,207,134,206,181, - 226,136,169,226,137,161,194,177,226,137,165,226,137,164,226,140, - 160,226,140,161,195,183,226,137,136,194,176,226,136,153,194,183, - 226,136,154,226,129,191,194,178,226,150,160,194,160,99,0,0, - 0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0, - 0,0,67,0,0,0,115,106,0,0,0,116,0,114,22,116, - 1,160,2,100,1,161,1,1,0,116,3,100,2,131,1,130, - 1,100,3,97,0,122,56,122,16,100,4,100,5,108,4,109, - 5,125,0,1,0,87,0,110,30,4,0,116,6,121,104,1, - 0,1,0,1,0,116,1,160,2,100,1,161,1,1,0,116, - 3,100,2,131,1,130,1,87,0,100,6,97,0,110,6,100, - 6,97,0,119,0,116,1,160,2,100,7,161,1,1,0,124, - 0,83,0,119,0,41,8,78,122,27,122,105,112,105,109,112, - 111,114,116,58,32,122,108,105,98,32,85,78,65,86,65,73, - 76,65,66,76,69,250,41,99,97,110,39,116,32,100,101,99, - 111,109,112,114,101,115,115,32,100,97,116,97,59,32,122,108, - 105,98,32,110,111,116,32,97,118,97,105,108,97,98,108,101, - 84,114,0,0,0,0,169,1,218,10,100,101,99,111,109,112, - 114,101,115,115,70,122,25,122,105,112,105,109,112,111,114,116, - 58,32,122,108,105,98,32,97,118,97,105,108,97,98,108,101, - 41,7,218,15,95,105,109,112,111,114,116,105,110,103,95,122, - 108,105,98,114,45,0,0,0,114,80,0,0,0,114,3,0, - 0,0,90,4,122,108,105,98,114,143,0,0,0,218,9,69, - 120,99,101,112,116,105,111,110,114,142,0,0,0,114,9,0, - 0,0,114,9,0,0,0,114,10,0,0,0,218,20,95,103, - 101,116,95,100,101,99,111,109,112,114,101,115,115,95,102,117, - 110,99,32,2,0,0,115,30,0,0,0,4,2,10,3,8, - 1,4,2,4,1,16,1,12,1,10,1,8,1,2,128,12, - 2,10,2,4,1,2,249,255,128,114,146,0,0,0,99,2, - 0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,9, - 0,0,0,67,0,0,0,115,134,1,0,0,124,1,92,8, - 125,2,125,3,125,4,125,5,125,6,125,7,125,8,125,9, - 124,4,100,1,107,0,114,36,116,0,100,2,131,1,130,1, - 116,1,160,2,124,0,161,1,144,1,143,4,125,10,122,14, - 124,10,160,3,124,6,161,1,1,0,87,0,110,32,4,0, - 116,4,144,1,121,132,1,0,1,0,1,0,116,0,100,3, - 124,0,155,2,157,2,124,0,100,4,141,2,130,1,124,10, - 160,5,100,5,161,1,125,11,116,6,124,11,131,1,100,5, - 107,3,114,128,116,7,100,6,131,1,130,1,124,11,100,0, - 100,7,133,2,25,0,100,8,107,3,114,162,116,0,100,9, - 124,0,155,2,157,2,124,0,100,4,141,2,130,1,116,8, - 124,11,100,10,100,11,133,2,25,0,131,1,125,12,116,8, - 124,11,100,11,100,5,133,2,25,0,131,1,125,13,100,5, - 124,12,23,0,124,13,23,0,125,14,124,6,124,14,55,0, - 125,6,122,14,124,10,160,3,124,6,161,1,1,0,87,0, - 110,32,4,0,116,4,144,1,121,130,1,0,1,0,1,0, - 116,0,100,3,124,0,155,2,157,2,124,0,100,4,141,2, - 130,1,124,10,160,5,124,4,161,1,125,15,116,6,124,15, - 131,1,124,4,107,3,144,1,114,38,116,4,100,12,131,1, - 130,1,87,0,100,0,4,0,4,0,131,3,1,0,110,18, - 49,0,144,1,115,60,119,1,1,0,1,0,1,0,89,0, - 1,0,124,3,100,1,107,2,144,1,114,84,124,15,83,0, - 122,10,116,9,131,0,125,16,87,0,110,22,4,0,116,10, - 144,1,121,128,1,0,1,0,1,0,116,0,100,13,131,1, - 130,1,124,16,124,15,100,14,131,2,83,0,119,0,119,0, - 119,0,41,15,78,114,0,0,0,0,122,18,110,101,103,97, - 116,105,118,101,32,100,97,116,97,32,115,105,122,101,114,94, - 0,0,0,114,12,0,0,0,114,106,0,0,0,114,100,0, - 0,0,114,95,0,0,0,115,4,0,0,0,80,75,3,4, - 122,23,98,97,100,32,108,111,99,97,108,32,102,105,108,101, - 32,104,101,97,100,101,114,58,32,233,26,0,0,0,114,105, - 0,0,0,122,26,122,105,112,105,109,112,111,114,116,58,32, - 99,97,110,39,116,32,114,101,97,100,32,100,97,116,97,114, - 141,0,0,0,105,241,255,255,255,41,11,114,3,0,0,0, - 114,112,0,0,0,114,113,0,0,0,114,114,0,0,0,114, - 22,0,0,0,114,116,0,0,0,114,55,0,0,0,114,121, - 0,0,0,114,1,0,0,0,114,146,0,0,0,114,145,0, - 0,0,41,17,114,29,0,0,0,114,58,0,0,0,90,8, - 100,97,116,97,112,97,116,104,114,132,0,0,0,114,136,0, - 0,0,114,127,0,0,0,114,139,0,0,0,114,133,0,0, - 0,114,134,0,0,0,114,135,0,0,0,114,125,0,0,0, - 114,126,0,0,0,114,137,0,0,0,114,138,0,0,0,114, - 129,0,0,0,90,8,114,97,119,95,100,97,116,97,114,143, - 0,0,0,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,114,56,0,0,0,53,2,0,0,115,70,0,0,0, - 20,1,8,1,8,1,14,2,2,2,14,1,14,1,18,1, - 10,1,12,1,8,1,16,2,18,2,16,2,16,1,12,1, - 8,1,2,1,14,1,14,1,18,1,10,1,14,1,40,1, - 10,2,4,2,2,3,10,1,14,1,8,1,10,1,2,254, - 2,243,2,240,255,128,114,56,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,16,0,0,0,116,0,124,0,124,1,24, - 0,131,1,100,1,107,1,83,0,41,2,78,114,5,0,0, - 0,41,1,218,3,97,98,115,41,2,90,2,116,49,90,2, - 116,50,114,9,0,0,0,114,9,0,0,0,114,10,0,0, - 0,218,9,95,101,113,95,109,116,105,109,101,99,2,0,0, - 115,4,0,0,0,16,2,255,128,114,149,0,0,0,99,5, - 0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,6, - 0,0,0,67,0,0,0,115,254,0,0,0,124,3,124,2, - 100,1,156,2,125,5,116,0,160,1,124,4,124,3,124,5, - 161,3,125,6,124,6,100,2,64,0,100,3,107,3,125,7, - 124,7,114,126,124,6,100,4,64,0,100,3,107,3,125,8, - 116,2,106,3,100,5,107,3,114,124,124,8,115,76,116,2, - 106,3,100,6,107,2,114,124,116,4,124,0,124,2,131,2, - 125,9,124,9,100,0,117,1,114,124,116,2,160,5,116,0, - 106,6,124,9,161,2,125,10,116,0,160,7,124,4,124,10, - 124,3,124,5,161,4,1,0,110,80,116,8,124,0,124,2, - 131,2,92,2,125,11,125,12,124,11,114,206,116,9,116,10, - 124,4,100,7,100,8,133,2,25,0,131,1,124,11,131,2, - 114,186,116,10,124,4,100,8,100,9,133,2,25,0,131,1, - 124,12,107,3,114,206,116,11,160,12,100,10,124,3,155,2, - 157,2,161,1,1,0,100,0,83,0,116,13,160,14,124,4, - 100,9,100,0,133,2,25,0,161,1,125,13,116,15,124,13, - 116,16,131,2,115,250,116,17,100,11,124,1,155,2,100,12, - 157,3,131,1,130,1,124,13,83,0,41,13,78,41,2,114, - 44,0,0,0,114,13,0,0,0,114,5,0,0,0,114,0, - 0,0,0,114,88,0,0,0,90,5,110,101,118,101,114,90, - 6,97,108,119,97,121,115,114,101,0,0,0,114,96,0,0, - 0,114,97,0,0,0,122,22,98,121,116,101,99,111,100,101, - 32,105,115,32,115,116,97,108,101,32,102,111,114,32,122,16, - 99,111,109,112,105,108,101,100,32,109,111,100,117,108,101,32, - 122,21,32,105,115,32,110,111,116,32,97,32,99,111,100,101, - 32,111,98,106,101,99,116,41,18,114,21,0,0,0,90,13, - 95,99,108,97,115,115,105,102,121,95,112,121,99,218,4,95, - 105,109,112,90,21,99,104,101,99,107,95,104,97,115,104,95, - 98,97,115,101,100,95,112,121,99,115,218,15,95,103,101,116, - 95,112,121,99,95,115,111,117,114,99,101,218,11,115,111,117, - 114,99,101,95,104,97,115,104,90,17,95,82,65,87,95,77, - 65,71,73,67,95,78,85,77,66,69,82,90,18,95,118,97, - 108,105,100,97,116,101,95,104,97,115,104,95,112,121,99,218, - 29,95,103,101,116,95,109,116,105,109,101,95,97,110,100,95, - 115,105,122,101,95,111,102,95,115,111,117,114,99,101,114,149, - 0,0,0,114,2,0,0,0,114,45,0,0,0,114,80,0, - 0,0,218,7,109,97,114,115,104,97,108,90,5,108,111,97, - 100,115,114,15,0,0,0,218,10,95,99,111,100,101,95,116, - 121,112,101,218,9,84,121,112,101,69,114,114,111,114,41,14, - 114,32,0,0,0,114,57,0,0,0,114,66,0,0,0,114, - 38,0,0,0,114,128,0,0,0,90,11,101,120,99,95,100, - 101,116,97,105,108,115,114,131,0,0,0,90,10,104,97,115, - 104,95,98,97,115,101,100,90,12,99,104,101,99,107,95,115, - 111,117,114,99,101,90,12,115,111,117,114,99,101,95,98,121, - 116,101,115,114,152,0,0,0,90,12,115,111,117,114,99,101, - 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,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,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, + 114,121,32,111,102,102,115,101,116,58,32,122,38,98,97,100, + 32,99,101,110,116,114,97,108,32,100,105,114,101,99,116,111, + 114,121,32,115,105,122,101,32,111,114,32,111,102,102,115,101, + 116,58,32,84,233,46,0,0,0,250,27,69,79,70,32,114, + 101,97,100,32,119,104,101,114,101,32,110,111,116,32,101,120, + 112,101,99,116,101,100,115,4,0,0,0,80,75,1,2,233, + 8,0,0,0,233,10,0,0,0,233,14,0,0,0,233,24, + 0,0,0,233,28,0,0,0,233,30,0,0,0,233,32,0, + 0,0,233,34,0,0,0,233,42,0,0,0,122,25,98,97, + 100,32,108,111,99,97,108,32,104,101,97,100,101,114,32,111, + 102,102,115,101,116,58,32,105,0,8,0,0,218,5,97,115, + 99,105,105,90,6,108,97,116,105,110,49,250,1,47,114,5, + 0,0,0,122,33,122,105,112,105,109,112,111,114,116,58,32, + 102,111,117,110,100,32,123,125,32,110,97,109,101,115,32,105, + 110,32,123,33,114,125,41,26,218,3,95,105,111,218,9,111, + 112,101,110,95,99,111,100,101,114,22,0,0,0,114,3,0, + 0,0,218,4,115,101,101,107,218,20,69,78,68,95,67,69, + 78,84,82,65,76,95,68,73,82,95,83,73,90,69,90,4, + 116,101,108,108,218,4,114,101,97,100,114,55,0,0,0,218, + 18,83,84,82,73,78,71,95,69,78,68,95,65,82,67,72, + 73,86,69,218,3,109,97,120,218,15,77,65,88,95,67,79, + 77,77,69,78,84,95,76,69,78,218,5,114,102,105,110,100, + 114,2,0,0,0,218,8,69,79,70,69,114,114,111,114,114, + 1,0,0,0,114,65,0,0,0,218,18,85,110,105,99,111, + 100,101,68,101,99,111,100,101,69,114,114,111,114,218,9,116, + 114,97,110,115,108,97,116,101,218,11,99,112,52,51,55,95, + 116,97,98,108,101,114,19,0,0,0,114,20,0,0,0,114, + 21,0,0,0,114,30,0,0,0,114,45,0,0,0,114,80, + 0,0,0,41,26,114,29,0,0,0,218,2,102,112,90,15, + 104,101,97,100,101,114,95,112,111,115,105,116,105,111,110,218, + 6,98,117,102,102,101,114,218,9,102,105,108,101,95,115,105, + 122,101,90,17,109,97,120,95,99,111,109,109,101,110,116,95, + 115,116,97,114,116,218,4,100,97,116,97,90,3,112,111,115, + 218,11,104,101,97,100,101,114,95,115,105,122,101,90,13,104, + 101,97,100,101,114,95,111,102,102,115,101,116,90,10,97,114, + 99,95,111,102,102,115,101,116,114,33,0,0,0,218,5,99, + 111,117,110,116,218,5,102,108,97,103,115,218,8,99,111,109, + 112,114,101,115,115,218,4,116,105,109,101,218,4,100,97,116, + 101,218,3,99,114,99,218,9,100,97,116,97,95,115,105,122, + 101,218,9,110,97,109,101,95,115,105,122,101,218,10,101,120, + 116,114,97,95,115,105,122,101,90,12,99,111,109,109,101,110, + 116,95,115,105,122,101,218,11,102,105,108,101,95,111,102,102, + 115,101,116,114,44,0,0,0,114,13,0,0,0,218,1,116, + 114,9,0,0,0,114,9,0,0,0,114,10,0,0,0,114, + 27,0,0,0,130,1,0,0,115,240,0,0,0,2,1,14, + 1,14,1,18,1,8,2,2,1,14,1,8,1,14,1,14, + 1,18,1,12,1,18,1,18,1,2,3,12,1,12,1,14, + 1,10,1,2,1,6,255,8,2,2,1,2,255,2,1,4, + 255,2,2,10,1,12,1,14,1,10,1,2,1,6,255,10, + 2,10,1,10,1,2,1,6,255,16,2,14,1,10,1,2, + 1,6,255,16,2,16,2,16,1,10,1,18,1,10,1,18, + 1,8,1,8,1,10,1,18,1,4,2,4,2,2,1,14, + 1,14,1,18,1,2,1,10,1,14,1,8,1,18,2,4, + 1,14,1,8,1,16,1,16,1,16,1,16,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,1,12,1,10,1,18, + 1,8,1,2,2,14,1,14,1,18,1,14,1,18,1,2, + 4,28,1,18,1,4,255,14,2,18,1,10,2,10,2,2, + 3,14,1,14,1,18,1,12,2,12,1,20,1,8,1,8, + 1,4,202,14,6,18,128,14,49,4,1,2,247,2,246,2, + 246,2,227,2,227,2,248,2,246,2,248,255,128,114,27,0, + 0,0,117,190,1,0,0,0,1,2,3,4,5,6,7,8, + 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24, + 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, + 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56, + 57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72, + 73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88, + 89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104, + 105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120, + 121,122,123,124,125,126,127,195,135,195,188,195,169,195,162,195, + 164,195,160,195,165,195,167,195,170,195,171,195,168,195,175,195, + 174,195,172,195,132,195,133,195,137,195,166,195,134,195,180,195, + 182,195,178,195,187,195,185,195,191,195,150,195,156,194,162,194, + 163,194,165,226,130,167,198,146,195,161,195,173,195,179,195,186, + 195,177,195,145,194,170,194,186,194,191,226,140,144,194,172,194, + 189,194,188,194,161,194,171,194,187,226,150,145,226,150,146,226, + 150,147,226,148,130,226,148,164,226,149,161,226,149,162,226,149, + 150,226,149,149,226,149,163,226,149,145,226,149,151,226,149,157, + 226,149,156,226,149,155,226,148,144,226,148,148,226,148,180,226, + 148,172,226,148,156,226,148,128,226,148,188,226,149,158,226,149, + 159,226,149,154,226,149,148,226,149,169,226,149,166,226,149,160, + 226,149,144,226,149,172,226,149,167,226,149,168,226,149,164,226, + 149,165,226,149,153,226,149,152,226,149,146,226,149,147,226,149, + 171,226,149,170,226,148,152,226,148,140,226,150,136,226,150,132, + 226,150,140,226,150,144,226,150,128,206,177,195,159,206,147,207, + 128,206,163,207,131,194,181,207,132,206,166,206,152,206,169,206, + 180,226,136,158,207,134,206,181,226,136,169,226,137,161,194,177, + 226,137,165,226,137,164,226,140,160,226,140,161,195,183,226,137, + 136,194,176,226,136,153,194,183,226,136,154,226,129,191,194,178, + 226,150,160,194,160,99,0,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,8,0,0,0,67,0,0,0,115,106, + 0,0,0,116,0,114,22,116,1,160,2,100,1,161,1,1, + 0,116,3,100,2,131,1,130,1,100,3,97,0,122,56,122, + 16,100,4,100,5,108,4,109,5,125,0,1,0,87,0,110, + 30,4,0,116,6,121,104,1,0,1,0,1,0,116,1,160, + 2,100,1,161,1,1,0,116,3,100,2,131,1,130,1,87, + 0,100,6,97,0,110,6,100,6,97,0,119,0,116,1,160, + 2,100,7,161,1,1,0,124,0,83,0,119,0,41,8,78, + 122,27,122,105,112,105,109,112,111,114,116,58,32,122,108,105, + 98,32,85,78,65,86,65,73,76,65,66,76,69,250,41,99, + 97,110,39,116,32,100,101,99,111,109,112,114,101,115,115,32, + 100,97,116,97,59,32,122,108,105,98,32,110,111,116,32,97, + 118,97,105,108,97,98,108,101,84,114,0,0,0,0,169,1, + 218,10,100,101,99,111,109,112,114,101,115,115,70,122,25,122, + 105,112,105,109,112,111,114,116,58,32,122,108,105,98,32,97, + 118,97,105,108,97,98,108,101,41,7,218,15,95,105,109,112, + 111,114,116,105,110,103,95,122,108,105,98,114,45,0,0,0, + 114,80,0,0,0,114,3,0,0,0,90,4,122,108,105,98, + 114,143,0,0,0,218,9,69,120,99,101,112,116,105,111,110, + 114,142,0,0,0,114,9,0,0,0,114,9,0,0,0,114, + 10,0,0,0,218,20,95,103,101,116,95,100,101,99,111,109, + 112,114,101,115,115,95,102,117,110,99,32,2,0,0,115,30, + 0,0,0,4,2,10,3,8,1,4,2,4,1,16,1,12, + 1,10,1,8,1,2,253,12,5,10,2,4,1,2,249,255, + 128,114,146,0,0,0,99,2,0,0,0,0,0,0,0,0, + 0,0,0,17,0,0,0,9,0,0,0,67,0,0,0,115, + 134,1,0,0,124,1,92,8,125,2,125,3,125,4,125,5, + 125,6,125,7,125,8,125,9,124,4,100,1,107,0,114,36, + 116,0,100,2,131,1,130,1,116,1,160,2,124,0,161,1, + 144,1,143,4,125,10,122,14,124,10,160,3,124,6,161,1, + 1,0,87,0,110,32,4,0,116,4,144,1,121,132,1,0, + 1,0,1,0,116,0,100,3,124,0,155,2,157,2,124,0, + 100,4,141,2,130,1,124,10,160,5,100,5,161,1,125,11, + 116,6,124,11,131,1,100,5,107,3,114,128,116,7,100,6, + 131,1,130,1,124,11,100,0,100,7,133,2,25,0,100,8, + 107,3,114,162,116,0,100,9,124,0,155,2,157,2,124,0, + 100,4,141,2,130,1,116,8,124,11,100,10,100,11,133,2, + 25,0,131,1,125,12,116,8,124,11,100,11,100,5,133,2, + 25,0,131,1,125,13,100,5,124,12,23,0,124,13,23,0, + 125,14,124,6,124,14,55,0,125,6,122,14,124,10,160,3, + 124,6,161,1,1,0,87,0,110,32,4,0,116,4,144,1, + 121,130,1,0,1,0,1,0,116,0,100,3,124,0,155,2, + 157,2,124,0,100,4,141,2,130,1,124,10,160,5,124,4, + 161,1,125,15,116,6,124,15,131,1,124,4,107,3,144,1, + 114,38,116,4,100,12,131,1,130,1,87,0,100,0,4,0, + 4,0,131,3,1,0,110,18,49,0,144,1,115,60,119,1, + 1,0,1,0,1,0,89,0,1,0,124,3,100,1,107,2, + 144,1,114,84,124,15,83,0,122,10,116,9,131,0,125,16, + 87,0,110,22,4,0,116,10,144,1,121,128,1,0,1,0, + 1,0,116,0,100,13,131,1,130,1,124,16,124,15,100,14, + 131,2,83,0,119,0,119,0,119,0,41,15,78,114,0,0, + 0,0,122,18,110,101,103,97,116,105,118,101,32,100,97,116, + 97,32,115,105,122,101,114,94,0,0,0,114,12,0,0,0, + 114,106,0,0,0,114,100,0,0,0,114,95,0,0,0,115, + 4,0,0,0,80,75,3,4,122,23,98,97,100,32,108,111, + 99,97,108,32,102,105,108,101,32,104,101,97,100,101,114,58, + 32,233,26,0,0,0,114,105,0,0,0,122,26,122,105,112, + 105,109,112,111,114,116,58,32,99,97,110,39,116,32,114,101, + 97,100,32,100,97,116,97,114,141,0,0,0,105,241,255,255, + 255,41,11,114,3,0,0,0,114,112,0,0,0,114,113,0, + 0,0,114,114,0,0,0,114,22,0,0,0,114,116,0,0, + 0,114,55,0,0,0,114,121,0,0,0,114,1,0,0,0, + 114,146,0,0,0,114,145,0,0,0,41,17,114,29,0,0, + 0,114,58,0,0,0,90,8,100,97,116,97,112,97,116,104, + 114,132,0,0,0,114,136,0,0,0,114,127,0,0,0,114, + 139,0,0,0,114,133,0,0,0,114,134,0,0,0,114,135, + 0,0,0,114,125,0,0,0,114,126,0,0,0,114,137,0, + 0,0,114,138,0,0,0,114,129,0,0,0,90,8,114,97, + 119,95,100,97,116,97,114,143,0,0,0,114,9,0,0,0, + 114,9,0,0,0,114,10,0,0,0,114,56,0,0,0,53, + 2,0,0,115,74,0,0,0,20,1,8,1,8,1,14,2, + 2,2,14,1,14,1,18,1,10,1,12,1,8,1,16,2, + 18,2,16,2,16,1,12,1,8,1,2,1,14,1,14,1, + 18,1,10,1,14,1,8,1,14,255,18,128,10,3,4,2, + 2,3,10,1,14,1,8,1,10,1,2,254,2,243,2,240, + 255,128,114,56,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,16,0,0,0,116,0,124,0,124,1,24,0,131,1,100, + 1,107,1,83,0,41,2,78,114,5,0,0,0,41,1,218, + 3,97,98,115,41,2,90,2,116,49,90,2,116,50,114,9, + 0,0,0,114,9,0,0,0,114,10,0,0,0,218,9,95, + 101,113,95,109,116,105,109,101,99,2,0,0,115,4,0,0, + 0,16,2,255,128,114,149,0,0,0,99,5,0,0,0,0, + 0,0,0,0,0,0,0,14,0,0,0,6,0,0,0,67, + 0,0,0,115,254,0,0,0,124,3,124,2,100,1,156,2, + 125,5,116,0,160,1,124,4,124,3,124,5,161,3,125,6, + 124,6,100,2,64,0,100,3,107,3,125,7,124,7,114,126, + 124,6,100,4,64,0,100,3,107,3,125,8,116,2,106,3, + 100,5,107,3,114,124,124,8,115,76,116,2,106,3,100,6, + 107,2,114,124,116,4,124,0,124,2,131,2,125,9,124,9, + 100,0,117,1,114,124,116,2,160,5,116,0,106,6,124,9, + 161,2,125,10,116,0,160,7,124,4,124,10,124,3,124,5, + 161,4,1,0,110,80,116,8,124,0,124,2,131,2,92,2, + 125,11,125,12,124,11,114,206,116,9,116,10,124,4,100,7, + 100,8,133,2,25,0,131,1,124,11,131,2,114,186,116,10, + 124,4,100,8,100,9,133,2,25,0,131,1,124,12,107,3, + 114,206,116,11,160,12,100,10,124,3,155,2,157,2,161,1, + 1,0,100,0,83,0,116,13,160,14,124,4,100,9,100,0, + 133,2,25,0,161,1,125,13,116,15,124,13,116,16,131,2, + 115,250,116,17,100,11,124,1,155,2,100,12,157,3,131,1, + 130,1,124,13,83,0,41,13,78,41,2,114,44,0,0,0, + 114,13,0,0,0,114,5,0,0,0,114,0,0,0,0,114, + 88,0,0,0,90,5,110,101,118,101,114,90,6,97,108,119, + 97,121,115,114,101,0,0,0,114,96,0,0,0,114,97,0, + 0,0,122,22,98,121,116,101,99,111,100,101,32,105,115,32, + 115,116,97,108,101,32,102,111,114,32,122,16,99,111,109,112, + 105,108,101,100,32,109,111,100,117,108,101,32,122,21,32,105, + 115,32,110,111,116,32,97,32,99,111,100,101,32,111,98,106, + 101,99,116,41,18,114,21,0,0,0,90,13,95,99,108,97, + 115,115,105,102,121,95,112,121,99,218,4,95,105,109,112,90, + 21,99,104,101,99,107,95,104,97,115,104,95,98,97,115,101, + 100,95,112,121,99,115,218,15,95,103,101,116,95,112,121,99, + 95,115,111,117,114,99,101,218,11,115,111,117,114,99,101,95, + 104,97,115,104,90,17,95,82,65,87,95,77,65,71,73,67, + 95,78,85,77,66,69,82,90,18,95,118,97,108,105,100,97, + 116,101,95,104,97,115,104,95,112,121,99,218,29,95,103,101, + 116,95,109,116,105,109,101,95,97,110,100,95,115,105,122,101, + 95,111,102,95,115,111,117,114,99,101,114,149,0,0,0,114, + 2,0,0,0,114,45,0,0,0,114,80,0,0,0,218,7, + 109,97,114,115,104,97,108,90,5,108,111,97,100,115,114,15, + 0,0,0,218,10,95,99,111,100,101,95,116,121,112,101,218, + 9,84,121,112,101,69,114,114,111,114,41,14,114,32,0,0, + 0,114,57,0,0,0,114,66,0,0,0,114,38,0,0,0, + 114,128,0,0,0,90,11,101,120,99,95,100,101,116,97,105, + 108,115,114,131,0,0,0,90,10,104,97,115,104,95,98,97, + 115,101,100,90,12,99,104,101,99,107,95,115,111,117,114,99, + 101,90,12,115,111,117,114,99,101,95,98,121,116,101,115,114, + 152,0,0,0,90,12,115,111,117,114,99,101,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,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,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 Wed Jan 13 10:05:34 2021 From: webhook-mailer at python.org (markshannon) Date: Wed, 13 Jan 2021 15:05:34 -0000 Subject: [Python-checkins] Eliminate NOPs in extended blocks. (GH-24209) Message-ID: https://github.com/python/cpython/commit/1659ad1c644240d3db1d65e782c8c53b4c4e71ea commit: 1659ad1c644240d3db1d65e782c8c53b4c4e71ea branch: master author: Mark Shannon committer: markshannon date: 2021-01-13T15:05:04Z summary: Eliminate NOPs in extended blocks. (GH-24209) files: M Python/compile.c diff --git a/Python/compile.c b/Python/compile.c index 268c5aa9eab2e..d373d8a4061a3 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -6328,10 +6328,9 @@ optimize_basic_block(basicblock *bb, PyObject *consts) static void -clean_basic_block(basicblock *bb) { - /* Remove NOPs. */ +clean_basic_block(basicblock *bb, int prev_lineno) { + /* Remove NOPs when legal to do so. */ int dest = 0; - int prev_lineno = -1; for (int src = 0; src < bb->b_iused; src++) { int lineno = bb->b_instr[src].i_lineno; if (bb->b_instr[src].i_opcode == NOP) { @@ -6531,7 +6530,7 @@ optimize_cfg(struct assembler *a, PyObject *consts) if (optimize_basic_block(b, consts)) { return -1; } - clean_basic_block(b); + clean_basic_block(b, -1); assert(b->b_predecessors == 0); } if (mark_reachable(a)) { @@ -6544,6 +6543,15 @@ optimize_cfg(struct assembler *a, PyObject *consts) b->b_nofallthrough = 0; } } + basicblock *pred = NULL; + for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { + int prev_lineno = -1; + if (pred && pred->b_iused) { + prev_lineno = pred->b_instr[pred->b_iused-1].i_lineno; + } + clean_basic_block(b, prev_lineno); + pred = b->b_nofallthrough ? NULL : b; + } eliminate_empty_basic_blocks(a->a_entry); /* Delete jump instructions made redundant by previous step. If a non-empty block ends with a jump instruction, check if the next non-empty block @@ -6571,7 +6579,7 @@ optimize_cfg(struct assembler *a, PyObject *consts) case JUMP_ABSOLUTE: case JUMP_FORWARD: b_last_instr->i_opcode = NOP; - clean_basic_block(b); + clean_basic_block(b, -1); maybe_empty_blocks = 1; break; } From webhook-mailer at python.org Wed Jan 13 11:17:04 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Wed, 13 Jan 2021 16:17:04 -0000 Subject: [Python-checkins] bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208) Message-ID: https://github.com/python/cpython/commit/61d8c54f43a7871d016f98b38f86858817d927d5 commit: 61d8c54f43a7871d016f98b38f86858817d927d5 branch: master author: Tobias Holl committer: serhiy-storchaka date: 2021-01-13T18:16:40+02:00 summary: bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208) Before, using the * operator to repeat a bytearray would copy data from the start of the internal buffer (ob_bytes) and not from the start of the actual data (ob_start). files: A Misc/NEWS.d/next/Core and Builtins/2021-01-13-14-06-01.bpo-42924._WS1Ok.rst M Lib/test/test_bytes.py M Objects/bytearrayobject.c diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index d550abfc65640..381030fe0e838 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -1666,6 +1666,16 @@ def test_iterator_length_hint(self): # Shouldn't raise an error self.assertEqual(list(it), []) + def test_repeat_after_setslice(self): + # bpo-42924: * used to copy from the wrong memory location + b = bytearray(b'abc') + b[:2] = b'x' + b1 = b * 1 + b3 = b * 3 + self.assertEqual(b1, b'xc') + self.assertEqual(b1, b) + self.assertEqual(b3, b'xcxcxc') + class AssortedBytesTest(unittest.TestCase): # diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-13-14-06-01.bpo-42924._WS1Ok.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-13-14-06-01.bpo-42924._WS1Ok.rst new file mode 100644 index 0000000000000..33fbb5235ddb6 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-13-14-06-01.bpo-42924._WS1Ok.rst @@ -0,0 +1 @@ +Fix ``bytearray`` repetition incorrectly copying data from the start of the buffer, even if the data is offset within the buffer (e.g. after reassigning a slice at the start of the ``bytearray`` to a shorter byte string). diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 7cb2b1478cf9c..2eaca5cec4290 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -321,6 +321,7 @@ bytearray_repeat(PyByteArrayObject *self, Py_ssize_t count) PyByteArrayObject *result; Py_ssize_t mysize; Py_ssize_t size; + const char *buf; if (count < 0) count = 0; @@ -329,13 +330,14 @@ bytearray_repeat(PyByteArrayObject *self, Py_ssize_t count) return PyErr_NoMemory(); size = mysize * count; result = (PyByteArrayObject *)PyByteArray_FromStringAndSize(NULL, size); + buf = PyByteArray_AS_STRING(self); if (result != NULL && size != 0) { if (mysize == 1) - memset(result->ob_bytes, self->ob_bytes[0], size); + memset(result->ob_bytes, buf[0], size); else { Py_ssize_t i; for (i = 0; i < count; i++) - memcpy(result->ob_bytes + i*mysize, self->ob_bytes, mysize); + memcpy(result->ob_bytes + i*mysize, buf, mysize); } } return (PyObject *)result; From webhook-mailer at python.org Wed Jan 13 18:17:48 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Wed, 13 Jan 2021 23:17:48 -0000 Subject: [Python-checkins] bpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214) Message-ID: https://github.com/python/cpython/commit/a330365ca5ae836075f306334ab648bf23471481 commit: a330365ca5ae836075f306334ab648bf23471481 branch: master author: Erlend Egeberg Aasland committer: berkerpeksag date: 2021-01-14T01:17:33+02:00 summary: bpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214) files: M Modules/_sqlite/clinic/cursor.c.h M Modules/_sqlite/cursor.c diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index d5cf0a5eaadae..7a79d74818a2e 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -138,10 +138,13 @@ pysqlite_cursor_fetchone(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) } PyDoc_STRVAR(pysqlite_cursor_fetchmany__doc__, -"fetchmany($self, /, size=cursor.arraysize)\n" +"fetchmany($self, /, size=1)\n" "--\n" "\n" -"Fetches several rows from the resultset."); +"Fetches several rows from the resultset.\n" +"\n" +" size\n" +" The default value is set by the Cursor.arraysize attribute."); #define PYSQLITE_CURSOR_FETCHMANY_METHODDEF \ {"fetchmany", (PyCFunction)(void(*)(void))pysqlite_cursor_fetchmany, METH_FASTCALL|METH_KEYWORDS, pysqlite_cursor_fetchmany__doc__}, @@ -256,4 +259,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=11db0de4fb1951a9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6a2d4d49784aa686 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 296d569148f8a..0852aa940264a 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -822,14 +822,15 @@ pysqlite_cursor_fetchone_impl(pysqlite_Cursor *self) /*[clinic input] _sqlite3.Cursor.fetchmany as pysqlite_cursor_fetchmany - size as maxrows: int(c_default='self->arraysize') = cursor.arraysize + size as maxrows: int(c_default='self->arraysize') = 1 + The default value is set by the Cursor.arraysize attribute. Fetches several rows from the resultset. [clinic start generated code]*/ static PyObject * pysqlite_cursor_fetchmany_impl(pysqlite_Cursor *self, int maxrows) -/*[clinic end generated code: output=a8ef31fea64d0906 input=d80ff999a7701ffb]*/ +/*[clinic end generated code: output=a8ef31fea64d0906 input=c26e6ca3f34debd0]*/ { PyObject* row; PyObject* list; From webhook-mailer at python.org Thu Jan 14 04:40:36 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Thu, 14 Jan 2021 09:40:36 -0000 Subject: [Python-checkins] bpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996) Message-ID: https://github.com/python/cpython/commit/14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9 commit: 14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9 branch: master author: Zackery Spytz committer: serhiy-storchaka date: 2021-01-14T11:40:09+02:00 summary: bpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996) files: A Misc/NEWS.d/next/Library/2020-01-13-23-37-58.bpo-39273.m5hzxV.rst M Doc/library/curses.rst M Doc/whatsnew/3.10.rst M Modules/_cursesmodule.c diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 26121acaacb7a..f55bb034b559b 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -220,11 +220,15 @@ The module :mod:`curses` defines the following functions: multiple devices, and *x*, *y*, *z* are the event's coordinates. (*z* is currently unused.) *bstate* is an integer value whose bits will be set to indicate the type of event, and will be the bitwise OR of one or more of the - following constants, where *n* is the button number from 1 to 4: + following constants, where *n* is the button number from 1 to 5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :const:`BUTTON_ALT`. + .. versionchanged:: 3.10 + The ``BUTTON5_*`` constants are now exposed if they are provided by the + underlying curses library. + .. function:: getsyx() diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 7a51a9dbfb83a..7edc552d824ab 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -242,6 +242,10 @@ by :func:`curses.color_content`, :func:`curses.init_color`, support is provided by the underlying ncurses library. (Contributed by Jeffrey Kintscher and Hans Petter Jansson in :issue:`36982`.) +The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if +they are provided by the underlying curses library. +(Contributed by Zackery Spytz in :issue:`39273`.) + distutils --------- diff --git a/Misc/NEWS.d/next/Library/2020-01-13-23-37-58.bpo-39273.m5hzxV.rst b/Misc/NEWS.d/next/Library/2020-01-13-23-37-58.bpo-39273.m5hzxV.rst new file mode 100644 index 0000000000000..c942da07da377 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-01-13-23-37-58.bpo-39273.m5hzxV.rst @@ -0,0 +1,2 @@ +The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if +available. diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 7175c72296579..7ab68c78c3159 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -4870,6 +4870,14 @@ PyInit__curses(void) SetDictInt("BUTTON4_DOUBLE_CLICKED", BUTTON4_DOUBLE_CLICKED); SetDictInt("BUTTON4_TRIPLE_CLICKED", BUTTON4_TRIPLE_CLICKED); +#if NCURSES_MOUSE_VERSION > 1 + SetDictInt("BUTTON5_PRESSED", BUTTON5_PRESSED); + SetDictInt("BUTTON5_RELEASED", BUTTON5_RELEASED); + SetDictInt("BUTTON5_CLICKED", BUTTON5_CLICKED); + SetDictInt("BUTTON5_DOUBLE_CLICKED", BUTTON5_DOUBLE_CLICKED); + SetDictInt("BUTTON5_TRIPLE_CLICKED", BUTTON5_TRIPLE_CLICKED); +#endif + SetDictInt("BUTTON_SHIFT", BUTTON_SHIFT); SetDictInt("BUTTON_CTRL", BUTTON_CTRL); SetDictInt("BUTTON_ALT", BUTTON_ALT); From webhook-mailer at python.org Thu Jan 14 10:57:19 2021 From: webhook-mailer at python.org (miss-islington) Date: Thu, 14 Jan 2021 15:57:19 -0000 Subject: [Python-checkins] Docs: Remove stray semicolon in init.rst (GH-23974) Message-ID: https://github.com/python/cpython/commit/971235827754eee6c0d9f7d39b52fecdfd4cb7b4 commit: 971235827754eee6c0d9f7d39b52fecdfd4cb7b4 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-14T07:57:08-08:00 summary: Docs: Remove stray semicolon in init.rst (GH-23974) Removed stray semicolon which was causing the docs to render weirdly (it's the function right under the one [here](https://docs.python.org/3/c-api/init.html#c._PyInterpreterState_GetEvalFrameFunc)). files: M Doc/c-api/init.rst diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 5736b83f211fb..0f759732b35ea 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1192,7 +1192,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`. .. versionadded:: 3.9 -.. c:function:: void _PyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, _PyFrameEvalFunction eval_frame); +.. c:function:: void _PyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, _PyFrameEvalFunction eval_frame) Set the frame evaluation function. From webhook-mailer at python.org Thu Jan 14 11:17:54 2021 From: webhook-mailer at python.org (miss-islington) Date: Thu, 14 Jan 2021 16:17:54 -0000 Subject: [Python-checkins] Docs: Remove stray semicolon in init.rst (GH-23974) Message-ID: https://github.com/python/cpython/commit/ddc0fa3a1c1da32359f2019d14cbcfc8eb73498b commit: ddc0fa3a1c1da32359f2019d14cbcfc8eb73498b 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-14T08:17:44-08:00 summary: Docs: Remove stray semicolon in init.rst (GH-23974) Removed stray semicolon which was causing the docs to render weirdly (it's the function right under the one [here](https://docs.python.org/3/c-api/init.htmlGH-c._PyInterpreterState_GetEvalFrameFunc)). (cherry picked from commit 971235827754eee6c0d9f7d39b52fecdfd4cb7b4) Co-authored-by: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com> files: M Doc/c-api/init.rst diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 7f06648bcb457..eb0bd14587145 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1155,7 +1155,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`. .. versionadded:: 3.9 -.. c:function:: void _PyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, _PyFrameEvalFunction eval_frame); +.. c:function:: void _PyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, _PyFrameEvalFunction eval_frame) Set the frame evaluation function. From webhook-mailer at python.org Thu Jan 14 16:36:40 2021 From: webhook-mailer at python.org (pablogsal) Date: Thu, 14 Jan 2021 21:36:40 -0000 Subject: [Python-checkins] bpo-42827: Fix crash on SyntaxError in multiline expressions (GH-24140) Message-ID: https://github.com/python/cpython/commit/e5fe509054183bed9aef42c92da8407d339e8af8 commit: e5fe509054183bed9aef42c92da8407d339e8af8 branch: master author: Lysandros Nikolaou committer: pablogsal date: 2021-01-14T21:36:30Z summary: bpo-42827: Fix crash on SyntaxError in multiline expressions (GH-24140) When trying to extract the error line for the error message there are two distinct cases: 1. The input comes from a file, which means that we can extract the error line by using `PyErr_ProgramTextObject` and which we already do. 2. The input does not come from a file, at which point we need to get the source code from the tokenizer: * If the tokenizer's current line number is the same with the line of the error, we get the line from `tok->buf` and we're ready. * Else, we can extract the error line from the source code in the following two ways: * If the input comes from a string we have all the input in `tok->str` and we can extract the error line from it. * If the input comes from stdin, i.e. the interactive prompt, we do not have access to the previous line. That's why a new field `tok->stdin_content` is added which holds the whole input for the current (multiline) statement or expression. We can then extract the error line from `tok->stdin_content` like we do in the string case above. Co-authored-by: Pablo Galindo files: A Misc/NEWS.d/next/Core and Builtins/2021-01-06-17-06-37.bpo-42827.jtRR0D.rst M Lib/test/test_exceptions.py M Parser/pegen.c M Parser/tokenizer.c M Parser/tokenizer.h diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 864422390ad30..eb70d7b4e4972 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -209,6 +209,9 @@ def testSyntaxErrorOffset(self): check('x = "a', 1, 7) check('lambda x: x = 2', 1, 1) check('f{a + b + c}', 1, 2) + check('[file for str(file) in []\n])', 1, 11) + check('[\nfile\nfor str(file)\nin\n[]\n]', 3, 5) + check('[file for\n str(file) in []]', 2, 2) # Errors thrown by compile.c check('class foo:return 1', 1, 11) diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-06-17-06-37.bpo-42827.jtRR0D.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-06-17-06-37.bpo-42827.jtRR0D.rst new file mode 100644 index 0000000000000..8e40ab6a65341 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-06-17-06-37.bpo-42827.jtRR0D.rst @@ -0,0 +1,2 @@ +Fix a crash when working out the error line of a :exc:`SyntaxError` in some +multi-line expressions. diff --git a/Parser/pegen.c b/Parser/pegen.c index 188fd282b7604..a6f97929255ac 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -380,6 +380,27 @@ _PyPegen_raise_error(Parser *p, PyObject *errtype, const char *errmsg, ...) return NULL; } +static PyObject * +get_error_line(Parser *p, Py_ssize_t lineno) +{ + /* If p->tok->fp == NULL, then we're parsing from a string, which means that + the whole source is stored in p->tok->str. If not, then we're parsing + from the REPL, so the source lines of the current (multi-line) statement + are stored in p->tok->stdin_content */ + assert(p->tok->fp == NULL || p->tok->fp == stdin); + + char *cur_line = p->tok->fp == NULL ? p->tok->str : p->tok->stdin_content; + for (int i = 0; i < lineno - 1; i++) { + cur_line = strchr(cur_line, '\n') + 1; + } + + char *next_newline; + if ((next_newline = strchr(cur_line, '\n')) == NULL) { // This is the last line + next_newline = cur_line + strlen(cur_line); + } + return PyUnicode_DecodeUTF8(cur_line, next_newline - cur_line, "replace"); +} + void * _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, Py_ssize_t lineno, Py_ssize_t col_offset, @@ -416,8 +437,22 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, } if (!error_line) { - Py_ssize_t size = p->tok->inp - p->tok->buf; - error_line = PyUnicode_DecodeUTF8(p->tok->buf, size, "replace"); + /* PyErr_ProgramTextObject was not called or returned NULL. If it was not called, + then we need to find the error line from some other source, because + p->start_rule != Py_file_input. If it returned NULL, then it either unexpectedly + failed or we're parsing from a string or the REPL. There's a third edge case where + we're actually parsing from a file, which has an E_EOF SyntaxError and in that case + `PyErr_ProgramTextObject` fails because lineno points to last_file_line + 1, which + does not physically exist */ + assert(p->tok->fp == NULL || p->tok->fp == stdin || p->tok->done == E_EOF); + + if (p->tok->lineno == lineno) { + Py_ssize_t size = p->tok->inp - p->tok->buf; + error_line = PyUnicode_DecodeUTF8(p->tok->buf, size, "replace"); + } + else { + error_line = get_error_line(p, lineno); + } if (!error_line) { goto error; } diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 96539bd556529..62cd2966231b8 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -81,6 +81,7 @@ tok_new(void) tok->decoding_readline = NULL; tok->decoding_buffer = NULL; tok->type_comments = 0; + tok->stdin_content = NULL; tok->async_hacks = 0; tok->async_def = 0; @@ -816,6 +817,8 @@ PyTokenizer_Free(struct tok_state *tok) PyMem_Free(tok->buf); if (tok->input) PyMem_Free(tok->input); + if (tok->stdin_content) + PyMem_Free(tok->stdin_content); PyMem_Free(tok); } @@ -856,6 +859,24 @@ tok_nextc(struct tok_state *tok) if (translated == NULL) return EOF; newtok = translated; + if (tok->stdin_content == NULL) { + tok->stdin_content = PyMem_Malloc(strlen(translated) + 1); + if (tok->stdin_content == NULL) { + tok->done = E_NOMEM; + return EOF; + } + sprintf(tok->stdin_content, "%s", translated); + } + else { + char *new_str = PyMem_Malloc(strlen(tok->stdin_content) + strlen(translated) + 1); + if (new_str == NULL) { + tok->done = E_NOMEM; + return EOF; + } + sprintf(new_str, "%s%s", tok->stdin_content, translated); + PyMem_Free(tok->stdin_content); + tok->stdin_content = new_str; + } } if (tok->encoding && newtok && *newtok) { /* Recode to UTF-8 */ diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h index 5660ea38e9443..b659f34796e42 100644 --- a/Parser/tokenizer.h +++ b/Parser/tokenizer.h @@ -37,6 +37,7 @@ struct tok_state { int atbol; /* Nonzero if at begin of new line */ int pendin; /* Pending indents (if > 0) or dedents (if < 0) */ const char *prompt, *nextprompt; /* For interactive prompting */ + char *stdin_content; int lineno; /* Current line number */ int first_lineno; /* First line of a single line or multi line string expression (cf. issue 16806) */ From webhook-mailer at python.org Thu Jan 14 21:45:15 2021 From: webhook-mailer at python.org (gvanrossum) Date: Fri, 15 Jan 2021 02:45:15 -0000 Subject: [Python-checkins] bpo-42877: add the 'compact' param to TracebackException's __init__ (#24179) Message-ID: https://github.com/python/cpython/commit/4c94d74152a511d977fe26a4f3a32b7352ba9024 commit: 4c94d74152a511d977fe26a4f3a32b7352ba9024 branch: master author: Irit Katriel committer: gvanrossum date: 2021-01-14T18:45:02-08:00 summary: bpo-42877: add the 'compact' param to TracebackException's __init__ (#24179) Use it to reduce the time and memory taken up by several of traceback's module-level functions. files: A Misc/NEWS.d/next/Library/2021-01-13-12-55-41.bpo-42877.Fi1zEG.rst M Doc/library/traceback.rst M Lib/test/test_traceback.py M Lib/traceback.py diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index c233f18d30a29..e938dd58b0531 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -212,11 +212,16 @@ The module also defines the following classes: :class:`TracebackException` objects are created from actual exceptions to capture data for later printing in a lightweight fashion. -.. class:: TracebackException(exc_type, exc_value, exc_traceback, *, limit=None, lookup_lines=True, capture_locals=False) +.. class:: TracebackException(exc_type, exc_value, exc_traceback, *, limit=None, lookup_lines=True, capture_locals=False, compact=False) Capture an exception for later rendering. *limit*, *lookup_lines* and *capture_locals* are as for the :class:`StackSummary` class. + If *compact* is true, only data that is required by :class:`TracebackException`'s + ``format`` method is saved in the class attributes. In particular, the + ``__context__`` field is calculated only if ``__cause__`` is ``None`` and + ``__suppress_context__`` is false. + Note that when locals are captured, they are also shown in the traceback. .. attribute:: __cause__ @@ -294,6 +299,9 @@ capture data for later printing in a lightweight fashion. The message indicating which exception occurred is always the last string in the output. + .. versionchanged:: 3.10 + Added the *compact* parameter. + :class:`StackSummary` Objects ----------------------------- diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 07555a0411a08..33bdda026662c 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -1173,6 +1173,46 @@ def f(): self.assertIn( "RecursionError: maximum recursion depth exceeded", res[-1]) + def test_compact_with_cause(self): + try: + try: + 1/0 + finally: + cause = Exception("cause") + raise Exception("uh oh") from cause + except Exception: + exc_info = sys.exc_info() + exc = traceback.TracebackException(*exc_info, compact=True) + expected_stack = traceback.StackSummary.extract( + traceback.walk_tb(exc_info[2])) + exc_cause = traceback.TracebackException(Exception, cause, None) + self.assertEqual(exc_cause, exc.__cause__) + self.assertEqual(None, exc.__context__) + self.assertEqual(True, exc.__suppress_context__) + self.assertEqual(expected_stack, exc.stack) + self.assertEqual(exc_info[0], exc.exc_type) + self.assertEqual(str(exc_info[1]), str(exc)) + + def test_compact_no_cause(self): + try: + try: + 1/0 + finally: + exc_info_context = sys.exc_info() + exc_context = traceback.TracebackException(*exc_info_context) + raise Exception("uh oh") + except Exception: + exc_info = sys.exc_info() + exc = traceback.TracebackException(*exc_info, compact=True) + expected_stack = traceback.StackSummary.extract( + traceback.walk_tb(exc_info[2])) + self.assertEqual(None, exc.__cause__) + self.assertEqual(exc_context, exc.__context__) + self.assertEqual(False, exc.__suppress_context__) + self.assertEqual(expected_stack, exc.stack) + self.assertEqual(exc_info[0], exc.exc_type) + self.assertEqual(str(exc_info[1]), str(exc)) + def test_no_refs_to_exception_and_traceback_objects(self): try: 1/0 diff --git a/Lib/traceback.py b/Lib/traceback.py index aef37c9a7af68..090465a3584b7 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -110,8 +110,8 @@ def print_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None, \ value, tb = _parse_value_tb(exc, value, tb) if file is None: file = sys.stderr - for line in TracebackException( - type(value), value, tb, limit=limit).format(chain=chain): + te = TracebackException(type(value), value, tb, limit=limit, compact=True) + for line in te.format(chain=chain): print(line, file=file, end="") @@ -126,8 +126,8 @@ def format_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None, \ printed as does print_exception(). """ value, tb = _parse_value_tb(exc, value, tb) - return list(TracebackException( - type(value), value, tb, limit=limit).format(chain=chain)) + te = TracebackException(type(value), value, tb, limit=limit, compact=True) + return list(te.format(chain=chain)) def format_exception_only(exc, /, value=_sentinel): @@ -146,8 +146,8 @@ def format_exception_only(exc, /, value=_sentinel): """ if value is _sentinel: value = exc - return list(TracebackException( - type(value), value, None).format_exception_only()) + te = TracebackException(type(value), value, None, compact=True) + return list(te.format_exception_only()) # -- not official API but folk probably use these two functions. @@ -476,7 +476,8 @@ class TracebackException: """ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None, - lookup_lines=True, capture_locals=False, _seen=None): + lookup_lines=True, capture_locals=False, compact=False, + _seen=None): # NB: we need to accept exc_traceback, exc_value, exc_traceback to # permit backwards compat with the existing API, otherwise we # need stub thunk objects just to glue it together. @@ -485,6 +486,7 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None, if _seen is None: _seen = set() _seen.add(id(exc_value)) + # TODO: locals. self.stack = StackSummary.extract( walk_tb(exc_traceback), limit=limit, lookup_lines=lookup_lines, @@ -504,7 +506,7 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None, if lookup_lines: self._load_lines() self.__suppress_context__ = \ - exc_value.__suppress_context__ if exc_value else False + exc_value.__suppress_context__ if exc_value is not None else False # Convert __cause__ and __context__ to `TracebackExceptions`s, use a # queue to avoid recursion (only the top-level call gets _seen == None) @@ -524,8 +526,13 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None, _seen=_seen) else: cause = None + + if compact: + need_context = cause is None and not e.__suppress_context__ + else: + need_context = True if (e and e.__context__ is not None - and id(e.__context__) not in _seen): + and need_context and id(e.__context__) not in _seen): context = TracebackException( type(e.__context__), e.__context__, diff --git a/Misc/NEWS.d/next/Library/2021-01-13-12-55-41.bpo-42877.Fi1zEG.rst b/Misc/NEWS.d/next/Library/2021-01-13-12-55-41.bpo-42877.Fi1zEG.rst new file mode 100644 index 0000000000000..49bb74bc53665 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-13-12-55-41.bpo-42877.Fi1zEG.rst @@ -0,0 +1,4 @@ +Added the ``compact`` parameter to the constructor of +:class:`traceback.TracebackException` to reduce time and memory +for use cases that only need to call :func:`TracebackException.format` +and :func:`TracebackException.format_exception_only`. From webhook-mailer at python.org Fri Jan 15 08:52:05 2021 From: webhook-mailer at python.org (markshannon) Date: Fri, 15 Jan 2021 13:52:05 -0000 Subject: [Python-checkins] Mark instructions at end of class scope as artificial. (GH-24222) Message-ID: https://github.com/python/cpython/commit/e56d54e447694c6ced2093d2273c3e3d60b36b6f commit: e56d54e447694c6ced2093d2273c3e3d60b36b6f branch: master author: Mark Shannon committer: markshannon date: 2021-01-15T13:52:00Z summary: Mark instructions at end of class scope as artificial. (GH-24222) files: M Lib/test/test_sys_settrace.py M Python/compile.c diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 42989862502ac..49e8928995686 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -956,6 +956,24 @@ def func(): (2, 'line'), (2, 'return')]) + def test_implicit_return_in_class(self): + + def func(): + class A: + if 3 < 9: + a = 1 + else: + a = 2 + + self.run_and_compare(func, + [(0, 'call'), + (1, 'line'), + (1, 'call'), + (1, 'line'), + (2, 'line'), + (3, 'line'), + (3, 'return'), + (1, '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 d373d8a4061a3..6aa74cc2d67e4 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2371,6 +2371,8 @@ compiler_class(struct compiler *c, stmt_ty s) compiler_exit_scope(c); return 0; } + /* The following code is artificial */ + c->u->u_lineno = -1; /* Return __classcell__ if it is referenced, otherwise return None */ if (c->u->u_ste->ste_needs_class_closure) { /* Store __classcell__ into class namespace & return it */ From webhook-mailer at python.org Fri Jan 15 10:59:56 2021 From: webhook-mailer at python.org (gvanrossum) Date: Fri, 15 Jan 2021 15:59:56 -0000 Subject: [Python-checkins] bpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221) Message-ID: https://github.com/python/cpython/commit/ba876c44a8d06668e622fb580fdcde45c7a36d48 commit: ba876c44a8d06668e622fb580fdcde45c7a36d48 branch: master author: Irit Katriel committer: gvanrossum date: 2021-01-15T07:59:44-08:00 summary: bpo-42934: use TracebackException(compact=True) in unittest.TestResult (GH-24221) files: A Misc/NEWS.d/next/Library/2021-01-15-11-48-00.bpo-42934.ILKoOI.rst M Lib/unittest/result.py diff --git a/Lib/unittest/result.py b/Lib/unittest/result.py index 111317b329a85..ce7468e31481f 100644 --- a/Lib/unittest/result.py +++ b/Lib/unittest/result.py @@ -183,7 +183,8 @@ def _exc_info_to_string(self, err, test): else: length = None tb_e = traceback.TracebackException( - exctype, value, tb, limit=length, capture_locals=self.tb_locals) + exctype, value, tb, + limit=length, capture_locals=self.tb_locals, compact=True) msgLines = list(tb_e.format()) if self.buffer: diff --git a/Misc/NEWS.d/next/Library/2021-01-15-11-48-00.bpo-42934.ILKoOI.rst b/Misc/NEWS.d/next/Library/2021-01-15-11-48-00.bpo-42934.ILKoOI.rst new file mode 100644 index 0000000000000..92f2402d2324a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-15-11-48-00.bpo-42934.ILKoOI.rst @@ -0,0 +1,3 @@ +Use :class:`~traceback.TracebackException`'s new ``compact`` param in +:class:`~unittest.TestResult` to reduce time and memory consumed by +traceback formatting. From webhook-mailer at python.org Fri Jan 15 12:51:05 2021 From: webhook-mailer at python.org (rhettinger) Date: Fri, 15 Jan 2021 17:51:05 -0000 Subject: [Python-checkins] bpo-42931: randbytes missing from random.__all__ (GH-24219) Message-ID: https://github.com/python/cpython/commit/998ae1fa3fb05a790071217cf8f6ae3a928da13f commit: 998ae1fa3fb05a790071217cf8f6ae3a928da13f branch: master author: Setrak Balian committer: rhettinger date: 2021-01-15T09:50:42-08:00 summary: bpo-42931: randbytes missing from random.__all__ (GH-24219) files: A Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst M Lib/random.py diff --git a/Lib/random.py b/Lib/random.py index 4142e2e860c8c..db0e6c20fccac 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -78,6 +78,7 @@ "lognormvariate", "normalvariate", "paretovariate", + "randbytes", "randint", "random", "randrange", diff --git a/Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst b/Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst new file mode 100644 index 0000000000000..01f8094944f70 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst @@ -0,0 +1 @@ +Add :func:`randbytes` to ``random.__all__``. From webhook-mailer at python.org Fri Jan 15 13:22:27 2021 From: webhook-mailer at python.org (rhettinger) Date: Fri, 15 Jan 2021 18:22:27 -0000 Subject: [Python-checkins] bpo-42931: randbytes missing from random.__all__ (GH-24219) (GH-24225) Message-ID: https://github.com/python/cpython/commit/17c1f0c8cb96637c36548edf6e4570ac7564004b commit: 17c1f0c8cb96637c36548edf6e4570ac7564004b branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: rhettinger date: 2021-01-15T10:21:52-08:00 summary: bpo-42931: randbytes missing from random.__all__ (GH-24219) (GH-24225) files: A Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst M Lib/random.py diff --git a/Lib/random.py b/Lib/random.py index a6454f520df0a..190df6a8c3a56 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -77,6 +77,7 @@ "lognormvariate", "normalvariate", "paretovariate", + "randbytes", "randint", "random", "randrange", diff --git a/Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst b/Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst new file mode 100644 index 0000000000000..01f8094944f70 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-15-00-23-50.bpo-42931.QD6U2B.rst @@ -0,0 +1 @@ +Add :func:`randbytes` to ``random.__all__``. From webhook-mailer at python.org Sat Jan 16 12:22:30 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 16 Jan 2021 17:22:30 -0000 Subject: [Python-checkins] [3.8] bpo-42531: Teach importlib.resources.path to handle packages without __file__ (GH-23611) Message-ID: https://github.com/python/cpython/commit/f08c66467d56c71f75c6659ede9177449fe9d2e6 commit: f08c66467d56c71f75c6659ede9177449fe9d2e6 branch: 3.8 author: William Schwartz committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-16T09:22:21-08:00 summary: [3.8] bpo-42531: Teach importlib.resources.path to handle packages without __file__ (GH-23611) Fixes [bpo-42531]() for Python 3.8. The issue also applies to 3.7. If this PR looks like it'll be accepted, I can cherry-pick it to the 3.7 branch and submit a follow-up PR. Automerge-Triggered-By: GH:jaraco files: A Misc/NEWS.d/next/Library/2020-12-02-16-28-04.bpo-42531.2sLlFW.rst M Lib/importlib/resources.py M Lib/test/test_importlib/test_path.py diff --git a/Lib/importlib/resources.py b/Lib/importlib/resources.py index fc3a1c9cabe63..8d37d52cb8d37 100644 --- a/Lib/importlib/resources.py +++ b/Lib/importlib/resources.py @@ -193,9 +193,11 @@ def path(package: Package, resource: Resource) -> Iterator[Path]: _check_location(package) # Fall-through for both the lack of resource_path() *and* if # resource_path() raises FileNotFoundError. - package_directory = Path(package.__spec__.origin).parent - file_path = package_directory / resource - if file_path.exists(): + file_path = None + if package.__spec__.origin is not None: + package_directory = Path(package.__spec__.origin).parent + file_path = package_directory / resource + if file_path is not None and file_path.exists(): yield file_path else: with open_binary(package, resource) as fp: diff --git a/Lib/test/test_importlib/test_path.py b/Lib/test/test_importlib/test_path.py index 2d3dcda7ed2e7..5c5a8e3d76e79 100644 --- a/Lib/test/test_importlib/test_path.py +++ b/Lib/test/test_importlib/test_path.py @@ -1,3 +1,4 @@ +import io import unittest from importlib import resources @@ -27,6 +28,17 @@ class PathDiskTests(PathTests, unittest.TestCase): data = data01 +class PathMemoryTests(PathTests, unittest.TestCase): + def setUp(self): + file = io.BytesIO(b'Hello, UTF-8 world!\n') + self.addCleanup(file.close) + self.data = util.create_package( + file=file, path=FileNotFoundError("package exists only in memory") + ) + self.data.__spec__.origin = None + self.data.__spec__.has_location = False + + class PathZipTests(PathTests, util.ZipSetup, unittest.TestCase): def test_remove_in_context_manager(self): # It is not an error if the file that was temporarily stashed on the diff --git a/Misc/NEWS.d/next/Library/2020-12-02-16-28-04.bpo-42531.2sLlFW.rst b/Misc/NEWS.d/next/Library/2020-12-02-16-28-04.bpo-42531.2sLlFW.rst new file mode 100644 index 0000000000000..7927078acda43 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-02-16-28-04.bpo-42531.2sLlFW.rst @@ -0,0 +1 @@ +:func:`importlib.resources.path` now works for :term:`package`\ s missing the optional :attr:`__file__` attribute (more specifically, packages whose :attr:`__spec__`\ ``.``\ :attr:`~importlib.machinery.ModuleSpec.origin` :keyword:`is` :data:`None`). \ No newline at end of file From webhook-mailer at python.org Sat Jan 16 14:45:51 2021 From: webhook-mailer at python.org (jaraco) Date: Sat, 16 Jan 2021 19:45:51 -0000 Subject: [Python-checkins] [3.9] bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor) (GH-23010) (#24232) Message-ID: https://github.com/python/cpython/commit/799722cb0ddb90752cde7798cab543f30623ebf2 commit: 799722cb0ddb90752cde7798cab543f30623ebf2 branch: 3.9 author: Jason R. Coombs committer: jaraco date: 2021-01-16T14:45:30-05:00 summary: [3.9] bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (for all but processor) (GH-23010) (#24232) * Add test capturing missed expectation with uname_result._replace. * bpo-42163: Override uname_result._make to allow uname_result._replace to work (for everything but 'processor'. * Replace hard-coded length with one derived from the definition. * Add test capturing missed expectation with copy/deepcopy on namedtuple (bpo-42189). * bpo-42189: Exclude processor parameter when constructing uname_result. * In _make, rely on __new__ to strip processor. * Add blurb. * iter is not necessary here. * Rely on num_fields in __new__ * Add test for slices on uname * Add test for copy and pickle. Co-authored-by: Serhiy Storchaka * import pickle * Fix equality test after pickling. * Simply rely on __reduce__ for pickling. Co-authored-by: Serhiy Storchaka (cherry picked from commit a6fd0f414c0cb4cd5cc20eb2df3340b31c6f7743) Co-authored-by: Jason R. Coombs files: A Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst M Lib/platform.py M Lib/test/test_platform.py diff --git a/Lib/platform.py b/Lib/platform.py index e9f50ab622d31..6258827d0e41f 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -782,7 +782,7 @@ class uname_result( ): """ A uname_result that's largely compatible with a - simple namedtuple except that 'platform' is + simple namedtuple except that 'processor' is resolved late and cached to avoid calling "uname" except when needed. """ @@ -797,12 +797,25 @@ def __iter__(self): (self.processor,) ) + @classmethod + def _make(cls, iterable): + # override factory to affect length check + num_fields = len(cls._fields) + result = cls.__new__(cls, *iterable) + if len(result) != num_fields + 1: + msg = f'Expected {num_fields} arguments, got {len(result)}' + raise TypeError(msg) + return result + def __getitem__(self, key): - return tuple(iter(self))[key] + return tuple(self)[key] def __len__(self): return len(tuple(iter(self))) + def __reduce__(self): + return uname_result, tuple(self)[:len(self._fields)] + _uname_cache = None diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index a3b06feb6552e..9f04c79e09ba4 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -1,4 +1,6 @@ import os +import copy +import pickle import platform import subprocess import sys @@ -175,6 +177,38 @@ def test_uname_cast_to_tuple(self): ) self.assertEqual(tuple(res), expected) + def test_uname_replace(self): + res = platform.uname() + new = res._replace( + system='system', node='node', release='release', + version='version', machine='machine') + self.assertEqual(new.system, 'system') + self.assertEqual(new.node, 'node') + self.assertEqual(new.release, 'release') + self.assertEqual(new.version, 'version') + self.assertEqual(new.machine, 'machine') + # processor cannot be replaced + self.assertEqual(new.processor, res.processor) + + def test_uname_copy(self): + uname = platform.uname() + self.assertEqual(copy.copy(uname), uname) + self.assertEqual(copy.deepcopy(uname), uname) + + def test_uname_pickle(self): + orig = platform.uname() + for proto in range(pickle.HIGHEST_PROTOCOL + 1): + with self.subTest(protocol=proto): + pickled = pickle.dumps(orig, proto) + restored = pickle.loads(pickled) + self.assertEqual(restored, orig) + + def test_uname_slices(self): + res = platform.uname() + expected = tuple(res) + self.assertEqual(res[:], expected) + self.assertEqual(res[:5], expected[:5]) + @unittest.skipIf(sys.platform in ['win32', 'OpenVMS'], "uname -p not used") def test_uname_processor(self): """ 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 new file mode 100644 index 0000000000000..0c357eb4ac1da --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-29-09-22-56.bpo-42163.O4VcCY.rst @@ -0,0 +1 @@ +Restore compatibility for ``uname_result`` around deepcopy and _replace. From webhook-mailer at python.org Mon Jan 18 12:24:53 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 18 Jan 2021 17:24:53 -0000 Subject: [Python-checkins] bpo-42923: Add Py_FatalError() test in test_capi (GH-24240) Message-ID: https://github.com/python/cpython/commit/e232025025c8bd07c1d1b12a583a80c4a673f077 commit: e232025025c8bd07c1d1b12a583a80c4a673f077 branch: master author: Victor Stinner committer: vstinner date: 2021-01-18T18:24:29+01:00 summary: bpo-42923: Add Py_FatalError() test in test_capi (GH-24240) Move faulthandler._fatal_error() to _testcapi.fatal_error(). files: M Lib/test/test_capi.py M Lib/test/test_faulthandler.py M Modules/_testcapimodule.c M Modules/faulthandler.c diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index a4ebe4a0a1b5c..0d5c97dcc2a4a 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -547,6 +547,15 @@ def test_pynumber_tobase(self): self.assertRaises(TypeError, pynumber_tobase, '123', 10) self.assertRaises(SystemError, pynumber_tobase, 123, 0) + def test_fatal_error(self): + code = 'import _testcapi; _testcapi.fatal_error(b"MESSAGE")' + with support.SuppressCrashReport(): + rc, out, err = assert_python_failure('-sSI', '-c', code) + + err = err.replace(b'\r', b'').decode('ascii', 'replace') + self.assertIn('Fatal Python error: test_fatal_error: MESSAGE\n', + err) + class TestPendingCalls(unittest.TestCase): diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 80c1f7d90adf0..bc61aab9c0fc2 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -227,25 +227,23 @@ def test_sigill(self): 5, 'Illegal instruction') + def check_fatal_error_func(self, release_gil): + # Test that Py_FatalError() dumps a traceback + with support.SuppressCrashReport(): + self.check_fatal_error(f""" + import _testcapi + _testcapi.fatal_error(b'xyz', {release_gil}) + """, + 2, + 'xyz', + func='test_fatal_error', + py_fatal_error=True) + def test_fatal_error(self): - self.check_fatal_error(""" - import faulthandler - faulthandler._fatal_error(b'xyz') - """, - 2, - 'xyz', - func='faulthandler_fatal_error_py', - py_fatal_error=True) + self.check_fatal_error_func(False) def test_fatal_error_without_gil(self): - self.check_fatal_error(""" - import faulthandler - faulthandler._fatal_error(b'xyz', True) - """, - 2, - 'xyz', - func='faulthandler_fatal_error_py', - py_fatal_error=True) + self.check_fatal_error_func(True) @unittest.skipIf(sys.platform.startswith('openbsd'), "Issue #12868: sigaltstack() doesn't work on " diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 4f97927fa2322..2a5b3d9c50b62 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -5665,6 +5665,27 @@ test_refcount(PyObject *self, PyObject *Py_UNUSED(ignored)) } +static PyObject * +test_fatal_error(PyObject *self, PyObject *args) +{ + char *message; + int release_gil = 0; + if (!PyArg_ParseTuple(args, "y|i:fatal_error", &message, &release_gil)) + return NULL; + if (release_gil) { + Py_BEGIN_ALLOW_THREADS + Py_FatalError(message); + Py_END_ALLOW_THREADS + } + else { + Py_FatalError(message); + } + // Py_FatalError() does not return, but exits the process. + Py_RETURN_NONE; +} + + + static PyMethodDef TestMethods[] = { {"raise_exception", raise_exception, METH_VARARGS}, {"raise_memoryerror", raise_memoryerror, METH_NOARGS}, @@ -5938,6 +5959,8 @@ static PyMethodDef TestMethods[] = { {"without_gc", without_gc, METH_O}, {"test_set_type_size", test_set_type_size, METH_NOARGS}, {"test_refcount", test_refcount, METH_NOARGS}, + {"fatal_error", test_fatal_error, METH_VARARGS, + PyDoc_STR("fatal_error(message, release_gil=False): call Py_FatalError(message)")}, {NULL, NULL} /* sentinel */ }; diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 67fe1ca9ffffd..fe5dbc1cc0fee 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -1,6 +1,6 @@ #include "Python.h" -#include "pycore_initconfig.h" -#include "pycore_traceback.h" +#include "pycore_initconfig.h" // _PyStatus_ERR +#include "pycore_traceback.h" // _Py_DumpTracebackThreads #include #include #include @@ -1123,25 +1123,6 @@ faulthandler_sigabrt(PyObject *self, PyObject *args) Py_RETURN_NONE; } -static PyObject * -faulthandler_fatal_error_py(PyObject *self, PyObject *args) -{ - char *message; - int release_gil = 0; - if (!PyArg_ParseTuple(args, "y|i:fatal_error", &message, &release_gil)) - return NULL; - faulthandler_suppress_crash_report(); - if (release_gil) { - Py_BEGIN_ALLOW_THREADS - Py_FatalError(message); - Py_END_ALLOW_THREADS - } - else { - Py_FatalError(message); - } - Py_RETURN_NONE; -} - #if defined(FAULTHANDLER_USE_ALT_STACK) #define FAULTHANDLER_STACK_OVERFLOW @@ -1278,8 +1259,6 @@ static PyMethodDef module_methods[] = { PyDoc_STR("_sigabrt(): raise a SIGABRT signal")}, {"_sigfpe", (PyCFunction)faulthandler_sigfpe, METH_NOARGS, PyDoc_STR("_sigfpe(): raise a SIGFPE signal")}, - {"_fatal_error", faulthandler_fatal_error_py, METH_VARARGS, - PyDoc_STR("_fatal_error(message): call Py_FatalError(message)")}, #ifdef FAULTHANDLER_STACK_OVERFLOW {"_stack_overflow", faulthandler_stack_overflow, METH_NOARGS, PyDoc_STR("_stack_overflow(): recursive call to raise a stack overflow")}, From webhook-mailer at python.org Mon Jan 18 12:35:05 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 18 Jan 2021 17:35:05 -0000 Subject: [Python-checkins] bpo-42923: Py_FatalError() avoids fprintf() (GH-24242) Message-ID: https://github.com/python/cpython/commit/314b8787e0c50985ba708034b84ff5b37a1d47de commit: 314b8787e0c50985ba708034b84ff5b37a1d47de branch: master author: Victor Stinner committer: vstinner date: 2021-01-18T18:34:56+01:00 summary: bpo-42923: Py_FatalError() avoids fprintf() (GH-24242) * Replace buffered fprintf() with unbuffered _Py_write_noraise() in Py_FatalError(). * _Py_DumpHexadecimal() now accepts uintptr_t. files: M Include/internal/pycore_traceback.h M Python/pylifecycle.c M Python/traceback.c diff --git a/Include/internal/pycore_traceback.h b/Include/internal/pycore_traceback.h index 1f092411a72ba..169e99b86ef72 100644 --- a/Include/internal/pycore_traceback.h +++ b/Include/internal/pycore_traceback.h @@ -76,15 +76,11 @@ PyAPI_FUNC(void) _Py_DumpDecimal( int fd, unsigned long value); -/* Format an integer as hexadecimal into the file descriptor fd with at least - width digits. - - The maximum width is sizeof(unsigned long)*2 digits. - - This function is signal safe. */ +/* Format an integer as hexadecimal with width digits into fd file descriptor. + The function is signal safe. */ PyAPI_FUNC(void) _Py_DumpHexadecimal( int fd, - unsigned long value, + uintptr_t value, Py_ssize_t width); PyAPI_FUNC(PyObject*) _PyTraceBack_FromFrame( diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 9828dffad5c63..c02071780b863 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -38,6 +38,9 @@ #endif +#define PUTS(fd, str) _Py_write_noraise(fd, str, (int)strlen(str)) + + _Py_IDENTIFIER(flush); _Py_IDENTIFIER(name); _Py_IDENTIFIER(stdin); @@ -2348,8 +2351,7 @@ static void _Py_FatalError_DumpTracebacks(int fd, PyInterpreterState *interp, PyThreadState *tstate) { - fputc('\n', stderr); - fflush(stderr); + PUTS(fd, "\n"); /* display the current Python stack */ _Py_DumpTracebackThreads(fd, interp, tstate); @@ -2451,30 +2453,31 @@ fatal_output_debug(const char *msg) static void -fatal_error_dump_runtime(FILE *stream, _PyRuntimeState *runtime) +fatal_error_dump_runtime(int fd, _PyRuntimeState *runtime) { - fprintf(stream, "Python runtime state: "); + PUTS(fd, "Python runtime state: "); PyThreadState *finalizing = _PyRuntimeState_GetFinalizing(runtime); if (finalizing) { - fprintf(stream, "finalizing (tstate=%p)", finalizing); + PUTS(fd, "finalizing (tstate=0x"); + _Py_DumpHexadecimal(fd, (uintptr_t)finalizing, sizeof(finalizing) * 2); + PUTS(fd, ")"); } else if (runtime->initialized) { - fprintf(stream, "initialized"); + PUTS(fd, "initialized"); } else if (runtime->core_initialized) { - fprintf(stream, "core initialized"); + PUTS(fd, "core initialized"); } else if (runtime->preinitialized) { - fprintf(stream, "preinitialized"); + PUTS(fd, "preinitialized"); } else if (runtime->preinitializing) { - fprintf(stream, "preinitializing"); + PUTS(fd, "preinitializing"); } else { - fprintf(stream, "unknown"); + PUTS(fd, "unknown"); } - fprintf(stream, "\n"); - fflush(stream); + PUTS(fd, "\n"); } @@ -2494,10 +2497,9 @@ fatal_error_exit(int status) static void _Py_NO_RETURN -fatal_error(FILE *stream, int header, const char *prefix, const char *msg, +fatal_error(int fd, int header, const char *prefix, const char *msg, int status) { - const int fd = fileno(stream); static int reentrant = 0; if (reentrant) { @@ -2508,29 +2510,22 @@ fatal_error(FILE *stream, int header, const char *prefix, const char *msg, reentrant = 1; if (header) { - fprintf(stream, "Fatal Python error: "); + PUTS(fd, "Fatal Python error: "); if (prefix) { - fputs(prefix, stream); - fputs(": ", stream); + PUTS(fd, prefix); + PUTS(fd, ": "); } if (msg) { - fputs(msg, stream); + PUTS(fd, msg); } else { - fprintf(stream, ""); + PUTS(fd, ""); } - fputs("\n", stream); - fflush(stream); + PUTS(fd, "\n"); } _PyRuntimeState *runtime = &_PyRuntime; - fatal_error_dump_runtime(stream, runtime); - - PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime); - PyInterpreterState *interp = NULL; - if (tstate != NULL) { - interp = tstate->interp; - } + fatal_error_dump_runtime(fd, runtime); /* Check if the current thread has a Python thread state and holds the GIL. @@ -2540,8 +2535,17 @@ fatal_error(FILE *stream, int header, const char *prefix, const char *msg, tss_tstate != tstate if the current Python thread does not hold the GIL. */ + PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime); + PyInterpreterState *interp = NULL; PyThreadState *tss_tstate = PyGILState_GetThisThreadState(); + if (tstate != NULL) { + interp = tstate->interp; + } + else if (tss_tstate != NULL) { + interp = tss_tstate->interp; + } int has_tstate_and_gil = (tss_tstate != NULL && tss_tstate == tstate); + if (has_tstate_and_gil) { /* If an exception is set, print the exception with its traceback */ if (!_Py_FatalError_PrintExc(tss_tstate)) { @@ -2578,14 +2582,14 @@ fatal_error(FILE *stream, int header, const char *prefix, const char *msg, void _Py_NO_RETURN Py_FatalError(const char *msg) { - fatal_error(stderr, 1, NULL, msg, -1); + fatal_error(fileno(stderr), 1, NULL, msg, -1); } void _Py_NO_RETURN _Py_FatalErrorFunc(const char *func, const char *msg) { - fatal_error(stderr, 1, func, msg, -1); + fatal_error(fileno(stderr), 1, func, msg, -1); } @@ -2600,12 +2604,12 @@ _Py_FatalErrorFormat(const char *func, const char *format, ...) reentrant = 1; FILE *stream = stderr; - fprintf(stream, "Fatal Python error: "); + const int fd = fileno(stream); + PUTS(fd, "Fatal Python error: "); if (func) { - fputs(func, stream); - fputs(": ", stream); + PUTS(fd, func); + PUTS(fd, ": "); } - fflush(stream); va_list vargs; #ifdef HAVE_STDARG_PROTOTYPES @@ -2619,7 +2623,7 @@ _Py_FatalErrorFormat(const char *func, const char *format, ...) fputs("\n", stream); fflush(stream); - fatal_error(stream, 0, NULL, NULL, -1); + fatal_error(fd, 0, NULL, NULL, -1); } @@ -2630,7 +2634,7 @@ Py_ExitStatusException(PyStatus status) exit(status.exitcode); } else if (_PyStatus_IS_ERROR(status)) { - fatal_error(stderr, 1, status.func, status.err_msg, 1); + fatal_error(fileno(stderr), 1, status.func, status.err_msg, 1); } else { Py_FatalError("Py_ExitStatusException() must not be called on success"); diff --git a/Python/traceback.c b/Python/traceback.c index b82cfd3665ce1..bd5fd352152e0 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -649,15 +649,12 @@ _Py_DumpDecimal(int fd, unsigned long value) _Py_write_noraise(fd, ptr, end - ptr); } -/* Format an integer in range [0; 0xffffffff] to hexadecimal of 'width' digits, - and write it into the file fd. - - This function is signal safe. */ - +/* Format an integer as hexadecimal with width digits into fd file descriptor. + The function is signal safe. */ void -_Py_DumpHexadecimal(int fd, unsigned long value, Py_ssize_t width) +_Py_DumpHexadecimal(int fd, uintptr_t value, Py_ssize_t width) { - char buffer[sizeof(unsigned long) * 2 + 1], *ptr, *end; + char buffer[sizeof(uintptr_t) * 2 + 1], *ptr, *end; const Py_ssize_t size = Py_ARRAY_LENGTH(buffer) - 1; if (width > size) From webhook-mailer at python.org Mon Jan 18 13:04:33 2021 From: webhook-mailer at python.org (rhettinger) Date: Mon, 18 Jan 2021 18:04:33 -0000 Subject: [Python-checkins] bpo-42944 Fix Random.sample when counts is not None (GH-24235) Message-ID: https://github.com/python/cpython/commit/f7b5bacd7a0b2084ce699eda6f6f4b1adfa16590 commit: f7b5bacd7a0b2084ce699eda6f6f4b1adfa16590 branch: master author: jonanifranco <66563903+jonanifranco at users.noreply.github.com> committer: rhettinger date: 2021-01-18T10:04:29-08:00 summary: bpo-42944 Fix Random.sample when counts is not None (GH-24235) files: A Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst M Lib/random.py M Lib/test/test_random.py diff --git a/Lib/random.py b/Lib/random.py index db0e6c20fccac..30186fc7a3b50 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -479,7 +479,7 @@ def sample(self, population, k, *, counts=None): raise TypeError('Counts must be integers') if total <= 0: raise ValueError('Total of counts must be greater than zero') - selections = sample(range(total), k=k) + selections = self.sample(range(total), k=k) bisect = _bisect return [population[bisect(cum_counts, s)] for s in selections] randbelow = self._randbelow diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index 41a26e376d3a5..35ae4e6c3c80c 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -223,33 +223,6 @@ def test_sample_with_counts(self): with self.assertRaises(ValueError): sample(['red', 'green', 'blue'], counts=[1, 2, 3, 4], k=2) # too many counts - def test_sample_counts_equivalence(self): - # Test the documented strong equivalence to a sample with repeated elements. - # We run this test on random.Random() which makes deterministic selections - # for a given seed value. - sample = random.sample - seed = random.seed - - colors = ['red', 'green', 'blue', 'orange', 'black', 'amber'] - counts = [500, 200, 20, 10, 5, 1 ] - k = 700 - seed(8675309) - s1 = sample(colors, counts=counts, k=k) - seed(8675309) - expanded = [color for (color, count) in zip(colors, counts) for i in range(count)] - self.assertEqual(len(expanded), sum(counts)) - s2 = sample(expanded, k=k) - self.assertEqual(s1, s2) - - pop = 'abcdefghi' - counts = [10, 9, 8, 7, 6, 5, 4, 3, 2] - seed(8675309) - s1 = ''.join(sample(pop, counts=counts, k=30)) - expanded = ''.join([letter for (letter, count) in zip(pop, counts) for i in range(count)]) - seed(8675309) - s2 = ''.join(sample(expanded, k=30)) - self.assertEqual(s1, s2) - def test_choices(self): choices = self.gen.choices data = ['red', 'green', 'blue', 'yellow'] @@ -957,6 +930,33 @@ def test_randbytes_getrandbits(self): self.assertEqual(self.gen.randbytes(n), gen2.getrandbits(n * 8).to_bytes(n, 'little')) + def test_sample_counts_equivalence(self): + # Test the documented strong equivalence to a sample with repeated elements. + # We run this test on random.Random() which makes deterministic selections + # for a given seed value. + sample = self.gen.sample + seed = self.gen.seed + + colors = ['red', 'green', 'blue', 'orange', 'black', 'amber'] + counts = [500, 200, 20, 10, 5, 1 ] + k = 700 + seed(8675309) + s1 = sample(colors, counts=counts, k=k) + seed(8675309) + expanded = [color for (color, count) in zip(colors, counts) for i in range(count)] + self.assertEqual(len(expanded), sum(counts)) + s2 = sample(expanded, k=k) + self.assertEqual(s1, s2) + + pop = 'abcdefghi' + counts = [10, 9, 8, 7, 6, 5, 4, 3, 2] + seed(8675309) + s1 = ''.join(sample(pop, counts=counts, k=30)) + expanded = ''.join([letter for (letter, count) in zip(pop, counts) for i in range(count)]) + seed(8675309) + s2 = ''.join(sample(expanded, k=30)) + self.assertEqual(s1, s2) + def gamma(z, sqrt2pi=(2.0*pi)**0.5): # Reflection to right half of complex plane diff --git a/Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst b/Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst new file mode 100644 index 0000000000000..b78d10aa25545 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst @@ -0,0 +1 @@ +Fix ``random.Random.sample`` when ``counts`` argument is not ``None``. From webhook-mailer at python.org Mon Jan 18 13:36:16 2021 From: webhook-mailer at python.org (rhettinger) Date: Mon, 18 Jan 2021 18:36:16 -0000 Subject: [Python-checkins] bpo-42944 Fix Random.sample when counts is not None (GH-24235) (GH-24243) Message-ID: https://github.com/python/cpython/commit/a90539f5723a4c34430761be8cba97daa8474abf commit: a90539f5723a4c34430761be8cba97daa8474abf branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: rhettinger date: 2021-01-18T10:36:07-08:00 summary: bpo-42944 Fix Random.sample when counts is not None (GH-24235) (GH-24243) files: A Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst M Lib/random.py M Lib/test/test_random.py diff --git a/Lib/random.py b/Lib/random.py index 190df6a8c3a56..36e16a9063b53 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -442,7 +442,7 @@ def sample(self, population, k, *, counts=None): raise TypeError('Counts must be integers') if total <= 0: raise ValueError('Total of counts must be greater than zero') - selections = sample(range(total), k=k) + selections = self.sample(range(total), k=k) bisect = _bisect return [population[bisect(cum_counts, s)] for s in selections] randbelow = self._randbelow diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index a80e71e67e4c6..15a68418bdd86 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -207,33 +207,6 @@ def test_sample_with_counts(self): with self.assertRaises(ValueError): sample(['red', 'green', 'blue'], counts=[1, 2, 3, 4], k=2) # too many counts - def test_sample_counts_equivalence(self): - # Test the documented strong equivalence to a sample with repeated elements. - # We run this test on random.Random() which makes deterministic selections - # for a given seed value. - sample = random.sample - seed = random.seed - - colors = ['red', 'green', 'blue', 'orange', 'black', 'amber'] - counts = [500, 200, 20, 10, 5, 1 ] - k = 700 - seed(8675309) - s1 = sample(colors, counts=counts, k=k) - seed(8675309) - expanded = [color for (color, count) in zip(colors, counts) for i in range(count)] - self.assertEqual(len(expanded), sum(counts)) - s2 = sample(expanded, k=k) - self.assertEqual(s1, s2) - - pop = 'abcdefghi' - counts = [10, 9, 8, 7, 6, 5, 4, 3, 2] - seed(8675309) - s1 = ''.join(sample(pop, counts=counts, k=30)) - expanded = ''.join([letter for (letter, count) in zip(pop, counts) for i in range(count)]) - seed(8675309) - s2 = ''.join(sample(expanded, k=30)) - self.assertEqual(s1, s2) - def test_choices(self): choices = self.gen.choices data = ['red', 'green', 'blue', 'yellow'] @@ -888,6 +861,33 @@ def test_randbytes_getrandbits(self): self.assertEqual(self.gen.randbytes(n), gen2.getrandbits(n * 8).to_bytes(n, 'little')) + def test_sample_counts_equivalence(self): + # Test the documented strong equivalence to a sample with repeated elements. + # We run this test on random.Random() which makes deterministic selections + # for a given seed value. + sample = self.gen.sample + seed = self.gen.seed + + colors = ['red', 'green', 'blue', 'orange', 'black', 'amber'] + counts = [500, 200, 20, 10, 5, 1 ] + k = 700 + seed(8675309) + s1 = sample(colors, counts=counts, k=k) + seed(8675309) + expanded = [color for (color, count) in zip(colors, counts) for i in range(count)] + self.assertEqual(len(expanded), sum(counts)) + s2 = sample(expanded, k=k) + self.assertEqual(s1, s2) + + pop = 'abcdefghi' + counts = [10, 9, 8, 7, 6, 5, 4, 3, 2] + seed(8675309) + s1 = ''.join(sample(pop, counts=counts, k=30)) + expanded = ''.join([letter for (letter, count) in zip(pop, counts) for i in range(count)]) + seed(8675309) + s2 = ''.join(sample(expanded, k=30)) + self.assertEqual(s1, s2) + def gamma(z, sqrt2pi=(2.0*pi)**0.5): # Reflection to right half of complex plane diff --git a/Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst b/Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst new file mode 100644 index 0000000000000..b78d10aa25545 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-18-10-41-44.bpo-42944.RrONvy.rst @@ -0,0 +1 @@ +Fix ``random.Random.sample`` when ``counts`` argument is not ``None``. From webhook-mailer at python.org Mon Jan 18 14:47:23 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 18 Jan 2021 19:47:23 -0000 Subject: [Python-checkins] bpo-42923: Dump extension modules on fatal error (GH-24207) Message-ID: https://github.com/python/cpython/commit/250035d134ad482e724f73ce654682254b513ee0 commit: 250035d134ad482e724f73ce654682254b513ee0 branch: master author: Victor Stinner committer: vstinner date: 2021-01-18T20:47:13+01:00 summary: bpo-42923: Dump extension modules on fatal error (GH-24207) The Py_FatalError() function and the faulthandler module now dump the list of extension modules on a fatal error. Add _Py_DumpExtensionModules() and _PyModule_IsExtension() internal functions. files: A Misc/NEWS.d/next/Library/2021-01-13-12-15-13.bpo-42923.zBiNls.rst M Include/internal/pycore_pyerrors.h M Include/moduleobject.h M Lib/test/test_capi.py M Lib/test/test_faulthandler.py M Modules/faulthandler.c M Objects/moduleobject.c M Python/pylifecycle.c diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h index 2cf1160afc014..9dd66aec9c3d7 100644 --- a/Include/internal/pycore_pyerrors.h +++ b/Include/internal/pycore_pyerrors.h @@ -84,6 +84,8 @@ PyAPI_FUNC(PyObject *) _PyErr_FormatFromCauseTstate( PyAPI_FUNC(int) _PyErr_CheckSignalsTstate(PyThreadState *tstate); +PyAPI_FUNC(void) _Py_DumpExtensionModules(int fd, PyInterpreterState *interp); + #ifdef __cplusplus } #endif diff --git a/Include/moduleobject.h b/Include/moduleobject.h index cf9ad40c0a17a..49b116ca1c358 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -84,6 +84,12 @@ typedef struct PyModuleDef{ freefunc m_free; } PyModuleDef; + +// Internal C API +#ifdef Py_BUILD_CORE +extern int _PyModule_IsExtension(PyObject *obj); +#endif + #ifdef __cplusplus } #endif diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 0d5c97dcc2a4a..5e72ba9eb04ea 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -556,6 +556,16 @@ def test_fatal_error(self): self.assertIn('Fatal Python error: test_fatal_error: MESSAGE\n', err) + match = re.search('^Extension modules:(.*)$', err, re.MULTILINE) + if not match: + self.fail(f"Cannot find 'Extension modules:' in {err!r}") + modules = set(match.group(1).strip().split(', ')) + # Test _PyModule_IsExtension(): the list doesn't have to + # be exhaustive. + for name in ('sys', 'builtins', '_imp', '_thread', '_weakref', + '_io', 'marshal', '_signal', '_abc', '_testcapi'): + self.assertIn(name, modules) + class TestPendingCalls(unittest.TestCase): diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index bc61aab9c0fc2..c6b763a9555ab 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -2,6 +2,7 @@ import datetime import faulthandler import os +import re import signal import subprocess import sys @@ -329,6 +330,24 @@ def test_disable(self): "%r is present in %r" % (not_expected, stderr)) self.assertNotEqual(exitcode, 0) + @skip_segfault_on_android + def test_dump_ext_modules(self): + code = """ + import faulthandler + faulthandler.enable() + faulthandler._sigsegv() + """ + stderr, exitcode = self.get_output(code) + stderr = '\n'.join(stderr) + match = re.search('^Extension modules:(.*)$', stderr, re.MULTILINE) + if not match: + self.fail(f"Cannot find 'Extension modules:' in {stderr!r}") + modules = set(match.group(1).strip().split(', ')) + # Only check for a few extensions, the list doesn't have to be + # exhaustive. + for ext in ('sys', 'builtins', '_io', 'faulthandler'): + self.assertIn(ext, modules) + def test_is_enabled(self): orig_stderr = sys.stderr try: diff --git a/Misc/NEWS.d/next/Library/2021-01-13-12-15-13.bpo-42923.zBiNls.rst b/Misc/NEWS.d/next/Library/2021-01-13-12-15-13.bpo-42923.zBiNls.rst new file mode 100644 index 0000000000000..bb566f982b5ce --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-13-12-15-13.bpo-42923.zBiNls.rst @@ -0,0 +1,2 @@ +The :c:func:`Py_FatalError` function and the :mod:`faulthandler` module now +dump the list of extension modules on a fatal error. diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index fe5dbc1cc0fee..da8b7741345de 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -1,5 +1,6 @@ #include "Python.h" #include "pycore_initconfig.h" // _PyStatus_ERR +#include "pycore_pyerrors.h" // _Py_DumpExtensionModules #include "pycore_traceback.h" // _Py_DumpTracebackThreads #include #include @@ -349,6 +350,8 @@ faulthandler_fatal_error(int signum) faulthandler_dump_traceback(fd, fatal_error.all_threads, fatal_error.interp); + _Py_DumpExtensionModules(fd, fatal_error.interp); + errno = save_errno; #ifdef MS_WINDOWS if (signum == SIGSEGV) { diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 6590387dac531..e57ea86e7694c 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -35,6 +35,19 @@ PyTypeObject PyModuleDef_Type = { }; +int +_PyModule_IsExtension(PyObject *obj) +{ + if (!PyModule_Check(obj)) { + return 0; + } + PyModuleObject *module = (PyModuleObject*)obj; + + struct PyModuleDef *def = module->md_def; + return (def != NULL && def->m_methods != NULL); +} + + PyObject* PyModuleDef_Init(struct PyModuleDef* def) { diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index c02071780b863..ee64b0f125b95 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -2496,6 +2496,45 @@ fatal_error_exit(int status) } +// Dump the list of extension modules of sys.modules into fd file descriptor. +// This function is called by a signal handler in faulthandler: avoid memory +// allocations and keep the implementation simple. For example, the list +// is not sorted on purpose. +void +_Py_DumpExtensionModules(int fd, PyInterpreterState *interp) +{ + if (interp == NULL) { + return; + } + PyObject *modules = interp->modules; + if (!PyDict_Check(modules)) { + return; + } + + PUTS(fd, "\nExtension modules: "); + + Py_ssize_t pos = 0; + PyObject *key, *value; + int comma = 0; + while (PyDict_Next(modules, &pos, &key, &value)) { + if (!PyUnicode_Check(key)) { + continue; + } + if (!_PyModule_IsExtension(value)) { + continue; + } + + if (comma) { + PUTS(fd, ", "); + } + comma = 1; + + _Py_DumpASCII(fd, key); + } + PUTS(fd, "\n"); +} + + static void _Py_NO_RETURN fatal_error(int fd, int header, const char *prefix, const char *msg, int status) @@ -2557,6 +2596,8 @@ fatal_error(int fd, int header, const char *prefix, const char *msg, _Py_FatalError_DumpTracebacks(fd, interp, tss_tstate); } + _Py_DumpExtensionModules(fd, interp); + /* The main purpose of faulthandler is to display the traceback. This function already did its best to display a traceback. Disable faulthandler to prevent writing a second traceback From webhook-mailer at python.org Mon Jan 18 15:23:48 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 18 Jan 2021 20:23:48 -0000 Subject: [Python-checkins] bpo-36143: make regen-all now also runs regen-keyword (GH-24245) Message-ID: https://github.com/python/cpython/commit/6a809fa01f59bb00f4029d35d132cd87553554c3 commit: 6a809fa01f59bb00f4029d35d132cd87553554c3 branch: master author: Victor Stinner committer: vstinner date: 2021-01-18T21:23:35+01:00 summary: bpo-36143: make regen-all now also runs regen-keyword (GH-24245) files: A Misc/NEWS.d/next/Build/2021-01-18-20-52-06.bpo-36143.kgnIYo.rst M Makefile.pre.in diff --git a/Makefile.pre.in b/Makefile.pre.in index 7f7f759641941..5605a88ac18eb 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -755,7 +755,7 @@ regen-limited-abi: all # Regenerate all generated files regen-all: regen-opcode regen-opcode-targets regen-typeslots \ - regen-token regen-ast regen-importlib clinic \ + regen-token regen-ast regen-keyword regen-importlib clinic \ regen-pegen-metaparser regen-pegen ############################################################################ diff --git a/Misc/NEWS.d/next/Build/2021-01-18-20-52-06.bpo-36143.kgnIYo.rst b/Misc/NEWS.d/next/Build/2021-01-18-20-52-06.bpo-36143.kgnIYo.rst new file mode 100644 index 0000000000000..5ac3269d95540 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-01-18-20-52-06.bpo-36143.kgnIYo.rst @@ -0,0 +1 @@ +``make regen-all`` now also runs ``regen-keyword``. Patch by Victor Stinner. From webhook-mailer at python.org Mon Jan 18 15:47:23 2021 From: webhook-mailer at python.org (benjaminp) Date: Mon, 18 Jan 2021 20:47:23 -0000 Subject: [Python-checkins] closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (24239) Message-ID: https://github.com/python/cpython/commit/916610ef90a0d0761f08747f7b0905541f0977c7 commit: 916610ef90a0d0761f08747f7b0905541f0977c7 branch: master author: Benjamin Peterson committer: benjaminp date: 2021-01-18T14:47:05-06:00 summary: closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (24239) files: A Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst M Lib/ctypes/test/test_parameters.py M Modules/_ctypes/callproc.c diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index e4c25fd880cef..531894fdec838 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -201,6 +201,49 @@ def __dict__(self): with self.assertRaises(ZeroDivisionError): WorseStruct().__setstate__({}, b'foo') + def test_parameter_repr(self): + from ctypes import ( + c_bool, + c_char, + c_wchar, + c_byte, + c_ubyte, + c_short, + c_ushort, + c_int, + c_uint, + c_long, + c_ulong, + c_longlong, + c_ulonglong, + c_float, + c_double, + c_longdouble, + c_char_p, + c_wchar_p, + c_void_p, + ) + self.assertRegex(repr(c_bool.from_param(True)), r"^$") + self.assertEqual(repr(c_char.from_param(97)), "") + self.assertRegex(repr(c_wchar.from_param('a')), r"^$") + self.assertEqual(repr(c_byte.from_param(98)), "") + self.assertEqual(repr(c_ubyte.from_param(98)), "") + self.assertEqual(repr(c_short.from_param(511)), "") + self.assertEqual(repr(c_ushort.from_param(511)), "") + self.assertRegex(repr(c_int.from_param(20000)), r"^$") + self.assertRegex(repr(c_uint.from_param(20000)), r"^$") + self.assertRegex(repr(c_long.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulong.from_param(20000)), r"^$") + self.assertRegex(repr(c_longlong.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulonglong.from_param(20000)), r"^$") + self.assertEqual(repr(c_float.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1e300)), "") + self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") + ################################################################ if __name__ == '__main__': diff --git a/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst new file mode 100644 index 0000000000000..7df65a156feab --- /dev/null +++ b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst @@ -0,0 +1,2 @@ +Avoid static buffers when computing the repr of :class:`ctypes.c_double` and +:class:`ctypes.c_longdouble` values. diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 40a05a44edd4c..56ccc2f1e0b5d 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -487,58 +487,47 @@ is_literal_char(unsigned char c) static PyObject * PyCArg_repr(PyCArgObject *self) { - char buffer[256]; switch(self->tag) { case 'b': case 'B': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.b); - break; case 'h': case 'H': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.h); - break; case 'i': case 'I': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.i); - break; case 'l': case 'L': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.l); - break; case 'q': case 'Q': - sprintf(buffer, -#ifdef MS_WIN32 - "", -#else - "", -#endif + return PyUnicode_FromFormat("", self->tag, self->value.q); - break; case 'd': - sprintf(buffer, "", - self->tag, self->value.d); - break; - case 'f': - sprintf(buffer, "", - self->tag, self->value.f); - break; - + case 'f': { + PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d); + if (f == NULL) { + return NULL; + } + PyObject *result = PyUnicode_FromFormat("", self->tag, f); + Py_DECREF(f); + return result; + } case 'c': if (is_literal_char((unsigned char)self->value.c)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.c); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, (unsigned char)self->value.c); } - break; /* Hm, are these 'z' and 'Z' codes useful at all? Shouldn't they be replaced by the functionality of c_string @@ -547,22 +536,20 @@ PyCArg_repr(PyCArgObject *self) case 'z': case 'Z': case 'P': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.p); break; default: if (is_literal_char((unsigned char)self->tag)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", (unsigned char)self->tag, (void *)self); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", (unsigned char)self->tag, (void *)self); } - break; } - return PyUnicode_FromString(buffer); } static PyMemberDef PyCArgType_members[] = { From webhook-mailer at python.org Mon Jan 18 16:11:53 2021 From: webhook-mailer at python.org (benjaminp) Date: Mon, 18 Jan 2021 21:11:53 -0000 Subject: [Python-checkins] [3.6] closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24250) Message-ID: https://github.com/python/cpython/commit/34df10a9a16b38d54421eeeaf73ec89828563be7 commit: 34df10a9a16b38d54421eeeaf73ec89828563be7 branch: 3.6 author: Benjamin Peterson committer: benjaminp date: 2021-01-18T15:11:46-06:00 summary: [3.6] closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24250) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson files: A Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst M Lib/ctypes/test/test_parameters.py M Modules/_ctypes/callproc.c diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index e4c25fd880cef..531894fdec838 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -201,6 +201,49 @@ def __dict__(self): with self.assertRaises(ZeroDivisionError): WorseStruct().__setstate__({}, b'foo') + def test_parameter_repr(self): + from ctypes import ( + c_bool, + c_char, + c_wchar, + c_byte, + c_ubyte, + c_short, + c_ushort, + c_int, + c_uint, + c_long, + c_ulong, + c_longlong, + c_ulonglong, + c_float, + c_double, + c_longdouble, + c_char_p, + c_wchar_p, + c_void_p, + ) + self.assertRegex(repr(c_bool.from_param(True)), r"^$") + self.assertEqual(repr(c_char.from_param(97)), "") + self.assertRegex(repr(c_wchar.from_param('a')), r"^$") + self.assertEqual(repr(c_byte.from_param(98)), "") + self.assertEqual(repr(c_ubyte.from_param(98)), "") + self.assertEqual(repr(c_short.from_param(511)), "") + self.assertEqual(repr(c_ushort.from_param(511)), "") + self.assertRegex(repr(c_int.from_param(20000)), r"^$") + self.assertRegex(repr(c_uint.from_param(20000)), r"^$") + self.assertRegex(repr(c_long.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulong.from_param(20000)), r"^$") + self.assertRegex(repr(c_longlong.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulonglong.from_param(20000)), r"^$") + self.assertEqual(repr(c_float.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1e300)), "") + self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") + ################################################################ if __name__ == '__main__': diff --git a/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst new file mode 100644 index 0000000000000..7df65a156feab --- /dev/null +++ b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst @@ -0,0 +1,2 @@ +Avoid static buffers when computing the repr of :class:`ctypes.c_double` and +:class:`ctypes.c_longdouble` values. diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index d1c190f359108..2bb289bce043f 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -461,58 +461,47 @@ is_literal_char(unsigned char c) static PyObject * PyCArg_repr(PyCArgObject *self) { - char buffer[256]; switch(self->tag) { case 'b': case 'B': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.b); - break; case 'h': case 'H': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.h); - break; case 'i': case 'I': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.i); - break; case 'l': case 'L': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.l); - break; case 'q': case 'Q': - sprintf(buffer, -#ifdef MS_WIN32 - "", -#else - "", -#endif + return PyUnicode_FromFormat("", self->tag, self->value.q); - break; case 'd': - sprintf(buffer, "", - self->tag, self->value.d); - break; - case 'f': - sprintf(buffer, "", - self->tag, self->value.f); - break; - + case 'f': { + PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d); + if (f == NULL) { + return NULL; + } + PyObject *result = PyUnicode_FromFormat("", self->tag, f); + Py_DECREF(f); + return result; + } case 'c': if (is_literal_char((unsigned char)self->value.c)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.c); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, (unsigned char)self->value.c); } - break; /* Hm, are these 'z' and 'Z' codes useful at all? Shouldn't they be replaced by the functionality of c_string @@ -521,22 +510,20 @@ PyCArg_repr(PyCArgObject *self) case 'z': case 'Z': case 'P': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.p); break; default: if (is_literal_char((unsigned char)self->tag)) { - sprintf(buffer, "", - (unsigned char)self->tag, self); + return PyUnicode_FromFormat("", + (unsigned char)self->tag, (void *)self); } else { - sprintf(buffer, "", - (unsigned char)self->tag, self); + return PyUnicode_FromFormat("", + (unsigned char)self->tag, (void *)self); } - break; } - return PyUnicode_FromString(buffer); } static PyMemberDef PyCArgType_members[] = { From webhook-mailer at python.org Mon Jan 18 16:24:06 2021 From: webhook-mailer at python.org (benjaminp) Date: Mon, 18 Jan 2021 21:24:06 -0000 Subject: [Python-checkins] [3.7] closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24249) Message-ID: https://github.com/python/cpython/commit/d9b8f138b7df3b455b54653ca59f491b4840d6fa commit: d9b8f138b7df3b455b54653ca59f491b4840d6fa branch: 3.7 author: Benjamin Peterson committer: benjaminp date: 2021-01-18T15:24:02-06:00 summary: [3.7] closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24249) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson files: A Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst M Lib/ctypes/test/test_parameters.py M Modules/_ctypes/callproc.c diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index e4c25fd880cef..531894fdec838 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -201,6 +201,49 @@ def __dict__(self): with self.assertRaises(ZeroDivisionError): WorseStruct().__setstate__({}, b'foo') + def test_parameter_repr(self): + from ctypes import ( + c_bool, + c_char, + c_wchar, + c_byte, + c_ubyte, + c_short, + c_ushort, + c_int, + c_uint, + c_long, + c_ulong, + c_longlong, + c_ulonglong, + c_float, + c_double, + c_longdouble, + c_char_p, + c_wchar_p, + c_void_p, + ) + self.assertRegex(repr(c_bool.from_param(True)), r"^$") + self.assertEqual(repr(c_char.from_param(97)), "") + self.assertRegex(repr(c_wchar.from_param('a')), r"^$") + self.assertEqual(repr(c_byte.from_param(98)), "") + self.assertEqual(repr(c_ubyte.from_param(98)), "") + self.assertEqual(repr(c_short.from_param(511)), "") + self.assertEqual(repr(c_ushort.from_param(511)), "") + self.assertRegex(repr(c_int.from_param(20000)), r"^$") + self.assertRegex(repr(c_uint.from_param(20000)), r"^$") + self.assertRegex(repr(c_long.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulong.from_param(20000)), r"^$") + self.assertRegex(repr(c_longlong.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulonglong.from_param(20000)), r"^$") + self.assertEqual(repr(c_float.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1e300)), "") + self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") + ################################################################ if __name__ == '__main__': diff --git a/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst new file mode 100644 index 0000000000000..7df65a156feab --- /dev/null +++ b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst @@ -0,0 +1,2 @@ +Avoid static buffers when computing the repr of :class:`ctypes.c_double` and +:class:`ctypes.c_longdouble` values. diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 73413531bdbf0..9cbf9801ad188 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -463,58 +463,47 @@ is_literal_char(unsigned char c) static PyObject * PyCArg_repr(PyCArgObject *self) { - char buffer[256]; switch(self->tag) { case 'b': case 'B': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.b); - break; case 'h': case 'H': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.h); - break; case 'i': case 'I': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.i); - break; case 'l': case 'L': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.l); - break; case 'q': case 'Q': - sprintf(buffer, -#ifdef MS_WIN32 - "", -#else - "", -#endif + return PyUnicode_FromFormat("", self->tag, self->value.q); - break; case 'd': - sprintf(buffer, "", - self->tag, self->value.d); - break; - case 'f': - sprintf(buffer, "", - self->tag, self->value.f); - break; - + case 'f': { + PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d); + if (f == NULL) { + return NULL; + } + PyObject *result = PyUnicode_FromFormat("", self->tag, f); + Py_DECREF(f); + return result; + } case 'c': if (is_literal_char((unsigned char)self->value.c)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.c); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, (unsigned char)self->value.c); } - break; /* Hm, are these 'z' and 'Z' codes useful at all? Shouldn't they be replaced by the functionality of c_string @@ -523,22 +512,20 @@ PyCArg_repr(PyCArgObject *self) case 'z': case 'Z': case 'P': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.p); break; default: if (is_literal_char((unsigned char)self->tag)) { - sprintf(buffer, "", - (unsigned char)self->tag, self); + return PyUnicode_FromFormat("", + (unsigned char)self->tag, (void *)self); } else { - sprintf(buffer, "", - (unsigned char)self->tag, self); + return PyUnicode_FromFormat("", + (unsigned char)self->tag, (void *)self); } - break; } - return PyUnicode_FromString(buffer); } static PyMemberDef PyCArgType_members[] = { From webhook-mailer at python.org Mon Jan 18 16:28:58 2021 From: webhook-mailer at python.org (benjaminp) Date: Mon, 18 Jan 2021 21:28:58 -0000 Subject: [Python-checkins] closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24248) Message-ID: https://github.com/python/cpython/commit/ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f commit: ece5dfd403dac211f8d3c72701fe7ba7b7aa5b5f branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: benjaminp date: 2021-01-18T15:28:52-06:00 summary: closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24248) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson Co-authored-by: Benjamin Peterson files: A Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst M Lib/ctypes/test/test_parameters.py M Modules/_ctypes/callproc.c diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index e4c25fd880cef..531894fdec838 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -201,6 +201,49 @@ def __dict__(self): with self.assertRaises(ZeroDivisionError): WorseStruct().__setstate__({}, b'foo') + def test_parameter_repr(self): + from ctypes import ( + c_bool, + c_char, + c_wchar, + c_byte, + c_ubyte, + c_short, + c_ushort, + c_int, + c_uint, + c_long, + c_ulong, + c_longlong, + c_ulonglong, + c_float, + c_double, + c_longdouble, + c_char_p, + c_wchar_p, + c_void_p, + ) + self.assertRegex(repr(c_bool.from_param(True)), r"^$") + self.assertEqual(repr(c_char.from_param(97)), "") + self.assertRegex(repr(c_wchar.from_param('a')), r"^$") + self.assertEqual(repr(c_byte.from_param(98)), "") + self.assertEqual(repr(c_ubyte.from_param(98)), "") + self.assertEqual(repr(c_short.from_param(511)), "") + self.assertEqual(repr(c_ushort.from_param(511)), "") + self.assertRegex(repr(c_int.from_param(20000)), r"^$") + self.assertRegex(repr(c_uint.from_param(20000)), r"^$") + self.assertRegex(repr(c_long.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulong.from_param(20000)), r"^$") + self.assertRegex(repr(c_longlong.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulonglong.from_param(20000)), r"^$") + self.assertEqual(repr(c_float.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1e300)), "") + self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") + ################################################################ if __name__ == '__main__': diff --git a/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst new file mode 100644 index 0000000000000..7df65a156feab --- /dev/null +++ b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst @@ -0,0 +1,2 @@ +Avoid static buffers when computing the repr of :class:`ctypes.c_double` and +:class:`ctypes.c_longdouble` values. diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index a9b8675cd951b..de75918d49f37 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -484,58 +484,47 @@ is_literal_char(unsigned char c) static PyObject * PyCArg_repr(PyCArgObject *self) { - char buffer[256]; switch(self->tag) { case 'b': case 'B': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.b); - break; case 'h': case 'H': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.h); - break; case 'i': case 'I': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.i); - break; case 'l': case 'L': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.l); - break; case 'q': case 'Q': - sprintf(buffer, -#ifdef MS_WIN32 - "", -#else - "", -#endif + return PyUnicode_FromFormat("", self->tag, self->value.q); - break; case 'd': - sprintf(buffer, "", - self->tag, self->value.d); - break; - case 'f': - sprintf(buffer, "", - self->tag, self->value.f); - break; - + case 'f': { + PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d); + if (f == NULL) { + return NULL; + } + PyObject *result = PyUnicode_FromFormat("", self->tag, f); + Py_DECREF(f); + return result; + } case 'c': if (is_literal_char((unsigned char)self->value.c)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.c); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, (unsigned char)self->value.c); } - break; /* Hm, are these 'z' and 'Z' codes useful at all? Shouldn't they be replaced by the functionality of c_string @@ -544,22 +533,20 @@ PyCArg_repr(PyCArgObject *self) case 'z': case 'Z': case 'P': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.p); break; default: if (is_literal_char((unsigned char)self->tag)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", (unsigned char)self->tag, (void *)self); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", (unsigned char)self->tag, (void *)self); } - break; } - return PyUnicode_FromString(buffer); } static PyMemberDef PyCArgType_members[] = { From webhook-mailer at python.org Mon Jan 18 16:29:35 2021 From: webhook-mailer at python.org (benjaminp) Date: Mon, 18 Jan 2021 21:29:35 -0000 Subject: [Python-checkins] closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24247) Message-ID: https://github.com/python/cpython/commit/c347cbe694743cee120457aa6626712f7799a932 commit: c347cbe694743cee120457aa6626712f7799a932 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: benjaminp date: 2021-01-18T15:29:31-06:00 summary: closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs. (GH-24247) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson Co-authored-by: Benjamin Peterson files: A Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst M Lib/ctypes/test/test_parameters.py M Modules/_ctypes/callproc.c diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index e4c25fd880cef..531894fdec838 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -201,6 +201,49 @@ def __dict__(self): with self.assertRaises(ZeroDivisionError): WorseStruct().__setstate__({}, b'foo') + def test_parameter_repr(self): + from ctypes import ( + c_bool, + c_char, + c_wchar, + c_byte, + c_ubyte, + c_short, + c_ushort, + c_int, + c_uint, + c_long, + c_ulong, + c_longlong, + c_ulonglong, + c_float, + c_double, + c_longdouble, + c_char_p, + c_wchar_p, + c_void_p, + ) + self.assertRegex(repr(c_bool.from_param(True)), r"^$") + self.assertEqual(repr(c_char.from_param(97)), "") + self.assertRegex(repr(c_wchar.from_param('a')), r"^$") + self.assertEqual(repr(c_byte.from_param(98)), "") + self.assertEqual(repr(c_ubyte.from_param(98)), "") + self.assertEqual(repr(c_short.from_param(511)), "") + self.assertEqual(repr(c_ushort.from_param(511)), "") + self.assertRegex(repr(c_int.from_param(20000)), r"^$") + self.assertRegex(repr(c_uint.from_param(20000)), r"^$") + self.assertRegex(repr(c_long.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulong.from_param(20000)), r"^$") + self.assertRegex(repr(c_longlong.from_param(20000)), r"^$") + self.assertRegex(repr(c_ulonglong.from_param(20000)), r"^$") + self.assertEqual(repr(c_float.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1.5)), "") + self.assertEqual(repr(c_double.from_param(1e300)), "") + self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") + ################################################################ if __name__ == '__main__': diff --git a/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst new file mode 100644 index 0000000000000..7df65a156feab --- /dev/null +++ b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst @@ -0,0 +1,2 @@ +Avoid static buffers when computing the repr of :class:`ctypes.c_double` and +:class:`ctypes.c_longdouble` values. diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index b0a36a30248f7..f2506de54498e 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -489,58 +489,47 @@ is_literal_char(unsigned char c) static PyObject * PyCArg_repr(PyCArgObject *self) { - char buffer[256]; switch(self->tag) { case 'b': case 'B': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.b); - break; case 'h': case 'H': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.h); - break; case 'i': case 'I': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.i); - break; case 'l': case 'L': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.l); - break; case 'q': case 'Q': - sprintf(buffer, -#ifdef MS_WIN32 - "", -#else - "", -#endif + return PyUnicode_FromFormat("", self->tag, self->value.q); - break; case 'd': - sprintf(buffer, "", - self->tag, self->value.d); - break; - case 'f': - sprintf(buffer, "", - self->tag, self->value.f); - break; - + case 'f': { + PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d); + if (f == NULL) { + return NULL; + } + PyObject *result = PyUnicode_FromFormat("", self->tag, f); + Py_DECREF(f); + return result; + } case 'c': if (is_literal_char((unsigned char)self->value.c)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.c); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, (unsigned char)self->value.c); } - break; /* Hm, are these 'z' and 'Z' codes useful at all? Shouldn't they be replaced by the functionality of c_string @@ -549,22 +538,20 @@ PyCArg_repr(PyCArgObject *self) case 'z': case 'Z': case 'P': - sprintf(buffer, "", + return PyUnicode_FromFormat("", self->tag, self->value.p); break; default: if (is_literal_char((unsigned char)self->tag)) { - sprintf(buffer, "", + return PyUnicode_FromFormat("", (unsigned char)self->tag, (void *)self); } else { - sprintf(buffer, "", + return PyUnicode_FromFormat("", (unsigned char)self->tag, (void *)self); } - break; } - return PyUnicode_FromString(buffer); } static PyMemberDef PyCArgType_members[] = { From webhook-mailer at python.org Mon Jan 18 17:21:01 2021 From: webhook-mailer at python.org (pablogsal) Date: Mon, 18 Jan 2021 22:21:01 -0000 Subject: [Python-checkins] Add a paragraph about allocation domains to the C-API docs (GH-24252) Message-ID: https://github.com/python/cpython/commit/bc450f9694fb8aa7a7a3d2f9d46f8b200e8aa4b3 commit: bc450f9694fb8aa7a7a3d2f9d46f8b200e8aa4b3 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-18T22:20:57Z summary: Add a paragraph about allocation domains to the C-API docs (GH-24252) files: M Doc/c-api/memory.rst diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst index 87425bcf1e71f..bd73780cc0f8e 100644 --- a/Doc/c-api/memory.rst +++ b/Doc/c-api/memory.rst @@ -92,6 +92,38 @@ for the I/O buffer escapes completely the Python memory manager. statistics of the :ref:`pymalloc memory allocator ` every time a new pymalloc object arena is created, and on shutdown. +Allocator Domains +================= + +All allocating functions belong to one of three different "domains" (see also +:c:type`PyMemAllocatorDomain`). These domains represent different allocation +strategies and are optimized for different purposes. The specific details on +how every domain allocates memory or what internal functions each domain calls +is considered an implementation detail, but for debugging purposes a simplified +table can be found at :ref:`here `. There is no hard +requirement to use the memory returned by the allocation functions belonging to +a given domain for only the purposes hinted by that domain (although this is the +recommended practice). For example, one could use the memory returned by +:c:func:`PyMem_RawMalloc` for allocating Python objects or the memory returned +by :c:func:`PyObject_Malloc` for allocating memory for buffers. + +The three allocation domains are: + +* Raw domain: intended for allocating memory for general-purpose memory + buffers where the allocation *must* go to the system allocator or where the + allocator can operate without the :term:`GIL`. The memory is requested directly + to the system. + +* "Mem" domain: intended for allocating memory for Python buffers and + general-purpose memory buffers where the allocation must be performed with + the :term:`GIL` held. The memory is taken from the Python private heap. + +* Object domain: intended for allocating memory belonging to Python objects. The + memory is taken from the Python private heap. + +When freeing memory previously allocated by the allocating functions belonging to a +given domain,the matching specific deallocating functions must be used. For example, +:c:func:`PyMem_Free` must be used to free memory allocated using :c:func:`PyMem_Malloc`. Raw Memory Interface ==================== @@ -601,4 +633,3 @@ heap, objects in Python are allocated and released with :c:func:`PyObject_New`, These will be explained in the next chapter on defining and implementing new object types in C. - From webhook-mailer at python.org Tue Jan 19 08:03:21 2021 From: webhook-mailer at python.org (encukou) Date: Tue, 19 Jan 2021 13:03:21 -0000 Subject: [Python-checkins] bpo-41818: Close file descriptors in test_openpty (#GH-24119) Message-ID: https://github.com/python/cpython/commit/65cf1ad6723b6b4489fa7dda04283bb2466be531 commit: 65cf1ad6723b6b4489fa7dda04283bb2466be531 branch: master author: Petr Viktorin committer: encukou date: 2021-01-19T14:03:12+01:00 summary: bpo-41818: Close file descriptors in test_openpty (#GH-24119) When stdin is a TTY, the test added in commit c13d89955d9a2942c6355d6839d7096323244136 is expected to fail. However, when it failed, it did not close its file descriptors. This is flagged by the refleak tests (but only when stdin is a TTY, which doesn't seem to be the case on CI). files: M Lib/test/test_pty.py diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index 190d8d787a2cc..7585c42bf0133 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -91,7 +91,6 @@ def _set_term_winsz(fd, winsz): # Marginal testing of pty suite. Cannot do extensive 'do or fail' testing # because pty code is not too portable. -# XXX(nnorwitz): these tests leak fds when there is an error. class PtyTest(unittest.TestCase): def setUp(self): old_alarm = signal.signal(signal.SIGALRM, self.handle_sig) @@ -176,6 +175,12 @@ def test_openpty(self): # " An optional feature could not be imported " ... ? raise unittest.SkipTest("Pseudo-terminals (seemingly) not functional.") + # closing master_fd can raise a SIGHUP if the process is + # the session leader: we installed a SIGHUP signal handler + # to ignore this signal. + self.addCleanup(os.close, master_fd) + self.addCleanup(os.close, slave_fd) + self.assertTrue(os.isatty(slave_fd), "slave_fd is not a tty") if mode: @@ -218,15 +223,10 @@ def test_openpty(self): s2 = _readline(master_fd) self.assertEqual(b'For my pet fish, Eric.\n', normalize_output(s2)) - os.close(slave_fd) - # closing master_fd can raise a SIGHUP if the process is - # the session leader: we installed a SIGHUP signal handler - # to ignore this signal. - os.close(master_fd) - def test_fork(self): debug("calling pty.fork()") pid, master_fd = pty.fork() + self.addCleanup(os.close, master_fd) if pid == pty.CHILD: # stdout should be connected to a tty. if not os.isatty(1): @@ -305,13 +305,14 @@ def test_fork(self): ##else: ## raise TestFailed("Read from master_fd did not raise exception") - os.close(master_fd) - def test_master_read(self): + # XXX(nnorwitz): this test leaks fds when there is an error. debug("Calling pty.openpty()") master_fd, slave_fd = pty.openpty() debug(f"Got master_fd '{master_fd}', slave_fd '{slave_fd}'") + self.addCleanup(os.close, master_fd) + debug("Closing slave_fd") os.close(slave_fd) @@ -321,7 +322,6 @@ def test_master_read(self): except OSError: # Linux data = b"" - os.close(master_fd) self.assertEqual(data, b"") class SmallPtyTests(unittest.TestCase): From webhook-mailer at python.org Tue Jan 19 08:09:43 2021 From: webhook-mailer at python.org (pablogsal) Date: Tue, 19 Jan 2021 13:09:43 -0000 Subject: [Python-checkins] Add a clarification for the object-domain allocators regarding pointer validity (GH-24253) Message-ID: https://github.com/python/cpython/commit/e485be5b6bd5fde97d78f09e2e4cca7f363763c3 commit: e485be5b6bd5fde97d78f09e2e4cca7f363763c3 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-19T13:09:06Z summary: Add a clarification for the object-domain allocators regarding pointer validity (GH-24253) files: M Doc/c-api/memory.rst diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst index bd73780cc0f8e..0597ef7136657 100644 --- a/Doc/c-api/memory.rst +++ b/Doc/c-api/memory.rst @@ -304,6 +304,12 @@ The following function sets, modeled after the ANSI C standard, but specifying behavior when requesting zero bytes, are available for allocating and releasing memory from the Python heap. +.. note:: + There is no guarantee that the memory returned by these allocators can be + succesfully casted to a Python object when intercepting the allocating + functions in this domain by the methods described in + the :ref:`Customize Memory Allocators ` section. + The :ref:`default object allocator ` uses the :ref:`pymalloc memory allocator `. @@ -385,6 +391,7 @@ Legend: * ``pymalloc``: :ref:`pymalloc memory allocator ` * "+ debug": with debug hooks installed by :c:func:`PyMem_SetupDebugHooks` +.. _customize-memory-allocators: Customize Memory Allocators =========================== From webhook-mailer at python.org Tue Jan 19 12:27:27 2021 From: webhook-mailer at python.org (vstinner) Date: Tue, 19 Jan 2021 17:27:27 -0000 Subject: [Python-checkins] bpo-41713: Remove PyOS_InitInterrupts() from python3dll.c (GH-24257) Message-ID: https://github.com/python/cpython/commit/e8e66eab941b983b6e85cd0d57cd45838880c568 commit: e8e66eab941b983b6e85cd0d57cd45838880c568 branch: master author: Victor Stinner committer: vstinner date: 2021-01-19T18:27:01+01:00 summary: bpo-41713: Remove PyOS_InitInterrupts() from python3dll.c (GH-24257) files: M PC/python3dll.c diff --git a/PC/python3dll.c b/PC/python3dll.c index 683bba3a9364d..542853abc894d 100644 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -459,7 +459,6 @@ EXPORT_FUNC(PyOS_CheckStack) EXPORT_FUNC(PyOS_double_to_string) EXPORT_FUNC(PyOS_FSPath) EXPORT_FUNC(PyOS_getsig) -EXPORT_FUNC(PyOS_InitInterrupts) EXPORT_FUNC(PyOS_InterruptOccurred) EXPORT_FUNC(PyOS_mystricmp) EXPORT_FUNC(PyOS_mystrnicmp) From webhook-mailer at python.org Tue Jan 19 17:04:59 2021 From: webhook-mailer at python.org (vstinner) Date: Tue, 19 Jan 2021 22:04:59 -0000 Subject: [Python-checkins] bpo-42955: Add Python/module_names.h (GH-24258) Message-ID: https://github.com/python/cpython/commit/cad8020cb83ec6d904f874c0e4f599e651022196 commit: cad8020cb83ec6d904f874c0e4f599e651022196 branch: master author: Victor Stinner committer: vstinner date: 2021-01-19T23:04:49+01:00 summary: bpo-42955: Add Python/module_names.h (GH-24258) Add a private list of all stdlib modules: _Py_module_names. * Add Tools/scripts/generate_module_names.py script. * Makefile: Add "make regen-module-names" command. * setup.py: Add --list-module-names option. * GitHub Action and Travis CI also runs "make regen-module-names", not ony "make regen-all", to ensure that the module names remains up to date. files: A Python/module_names.h A Tools/scripts/generate_module_names.py M .github/workflows/build.yml M .travis.yml M Makefile.pre.in M PCbuild/pythoncore.vcxproj M PCbuild/pythoncore.vcxproj.filters M setup.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f05310e6e586..6a41b51824546 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,7 @@ jobs: # Build Python with the libpython dynamic library ./configure --with-pydebug --enable-shared make -j4 regen-all + make regen-module-names - name: Check for changes run: | changes=$(git status --porcelain) diff --git a/.travis.yml b/.travis.yml index 547d919974957..c908891b2e322 100644 --- a/.travis.yml +++ b/.travis.yml @@ -172,6 +172,7 @@ before_script: - eval "$(pyenv init -)" - pyenv global 3.8 - PYTHON_FOR_REGEN=python3.8 make -j4 regen-all + - make regen-module-names - changes=`git status --porcelain` - | # Check for changes in regenerated files diff --git a/Makefile.pre.in b/Makefile.pre.in index 5605a88ac18eb..fa0b9d85d36ed 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -252,7 +252,7 @@ PYTHON= python$(EXE) BUILDPYTHON= python$(BUILDEXE) PYTHON_FOR_REGEN?=@PYTHON_FOR_REGEN@ -UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py +UPDATE_FILE=$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/update_file.py PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ BUILD_GNU_TYPE= @build@ @@ -757,6 +757,8 @@ regen-limited-abi: all regen-all: regen-opcode regen-opcode-targets regen-typeslots \ regen-token regen-ast regen-keyword regen-importlib clinic \ regen-pegen-metaparser regen-pegen + @echo + @echo "Note: make regen-module-names and autoconf should be run manually" ############################################################################ # Special rules for object files @@ -896,6 +898,15 @@ regen-keyword: $(srcdir)/Lib/keyword.py.new $(UPDATE_FILE) $(srcdir)/Lib/keyword.py $(srcdir)/Lib/keyword.py.new +.PHONY: regen-module-names +regen-module-names: build_all + # Regenerate Python/module_names.h + # using Tools/scripts/generate_module_names.py + $(RUNSHARED) ./$(BUILDPYTHON) \ + $(srcdir)/Tools/scripts/generate_module_names.py \ + > $(srcdir)/Python/module_names.h.new + $(UPDATE_FILE) $(srcdir)/Python/module_names.h $(srcdir)/Python/module_names.h.new + Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o: $(srcdir)/Include/Python-ast.h Python/getplatform.o: $(srcdir)/Python/getplatform.c @@ -1145,7 +1156,9 @@ PYTHON_HEADERS= \ $(srcdir)/Include/internal/pycore_ucnhash.h \ $(srcdir)/Include/internal/pycore_unionobject.h \ $(srcdir)/Include/internal/pycore_warnings.h \ - $(DTRACE_HEADERS) + $(DTRACE_HEADERS) \ + \ + $(srcdir)/Python/module_names.h $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS) diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index fd27dea9daec7..6a260da65556a 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -291,6 +291,7 @@ + diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 75a653dcbdab2..98e3ca2c9e6b8 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -360,6 +360,9 @@ Python + + Python + Python diff --git a/Python/module_names.h b/Python/module_names.h new file mode 100644 index 0000000000000..533a73260efe9 --- /dev/null +++ b/Python/module_names.h @@ -0,0 +1,336 @@ +// Auto-generated by Tools/scripts/generate_module_names.py. + +static const char* _Py_module_names[] = { + +// Built-in modules +"_abc", +"_ast", +"_codecs", +"_collections", +"_functools", +"_imp", +"_io", +"_locale", +"_operator", +"_signal", +"_sre", +"_stat", +"_string", +"_symtable", +"_thread", +"_tracemalloc", +"_warnings", +"_weakref", +"atexit", +"builtins", +"errno", +"faulthandler", +"gc", +"itertools", +"marshal", +"posix", +"pwd", +"sys", +"time", + +// Pure Python modules (Lib/*.py) +"__future__", +"abc", +"aifc", +"antigravity", +"argparse", +"ast", +"asynchat", +"asyncore", +"base64", +"bdb", +"binhex", +"bisect", +"bz2", +"cProfile", +"calendar", +"cgi", +"cgitb", +"chunk", +"cmd", +"code", +"codecs", +"codeop", +"colorsys", +"compileall", +"configparser", +"contextlib", +"contextvars", +"copy", +"copyreg", +"crypt", +"csv", +"dataclasses", +"datetime", +"decimal", +"difflib", +"dis", +"doctest", +"enum", +"filecmp", +"fileinput", +"fnmatch", +"fractions", +"ftplib", +"functools", +"genericpath", +"getopt", +"getpass", +"gettext", +"glob", +"graphlib", +"gzip", +"hashlib", +"heapq", +"hmac", +"imaplib", +"imghdr", +"imp", +"inspect", +"io", +"ipaddress", +"keyword", +"linecache", +"locale", +"lzma", +"mailbox", +"mailcap", +"mimetypes", +"modulefinder", +"netrc", +"nntplib", +"ntpath", +"nturl2path", +"numbers", +"opcode", +"operator", +"optparse", +"os", +"pathlib", +"pdb", +"pickle", +"pickletools", +"pipes", +"pkgutil", +"platform", +"plistlib", +"poplib", +"posixpath", +"pprint", +"profile", +"pstats", +"pty", +"py_compile", +"pyclbr", +"pydoc", +"queue", +"quopri", +"random", +"re", +"reprlib", +"rlcompleter", +"runpy", +"sched", +"secrets", +"selectors", +"shelve", +"shlex", +"shutil", +"signal", +"site", +"smtpd", +"smtplib", +"sndhdr", +"socket", +"socketserver", +"sre_compile", +"sre_constants", +"sre_parse", +"ssl", +"stat", +"statistics", +"string", +"stringprep", +"struct", +"subprocess", +"sunau", +"symtable", +"sysconfig", +"tabnanny", +"tarfile", +"telnetlib", +"tempfile", +"textwrap", +"this", +"threading", +"timeit", +"token", +"tokenize", +"trace", +"traceback", +"tracemalloc", +"tty", +"turtle", +"types", +"typing", +"uu", +"uuid", +"warnings", +"wave", +"weakref", +"webbrowser", +"xdrlib", +"zipapp", +"zipfile", +"zipimport", + +// Packages and sub-packages +"asyncio", +"collections", +"concurrent", +"concurrent.futures", +"ctypes", +"ctypes.macholib", +"curses", +"dbm", +"distutils", +"distutils.command", +"email", +"email.mime", +"encodings", +"ensurepip", +"ensurepip._bundled", +"html", +"http", +"idlelib", +"importlib", +"json", +"lib2to3", +"lib2to3.fixes", +"lib2to3.pgen2", +"logging", +"msilib", +"multiprocessing", +"multiprocessing.dummy", +"pydoc_data", +"sqlite3", +"tkinter", +"turtledemo", +"unittest", +"urllib", +"venv", +"wsgiref", +"xml", +"xml.dom", +"xml.etree", +"xml.parsers", +"xml.sax", +"xmlrpc", +"zoneinfo", + +// Extension modules built by setup.py +"_asyncio", +"_bisect", +"_blake2", +"_bz2", +"_codecs_cn", +"_codecs_hk", +"_codecs_iso2022", +"_codecs_jp", +"_codecs_kr", +"_codecs_tw", +"_contextvars", +"_crypt", +"_csv", +"_ctypes", +"_curses", +"_curses_panel", +"_datetime", +"_dbm", +"_decimal", +"_elementtree", +"_gdbm", +"_hashlib", +"_heapq", +"_json", +"_lsprof", +"_lzma", +"_md5", +"_multibytecodec", +"_multiprocessing", +"_opcode", +"_pickle", +"_posixshmem", +"_posixsubprocess", +"_queue", +"_random", +"_sha1", +"_sha256", +"_sha3", +"_sha512", +"_socket", +"_sqlite3", +"_ssl", +"_statistics", +"_struct", +"_tkinter", +"_uuid", +"_xxsubinterpreters", +"_zoneinfo", +"array", +"audioop", +"binascii", +"cmath", +"fcntl", +"grp", +"math", +"mmap", +"nis", +"ossaudiodev", +"pyexpat", +"readline", +"resource", +"select", +"spwd", +"syslog", +"termios", +"unicodedata", +"zlib", + +// Built-in and extension modules built by Modules/Setup +"_abc", +"_codecs", +"_collections", +"_functools", +"_io", +"_locale", +"_operator", +"_signal", +"_sre", +"_stat", +"_symtable", +"_thread", +"_tracemalloc", +"_weakref", +"atexit", +"errno", +"faulthandler", +"itertools", +"posix", +"pwd", +"time", + +// Windows extension modules +"_msi", +"_winapi", +"msvcrt", +"nt", +"winreg", +"winsound", + +}; diff --git a/Tools/scripts/generate_module_names.py b/Tools/scripts/generate_module_names.py new file mode 100644 index 0000000000000..985a1a5e5a2d9 --- /dev/null +++ b/Tools/scripts/generate_module_names.py @@ -0,0 +1,200 @@ +# This script lists the names of standard library modules +# to update Python/module_names.h +import os.path +import re +import subprocess +import sys +import sysconfig + + +SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) +STDLIB_PATH = os.path.join(SRC_DIR, 'Lib') +MODULES_SETUP = os.path.join(SRC_DIR, 'Modules', 'Setup') +SETUP_PY = os.path.join(SRC_DIR, 'setup.py') + +IGNORE = { + '__init__', + '__pycache__', + 'site-packages', + + # Helper modules of public modules. + # For example, sysconfig uses _osx_support. + '_aix_support', + '_collections_abc', + '_compat_pickle', + '_compression', + '_markupbase', + '_osx_support', + '_sitebuiltins', + '_strptime', + '_threading_local', + '_weakrefset', + + # Used to bootstrap setup.py + '_bootsubprocess', + + # pure Python implementation + '_py_abc', + '_pydecimal', + '_pyio', + + # test modules + '__phello__.foo', + '_ctypes_test', + '_testbuffer', + '_testcapi', + '_testconsole', + '_testimportmultiple', + '_testinternalcapi', + '_testmultiphase', + '_xxtestfuzz', + 'distutils.tests', + 'idlelib.idle_test', + 'lib2to3.tests', + 'test', + 'xxlimited', + 'xxlimited_35', + 'xxsubtype', +} + +# Windows extension modules +WINDOWS_MODULES = ( + '_msi', + '_testconsole', + '_winapi', + 'msvcrt', + 'nt', + 'winreg', + 'winsound' +) + + +def write_comment(fp, comment): + print(f"// {comment}", file=fp) + + +def write_modules(fp, names): + for name in sorted(names): + if name in IGNORE: + continue + print(f'"{name}",', file=fp) + print(file=fp) + + +def list_builtin_modules(fp): + write_comment(fp, "Built-in modules") + write_modules(fp, sys.builtin_module_names) + + +# Pure Python modules (Lib/*.py) +def list_python_modules(fp): + write_comment(fp, "Pure Python modules (Lib/*.py)") + names = [] + for filename in os.listdir(STDLIB_PATH): + if not filename.endswith(".py"): + continue + name = filename.removesuffix(".py") + names.append(name) + write_modules(fp, names) + + +def _list_sub_packages(path, names, parent=None): + for name in os.listdir(path): + package_path = os.path.join(path, name) + if name in IGNORE: + continue + if not os.path.isdir(package_path): + continue + if not any(package_file.endswith(".py") + for package_file in os.listdir(package_path)): + continue + if parent: + qualname = f"{parent}.{name}" + else: + qualname = name + if qualname in IGNORE: + continue + names.append(qualname) + _list_sub_packages(package_path, names, qualname) + + +# Packages and sub-packages +def list_packages(fp): + write_comment(fp, "Packages and sub-packages") + names = [] + _list_sub_packages(STDLIB_PATH, names) + write_modules(fp, names) + + +# Windows extensions +def list_windows_extensions(fp): + write_comment(fp, "Windows extension modules") + write_modules(fp, WINDOWS_MODULES) + + +# Extension modules built by setup.py +def list_setup(fp): + cmd = [sys.executable, SETUP_PY, "-q", "build", "--list-module-names"] + output = subprocess.check_output(cmd) + output = output.decode("utf8") + names = output.splitlines() + + write_comment(fp, "Extension modules built by setup.py") + write_modules(fp, names) + + +# Built-in and extension modules built by Modules/Setup +def list_modules_setup(fp): + assign_var = re.compile("^[A-Z]+=") + + names = [] + with open(MODULES_SETUP, encoding="utf-8") as modules_fp: + for line in modules_fp: + # Strip comment + line = line.partition("#")[0] + line = line.rstrip() + if not line: + continue + if assign_var.match(line): + # Ignore "VAR=VALUE" + continue + if line in ("*disabled*", "*shared*"): + continue + parts = line.split() + if len(parts) < 2: + continue + # "errno errnomodule.c" => write "errno" + name = parts[0] + names.append(name) + + write_comment(fp, "Built-in and extension modules built by Modules/Setup") + write_modules(fp, names) + + +def list_modules(fp): + print("// Auto-generated by Tools/scripts/generate_module_names.py.", file=fp) + print(file=fp) + print("static const char* _Py_module_names[] = {", file=fp) + print(file=fp) + + list_builtin_modules(fp) + list_python_modules(fp) + list_packages(fp) + list_setup(fp) + list_modules_setup(fp) + list_windows_extensions(fp) + + print("};", file=fp) + + +def main(): + if not sysconfig.is_python_build(): + print(f"ERROR: {sys.executable} is not a Python build", + file=sys.stderr) + sys.exit(1) + + list_modules(sys.stdout) + + +if __name__ == "__main__": + main() diff --git a/setup.py b/setup.py index ddc0bd067d4e4..a4d21d4c61972 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,9 @@ # This global variable is used to hold the list of modules to be disabled. DISABLED_MODULE_LIST = [] +# --list-module-names option used by Tools/scripts/generate_module_names.py +LIST_MODULE_NAMES = False + def get_platform(): # Cross compiling @@ -447,12 +450,20 @@ def build_extensions(self): # Detect which modules should be compiled self.detect_modules() - self.remove_disabled() + if not LIST_MODULE_NAMES: + self.remove_disabled() self.update_sources_depends() mods_built, mods_disabled = self.remove_configured_extensions() self.set_compiler_executables() + if LIST_MODULE_NAMES: + for ext in self.extensions: + print(ext.name) + for name in self.missing: + print(name) + return + build_ext.build_extensions(self) if SUBPROCESS_BOOTSTRAP: @@ -1118,6 +1129,7 @@ def detect_crypt(self): # bpo-31904: crypt() function is not provided by VxWorks. # DES_crypt() OpenSSL provides is too weak to implement # the encryption. + self.missing.append('_crypt') return if self.compiler.find_library_file(self.lib_dirs, 'crypt'): @@ -1125,8 +1137,7 @@ def detect_crypt(self): else: libs = [] - self.add(Extension('_crypt', ['_cryptmodule.c'], - libraries=libs)) + self.add(Extension('_crypt', ['_cryptmodule.c'], libraries=libs)) def detect_socket(self): # socket(2) @@ -1735,27 +1746,29 @@ def detect_multiprocessing(self): if MS_WINDOWS: multiprocessing_srcs = ['_multiprocessing/multiprocessing.c', '_multiprocessing/semaphore.c'] - else: multiprocessing_srcs = ['_multiprocessing/multiprocessing.c'] if (sysconfig.get_config_var('HAVE_SEM_OPEN') and not sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')): multiprocessing_srcs.append('_multiprocessing/semaphore.c') - if (sysconfig.get_config_var('HAVE_SHM_OPEN') and - sysconfig.get_config_var('HAVE_SHM_UNLINK')): - posixshmem_srcs = ['_multiprocessing/posixshmem.c'] - libs = [] - if sysconfig.get_config_var('SHM_NEEDS_LIBRT'): - # need to link with librt to get shm_open() - libs.append('rt') - self.add(Extension('_posixshmem', posixshmem_srcs, - define_macros={}, - libraries=libs, - include_dirs=["Modules/_multiprocessing"])) - self.add(Extension('_multiprocessing', multiprocessing_srcs, include_dirs=["Modules/_multiprocessing"])) + if (not MS_WINDOWS and + sysconfig.get_config_var('HAVE_SHM_OPEN') and + sysconfig.get_config_var('HAVE_SHM_UNLINK')): + posixshmem_srcs = ['_multiprocessing/posixshmem.c'] + libs = [] + if sysconfig.get_config_var('SHM_NEEDS_LIBRT'): + # need to link with librt to get shm_open() + libs.append('rt') + self.add(Extension('_posixshmem', posixshmem_srcs, + define_macros={}, + libraries=libs, + include_dirs=["Modules/_multiprocessing"])) + else: + self.missing.append('_posixshmem') + def detect_uuid(self): # Build the _uuid module if possible uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"]) @@ -2549,6 +2562,12 @@ def copy_scripts(self): def main(): + global LIST_MODULE_NAMES + + if "--list-module-names" in sys.argv: + LIST_MODULE_NAMES = True + sys.argv.remove("--list-module-names") + set_compiler_flags('CFLAGS', 'PY_CFLAGS_NODIST') set_compiler_flags('LDFLAGS', 'PY_LDFLAGS_NODIST') From webhook-mailer at python.org Tue Jan 19 17:35:35 2021 From: webhook-mailer at python.org (vstinner) Date: Tue, 19 Jan 2021 22:35:35 -0000 Subject: [Python-checkins] bpo-42923: _Py_DumpExtensionModules() ignores stdlib ext (GH-24254) Message-ID: https://github.com/python/cpython/commit/66f77caca39ba39ebe1e4a95dba6d19b20d51951 commit: 66f77caca39ba39ebe1e4a95dba6d19b20d51951 branch: master author: Victor Stinner committer: vstinner date: 2021-01-19T23:35:27+01:00 summary: bpo-42923: _Py_DumpExtensionModules() ignores stdlib ext (GH-24254) files: M Include/internal/pycore_traceback.h M Lib/test/test_capi.py M Lib/test/test_faulthandler.py M Python/pylifecycle.c M Python/traceback.c diff --git a/Include/internal/pycore_traceback.h b/Include/internal/pycore_traceback.h index 169e99b86ef72..4d282308769dc 100644 --- a/Include/internal/pycore_traceback.h +++ b/Include/internal/pycore_traceback.h @@ -74,7 +74,7 @@ PyAPI_FUNC(void) _Py_DumpASCII(int fd, PyObject *text); This function is signal safe. */ PyAPI_FUNC(void) _Py_DumpDecimal( int fd, - unsigned long value); + size_t value); /* Format an integer as hexadecimal with width digits into fd file descriptor. The function is signal safe. */ diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 5e72ba9eb04ea..67175cd044a21 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -547,8 +547,7 @@ def test_pynumber_tobase(self): self.assertRaises(TypeError, pynumber_tobase, '123', 10) self.assertRaises(SystemError, pynumber_tobase, 123, 0) - def test_fatal_error(self): - code = 'import _testcapi; _testcapi.fatal_error(b"MESSAGE")' + def check_fatal_error(self, code, expected, not_expected=()): with support.SuppressCrashReport(): rc, out, err = assert_python_failure('-sSI', '-c', code) @@ -556,15 +555,25 @@ def test_fatal_error(self): self.assertIn('Fatal Python error: test_fatal_error: MESSAGE\n', err) - match = re.search('^Extension modules:(.*)$', err, re.MULTILINE) + match = re.search(r'^Extension modules:(.*) \(total: ([0-9]+)\)$', + err, re.MULTILINE) if not match: self.fail(f"Cannot find 'Extension modules:' in {err!r}") modules = set(match.group(1).strip().split(', ')) - # Test _PyModule_IsExtension(): the list doesn't have to - # be exhaustive. - for name in ('sys', 'builtins', '_imp', '_thread', '_weakref', - '_io', 'marshal', '_signal', '_abc', '_testcapi'): + total = int(match.group(2)) + + for name in expected: self.assertIn(name, modules) + for name in not_expected: + self.assertNotIn(name, modules) + self.assertEqual(len(modules), total) + + def test_fatal_error(self): + expected = ('_testcapi',) + not_expected = ('sys', 'builtins', '_imp', '_thread', '_weakref', + '_io', 'marshal', '_signal', '_abc') + code = 'import _testcapi; _testcapi.fatal_error(b"MESSAGE")' + self.check_fatal_error(code, expected, not_expected) class TestPendingCalls(unittest.TestCase): diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index c6b763a9555ab..b4a654f8a9cae 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -334,19 +334,19 @@ def test_disable(self): def test_dump_ext_modules(self): code = """ import faulthandler + # _testcapi is a test module and not considered as a stdlib module + import _testcapi faulthandler.enable() faulthandler._sigsegv() """ stderr, exitcode = self.get_output(code) stderr = '\n'.join(stderr) - match = re.search('^Extension modules:(.*)$', stderr, re.MULTILINE) + match = re.search(r'^Extension modules:(.*) \(total: [0-9]+\)$', + stderr, re.MULTILINE) if not match: self.fail(f"Cannot find 'Extension modules:' in {stderr!r}") modules = set(match.group(1).strip().split(', ')) - # Only check for a few extensions, the list doesn't have to be - # exhaustive. - for ext in ('sys', 'builtins', '_io', 'faulthandler'): - self.assertIn(ext, modules) + self.assertIn('_testcapi', modules) def test_is_enabled(self): orig_stderr = sys.stderr diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index ee64b0f125b95..e9df8fb5d273a 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -18,6 +18,8 @@ #include "pycore_sysmodule.h" // _PySys_ClearAuditHooks() #include "pycore_traceback.h" // _Py_DumpTracebackThreads() +#include "module_names.h" // _Py_module_names + #include // setlocale() #ifdef HAVE_SIGNAL_H @@ -2496,10 +2498,12 @@ fatal_error_exit(int status) } -// Dump the list of extension modules of sys.modules into fd file descriptor. +// Dump the list of extension modules of sys.modules, excluding stdlib modules +// (_Py_module_names), into fd file descriptor. +// // This function is called by a signal handler in faulthandler: avoid memory -// allocations and keep the implementation simple. For example, the list -// is not sorted on purpose. +// allocations and keep the implementation simple. For example, the list is not +// sorted on purpose. void _Py_DumpExtensionModules(int fd, PyInterpreterState *interp) { @@ -2507,15 +2511,14 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp) return; } PyObject *modules = interp->modules; - if (!PyDict_Check(modules)) { + if (modules == NULL || !PyDict_Check(modules)) { return; } - PUTS(fd, "\nExtension modules: "); - + int header = 1; + Py_ssize_t count = 0; Py_ssize_t pos = 0; PyObject *key, *value; - int comma = 0; while (PyDict_Next(modules, &pos, &key, &value)) { if (!PyUnicode_Check(key)) { continue; @@ -2524,14 +2527,41 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp) continue; } - if (comma) { + // Check if it is a stdlib extension module. + // Use the module name from the sys.modules key, + // don't attempt to get the module object name. + const Py_ssize_t names_len = Py_ARRAY_LENGTH(_Py_module_names); + int is_stdlib_mod = 0; + for (Py_ssize_t i=0; i < names_len; i++) { + const char *name = _Py_module_names[i]; + if (PyUnicode_CompareWithASCIIString(key, name) == 0) { + is_stdlib_mod = 1; + break; + } + } + if (is_stdlib_mod) { + // Ignore stdlib extension module. + continue; + } + + if (header) { + PUTS(fd, "\nExtension modules: "); + header = 0; + } + else { PUTS(fd, ", "); } - comma = 1; _Py_DumpASCII(fd, key); + count++; + } + + if (count) { + PUTS(fd, " (total: "); + _Py_DumpDecimal(fd, count); + PUTS(fd, ")"); + PUTS(fd, "\n"); } - PUTS(fd, "\n"); } diff --git a/Python/traceback.c b/Python/traceback.c index bd5fd352152e0..9363d4eb1b5b7 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -628,12 +628,12 @@ PyTraceBack_Print(PyObject *v, PyObject *f) This function is signal safe. */ void -_Py_DumpDecimal(int fd, unsigned long value) +_Py_DumpDecimal(int fd, size_t value) { /* maximum number of characters required for output of %lld or %p. We need at most ceil(log10(256)*SIZEOF_LONG_LONG) digits, plus 1 for the null byte. 53/22 is an upper bound for log10(256). */ - char buffer[1 + (sizeof(unsigned long)*53-1) / 22 + 1]; + char buffer[1 + (sizeof(size_t)*53-1) / 22 + 1]; char *ptr, *end; end = &buffer[Py_ARRAY_LENGTH(buffer) - 1]; @@ -767,7 +767,7 @@ dump_frame(int fd, PyFrameObject *frame) int lineno = PyCode_Addr2Line(code, frame->f_lasti); PUTS(fd, ", line "); if (lineno >= 0) { - _Py_DumpDecimal(fd, (unsigned long)lineno); + _Py_DumpDecimal(fd, (size_t)lineno); } else { PUTS(fd, "???"); From webhook-mailer at python.org Tue Jan 19 18:59:45 2021 From: webhook-mailer at python.org (pablogsal) Date: Tue, 19 Jan 2021 23:59:45 -0000 Subject: [Python-checkins] bpo-42864: Improve error messages regarding unclosed parentheses (GH-24161) Message-ID: https://github.com/python/cpython/commit/d6d6371447357c9c69b093657bbbb3977a3e60f2 commit: d6d6371447357c9c69b093657bbbb3977a3e60f2 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-19T23:59:33Z summary: bpo-42864: Improve error messages regarding unclosed parentheses (GH-24161) files: A Misc/NEWS.d/next/Core and Builtins/2021-01-14-23-15-34.bpo-42864.QgOAQ1.rst M Lib/test/test_codeop.py M Lib/test/test_grammar.py M Lib/test/test_pdb.py M Lib/test/test_syntax.py M Parser/pegen.c M Parser/tokenizer.c M Parser/tokenizer.h diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py index 45d0a7de9d925..1da6ca55c48f7 100644 --- a/Lib/test/test_codeop.py +++ b/Lib/test/test_codeop.py @@ -160,7 +160,6 @@ def test_incomplete(self): ai("","eval") ai("\n","eval") ai("(","eval") - ai("(\n\n\n","eval") ai("(9+","eval") ai("9+ \\","eval") ai("lambda z: \\","eval") diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 2f6716dfc9a13..0be869ef69b7c 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -260,7 +260,7 @@ def test_eof_error(self): for s in samples: with self.assertRaises(SyntaxError) as cm: compile(s, "", "exec") - self.assertIn("unexpected EOF", str(cm.exception)) + self.assertIn("was never closed", str(cm.exception)) var_annot_global: int # a global annotated is necessary for test_var_annot diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 4bb574fc5b7bf..93b61dcfbcdd8 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1649,10 +1649,10 @@ def test_errors_in_command(self): self.assertEqual(stdout.splitlines()[1:], [ '-> pass', - '(Pdb) *** SyntaxError: unexpected EOF while parsing', + '(Pdb) *** SyntaxError: \'(\' was never closed', '(Pdb) ENTERING RECURSIVE DEBUGGER', - '*** SyntaxError: unexpected EOF while parsing', + '*** SyntaxError: \'(\' was never closed', 'LEAVING RECURSIVE DEBUGGER', '(Pdb) ENTERING RECURSIVE DEBUGGER', diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index d8255607dcfd5..c8d191df4cc49 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -987,6 +987,14 @@ def test_invalid_line_continuation_left_recursive(self): self._check_error("A.\u03bc\\\n", "unexpected EOF while parsing") + def test_error_parenthesis(self): + for paren in "([{": + self._check_error(paren + "1 + 2", f"\\{paren}' was never closed") + + for paren in ")]}": + self._check_error(paren + "1 + 2", f"unmatched '\\{paren}'") + + def test_main(): support.run_unittest(SyntaxTestCase) from test import test_syntax diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-14-23-15-34.bpo-42864.QgOAQ1.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-14-23-15-34.bpo-42864.QgOAQ1.rst new file mode 100644 index 0000000000000..127a29f518d79 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-14-23-15-34.bpo-42864.QgOAQ1.rst @@ -0,0 +1,2 @@ +Improve error messages in the parser when parentheses are not closed. Patch +by Pablo Galindo. diff --git a/Parser/pegen.c b/Parser/pegen.c index a6f97929255ac..6c27980602105 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -265,6 +265,16 @@ raise_decode_error(Parser *p) return -1; } +static inline void +raise_unclosed_parentheses_error(Parser *p) { + int error_lineno = p->tok->parenlinenostack[p->tok->level-1]; + int error_col = p->tok->parencolstack[p->tok->level-1]; + RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, + error_lineno, error_col, + "'%c' was never closed", + p->tok->parenstack[p->tok->level-1]); +} + static void raise_tokenizer_init_error(PyObject *filename) { @@ -324,7 +334,11 @@ tokenizer_error(Parser *p) RAISE_SYNTAX_ERROR("EOL while scanning string literal"); return -1; case E_EOF: - RAISE_SYNTAX_ERROR("unexpected EOF while parsing"); + if (p->tok->level) { + raise_unclosed_parentheses_error(p); + } else { + RAISE_SYNTAX_ERROR("unexpected EOF while parsing"); + } return -1; case E_DEDENT: RAISE_INDENTATION_ERROR("unindent does not match any outer indentation level"); @@ -1151,6 +1165,52 @@ reset_parser_state(Parser *p) p->call_invalid_rules = 1; } +static int +_PyPegen_check_tokenizer_errors(Parser *p) { + // Tokenize the whole input to see if there are any tokenization + // errors such as mistmatching parentheses. These will get priority + // over generic syntax errors only if the line number of the error is + // before the one that we had for the generic error. + + // We don't want to tokenize to the end for interactive input + if (p->tok->prompt != NULL) { + return 0; + } + + + Token *current_token = p->known_err_token != NULL ? p->known_err_token : p->tokens[p->fill - 1]; + Py_ssize_t current_err_line = current_token->lineno; + + // Save the tokenizer state to restore them later in case we found nothing + struct tok_state saved_tok; + memcpy(&saved_tok, p->tok, sizeof(struct tok_state)); + + for (;;) { + const char *start; + const char *end; + switch (PyTokenizer_Get(p->tok, &start, &end)) { + case ERRORTOKEN: + if (p->tok->level != 0) { + int error_lineno = p->tok->parenlinenostack[p->tok->level-1]; + if (current_err_line > error_lineno) { + raise_unclosed_parentheses_error(p); + return -1; + } + } + break; + case ENDMARKER: + break; + default: + continue; + } + break; + } + + // Restore the tokenizer state + memcpy(p->tok, &saved_tok, sizeof(struct tok_state)); + return 0; +} + void * _PyPegen_run_parser(Parser *p) { @@ -1164,8 +1224,12 @@ _PyPegen_run_parser(Parser *p) if (p->fill == 0) { RAISE_SYNTAX_ERROR("error at start before reading any input"); } - else if (p->tok->done == E_EOF) { - RAISE_SYNTAX_ERROR("unexpected EOF while parsing"); + else if (p->tok->done == E_EOF) { + if (p->tok->level) { + raise_unclosed_parentheses_error(p); + } else { + RAISE_SYNTAX_ERROR("unexpected EOF while parsing"); + } } else { if (p->tokens[p->fill-1]->type == INDENT) { @@ -1175,6 +1239,9 @@ _PyPegen_run_parser(Parser *p) RAISE_INDENTATION_ERROR("unexpected unindent"); } else { + if (_PyPegen_check_tokenizer_errors(p)) { + return NULL; + } RAISE_SYNTAX_ERROR("invalid syntax"); } } diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 62cd2966231b8..f9c8bf652cdfb 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -64,7 +64,6 @@ tok_new(void) tok->tabsize = TABSIZE; tok->indent = 0; tok->indstack[0] = 0; - tok->atbol = 1; tok->pendin = 0; tok->prompt = tok->nextprompt = NULL; @@ -1396,6 +1395,9 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end) /* Check for EOF and errors now */ if (c == EOF) { + if (tok->level) { + return ERRORTOKEN; + } return tok->done == E_EOF ? ENDMARKER : ERRORTOKEN; } @@ -1818,6 +1820,7 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end) } tok->parenstack[tok->level] = c; tok->parenlinenostack[tok->level] = tok->lineno; + tok->parencolstack[tok->level] = tok->start - tok->line_start; tok->level++; break; case ')': diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h index b659f34796e42..56074b61ae100 100644 --- a/Parser/tokenizer.h +++ b/Parser/tokenizer.h @@ -45,6 +45,7 @@ struct tok_state { /* Used to allow free continuations inside them */ char parenstack[MAXLEVEL]; int parenlinenostack[MAXLEVEL]; + int parencolstack[MAXLEVEL]; PyObject *filename; /* Stuff for checking on different tab sizes */ int altindstack[MAXINDENT]; /* Stack of alternate indents */ From webhook-mailer at python.org Wed Jan 20 03:39:00 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 20 Jan 2021 08:39:00 -0000 Subject: [Python-checkins] bpo-41995: Handle allocation failure in _tracemalloc and _zoneinfo (GH-22635) Message-ID: https://github.com/python/cpython/commit/f1ff800db1f9fa5ff8f2fa2863796a46bfa9ee46 commit: f1ff800db1f9fa5ff8f2fa2863796a46bfa9ee46 branch: master author: Yunlongs committer: vstinner date: 2021-01-20T09:38:28+01:00 summary: bpo-41995: Handle allocation failure in _tracemalloc and _zoneinfo (GH-22635) files: M Modules/_zoneinfo.c diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index bb32b1496683e..d1e09340d1df8 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -904,7 +904,13 @@ load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj) // Load the transition indices and list self->trans_list_utc = PyMem_Malloc(self->num_transitions * sizeof(int64_t)); + if (self->trans_list_utc == NULL) { + goto error; + } trans_idx = PyMem_Malloc(self->num_transitions * sizeof(Py_ssize_t)); + if (trans_idx == NULL) { + goto error; + } for (size_t i = 0; i < self->num_transitions; ++i) { PyObject *num = PyTuple_GetItem(trans_utc, i); @@ -986,6 +992,9 @@ load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj) // Build _ttinfo objects from utcoff, dstoff and abbr self->_ttinfos = PyMem_Malloc(self->num_ttinfos * sizeof(_ttinfo)); + if (self->_ttinfos == NULL) { + goto error; + } for (size_t i = 0; i < self->num_ttinfos; ++i) { PyObject *tzname = PyTuple_GetItem(abbr, i); if (tzname == NULL) { @@ -1001,6 +1010,9 @@ load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj) // Build our mapping from transition to the ttinfo that applies self->trans_ttinfos = PyMem_Calloc(self->num_transitions, sizeof(_ttinfo *)); + if (self->trans_ttinfos == NULL) { + goto error; + } for (size_t i = 0; i < self->num_transitions; ++i) { size_t ttinfo_idx = trans_idx[i]; assert(ttinfo_idx < self->num_ttinfos); From webhook-mailer at python.org Wed Jan 20 03:56:48 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 20 Jan 2021 08:56:48 -0000 Subject: [Python-checkins] bpo-42005: profile and cProfile catch BrokenPipeError (GH-22643) Message-ID: https://github.com/python/cpython/commit/3554fa4abecfb77ac5fcaa5ce8310eeca5683960 commit: 3554fa4abecfb77ac5fcaa5ce8310eeca5683960 branch: master author: Zhiming Wang committer: vstinner date: 2021-01-20T09:56:21+01:00 summary: bpo-42005: profile and cProfile catch BrokenPipeError (GH-22643) files: A Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst M Lib/cProfile.py M Lib/profile.py diff --git a/Lib/cProfile.py b/Lib/cProfile.py index 59b4699feb506..22a7d0aade855 100755 --- a/Lib/cProfile.py +++ b/Lib/cProfile.py @@ -175,7 +175,12 @@ def main(): '__package__': None, '__cached__': None, } - runctx(code, globs, None, options.outfile, options.sort) + try: + runctx(code, globs, None, options.outfile, options.sort) + except BrokenPipeError as exc: + # Prevent "Exception ignored" during interpreter shutdown. + sys.stdout = None + sys.exit(exc.errno) else: parser.print_usage() return parser diff --git a/Lib/profile.py b/Lib/profile.py index 5cb017ed83009..d8599fb4eebd6 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -595,7 +595,12 @@ def main(): '__package__': None, '__cached__': None, } - runctx(code, globs, None, options.outfile, options.sort) + try: + runctx(code, globs, None, options.outfile, options.sort) + except BrokenPipeError as exc: + # Prevent "Exception ignored" during interpreter shutdown. + sys.stdout = None + sys.exit(exc.errno) else: parser.print_usage() return parser diff --git a/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst b/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst new file mode 100644 index 0000000000000..be4ed7f55ffde --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst @@ -0,0 +1,2 @@ +Fix CLI of :mod:`cProfile` and :mod:`profile` to catch +:exc:`BrokenPipeError`. From webhook-mailer at python.org Wed Jan 20 04:03:37 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 20 Jan 2021 09:03:37 -0000 Subject: [Python-checkins] bpo-41995: Handle allocation failure in _tracemalloc and _zoneinfo (GH-22635) Message-ID: https://github.com/python/cpython/commit/50938b63fbb0d4bed24dceccf188b8d0fe58463c commit: 50938b63fbb0d4bed24dceccf188b8d0fe58463c 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-20T01:03:28-08:00 summary: bpo-41995: Handle allocation failure in _tracemalloc and _zoneinfo (GH-22635) (cherry picked from commit f1ff800db1f9fa5ff8f2fa2863796a46bfa9ee46) Co-authored-by: Yunlongs files: M Modules/_zoneinfo.c diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index fafb6b01df371..d87a20100a221 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -909,7 +909,13 @@ load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj) // Load the transition indices and list self->trans_list_utc = PyMem_Malloc(self->num_transitions * sizeof(int64_t)); + if (self->trans_list_utc == NULL) { + goto error; + } trans_idx = PyMem_Malloc(self->num_transitions * sizeof(Py_ssize_t)); + if (trans_idx == NULL) { + goto error; + } for (size_t i = 0; i < self->num_transitions; ++i) { PyObject *num = PyTuple_GetItem(trans_utc, i); @@ -991,6 +997,9 @@ load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj) // Build _ttinfo objects from utcoff, dstoff and abbr self->_ttinfos = PyMem_Malloc(self->num_ttinfos * sizeof(_ttinfo)); + if (self->_ttinfos == NULL) { + goto error; + } for (size_t i = 0; i < self->num_ttinfos; ++i) { PyObject *tzname = PyTuple_GetItem(abbr, i); if (tzname == NULL) { @@ -1006,6 +1015,9 @@ load_data(PyZoneInfo_ZoneInfo *self, PyObject *file_obj) // Build our mapping from transition to the ttinfo that applies self->trans_ttinfos = PyMem_Calloc(self->num_transitions, sizeof(_ttinfo *)); + if (self->trans_ttinfos == NULL) { + goto error; + } for (size_t i = 0; i < self->num_transitions; ++i) { size_t ttinfo_idx = trans_idx[i]; assert(ttinfo_idx < self->num_ttinfos); From webhook-mailer at python.org Wed Jan 20 04:18:26 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 20 Jan 2021 09:18:26 -0000 Subject: [Python-checkins] bpo-42005: profile and cProfile catch BrokenPipeError (GH-22643) Message-ID: https://github.com/python/cpython/commit/648b72900b5039ab46b8b459f921daecb8db2a6b commit: 648b72900b5039ab46b8b459f921daecb8db2a6b 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-20T01:18:07-08:00 summary: bpo-42005: profile and cProfile catch BrokenPipeError (GH-22643) (cherry picked from commit 3554fa4abecfb77ac5fcaa5ce8310eeca5683960) Co-authored-by: Zhiming Wang files: A Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst M Lib/cProfile.py M Lib/profile.py diff --git a/Lib/cProfile.py b/Lib/cProfile.py index 47aacf9e2d494..406a9b7cf11be 100755 --- a/Lib/cProfile.py +++ b/Lib/cProfile.py @@ -191,7 +191,12 @@ def main(): '__package__': None, '__cached__': None, } - runctx(code, globs, None, options.outfile, options.sort) + try: + runctx(code, globs, None, options.outfile, options.sort) + except BrokenPipeError as exc: + # Prevent "Exception ignored" during interpreter shutdown. + sys.stdout = None + sys.exit(exc.errno) else: parser.print_usage() return parser diff --git a/Lib/profile.py b/Lib/profile.py index 9df4435c5ae83..df4450dac6a1b 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -611,7 +611,12 @@ def main(): '__package__': None, '__cached__': None, } - runctx(code, globs, None, options.outfile, options.sort) + try: + runctx(code, globs, None, options.outfile, options.sort) + except BrokenPipeError as exc: + # Prevent "Exception ignored" during interpreter shutdown. + sys.stdout = None + sys.exit(exc.errno) else: parser.print_usage() return parser diff --git a/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst b/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst new file mode 100644 index 0000000000000..be4ed7f55ffde --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst @@ -0,0 +1,2 @@ +Fix CLI of :mod:`cProfile` and :mod:`profile` to catch +:exc:`BrokenPipeError`. From webhook-mailer at python.org Wed Jan 20 04:19:14 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 20 Jan 2021 09:19:14 -0000 Subject: [Python-checkins] bpo-42005: profile and cProfile catch BrokenPipeError (GH-22643) Message-ID: https://github.com/python/cpython/commit/0654c4c4cc54a325e878154f8b117159d0105cf7 commit: 0654c4c4cc54a325e878154f8b117159d0105cf7 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-20T01:19:08-08:00 summary: bpo-42005: profile and cProfile catch BrokenPipeError (GH-22643) (cherry picked from commit 3554fa4abecfb77ac5fcaa5ce8310eeca5683960) Co-authored-by: Zhiming Wang files: A Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst M Lib/cProfile.py M Lib/profile.py diff --git a/Lib/cProfile.py b/Lib/cProfile.py index 59b4699feb506..22a7d0aade855 100755 --- a/Lib/cProfile.py +++ b/Lib/cProfile.py @@ -175,7 +175,12 @@ def main(): '__package__': None, '__cached__': None, } - runctx(code, globs, None, options.outfile, options.sort) + try: + runctx(code, globs, None, options.outfile, options.sort) + except BrokenPipeError as exc: + # Prevent "Exception ignored" during interpreter shutdown. + sys.stdout = None + sys.exit(exc.errno) else: parser.print_usage() return parser diff --git a/Lib/profile.py b/Lib/profile.py index 5cb017ed83009..d8599fb4eebd6 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -595,7 +595,12 @@ def main(): '__package__': None, '__cached__': None, } - runctx(code, globs, None, options.outfile, options.sort) + try: + runctx(code, globs, None, options.outfile, options.sort) + except BrokenPipeError as exc: + # Prevent "Exception ignored" during interpreter shutdown. + sys.stdout = None + sys.exit(exc.errno) else: parser.print_usage() return parser diff --git a/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst b/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst new file mode 100644 index 0000000000000..be4ed7f55ffde --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-10-11-13-48-03.bpo-42005.Jq6Az-.rst @@ -0,0 +1,2 @@ +Fix CLI of :mod:`cProfile` and :mod:`profile` to catch +:exc:`BrokenPipeError`. From webhook-mailer at python.org Wed Jan 20 05:20:32 2021 From: webhook-mailer at python.org (JulienPalard) Date: Wed, 20 Jan 2021 10:20:32 -0000 Subject: [Python-checkins] Doc: os.path.abspath and Path.resolve are also different (GH-23276) Message-ID: https://github.com/python/cpython/commit/1459fed92c4bf6bb0d18a4c5637e8f1d8662bed5 commit: 1459fed92c4bf6bb0d18a4c5637e8f1d8662bed5 branch: master author: Hong Xu committer: JulienPalard date: 2021-01-20T11:20:00+01:00 summary: Doc: os.path.abspath and Path.resolve are also different (GH-23276) files: M Doc/library/pathlib.rst diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 2bbf3aad61988..ac96de334b329 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1195,14 +1195,15 @@ Below is a table mapping various :mod:`os` functions to their corresponding .. note:: - Although :func:`os.path.relpath` and :meth:`PurePath.relative_to` have some - overlapping use-cases, their semantics differ enough to warrant not - considering them equivalent. + Not all pairs of functions/methods below are equivalent. Some of them, + despite having some overlapping use-cases, have different semantics. They + include :func:`os.path.abspath` and :meth:`Path.resolve`, + :func:`os.path.relpath` and :meth:`PurePath.relative_to`. ==================================== ============================== -os and os.path pathlib +:mod:`os` and :mod:`os.path` :mod:`pathlib` ==================================== ============================== -:func:`os.path.abspath` :meth:`Path.resolve` +:func:`os.path.abspath` :meth:`Path.resolve` [#]_ :func:`os.chmod` :meth:`Path.chmod` :func:`os.mkdir` :meth:`Path.mkdir` :func:`os.makedirs` :meth:`Path.mkdir` @@ -1221,6 +1222,7 @@ os and os.path pathlib :func:`os.link` :meth:`Path.link_to` :func:`os.symlink` :meth:`Path.symlink_to` :func:`os.readlink` :meth:`Path.readlink` +:func:`os.path.relpath` :meth:`Path.relative_to` [#]_ :func:`os.stat` :meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group` @@ -1231,3 +1233,8 @@ os and os.path pathlib :func:`os.path.samefile` :meth:`Path.samefile` :func:`os.path.splitext` :data:`PurePath.suffix` ==================================== ============================== + +.. rubric:: Footnotes + +.. [#] :func:`os.path.abspath` does not resolve symbolic links while :meth:`Path.resolve` does. +.. [#] :meth:`Path.relative_to` requires ``self`` to be the subpath of the argument, but :func:`os.path.relpath` does not. From webhook-mailer at python.org Wed Jan 20 05:43:34 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 20 Jan 2021 10:43:34 -0000 Subject: [Python-checkins] bpo-36769: Document that fnmatch.filter supports any kind of iterable (GH-13039) Message-ID: https://github.com/python/cpython/commit/8f334dbbf04582071d1318e5817e2fe99f1e5169 commit: 8f334dbbf04582071d1318e5817e2fe99f1e5169 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-20T02:43:22-08:00 summary: bpo-36769: Document that fnmatch.filter supports any kind of iterable (GH-13039) (cherry picked from commit e8d22642105d57007ab1242848a8cbadc7f179df) Co-authored-by: Andre Delfino files: M Doc/library/fnmatch.rst M Lib/fnmatch.py diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst index ce07d326b395d..925f08e914685 100644 --- a/Doc/library/fnmatch.rst +++ b/Doc/library/fnmatch.rst @@ -75,7 +75,7 @@ patterns. .. function:: filter(names, pattern) - Return the subset of the list of *names* that match *pattern*. It is the same as + Construct a list from those elements of the iterable *names* that match *pattern*. It is the same as ``[n for n in names if fnmatch(n, pattern)]``, but implemented more efficiently. diff --git a/Lib/fnmatch.py b/Lib/fnmatch.py index b98e6413295e1..7d52871a829a3 100644 --- a/Lib/fnmatch.py +++ b/Lib/fnmatch.py @@ -46,7 +46,7 @@ def _compile_pattern(pat): return re.compile(res).match def filter(names, pat): - """Return the subset of the list NAMES that match PAT.""" + """Construct a list from those elements of the iterable NAMES that match PAT.""" result = [] pat = os.path.normcase(pat) match = _compile_pattern(pat) From webhook-mailer at python.org Wed Jan 20 06:03:57 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 20 Jan 2021 11:03:57 -0000 Subject: [Python-checkins] bpo-41798: Allocate unicodedata CAPI on the heap (GH-24128) Message-ID: https://github.com/python/cpython/commit/61d26394f97306ab4890f1522f26ee6d17461e2b commit: 61d26394f97306ab4890f1522f26ee6d17461e2b branch: master author: Erlend Egeberg Aasland committer: vstinner date: 2021-01-20T12:03:53+01:00 summary: bpo-41798: Allocate unicodedata CAPI on the heap (GH-24128) files: M Modules/unicodedata.c diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 4b8c46c779766..aebae7da57656 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -1308,10 +1308,31 @@ capi_getcode(const char* name, int namelen, Py_UCS4* code, } -static const _PyUnicode_Name_CAPI unicodedata_capi = +static void +unicodedata_destroy_capi(PyObject *capsule) { - .getname = capi_getucname, - .getcode = capi_getcode, + void *capi = PyCapsule_GetPointer(capsule, PyUnicodeData_CAPSULE_NAME); + PyMem_Free(capi); +} + +static PyObject * +unicodedata_create_capi(void) +{ + _PyUnicode_Name_CAPI *capi = PyMem_Malloc(sizeof(_PyUnicode_Name_CAPI)); + if (capi == NULL) { + PyErr_NoMemory(); + return NULL; + } + capi->getname = capi_getucname; + capi->getcode = capi_getcode; + + PyObject *capsule = PyCapsule_New(capi, + PyUnicodeData_CAPSULE_NAME, + unicodedata_destroy_capi); + if (capsule == NULL) { + PyMem_Free(capi); + } + return capsule; }; @@ -1477,13 +1498,13 @@ unicodedata_exec(PyObject *module) } /* Export C API */ - v = PyCapsule_New((void *)&unicodedata_capi, PyUnicodeData_CAPSULE_NAME, - NULL); - if (v == NULL) { + PyObject *capsule = unicodedata_create_capi(); + if (capsule == NULL) { return -1; } - if (PyModule_AddObject(module, "_ucnhash_CAPI", v) < 0) { - Py_DECREF(v); + int rc = PyModule_AddObjectRef(module, "_ucnhash_CAPI", capsule); + Py_DECREF(capsule); + if (rc < 0) { return -1; } return 0; From webhook-mailer at python.org Wed Jan 20 06:20:16 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 20 Jan 2021 11:20:16 -0000 Subject: [Python-checkins] bpo-42048: Clinic Howto: Document AC's defining_class converter (GH-23978) Message-ID: https://github.com/python/cpython/commit/e982fe496bf756afd2ead8e56eb24b28a93c627a commit: e982fe496bf756afd2ead8e56eb24b28a93c627a branch: master author: Erlend Egeberg Aasland committer: vstinner date: 2021-01-20T12:19:57+01:00 summary: bpo-42048: Clinic Howto: Document AC's defining_class converter (GH-23978) files: M Doc/howto/clinic.rst diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst index 50041829b8c38..3a3653a5ee3a3 100644 --- a/Doc/howto/clinic.rst +++ b/Doc/howto/clinic.rst @@ -1206,6 +1206,68 @@ type for ``self``, it's best to create your own converter, subclassing [clinic start generated code]*/ +Using a "defining class" converter +---------------------------------- + +Argument Clinic facilitates gaining access to the defining class of a method. +This is useful for :ref:`heap type ` methods that need to fetch +module level state. Use :c:func:`PyType_FromModuleAndSpec` to associate a new +heap type with a module. You can now use :c:func:`PyType_GetModuleState` on +the defining class to fetch the module state, for example from a module method. + +Example from ``Modules/zlibmodule.c``. First, ``defining_class`` is added to +the clinic input:: + + /*[clinic input] + zlib.Compress.compress + + cls: defining_class + data: Py_buffer + Binary data to be compressed. + / + + +After running the Argument Clinic tool, the following function signature is +generated:: + + /*[clinic start generated code]*/ + static PyObject * + zlib_Compress_compress_impl(compobject *self, PyTypeObject *cls, + Py_buffer *data) + /*[clinic end generated code: output=6731b3f0ff357ca6 input=04d00f65ab01d260]*/ + + +The following code can now use ``PyType_GetModuleState(cls)`` to fetch the +module state:: + + zlibstate *state = PyType_GetModuleState(cls); + + +Each method may only have one argument using this converter, and it must appear +after ``self``, or, if ``self`` is not used, as the first argument. The argument +will be of type ``PyTypeObject *``. The argument will not appear in the +``__text_signature__``. + +The ``defining_class`` converter is not compatible with ``__init__`` and ``__new__`` +methods, which cannot use the ``METH_METHOD`` convention. + +It is not possible to use ``defining_class`` with slot methods. In order to +fetch the module state from such methods, use ``_PyType_GetModuleByDef`` to +look up the module and then :c:func:`PyModule_GetState` to fetch the module +state. Example from the ``setattro`` slot method in +``Modules/_threadmodule.c``:: + + static int + local_setattro(localobject *self, PyObject *name, PyObject *v) + { + PyObject *module = _PyType_GetModuleByDef(Py_TYPE(self), &thread_module); + thread_module_state *state = get_thread_state(module); + ... + } + + +See also :pep:`573`. + Writing a custom converter -------------------------- From webhook-mailer at python.org Wed Jan 20 07:54:00 2021 From: webhook-mailer at python.org (pablogsal) Date: Wed, 20 Jan 2021 12:54:00 -0000 Subject: [Python-checkins] bpo-42864: Fix compiler warning in the tokenizer with the new paren stack for column numbers (GH-24266) Message-ID: https://github.com/python/cpython/commit/ae7d3cd980fae6b9a9778c0ccd162b93035ad33e commit: ae7d3cd980fae6b9a9778c0ccd162b93035ad33e branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-20T12:53:52Z summary: bpo-42864: Fix compiler warning in the tokenizer with the new paren stack for column numbers (GH-24266) files: M Parser/tokenizer.c diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index f9c8bf652cdfb..d3e846c0a5a12 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -1820,7 +1820,7 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end) } tok->parenstack[tok->level] = c; tok->parenlinenostack[tok->level] = tok->lineno; - tok->parencolstack[tok->level] = tok->start - tok->line_start; + tok->parencolstack[tok->level] = (int)(tok->start - tok->line_start); tok->level++; break; case ')': From webhook-mailer at python.org Wed Jan 20 08:09:05 2021 From: webhook-mailer at python.org (tirkarthi) Date: Wed, 20 Jan 2021 13:09:05 -0000 Subject: [Python-checkins] Fix typos in unittest documentation (GH-24194) Message-ID: https://github.com/python/cpython/commit/e0e398ef1855f3db708c682f70adc412f0877d59 commit: e0e398ef1855f3db708c682f70adc412f0877d59 branch: master author: Conchylicultor committer: tirkarthi date: 2021-01-20T18:38:37+05:30 summary: Fix typos in unittest documentation (GH-24194) * addCleanupClass -> addClassCleanup * doCleanupsClass -> doClassCleanups files: M Doc/library/unittest.rst diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 0a0993518efdd..bb229f0bf9ce0 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1498,11 +1498,11 @@ Test cases after :meth:`setUpClass` if :meth:`setUpClass` raises an exception. It is responsible for calling all the cleanup functions added by - :meth:`addCleanupClass`. If you need cleanup functions to be called + :meth:`addClassCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDownClass` then you can call - :meth:`doCleanupsClass` yourself. + :meth:`doClassCleanups` yourself. - :meth:`doCleanupsClass` pops methods off the stack of cleanup + :meth:`doClassCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time. .. versionadded:: 3.8 From webhook-mailer at python.org Wed Jan 20 08:18:17 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 20 Jan 2021 13:18:17 -0000 Subject: [Python-checkins] Fix typos in unittest documentation (GH-24194) Message-ID: https://github.com/python/cpython/commit/ebb2f26cd8b7c0b4919e994a8e62b6e709597939 commit: ebb2f26cd8b7c0b4919e994a8e62b6e709597939 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-20T05:18:08-08:00 summary: Fix typos in unittest documentation (GH-24194) * addCleanupClass -> addClassCleanup * doCleanupsClass -> doClassCleanups (cherry picked from commit e0e398ef1855f3db708c682f70adc412f0877d59) Co-authored-by: Conchylicultor files: M Doc/library/unittest.rst diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index a9e679f048472..af2f46cfe8f6a 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1477,11 +1477,11 @@ Test cases after :meth:`setUpClass` if :meth:`setUpClass` raises an exception. It is responsible for calling all the cleanup functions added by - :meth:`addCleanupClass`. If you need cleanup functions to be called + :meth:`addClassCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDownClass` then you can call - :meth:`doCleanupsClass` yourself. + :meth:`doClassCleanups` yourself. - :meth:`doCleanupsClass` pops methods off the stack of cleanup + :meth:`doClassCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time. .. versionadded:: 3.8 From webhook-mailer at python.org Wed Jan 20 09:06:26 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 20 Jan 2021 14:06:26 -0000 Subject: [Python-checkins] bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172) Message-ID: https://github.com/python/cpython/commit/7dc71c425cf6aa6a4070a418dce5d95ca435c79f commit: 7dc71c425cf6aa6a4070a418dce5d95ca435c79f branch: master author: cptpcrd <31829097+cptpcrd at users.noreply.github.com> committer: vstinner date: 2021-01-20T15:05:51+01:00 summary: bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172) files: A Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst M Lib/test/test_os.py M Python/fileutils.c diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 08d7ab8a30ba7..96fddc7d05766 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3881,6 +3881,33 @@ def test_set_inheritable_cloexec(self): self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC, 0) + @unittest.skipUnless(hasattr(os, 'O_PATH'), "need os.O_PATH") + def test_get_set_inheritable_o_path(self): + fd = os.open(__file__, os.O_PATH) + self.addCleanup(os.close, fd) + self.assertEqual(os.get_inheritable(fd), False) + + os.set_inheritable(fd, True) + self.assertEqual(os.get_inheritable(fd), True) + + os.set_inheritable(fd, False) + self.assertEqual(os.get_inheritable(fd), False) + + def test_get_set_inheritable_badf(self): + fd = os_helper.make_bad_fd() + + with self.assertRaises(OSError) as ctx: + os.get_inheritable(fd) + self.assertEqual(ctx.exception.errno, errno.EBADF) + + with self.assertRaises(OSError) as ctx: + os.set_inheritable(fd, True) + self.assertEqual(ctx.exception.errno, errno.EBADF) + + with self.assertRaises(OSError) as ctx: + os.set_inheritable(fd, False) + self.assertEqual(ctx.exception.errno, errno.EBADF) + def test_open(self): fd = os.open(__file__, os.O_RDONLY) self.addCleanup(os.close, fd) diff --git a/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst b/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst new file mode 100644 index 0000000000000..a491690507129 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst @@ -0,0 +1 @@ +Fix os.set_inheritable() for O_PATH file descriptors on Linux. diff --git a/Python/fileutils.c b/Python/fileutils.c index 8dc90fbe2b2e7..f2b4681ea849c 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1234,6 +1234,13 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works) return 0; } +#ifdef __linux__ + if (errno == EBADF) { + // On Linux, ioctl(FIOCLEX) will fail with EBADF for O_PATH file descriptors + // Fall through to the fcntl() path + } + else +#endif if (errno != ENOTTY && errno != EACCES) { if (raise) PyErr_SetFromErrno(PyExc_OSError); From webhook-mailer at python.org Wed Jan 20 09:20:27 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 20 Jan 2021 14:20:27 -0000 Subject: [Python-checkins] bpo-42323: Fix math.nextafter() for NaN on AIX (GH-24265) Message-ID: https://github.com/python/cpython/commit/c1c3493fb7a3af8efdc50175e592d29e8cb93886 commit: c1c3493fb7a3af8efdc50175e592d29e8cb93886 branch: master author: Victor Stinner committer: vstinner date: 2021-01-20T15:20:13+01:00 summary: bpo-42323: Fix math.nextafter() for NaN on AIX (GH-24265) files: A Misc/NEWS.d/next/Library/2021-01-20-12-10-47.bpo-42323.PONB8e.rst M Modules/mathmodule.c diff --git a/Misc/NEWS.d/next/Library/2021-01-20-12-10-47.bpo-42323.PONB8e.rst b/Misc/NEWS.d/next/Library/2021-01-20-12-10-47.bpo-42323.PONB8e.rst new file mode 100644 index 0000000000000..b2f7becee9d23 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-20-12-10-47.bpo-42323.PONB8e.rst @@ -0,0 +1 @@ +Fix :func:`math.nextafter` for NaN on AIX. diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 86b64fb422690..8133d6b3aaefb 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -3473,6 +3473,12 @@ math_nextafter_impl(PyObject *module, double x, double y) Bug fixed in bos.adt.libm 7.2.2.0 by APAR IV95512. */ return PyFloat_FromDouble(y); } + if (Py_IS_NAN(x)) { + return x; + } + if (Py_IS_NAN(y)) { + return y; + } #endif return PyFloat_FromDouble(nextafter(x, y)); } From webhook-mailer at python.org Wed Jan 20 11:07:29 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 20 Jan 2021 16:07:29 -0000 Subject: [Python-checkins] bpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210) Message-ID: https://github.com/python/cpython/commit/75e59a97f5d1fddb0c30ed9747b1b8cb84420a62 commit: 75e59a97f5d1fddb0c30ed9747b1b8cb84420a62 branch: master author: Victor Stinner committer: vstinner date: 2021-01-20T17:07:21+01:00 summary: bpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210) Add --with-wheel-pkg-dir=PATH option to the ./configure script. If specified, the ensurepip module looks for setuptools and pip wheel packages in this directory: if both are present, these wheel packages are used instead of ensurepip bundled wheel packages. Some Linux distribution packaging policies recommend against bundling dependencies. For example, Fedora installs wheel packages in the /usr/share/python-wheels/ directory and don't install the ensurepip._bundled package. ensurepip: Remove unused runpy import. files: A Misc/NEWS.d/next/Build/2021-01-07-12-51-38.bpo-42856.n3cMHV.rst M Doc/library/ensurepip.rst M Doc/whatsnew/3.10.rst M Lib/ensurepip/__init__.py M Lib/test/test_ensurepip.py M Makefile.pre.in M configure M configure.ac diff --git a/Doc/library/ensurepip.rst b/Doc/library/ensurepip.rst index a5221250c4048..fa1b42cf48409 100644 --- a/Doc/library/ensurepip.rst +++ b/Doc/library/ensurepip.rst @@ -48,7 +48,7 @@ The simplest possible invocation is:: This invocation will install ``pip`` if it is not already installed, but otherwise does nothing. To ensure the installed version of ``pip`` -is at least as recent as the one bundled with ``ensurepip``, pass the +is at least as recent as the one available in ``ensurepip``, pass the ``--upgrade`` option:: python -m ensurepip --upgrade @@ -86,7 +86,7 @@ Module API .. function:: version() - Returns a string specifying the bundled version of pip that will be + Returns a string specifying the available version of pip that will be installed when bootstrapping an environment. .. function:: bootstrap(root=None, upgrade=False, user=False, \ @@ -100,7 +100,7 @@ Module API for the current environment. *upgrade* indicates whether or not to upgrade an existing installation - of an earlier version of ``pip`` to the bundled version. + of an earlier version of ``pip`` to the available version. *user* indicates whether to use the user scheme rather than installing globally. diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 7edc552d824ab..7fe2b96a00e1b 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -621,6 +621,18 @@ Build Changes don't build nor install test modules. (Contributed by Xavier de Gaye, Thomas Petazzoni and Peixing Xin in :issue:`27640`.) +* Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` script. If + specified, the :mod:`ensurepip` module looks for ``setuptools`` and ``pip`` + wheel packages in this directory: if both are present, these wheel packages + are used instead of ensurepip bundled wheel packages. + + Some Linux distribution packaging policies recommend against bundling + dependencies. For example, Fedora installs wheel packages in the + ``/usr/share/python-wheels/`` directory and don't install the + ``ensurepip._bundled`` package. + + (Contributed by Victor Stinner in :issue:`42856`.) + C API Changes ============= diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py index cb2882e3360fc..2276fd7fd8f3b 100644 --- a/Lib/ensurepip/__init__.py +++ b/Lib/ensurepip/__init__.py @@ -1,27 +1,82 @@ +import collections import os import os.path +import subprocess import sys -import runpy +import sysconfig import tempfile -import subprocess from importlib import resources -from . import _bundled - __all__ = ["version", "bootstrap"] - - +_PACKAGE_NAMES = ('setuptools', 'pip') _SETUPTOOLS_VERSION = "47.1.0" - _PIP_VERSION = "20.2.3" - _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), ("pip", _PIP_VERSION, "py2.py3"), ] +# Packages bundled in ensurepip._bundled have wheel_name set. +# Packages from WHEEL_PKG_DIR have wheel_path set. +_Package = collections.namedtuple('Package', + ('version', 'wheel_name', 'wheel_path')) + +# Directory of system wheel packages. Some Linux distribution packaging +# policies recommend against bundling dependencies. For example, Fedora +# installs wheel packages in the /usr/share/python-wheels/ directory and don't +# install the ensurepip._bundled package. +_WHEEL_PKG_DIR = sysconfig.get_config_var('WHEEL_PKG_DIR') + + +def _find_packages(path): + packages = {} + try: + filenames = os.listdir(path) + except OSError: + # Ignore: path doesn't exist or permission error + filenames = () + # Make the code deterministic if a directory contains multiple wheel files + # of the same package, but don't attempt to implement correct version + # comparison since this case should not happen. + filenames = sorted(filenames) + for filename in filenames: + # filename is like 'pip-20.2.3-py2.py3-none-any.whl' + if not filename.endswith(".whl"): + continue + for name in _PACKAGE_NAMES: + prefix = name + '-' + if filename.startswith(prefix): + break + else: + continue + + # Extract '20.2.2' from 'pip-20.2.2-py2.py3-none-any.whl' + version = filename.removeprefix(prefix).partition('-')[0] + wheel_path = os.path.join(path, filename) + packages[name] = _Package(version, None, wheel_path) + return packages + + +def _get_packages(): + global _PACKAGES, _WHEEL_PKG_DIR + if _PACKAGES is not None: + return _PACKAGES + + packages = {} + for name, version, py_tag in _PROJECTS: + wheel_name = f"{name}-{version}-{py_tag}-none-any.whl" + packages[name] = _Package(version, wheel_name, None) + if _WHEEL_PKG_DIR: + dir_packages = _find_packages(_WHEEL_PKG_DIR) + # only used the wheel package directory if all packages are found there + if all(name in dir_packages for name in _PACKAGE_NAMES): + packages = dir_packages + _PACKAGES = packages + return packages +_PACKAGES = None + def _run_pip(args, additional_paths=None): # Run the bootstraping in a subprocess to avoid leaking any state that happens @@ -42,7 +97,8 @@ def version(): """ Returns a string specifying the bundled version of pip. """ - return _PIP_VERSION + return _get_packages()['pip'].version + def _disable_pip_configuration_settings(): # We deliberately ignore all pip environment variables @@ -104,16 +160,23 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # Put our bundled wheels into a temporary directory and construct the # additional paths that need added to sys.path additional_paths = [] - for project, version, py_tag in _PROJECTS: - wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) - whl = resources.read_binary( - _bundled, - wheel_name, - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + for name, package in _get_packages().items(): + if package.wheel_name: + # Use bundled wheel package + from ensurepip import _bundled + wheel_name = package.wheel_name + whl = resources.read_binary(_bundled, wheel_name) + else: + # Use the wheel package directory + with open(package.wheel_path, "rb") as fp: + whl = fp.read() + wheel_name = os.path.basename(package.wheel_path) + + filename = os.path.join(tmpdir, wheel_name) + with open(filename, "wb") as fp: fp.write(whl) - additional_paths.append(os.path.join(tmpdir, wheel_name)) + additional_paths.append(filename) # Construct the arguments to be passed to the pip command args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir] @@ -126,7 +189,7 @@ def _bootstrap(*, root=None, upgrade=False, user=False, if verbosity: args += ["-" + "v" * verbosity] - return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) + return _run_pip([*args, *_PACKAGE_NAMES], additional_paths) def _uninstall_helper(*, verbosity=0): """Helper to support a clean default uninstall process on Windows @@ -139,11 +202,14 @@ def _uninstall_helper(*, verbosity=0): except ImportError: return - # If the pip version doesn't match the bundled one, leave it alone - if pip.__version__ != _PIP_VERSION: - msg = ("ensurepip will only uninstall a matching version " - "({!r} installed, {!r} bundled)") - print(msg.format(pip.__version__, _PIP_VERSION), file=sys.stderr) + # If the installed pip version doesn't match the available one, + # leave it alone + available_version = version() + if pip.__version__ != available_version: + print(f"ensurepip will only uninstall a matching version " + f"({pip.__version__!r} installed, " + f"{available_version!r} available)", + file=sys.stderr) return _disable_pip_configuration_settings() @@ -153,7 +219,7 @@ def _uninstall_helper(*, verbosity=0): if verbosity: args += ["-" + "v" * verbosity] - return _run_pip(args + [p[0] for p in reversed(_PROJECTS)]) + return _run_pip([*args, *reversed(_PACKAGE_NAMES)]) def _main(argv=None): diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py index 4786d28f39a3d..bfca0cd7fbe48 100644 --- a/Lib/test/test_ensurepip.py +++ b/Lib/test/test_ensurepip.py @@ -1,19 +1,68 @@ -import unittest -import unittest.mock -import test.support +import contextlib import os import os.path -import contextlib import sys +import tempfile +import test.support +import unittest +import unittest.mock import ensurepip import ensurepip._uninstall -class TestEnsurePipVersion(unittest.TestCase): +class TestPackages(unittest.TestCase): + def touch(self, directory, filename): + fullname = os.path.join(directory, filename) + open(fullname, "wb").close() + + def test_version(self): + # Test version() + with tempfile.TemporaryDirectory() as tmpdir: + self.touch(tmpdir, "pip-1.2.3b1-py2.py3-none-any.whl") + self.touch(tmpdir, "setuptools-49.1.3-py3-none-any.whl") + with (unittest.mock.patch.object(ensurepip, '_PACKAGES', None), + unittest.mock.patch.object(ensurepip, '_WHEEL_PKG_DIR', tmpdir)): + self.assertEqual(ensurepip.version(), '1.2.3b1') + + def test_get_packages_no_dir(self): + # Test _get_packages() without a wheel package directory + with (unittest.mock.patch.object(ensurepip, '_PACKAGES', None), + unittest.mock.patch.object(ensurepip, '_WHEEL_PKG_DIR', None)): + packages = ensurepip._get_packages() + + # when bundled wheel packages are used, we get _PIP_VERSION + self.assertEqual(ensurepip._PIP_VERSION, ensurepip.version()) + + # use bundled wheel packages + self.assertIsNotNone(packages['pip'].wheel_name) + self.assertIsNotNone(packages['setuptools'].wheel_name) + + def test_get_packages_with_dir(self): + # Test _get_packages() with a wheel package directory + setuptools_filename = "setuptools-49.1.3-py3-none-any.whl" + pip_filename = "pip-20.2.2-py2.py3-none-any.whl" + + with tempfile.TemporaryDirectory() as tmpdir: + self.touch(tmpdir, setuptools_filename) + self.touch(tmpdir, pip_filename) + # not used, make sure that it's ignored + self.touch(tmpdir, "wheel-0.34.2-py2.py3-none-any.whl") + + with (unittest.mock.patch.object(ensurepip, '_PACKAGES', None), + unittest.mock.patch.object(ensurepip, '_WHEEL_PKG_DIR', tmpdir)): + packages = ensurepip._get_packages() + + self.assertEqual(packages['setuptools'].version, '49.1.3') + self.assertEqual(packages['setuptools'].wheel_path, + os.path.join(tmpdir, setuptools_filename)) + self.assertEqual(packages['pip'].version, '20.2.2') + self.assertEqual(packages['pip'].wheel_path, + os.path.join(tmpdir, pip_filename)) + + # wheel package is ignored + self.assertEqual(sorted(packages), ['pip', 'setuptools']) - def test_returns_version(self): - self.assertEqual(ensurepip._PIP_VERSION, ensurepip.version()) class EnsurepipMixin: @@ -27,6 +76,8 @@ def setUp(self): real_devnull = os.devnull os_patch = unittest.mock.patch("ensurepip.os") patched_os = os_patch.start() + # But expose os.listdir() used by _find_packages() + patched_os.listdir = os.listdir self.addCleanup(os_patch.stop) patched_os.devnull = real_devnull patched_os.path = os.path @@ -147,7 +198,7 @@ def test_pip_config_file_disabled(self): self.assertEqual(self.os_environ["PIP_CONFIG_FILE"], os.devnull) @contextlib.contextmanager -def fake_pip(version=ensurepip._PIP_VERSION): +def fake_pip(version=ensurepip.version()): if version is None: pip = None else: @@ -243,7 +294,7 @@ def test_pip_config_file_disabled(self): # Basic testing of the main functions and their argument parsing -EXPECTED_VERSION_OUTPUT = "pip " + ensurepip._PIP_VERSION +EXPECTED_VERSION_OUTPUT = "pip " + ensurepip.version() class TestBootstrappingMainFunction(EnsurepipMixin, unittest.TestCase): diff --git a/Makefile.pre.in b/Makefile.pre.in index fa0b9d85d36ed..ca6b5189c7564 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -146,6 +146,8 @@ CONFINCLUDEDIR= $(exec_prefix)/include PLATLIBDIR= @PLATLIBDIR@ SCRIPTDIR= $(prefix)/$(PLATLIBDIR) ABIFLAGS= @ABIFLAGS@ +# Variable used by ensurepip +WHEEL_PKG_DIR= @WHEEL_PKG_DIR@ # Detailed destination directories BINLIBDEST= @BINLIBDEST@ diff --git a/Misc/NEWS.d/next/Build/2021-01-07-12-51-38.bpo-42856.n3cMHV.rst b/Misc/NEWS.d/next/Build/2021-01-07-12-51-38.bpo-42856.n3cMHV.rst new file mode 100644 index 0000000000000..6aab7a6e51d07 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-01-07-12-51-38.bpo-42856.n3cMHV.rst @@ -0,0 +1,9 @@ +Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` script. If +specified, the :mod:`ensurepip` module looks for ``setuptools`` and ``pip`` +wheel packages in this directory: if both are present, these wheel packages are +used instead of ensurepip bundled wheel packages. + +Some Linux distribution packaging policies recommend against bundling +dependencies. For example, Fedora installs wheel packages in the +``/usr/share/python-wheels/`` directory and don't install the +``ensurepip._bundled`` package. diff --git a/configure b/configure index 1d81c00c6359c..37ee3691bb6b4 100755 --- a/configure +++ b/configure @@ -630,6 +630,7 @@ OPENSSL_INCLUDES ENSUREPIP SRCDIRS THREADHEADERS +WHEEL_PKG_DIR LIBPL PY_ENABLE_SHARED PLATLIBDIR @@ -847,6 +848,7 @@ with_libm with_libc enable_big_digits with_platlibdir +with_wheel_pkg_dir with_computed_gotos with_ensurepip with_openssl @@ -1576,6 +1578,9 @@ Optional Packages: system-dependent) --with-platlibdir=DIRNAME Python library directory name (default is "lib") + --with-wheel-pkg-dir=PATH + Directory of wheel packages used by ensurepip + (default: none) --with-computed-gotos enable computed gotos in evaluation loop (enabled by default on supported compilers) --with-ensurepip[=install|upgrade|no] @@ -15493,6 +15498,29 @@ else fi +# Check for --with-wheel-pkg-dir=PATH + +WHEEL_PKG_DIR="" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5 +$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; } + +# Check whether --with-wheel-pkg-dir was given. +if test "${with_wheel_pkg_dir+set}" = set; then : + withval=$with_wheel_pkg_dir; +if test -n "$withval"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + WHEEL_PKG_DIR="$withval" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5 diff --git a/configure.ac b/configure.ac index 08c462ac9f629..99077e9c3a923 100644 --- a/configure.ac +++ b/configure.ac @@ -4838,6 +4838,22 @@ else fi AC_SUBST(LIBPL) +# Check for --with-wheel-pkg-dir=PATH +AC_SUBST(WHEEL_PKG_DIR) +WHEEL_PKG_DIR="" +AC_MSG_CHECKING(for --with-wheel-pkg-dir) +AC_ARG_WITH(wheel-pkg-dir, + AS_HELP_STRING([--with-wheel-pkg-dir=PATH], + [Directory of wheel packages used by ensurepip (default: none)]), +[ +if test -n "$withval"; then + AC_MSG_RESULT(yes) + WHEEL_PKG_DIR="$withval" +else + AC_MSG_RESULT(no) +fi], +[AC_MSG_RESULT(no)]) + # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). AC_MSG_CHECKING(whether right shift extends the sign bit) From webhook-mailer at python.org Wed Jan 20 14:12:06 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 20 Jan 2021 19:12:06 -0000 Subject: [Python-checkins] bpo-42864: Simplify the tokenizer exceptions after generic SyntaxError (GH-24273) Message-ID: https://github.com/python/cpython/commit/c3f167d7b243f8b8e1b797586e6cef35add013bc commit: c3f167d7b243f8b8e1b797586e6cef35add013bc branch: master author: Pablo Galindo committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-20T11:11:56-08:00 summary: bpo-42864: Simplify the tokenizer exceptions after generic SyntaxError (GH-24273) Automerge-Triggered-By: GH:pablogsal files: M Parser/pegen.c diff --git a/Parser/pegen.c b/Parser/pegen.c index 6c27980602105..0d39030ea6ed1 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -1177,14 +1177,9 @@ _PyPegen_check_tokenizer_errors(Parser *p) { return 0; } - Token *current_token = p->known_err_token != NULL ? p->known_err_token : p->tokens[p->fill - 1]; Py_ssize_t current_err_line = current_token->lineno; - // Save the tokenizer state to restore them later in case we found nothing - struct tok_state saved_tok; - memcpy(&saved_tok, p->tok, sizeof(struct tok_state)); - for (;;) { const char *start; const char *end; @@ -1206,8 +1201,6 @@ _PyPegen_check_tokenizer_errors(Parser *p) { break; } - // Restore the tokenizer state - memcpy(p->tok, &saved_tok, sizeof(struct tok_state)); return 0; } @@ -1239,10 +1232,10 @@ _PyPegen_run_parser(Parser *p) RAISE_INDENTATION_ERROR("unexpected unindent"); } else { - if (_PyPegen_check_tokenizer_errors(p)) { - return NULL; - } RAISE_SYNTAX_ERROR("invalid syntax"); + // _PyPegen_check_tokenizer_errors will override the existing + // generic SyntaxError we just raised if errors are found. + _PyPegen_check_tokenizer_errors(p); } } return NULL; From webhook-mailer at python.org Wed Jan 20 16:38:58 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 20 Jan 2021 21:38:58 -0000 Subject: [Python-checkins] bpo-40176: Improve error messages for unclosed string literals (GH-19346) Message-ID: https://github.com/python/cpython/commit/a698d52c3975c80b45b139b2f08402ec514dce75 commit: a698d52c3975c80b45b139b2f08402ec514dce75 branch: master author: Batuhan Taskaya committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-20T13:38:47-08:00 summary: bpo-40176: Improve error messages for unclosed string literals (GH-19346) Automerge-Triggered-By: GH:isidentical files: A Misc/NEWS.d/next/Core and Builtins/2021-01-20-22-31-01.bpo-40176.anjyWw.rst M Include/errcode.h M Lib/test/test_eof.py M Lib/test/test_exceptions.py M Lib/test/test_fstring.py M Parser/pegen.c M Parser/tokenizer.c diff --git a/Include/errcode.h b/Include/errcode.h index 790518b8b7730..f2671d6c9b30b 100644 --- a/Include/errcode.h +++ b/Include/errcode.h @@ -26,8 +26,6 @@ extern "C" { #define E_TOODEEP 20 /* Too many indentation levels */ #define E_DEDENT 21 /* No matching outer block for dedent */ #define E_DECODE 22 /* Error in decoding into Unicode */ -#define E_EOFS 23 /* EOF in triple-quoted string */ -#define E_EOLS 24 /* EOL in single-quoted string */ #define E_LINECONT 25 /* Unexpected characters after a line continuation */ #define E_BADSINGLE 27 /* Ill-formed single statement input */ diff --git a/Lib/test/test_eof.py b/Lib/test/test_eof.py index 2cf263d27463c..b370e27161cee 100644 --- a/Lib/test/test_eof.py +++ b/Lib/test/test_eof.py @@ -7,23 +7,25 @@ import unittest class EOFTestCase(unittest.TestCase): - def test_EOFC(self): - expect = "EOL while scanning string literal (, line 1)" - try: - eval("""'this is a test\ - """) - except SyntaxError as msg: - self.assertEqual(str(msg), expect) - else: - raise support.TestFailed + def test_EOF_single_quote(self): + expect = "unterminated string literal (detected at line 1) (, line 1)" + for quote in ("'", "\""): + try: + eval(f"""{quote}this is a test\ + """) + except SyntaxError as msg: + self.assertEqual(str(msg), expect) + self.assertEqual(msg.offset, 1) + else: + raise support.TestFailed def test_EOFS(self): - expect = ("EOF while scanning triple-quoted string literal " - "(, line 1)") + expect = ("unterminated triple-quoted string literal (detected at line 1) (, line 1)") try: eval("""'''this is a test""") except SyntaxError as msg: self.assertEqual(str(msg), expect) + self.assertEqual(msg.offset, 1) else: raise support.TestFailed diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index eb70d7b4e4972..21878c39f4fec 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -206,7 +206,7 @@ def testSyntaxErrorOffset(self): check(b'# -*- coding: cp1251 -*-\nPython = "\xcf\xb3\xf2\xee\xed" +', 2, 19, encoding='cp1251') check(b'Python = "\xcf\xb3\xf2\xee\xed" +', 1, 18) - check('x = "a', 1, 7) + check('x = "a', 1, 5) check('lambda x: x = 2', 1, 1) check('f{a + b + c}', 1, 2) check('[file for str(file) in []\n])', 1, 11) @@ -238,7 +238,7 @@ def bar(): def baz(): '''quux''' - """, 9, 20) + """, 9, 24) check("pass\npass\npass\n(1+)\npass\npass\npass", 4, 4) check("(1+)", 1, 4) diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 2345832abce62..7ca1512ebbf1b 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -661,7 +661,7 @@ def test_parens_in_expressions(self): ["f'{3)+(4}'", ]) - self.assertAllRaise(SyntaxError, 'EOL while scanning string literal', + self.assertAllRaise(SyntaxError, 'unterminated string literal', ["f'{\n}'", ]) diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-20-22-31-01.bpo-40176.anjyWw.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-20-22-31-01.bpo-40176.anjyWw.rst new file mode 100644 index 0000000000000..df7de3bdf37bc --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-20-22-31-01.bpo-40176.anjyWw.rst @@ -0,0 +1,2 @@ +Syntax errors for unterminated string literals now point to the start +of the string instead of reporting EOF/EOL. diff --git a/Parser/pegen.c b/Parser/pegen.c index 0d39030ea6ed1..0e7f86bc99e45 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -327,12 +327,6 @@ tokenizer_error(Parser *p) case E_TOKEN: msg = "invalid token"; break; - case E_EOFS: - RAISE_SYNTAX_ERROR("EOF while scanning triple-quoted string literal"); - return -1; - case E_EOLS: - RAISE_SYNTAX_ERROR("EOL while scanning string literal"); - return -1; case E_EOF: if (p->tok->level) { raise_unclosed_parentheses_error(p); diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index d3e846c0a5a12..d9334aaf148ba 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -1739,20 +1739,26 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end) /* Get rest of string */ while (end_quote_size != quote_size) { c = tok_nextc(tok); - if (c == EOF) { + if (c == EOF || (quote_size == 1 && c == '\n')) { + // shift the tok_state's location into + // the start of string, and report the error + // from the initial quote character + tok->cur = (char *)tok->start; + tok->cur++; + tok->line_start = tok->multi_line_start; + int start = tok->lineno; + tok->lineno = tok->first_lineno; + if (quote_size == 3) { - tok->done = E_EOFS; + return syntaxerror(tok, + "unterminated triple-quoted string literal" + " (detected at line %d)", start); } else { - tok->done = E_EOLS; + return syntaxerror(tok, + "unterminated string literal (detected at" + " line %d)", start); } - tok->cur = tok->inp; - return ERRORTOKEN; - } - if (quote_size == 1 && c == '\n') { - tok->done = E_EOLS; - tok->cur = tok->inp; - return ERRORTOKEN; } if (c == quote) { end_quote_size += 1; From webhook-mailer at python.org Wed Jan 20 19:16:28 2021 From: webhook-mailer at python.org (miss-islington) Date: Thu, 21 Jan 2021 00:16:28 -0000 Subject: [Python-checkins] bpo-42392: Mention loop removal in whatsnew for 3.10 (GH-24256) Message-ID: https://github.com/python/cpython/commit/dcea78ff53d02733ac5983255610b651aa1c0034 commit: dcea78ff53d02733ac5983255610b651aa1c0034 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-20T16:16:12-08:00 summary: bpo-42392: Mention loop removal in whatsnew for 3.10 (GH-24256) @vstinner [noticed on python-dev](https://mail.python.org/archives/list/python-dev at python.org/thread/O3T7SK3BGMFWMLCQXDODZJSBL42AUWTR/) that there is no what's new or porting entry for removal of asyncio ``loop`` parameter. This patch adds a basic guide. Co-Authored-By: Kyle Stanley files: M Doc/whatsnew/3.10.rst diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 7fe2b96a00e1b..0fca2e8b8c311 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -558,6 +558,23 @@ Removed the :mod:`collections` module. (Contributed by Victor Stinner in :issue:`37324`.) +* The ``loop`` parameter has been removed from most of :mod:`asyncio`\ 's + :doc:`high-level API <../library/asyncio-api-index>` following deprecation + in Python 3.8. The motivation behind this change is multifold: + + 1. This simplifies the high-level API. + 2. The functions in the high-level API have been implicitly getting the + current thread's running event loop since Python 3.7. There isn't a need to + pass the event loop to the API in most normal use cases. + 3. Event loop passing is error-prone especially when dealing with loops + running in different threads. + + Note that the low-level API will still accept ``loop``. + See `Changes in the Python API`_ for examples of how to replace existing code. + + (Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle Stanley + in :issue:`42392`.) + Porting to Python 3.10 ====================== @@ -596,6 +613,26 @@ Changes in the Python API a 16-bit unsigned integer. (Contributed by Erlend E. Aasland in :issue:`42393`.) +* The ``loop`` parameter has been removed from most of :mod:`asyncio`\ 's + :doc:`high-level API <../library/asyncio-api-index>` following deprecation + in Python 3.8. + + A coroutine that currently look like this:: + + async def foo(loop): + await asyncio.sleep(1, loop=loop) + + Should be replaced with this:: + + async def foo(): + await asyncio.sleep(1) + + If ``foo()`` was specifically designed *not* to run in the current thread's + running event loop (e.g. running in another thread's event loop), consider + using :func:`asyncio.run_coroutine_threadsafe` instead. + + (Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle Stanley + in :issue:`42392`.) CPython bytecode changes ======================== From webhook-mailer at python.org Thu Jan 21 05:23:59 2021 From: webhook-mailer at python.org (miss-islington) Date: Thu, 21 Jan 2021 10:23:59 -0000 Subject: [Python-checkins] Fix typo in what's new. bidst_wheel -> bdist_wheel (GH-24234) Message-ID: https://github.com/python/cpython/commit/6cd5b0117e1cf7eb8f52d7e1f6db2c8fcdfc62eb commit: 6cd5b0117e1cf7eb8f52d7e1f6db2c8fcdfc62eb branch: master author: ravcio committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-21T02:23:46-08:00 summary: Fix typo in what's new. bidst_wheel -> bdist_wheel (GH-24234) bidst_wheel -> bdist_wheel Automerge-Triggered-By: GH:Mariatta files: M Doc/whatsnew/3.10.rst diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 0fca2e8b8c311..7a2f4f8c82fe8 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -250,7 +250,7 @@ distutils --------- The ``bdist_wininst`` command deprecated in Python 3.8 has been removed. -The ``bidst_wheel`` command is now recommended to distribute binary packages +The ``bdist_wheel`` command is now recommended to distribute binary packages on Windows. (Contributed by Victor Stinner in :issue:`42802`.) From webhook-mailer at python.org Thu Jan 21 05:47:04 2021 From: webhook-mailer at python.org (vstinner) Date: Thu, 21 Jan 2021 10:47:04 -0000 Subject: [Python-checkins] bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172) (GH-24277) Message-ID: https://github.com/python/cpython/commit/844ec0ba6606b60a59b7da82c54c1e646424259c commit: 844ec0ba6606b60a59b7da82c54c1e646424259c branch: 3.8 author: cptpcrd <31829097+cptpcrd at users.noreply.github.com> committer: vstinner date: 2021-01-21T11:46:53+01:00 summary: bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172) (GH-24277) (cherry picked from commit 7dc71c425cf6aa6a4070a418dce5d95ca435c79f) files: A Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst M Lib/test/test_os.py M Python/fileutils.c diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 2a4ae1573ef59..5302b1ce575d4 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3513,6 +3513,33 @@ def test_set_inheritable_cloexec(self): self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC, 0) + @unittest.skipUnless(hasattr(os, 'O_PATH'), "need os.O_PATH") + def test_get_set_inheritable_o_path(self): + fd = os.open(__file__, os.O_PATH) + self.addCleanup(os.close, fd) + self.assertEqual(os.get_inheritable(fd), False) + + os.set_inheritable(fd, True) + self.assertEqual(os.get_inheritable(fd), True) + + os.set_inheritable(fd, False) + self.assertEqual(os.get_inheritable(fd), False) + + def test_get_set_inheritable_badf(self): + fd = support.make_bad_fd() + + with self.assertRaises(OSError) as ctx: + os.get_inheritable(fd) + self.assertEqual(ctx.exception.errno, errno.EBADF) + + with self.assertRaises(OSError) as ctx: + os.set_inheritable(fd, True) + self.assertEqual(ctx.exception.errno, errno.EBADF) + + with self.assertRaises(OSError) as ctx: + os.set_inheritable(fd, False) + self.assertEqual(ctx.exception.errno, errno.EBADF) + def test_open(self): fd = os.open(__file__, os.O_RDONLY) self.addCleanup(os.close, fd) diff --git a/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst b/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst new file mode 100644 index 0000000000000..a491690507129 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst @@ -0,0 +1 @@ +Fix os.set_inheritable() for O_PATH file descriptors on Linux. diff --git a/Python/fileutils.c b/Python/fileutils.c index 25516c23bf7ab..fd2d5faa0fdf7 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1165,6 +1165,13 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works) return 0; } +#ifdef __linux__ + if (errno == EBADF) { + // On Linux, ioctl(FIOCLEX) will fail with EBADF for O_PATH file descriptors + // Fall through to the fcntl() path + } + else +#endif if (errno != ENOTTY && errno != EACCES) { if (raise) PyErr_SetFromErrno(PyExc_OSError); From webhook-mailer at python.org Thu Jan 21 05:47:05 2021 From: webhook-mailer at python.org (vstinner) Date: Thu, 21 Jan 2021 10:47:05 -0000 Subject: [Python-checkins] bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172) (GH-24278) Message-ID: https://github.com/python/cpython/commit/6893523bed4ad701838715380659c245eec71d48 commit: 6893523bed4ad701838715380659c245eec71d48 branch: 3.9 author: cptpcrd <31829097+cptpcrd at users.noreply.github.com> committer: vstinner date: 2021-01-21T11:46:35+01:00 summary: bpo-42780: Fix set_inheritable() for O_PATH file descriptors on Linux (GH-24172) (GH-24278) (cherry picked from commit 7dc71c425cf6aa6a4070a418dce5d95ca435c79f) files: A Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst M Lib/test/test_os.py M Python/fileutils.c diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index bf1cb5f511255..35933e9c8c3a9 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3659,6 +3659,33 @@ def test_set_inheritable_cloexec(self): self.assertEqual(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC, 0) + @unittest.skipUnless(hasattr(os, 'O_PATH'), "need os.O_PATH") + def test_get_set_inheritable_o_path(self): + fd = os.open(__file__, os.O_PATH) + self.addCleanup(os.close, fd) + self.assertEqual(os.get_inheritable(fd), False) + + os.set_inheritable(fd, True) + self.assertEqual(os.get_inheritable(fd), True) + + os.set_inheritable(fd, False) + self.assertEqual(os.get_inheritable(fd), False) + + def test_get_set_inheritable_badf(self): + fd = support.make_bad_fd() + + with self.assertRaises(OSError) as ctx: + os.get_inheritable(fd) + self.assertEqual(ctx.exception.errno, errno.EBADF) + + with self.assertRaises(OSError) as ctx: + os.set_inheritable(fd, True) + self.assertEqual(ctx.exception.errno, errno.EBADF) + + with self.assertRaises(OSError) as ctx: + os.set_inheritable(fd, False) + self.assertEqual(ctx.exception.errno, errno.EBADF) + def test_open(self): fd = os.open(__file__, os.O_RDONLY) self.addCleanup(os.close, fd) diff --git a/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst b/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst new file mode 100644 index 0000000000000..a491690507129 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-08-15-49-20.bpo-42780.rtqi6B.rst @@ -0,0 +1 @@ +Fix os.set_inheritable() for O_PATH file descriptors on Linux. diff --git a/Python/fileutils.c b/Python/fileutils.c index 397ac34e8073d..ddc090988f158 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1165,6 +1165,13 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works) return 0; } +#ifdef __linux__ + if (errno == EBADF) { + // On Linux, ioctl(FIOCLEX) will fail with EBADF for O_PATH file descriptors + // Fall through to the fcntl() path + } + else +#endif if (errno != ENOTTY && errno != EACCES) { if (raise) PyErr_SetFromErrno(PyExc_OSError); From webhook-mailer at python.org Thu Jan 21 12:36:44 2021 From: webhook-mailer at python.org (pablogsal) Date: Thu, 21 Jan 2021 17:36:44 -0000 Subject: [Python-checkins] Add a What's New entry for the new parser error improvements (GH-24280) Message-ID: https://github.com/python/cpython/commit/805ede8ae88fb517dea0df6de71cf88159b07e62 commit: 805ede8ae88fb517dea0df6de71cf88159b07e62 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-21T17:36:35Z summary: Add a What's New entry for the new parser error improvements (GH-24280) files: M Doc/whatsnew/3.10.rst diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 7a2f4f8c82fe8..d822dda09d2e1 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -166,6 +166,48 @@ See :class:`typing.Callable`, :class:`typing.ParamSpec`, (Contributed by Ken Jin in :issue:`41559`.) +Better error messages in the parser +----------------------------------- + +When parsing code that contains unclosed parentheses or brackets the interpreter +now includes the location of the unclosed bracket of parentheses instead of displaying +*SyntaxError: unexpected EOF while parsing* or pointing to some incorrect location. +For instance, consider the following code (notice the unclosed '{'): + +.. code-block:: python + + expected = {9: 1, 18: 2, 19: 2, 27: 3, 28: 3, 29: 3, 36: 4, 37: 4, + 38: 4, 39: 4, 45: 5, 46: 5, 47: 5, 48: 5, 49: 5, 54: 6, + some_other_code = foo() + +previous versions of the interpreter reported confusing places as the location of +the syntax error: + +.. code-block:: text + + File "example.py", line 3 + some_other_code = foo() + ^ + SyntaxError: invalid syntax + +but in Python3.10 a more informative error is emitted: + +.. code-block:: text + + File "example.py", line 1 + expected = {9: 1, 18: 2, 19: 2, 27: 3, 28: 3, 29: 3, 36: 4, 37: 4, + ^ + SyntaxError: '{' was never closed + + +In a similar way, errors involving unclosed string literals (single and triple +quoted) now point to the start of the string instead of reporting EOF/EOL. + +These improvements are inspired by previous work in the PyPy interpreter. + +(Contributed by Pablo Galindo in :issue:`42864` and Batuhan Taskaya in +:issue:`40176`.) + Other Language Changes ====================== From webhook-mailer at python.org Thu Jan 21 14:14:13 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Thu, 21 Jan 2021 19:14:13 -0000 Subject: [Python-checkins] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578) Message-ID: https://github.com/python/cpython/commit/6713e869c4989c04318158b406c30a147ea52904 commit: 6713e869c4989c04318158b406c30a147ea52904 branch: master author: Cheryl Sabella committer: serhiy-storchaka date: 2021-01-21T21:14:04+02:00 summary: bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578) files: A Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst M Lib/tkinter/__init__.py M Lib/tkinter/colorchooser.py M Lib/tkinter/test/test_tkinter/test_colorchooser.py M Lib/tkinter/test/test_tkinter/test_misc.py diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 57ac3fb5cf6ef..01dce7eff25c5 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -1185,8 +1185,7 @@ def winfo_reqwidth(self): self.tk.call('winfo', 'reqwidth', self._w)) def winfo_rgb(self, color): - """Return tuple of decimal values for red, green, blue for - COLOR in this widget.""" + """Return a tuple of integer RGB values in range(65536) for color in this widget.""" return self._getints( self.tk.call('winfo', 'rgb', self._w, color)) diff --git a/Lib/tkinter/colorchooser.py b/Lib/tkinter/colorchooser.py index 3cfc06f6f1fae..e2fb69dba9276 100644 --- a/Lib/tkinter/colorchooser.py +++ b/Lib/tkinter/colorchooser.py @@ -8,57 +8,69 @@ # fixed initialcolor handling in August 1998 # -# -# options (all have default values): -# -# - initialcolor: color to mark as selected when dialog is displayed -# (given as an RGB triplet or a Tk color string) -# -# - parent: which window to place the dialog on top of -# -# - title: dialog title -# from tkinter.commondialog import Dialog __all__ = ["Chooser", "askcolor"] -# -# color chooser class - class Chooser(Dialog): - "Ask for a color" + """Create a dialog for the tk_chooseColor command. + + Args: + master: The master widget for this dialog. If not provided, + defaults to options['parent'] (if defined). + options: Dictionary of options for the tk_chooseColor call. + initialcolor: Specifies the selected color when the + dialog is first displayed. This can be a tk color + string or a 3-tuple of ints in the range (0, 255) + for an RGB triplet. + parent: The parent window of the color dialog. The + color dialog is displayed on top of this. + title: A string for the title of the dialog box. + """ command = "tk_chooseColor" def _fixoptions(self): + """Ensure initialcolor is a tk color string. + + Convert initialcolor from a RGB triplet to a color string. + """ try: - # make sure initialcolor is a tk color string color = self.options["initialcolor"] if isinstance(color, tuple): - # assume an RGB triplet + # Assume an RGB triplet. self.options["initialcolor"] = "#%02x%02x%02x" % color except KeyError: pass def _fixresult(self, widget, result): - # result can be somethings: an empty tuple, an empty string or - # a Tcl_Obj, so this somewhat weird check handles that + """Adjust result returned from call to tk_chooseColor. + + Return both an RGB tuple of ints in the range (0, 255) and the + tk color string in the form #rrggbb. + """ + # Result can be many things: an empty tuple, an empty string, or + # a _tkinter.Tcl_Obj, so this somewhat weird check handles that. if not result or not str(result): - return None, None # canceled + return None, None # canceled - # to simplify application code, the color chooser returns - # an RGB tuple together with the Tk color string + # To simplify application code, the color chooser returns + # an RGB tuple together with the Tk color string. r, g, b = widget.winfo_rgb(result) - return (r/256, g/256, b/256), str(result) + return (r//256, g//256, b//256), str(result) # # convenience stuff -def askcolor(color = None, **options): - "Ask for a color" +def askcolor(color=None, **options): + """Display dialog window for selection of a color. + + Convenience wrapper for the Chooser class. Displays the color + chooser dialog with color as the initial value. + """ if color: options = options.copy() diff --git a/Lib/tkinter/test/test_tkinter/test_colorchooser.py b/Lib/tkinter/test/test_tkinter/test_colorchooser.py index 600c8cde67e76..41da86c2adef4 100644 --- a/Lib/tkinter/test/test_tkinter/test_colorchooser.py +++ b/Lib/tkinter/test/test_tkinter/test_colorchooser.py @@ -1,13 +1,44 @@ import unittest import tkinter from test.support import requires, run_unittest, swap_attr -from tkinter.test.support import AbstractDefaultRootTest -from tkinter.commondialog import Dialog +from tkinter.test.support import AbstractDefaultRootTest, AbstractTkTest +from tkinter import colorchooser from tkinter.colorchooser import askcolor +from tkinter.commondialog import Dialog requires('gui') +class ChooserTest(AbstractTkTest, unittest.TestCase): + + @classmethod + def setUpClass(cls): + AbstractTkTest.setUpClass.__func__(cls) + cls.cc = colorchooser.Chooser(initialcolor='dark blue slate') + + def test_fixoptions(self): + cc = self.cc + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], 'dark blue slate') + + cc.options['initialcolor'] = '#D2D269691E1E' + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], '#D2D269691E1E') + + cc.options['initialcolor'] = (210, 105, 30) + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], '#d2691e') + + def test_fixresult(self): + cc = self.cc + self.assertEqual(cc._fixresult(self.root, ()), (None, None)) + self.assertEqual(cc._fixresult(self.root, ''), (None, None)) + self.assertEqual(cc._fixresult(self.root, 'chocolate'), + ((210, 105, 30), 'chocolate')) + self.assertEqual(cc._fixresult(self.root, '#4a3c8c'), + ((74, 60, 140), '#4a3c8c')) + + class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): def test_askcolor(self): @@ -33,7 +64,7 @@ def test_callback(dialog, master): self.assertRaises(RuntimeError, askcolor) -tests_gui = (DefaultRootTest,) +tests_gui = (ChooserTest, DefaultRootTest,) if __name__ == "__main__": run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index 585d81ddf9f2d..f6e5b4db1ae1f 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -192,6 +192,26 @@ def test_clipboard_astral(self): with self.assertRaises(tkinter.TclError): root.clipboard_get() + def test_winfo_rgb(self): + root = self.root + rgb = root.winfo_rgb + + # Color name. + self.assertEqual(rgb('red'), (65535, 0, 0)) + self.assertEqual(rgb('dark slate blue'), (18504, 15677, 35723)) + # #RGB - extends each 4-bit hex value to be 16-bit. + self.assertEqual(rgb('#F0F'), (0xFFFF, 0x0000, 0xFFFF)) + # #RRGGBB - extends each 8-bit hex value to be 16-bit. + self.assertEqual(rgb('#4a3c8c'), (0x4a4a, 0x3c3c, 0x8c8c)) + # #RRRRGGGGBBBB + self.assertEqual(rgb('#dede14143939'), (0xdede, 0x1414, 0x3939)) + # Invalid string. + with self.assertRaises(tkinter.TclError): + rgb('#123456789a') + # RGB triplet is invalid input. + with self.assertRaises(tkinter.TclError): + rgb((111, 78, 55)) + def test_event_repr_defaults(self): e = tkinter.Event() e.serial = 12345 diff --git a/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst b/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst new file mode 100644 index 0000000000000..52d9ac9dd902c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst @@ -0,0 +1,2 @@ +Correct call to :mod:`tkinter.colorchooser` to return RGB triplet of ints +instead of floats. Patch by Cheryl Sabella. From webhook-mailer at python.org Thu Jan 21 19:55:57 2021 From: webhook-mailer at python.org (vstinner) Date: Fri, 22 Jan 2021 00:55:57 -0000 Subject: [Python-checkins] bpo-31904: setup.py: fix cross-compilation on VxWorks (GH-24191) Message-ID: https://github.com/python/cpython/commit/5e45f1c8e7bc5f0ab8feba88b9b6e47066203a5c commit: 5e45f1c8e7bc5f0ab8feba88b9b6e47066203a5c branch: master author: pxinwr committer: vstinner date: 2021-01-22T01:55:52+01:00 summary: bpo-31904: setup.py: fix cross-compilation on VxWorks (GH-24191) Add library search path by wr-cc in add_cross_compiling_paths(). files: A Misc/NEWS.d/next/Build/2021-01-11-23-26-00.bpo-31904.ty8f3h.rst M setup.py diff --git a/Misc/NEWS.d/next/Build/2021-01-11-23-26-00.bpo-31904.ty8f3h.rst b/Misc/NEWS.d/next/Build/2021-01-11-23-26-00.bpo-31904.ty8f3h.rst new file mode 100644 index 0000000000000..bc02d0a04f528 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-01-11-23-26-00.bpo-31904.ty8f3h.rst @@ -0,0 +1 @@ +Add library search path by wr-cc in add_cross_compiling_paths() for VxWorks. diff --git a/setup.py b/setup.py index a4d21d4c61972..8445546c0116f 100644 --- a/setup.py +++ b/setup.py @@ -682,6 +682,51 @@ def add_multiarch_paths(self): finally: os.unlink(tmpfile) + def add_wrcc_search_dirs(self): + # add library search path by wr-cc, the compiler wrapper + + def convert_mixed_path(path): + # convert path like C:\folder1\folder2/folder3/folder4 + # to msys style /c/folder1/folder2/folder3/folder4 + drive = path[0].lower() + left = path[2:].replace("\\", "/") + return "/" + drive + left + + def add_search_path(line): + # On Windows building machine, VxWorks does + # cross builds under msys2 environment. + pathsep = (";" if sys.platform == "msys" else ":") + for d in line.strip().split("=")[1].split(pathsep): + d = d.strip() + if sys.platform == "msys": + # On Windows building machine, compiler + # returns mixed style path like: + # C:\folder1\folder2/folder3/folder4 + d = convert_mixed_path(d) + d = os.path.normpath(d) + add_dir_to_list(self.compiler.library_dirs, d) + + cc = sysconfig.get_config_var('CC') + tmpfile = os.path.join(self.build_temp, 'wrccpaths') + os.makedirs(self.build_temp, exist_ok=True) + try: + ret = run_command('%s --print-search-dirs >%s' % (cc, tmpfile)) + if ret: + return + with open(tmpfile) as fp: + # Parse paths in libraries line. The line is like: + # On Linux, "libraries: = path1:path2:path3" + # On Windows, "libraries: = path1;path2;path3" + for line in fp: + if not line.startswith("libraries"): + continue + add_search_path(line) + finally: + try: + os.unlink(tmpfile) + except OSError: + pass + def add_cross_compiling_paths(self): cc = sysconfig.get_config_var('CC') tmpfile = os.path.join(self.build_temp, 'ccpaths') @@ -715,6 +760,9 @@ def add_cross_compiling_paths(self): finally: os.unlink(tmpfile) + if VXWORKS: + self.add_wrcc_search_dirs() + def add_ldflags_cppflags(self): # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. From webhook-mailer at python.org Thu Jan 21 20:20:18 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 22 Jan 2021 01:20:18 -0000 Subject: [Python-checkins] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) Message-ID: https://github.com/python/cpython/commit/8603dfb4219989644601f6ede75b57e82648cd4e commit: 8603dfb4219989644601f6ede75b57e82648cd4e branch: master author: Andrey Bienkowski committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-21T17:19:51-08:00 summary: bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) Automerge-Triggered-By: GH:gvanrossum files: A Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst M Lib/pdb.py M Lib/test/test_pdb.py diff --git a/Lib/pdb.py b/Lib/pdb.py index d7d957159458b..7a5192cbadc3a 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -1686,8 +1686,9 @@ def main(): sys.argv[:] = args # Hide "pdb.py" and pdb options from argument list - # Replace pdb's dir with script's dir in front of module search path. if not run_as_module: + mainpyfile = os.path.realpath(mainpyfile) + # Replace pdb's dir with script's dir in front of module search path. sys.path[0] = os.path.dirname(mainpyfile) # Note on saving/restoring sys.argv: it's a good idea when sys.argv was diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 93b61dcfbcdd8..0a6f186d4be2f 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1662,6 +1662,48 @@ def test_errors_in_command(self): '(Pdb) ', ]) + + def test_issue42384(self): + '''When running `python foo.py` sys.path[0] is an absolute path. `python -m pdb foo.py` should behave the same''' + script = textwrap.dedent(""" + import sys + print('sys.path[0] is', sys.path[0]) + """) + commands = 'c\nq' + + with os_helper.temp_cwd() as cwd: + expected = f'(Pdb) sys.path[0] is {os.path.realpath(cwd)}' + + stdout, stderr = self.run_pdb_script(script, commands) + + self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + + @os_helper.skip_unless_symlink + def test_issue42384_symlink(self): + '''When running `python foo.py` sys.path[0] resolves symlinks. `python -m pdb foo.py` should behave the same''' + script = textwrap.dedent(""" + import sys + print('sys.path[0] is', sys.path[0]) + """) + commands = 'c\nq' + + with os_helper.temp_cwd() as cwd: + cwd = os.path.realpath(cwd) + dir_one = os.path.join(cwd, 'dir_one') + dir_two = os.path.join(cwd, 'dir_two') + expected = f'(Pdb) sys.path[0] is {dir_one}' + + os.mkdir(dir_one) + with open(os.path.join(dir_one, 'foo.py'), 'w') as f: + f.write(script) + os.mkdir(dir_two) + os.symlink(os.path.join(dir_one, 'foo.py'), os.path.join(dir_two, 'foo.py')) + + stdout, stderr = self._run_pdb([os.path.join('dir_two', 'foo.py')], commands) + + self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + + def load_tests(*args): from test import test_pdb suites = [ diff --git a/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst b/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst new file mode 100644 index 0000000000000..ae990162fbab7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst @@ -0,0 +1 @@ +Make pdb populate sys.path[0] exactly the same as regular python execution. From webhook-mailer at python.org Fri Jan 22 00:47:32 2021 From: webhook-mailer at python.org (terryjreedy) Date: Fri, 22 Jan 2021 05:47:32 -0000 Subject: [Python-checkins] bpo-40304: Correct type(name, bases, dict) doc (GH-19553) Message-ID: https://github.com/python/cpython/commit/644d52818a6391535e5838fd57d58ffcb1163056 commit: 644d52818a6391535e5838fd57d58ffcb1163056 branch: master author: ????? ?????????? committer: terryjreedy date: 2021-01-22T00:47:23-05:00 summary: bpo-40304: Correct type(name, bases, dict) doc (GH-19553) Co-authored-by: ?ric Araujo Co-authored-by: Terry Jan Reedy Co-authored-by: Tal Einat <532281+taleinat at users.noreply.github.com> files: A Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst M Doc/library/functions.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 0598a6ce9415e..f28d63b6b3d21 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1703,18 +1703,19 @@ are always available. They are listed here in alphabetical order. With three arguments, return a new type object. This is essentially a - dynamic form of the :keyword:`class` statement. The *name* string is the - class name and becomes the :attr:`~definition.__name__` attribute; the *bases* - tuple itemizes the base classes and becomes the :attr:`~class.__bases__` - attribute; and the *dict* dictionary is the namespace containing definitions - for class body and is copied to a standard dictionary to become the - :attr:`~object.__dict__` attribute. For example, the following two - statements create identical :class:`type` objects: + dynamic form of the :keyword:`class` statement. The *name* string is + the class name and becomes the :attr:`~definition.__name__` attribute. + The *bases* tuple contains the base classes and becomes the + :attr:`~class.__bases__` attribute; if empty, :class:`object`, the + ultimate base of all classes, is added. The *dict* dictionary contains + attribute and method definitions for the class body; it may be copied + or wrapped before becoming the :attr:`~object.__dict__` attribute. + The following two statements create identical :class:`type` objects: >>> class X: ... a = 1 ... - >>> X = type('X', (object,), dict(a=1)) + >>> X = type('X', (), dict(a=1)) See also :ref:`bltin-type-objects`. diff --git a/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst b/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst new file mode 100644 index 0000000000000..3f2f14c2d7b89 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst @@ -0,0 +1,2 @@ +Fix doc for type(name, bases, dict). Patch by Boris Verkhovskiy and +?ric Araujo. From webhook-mailer at python.org Fri Jan 22 00:58:09 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 22 Jan 2021 05:58:09 -0000 Subject: [Python-checkins] bpo-40304: Correct type(name, bases, dict) doc (GH-19553) Message-ID: https://github.com/python/cpython/commit/34f3f4ac70e3ba2e603ba7792addf973c94f90cb commit: 34f3f4ac70e3ba2e603ba7792addf973c94f90cb 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-21T21:57:40-08:00 summary: bpo-40304: Correct type(name, bases, dict) doc (GH-19553) Co-authored-by: ?ric Araujo Co-authored-by: Terry Jan Reedy Co-authored-by: Tal Einat <532281+taleinat at users.noreply.github.com> (cherry picked from commit 644d52818a6391535e5838fd57d58ffcb1163056) Co-authored-by: ????? ?????????? files: A Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst M Doc/library/functions.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 4f5fe6bc23069..5a039f7a9476f 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1683,18 +1683,19 @@ are always available. They are listed here in alphabetical order. With three arguments, return a new type object. This is essentially a - dynamic form of the :keyword:`class` statement. The *name* string is the - class name and becomes the :attr:`~definition.__name__` attribute; the *bases* - tuple itemizes the base classes and becomes the :attr:`~class.__bases__` - attribute; and the *dict* dictionary is the namespace containing definitions - for class body and is copied to a standard dictionary to become the - :attr:`~object.__dict__` attribute. For example, the following two - statements create identical :class:`type` objects: + dynamic form of the :keyword:`class` statement. The *name* string is + the class name and becomes the :attr:`~definition.__name__` attribute. + The *bases* tuple contains the base classes and becomes the + :attr:`~class.__bases__` attribute; if empty, :class:`object`, the + ultimate base of all classes, is added. The *dict* dictionary contains + attribute and method definitions for the class body; it may be copied + or wrapped before becoming the :attr:`~object.__dict__` attribute. + The following two statements create identical :class:`type` objects: >>> class X: ... a = 1 ... - >>> X = type('X', (object,), dict(a=1)) + >>> X = type('X', (), dict(a=1)) See also :ref:`bltin-type-objects`. diff --git a/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst b/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst new file mode 100644 index 0000000000000..3f2f14c2d7b89 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst @@ -0,0 +1,2 @@ +Fix doc for type(name, bases, dict). Patch by Boris Verkhovskiy and +?ric Araujo. From webhook-mailer at python.org Fri Jan 22 01:10:09 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 22 Jan 2021 06:10:09 -0000 Subject: [Python-checkins] bpo-40304: Correct type(name, bases, dict) doc (GH-19553) Message-ID: https://github.com/python/cpython/commit/98e1f5c778b9719f6338a3247da95402192bad18 commit: 98e1f5c778b9719f6338a3247da95402192bad18 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-21T22:09:50-08:00 summary: bpo-40304: Correct type(name, bases, dict) doc (GH-19553) Co-authored-by: ?ric Araujo Co-authored-by: Terry Jan Reedy Co-authored-by: Tal Einat <532281+taleinat at users.noreply.github.com> (cherry picked from commit 644d52818a6391535e5838fd57d58ffcb1163056) Co-authored-by: ????? ?????????? files: A Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst M Doc/library/functions.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 9c12b6c48d8ff..9d13967c04fff 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1687,18 +1687,19 @@ are always available. They are listed here in alphabetical order. With three arguments, return a new type object. This is essentially a - dynamic form of the :keyword:`class` statement. The *name* string is the - class name and becomes the :attr:`~definition.__name__` attribute; the *bases* - tuple itemizes the base classes and becomes the :attr:`~class.__bases__` - attribute; and the *dict* dictionary is the namespace containing definitions - for class body and is copied to a standard dictionary to become the - :attr:`~object.__dict__` attribute. For example, the following two - statements create identical :class:`type` objects: + dynamic form of the :keyword:`class` statement. The *name* string is + the class name and becomes the :attr:`~definition.__name__` attribute. + The *bases* tuple contains the base classes and becomes the + :attr:`~class.__bases__` attribute; if empty, :class:`object`, the + ultimate base of all classes, is added. The *dict* dictionary contains + attribute and method definitions for the class body; it may be copied + or wrapped before becoming the :attr:`~object.__dict__` attribute. + The following two statements create identical :class:`type` objects: >>> class X: ... a = 1 ... - >>> X = type('X', (object,), dict(a=1)) + >>> X = type('X', (), dict(a=1)) See also :ref:`bltin-type-objects`. diff --git a/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst b/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst new file mode 100644 index 0000000000000..3f2f14c2d7b89 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-01-20-23-03-49.bpo-40304.-LK7Ps.rst @@ -0,0 +1,2 @@ +Fix doc for type(name, bases, dict). Patch by Boris Verkhovskiy and +?ric Araujo. From webhook-mailer at python.org Fri Jan 22 05:07:19 2021 From: webhook-mailer at python.org (vstinner) Date: Fri, 22 Jan 2021 10:07:19 -0000 Subject: [Python-checkins] bpo-41798: Allocate the _curses._C_API on the heap memory (GH-24186) Message-ID: https://github.com/python/cpython/commit/2f12a1b7ecc9e0cf39b4c6994473e6cb9989f81b commit: 2f12a1b7ecc9e0cf39b4c6994473e6cb9989f81b branch: master author: Hai Shi committer: vstinner date: 2021-01-22T11:06:43+01:00 summary: bpo-41798: Allocate the _curses._C_API on the heap memory (GH-24186) files: M Modules/_cursesmodule.c diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 7ab68c78c3159..4fcedc5fc4820 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -4725,22 +4725,23 @@ static struct PyModuleDef _cursesmodule = { NULL }; +static void +curses_destructor(PyObject *op) +{ + void *ptr = PyCapsule_GetPointer(op, PyCurses_CAPSULE_NAME); + Py_DECREF(*(void **)ptr); + PyMem_Free(ptr); +} + PyMODINIT_FUNC PyInit__curses(void) { PyObject *m, *d, *v, *c_api_object; - static void *PyCurses_API[PyCurses_API_pointers]; /* Initialize object type */ if (PyType_Ready(&PyCursesWindow_Type) < 0) return NULL; - /* Initialize the C API pointer array */ - PyCurses_API[0] = (void *)&PyCursesWindow_Type; - PyCurses_API[1] = (void *)func_PyCursesSetupTermCalled; - PyCurses_API[2] = (void *)func_PyCursesInitialised; - PyCurses_API[3] = (void *)func_PyCursesInitialisedColor; - /* Create the module and add the functions */ m = PyModule_Create(&_cursesmodule); if (m == NULL) @@ -4752,9 +4753,29 @@ PyInit__curses(void) return NULL; ModDict = d; /* For PyCurses_InitScr to use later */ + void **PyCurses_API = PyMem_Calloc(PyCurses_API_pointers, sizeof(void *)); + if (PyCurses_API == NULL) { + PyErr_NoMemory(); + return NULL; + } + /* Initialize the C API pointer array */ + PyCurses_API[0] = (void *)Py_NewRef(&PyCursesWindow_Type); + PyCurses_API[1] = (void *)func_PyCursesSetupTermCalled; + PyCurses_API[2] = (void *)func_PyCursesInitialised; + PyCurses_API[3] = (void *)func_PyCursesInitialisedColor; + /* Add a capsule for the C API */ - c_api_object = PyCapsule_New(PyCurses_API, PyCurses_CAPSULE_NAME, NULL); - PyDict_SetItemString(d, "_C_API", c_api_object); + c_api_object = PyCapsule_New(PyCurses_API, PyCurses_CAPSULE_NAME, + curses_destructor); + if (c_api_object == NULL) { + Py_DECREF(PyCurses_API[0]); + PyMem_Free(PyCurses_API); + return NULL; + } + if (PyDict_SetItemString(d, "_C_API", c_api_object) < 0) { + Py_DECREF(c_api_object); + return NULL; + } Py_DECREF(c_api_object); /* For exception curses.error */ From webhook-mailer at python.org Fri Jan 22 07:06:28 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 22 Jan 2021 12:06:28 -0000 Subject: [Python-checkins] bpo-42996: Update a reference to PKCS #5 in hashlib docs to version 2.1 (GH-24289) Message-ID: https://github.com/python/cpython/commit/b745a6143ae79efe00aa46affe5ea31a06b0b532 commit: b745a6143ae79efe00aa46affe5ea31a06b0b532 branch: master author: Illia Volochii committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-22T04:06:00-08:00 summary: bpo-42996: Update a reference to PKCS #5 in hashlib docs to version 2.1 (GH-24289) RFC 8018 superseded RFC 8018. Automerge-Triggered-By: GH:tiran files: M Doc/library/hashlib.rst diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index d644974e66098..7bb030bd08f9d 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -746,5 +746,5 @@ Domain Dedication 1.0 Universal: Wikipedia article with information on which algorithms have known issues and what that means regarding their use. - https://www.ietf.org/rfc/rfc2898.txt - PKCS #5: Password-Based Cryptography Specification Version 2.0 + https://www.ietf.org/rfc/rfc8018.txt + PKCS #5: Password-Based Cryptography Specification Version 2.1 From webhook-mailer at python.org Sat Jan 23 11:34:32 2021 From: webhook-mailer at python.org (benjaminp) Date: Sat, 23 Jan 2021 16:34:32 -0000 Subject: [Python-checkins] closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) Message-ID: https://github.com/python/cpython/commit/f7fa64f0e87edc61d990ed51b4da722906a10928 commit: f7fa64f0e87edc61d990ed51b4da722906a10928 branch: master author: Zackery Spytz committer: benjaminp date: 2021-01-23T10:34:01-06:00 summary: closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) files: M Lib/ctypes/test/test_parameters.py diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index 531894fdec838..38af7ac13d756 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -240,8 +240,8 @@ def test_parameter_repr(self): self.assertEqual(repr(c_double.from_param(1.5)), "") self.assertEqual(repr(c_double.from_param(1e300)), "") self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") - self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") - self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), r"^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), r"^$") self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") ################################################################ From webhook-mailer at python.org Sat Jan 23 11:55:55 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 23 Jan 2021 16:55:55 -0000 Subject: [Python-checkins] closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) Message-ID: https://github.com/python/cpython/commit/dce86c230bb91722e84cd3618c1ee9cb55cc220f commit: dce86c230bb91722e84cd3618c1ee9cb55cc220f 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-23T08:55:20-08:00 summary: closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) (cherry picked from commit f7fa64f0e87edc61d990ed51b4da722906a10928) Co-authored-by: Zackery Spytz files: M Lib/ctypes/test/test_parameters.py diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index 531894fdec838..38af7ac13d756 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -240,8 +240,8 @@ def test_parameter_repr(self): self.assertEqual(repr(c_double.from_param(1.5)), "") self.assertEqual(repr(c_double.from_param(1e300)), "") self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") - self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") - self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), r"^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), r"^$") self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") ################################################################ From webhook-mailer at python.org Sat Jan 23 11:56:11 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 23 Jan 2021 16:56:11 -0000 Subject: [Python-checkins] closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) Message-ID: https://github.com/python/cpython/commit/00e24cdca422f792b80016287562b6b3bccab239 commit: 00e24cdca422f792b80016287562b6b3bccab239 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-23T08:56:08-08:00 summary: closes bpo-43011: Fix DeprecationWarnings in test_ctypes (GH-24305) (cherry picked from commit f7fa64f0e87edc61d990ed51b4da722906a10928) Co-authored-by: Zackery Spytz files: M Lib/ctypes/test/test_parameters.py diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py index 531894fdec838..38af7ac13d756 100644 --- a/Lib/ctypes/test/test_parameters.py +++ b/Lib/ctypes/test/test_parameters.py @@ -240,8 +240,8 @@ def test_parameter_repr(self): self.assertEqual(repr(c_double.from_param(1.5)), "") self.assertEqual(repr(c_double.from_param(1e300)), "") self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^$") - self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^$") - self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^$") + self.assertRegex(repr(c_char_p.from_param(b'hihi')), r"^$") + self.assertRegex(repr(c_wchar_p.from_param('hihi')), r"^$") self.assertRegex(repr(c_void_p.from_param(0x12)), r"^$") ################################################################ From webhook-mailer at python.org Sat Jan 23 17:57:26 2021 From: webhook-mailer at python.org (pablogsal) Date: Sat, 23 Jan 2021 22:57:26 -0000 Subject: [Python-checkins] Remove full stop from a bytes-related SyntaxError message (GH-24300) Message-ID: https://github.com/python/cpython/commit/bf9239bb61fda25efe89d53a60675528b2f3ce6f commit: bf9239bb61fda25efe89d53a60675528b2f3ce6f branch: master author: numbermaniac <5206120+numbermaniac at users.noreply.github.com> committer: pablogsal date: 2021-01-23T22:56:57Z summary: Remove full stop from a bytes-related SyntaxError message (GH-24300) files: M Parser/string_parser.c diff --git a/Parser/string_parser.c b/Parser/string_parser.c index a41f41ce2784d..0f3665c3453e2 100644 --- a/Parser/string_parser.c +++ b/Parser/string_parser.c @@ -250,7 +250,7 @@ _PyPegen_parsestr(Parser *p, int *bytesmode, int *rawmode, PyObject **result, if (Py_CHARMASK(*ch) >= 0x80) { RAISE_SYNTAX_ERROR( "bytes can only contain ASCII " - "literal characters."); + "literal characters"); return -1; } } From webhook-mailer at python.org Sun Jan 24 04:23:22 2021 From: webhook-mailer at python.org (isidentical) Date: Sun, 24 Jan 2021 09:23:22 -0000 Subject: [Python-checkins] bpo-43014: Improve performance of tokenize.tokenize by 20-30% Message-ID: https://github.com/python/cpython/commit/15bd9efd01e44087664e78bf766865a6d2e06626 commit: 15bd9efd01e44087664e78bf766865a6d2e06626 branch: master author: Anthony Sottile committer: isidentical date: 2021-01-24T12:23:17+03:00 summary: bpo-43014: Improve performance of tokenize.tokenize by 20-30% files: A Misc/NEWS.d/next/Library/2021-01-24-00-37-40.bpo-43014.BVPhEr.rst M Lib/tokenize.py diff --git a/Lib/tokenize.py b/Lib/tokenize.py index 1aee21b5e18fa..42c1f10373de9 100644 --- a/Lib/tokenize.py +++ b/Lib/tokenize.py @@ -27,6 +27,7 @@ from builtins import open as _builtin_open from codecs import lookup, BOM_UTF8 import collections +import functools from io import TextIOWrapper import itertools as _itertools import re @@ -95,6 +96,7 @@ def _all_string_prefixes(): result.add(''.join(u)) return result + at functools.lru_cache def _compile(expr): return re.compile(expr, re.UNICODE) diff --git a/Misc/NEWS.d/next/Library/2021-01-24-00-37-40.bpo-43014.BVPhEr.rst b/Misc/NEWS.d/next/Library/2021-01-24-00-37-40.bpo-43014.BVPhEr.rst new file mode 100644 index 0000000000000..02898e4a3a42e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-24-00-37-40.bpo-43014.BVPhEr.rst @@ -0,0 +1 @@ +Improve performance of :mod:`tokenize` by 20-30%. Patch by Anthony Sottile. From webhook-mailer at python.org Sun Jan 24 14:09:14 2021 From: webhook-mailer at python.org (terryjreedy) Date: Sun, 24 Jan 2021 19:09:14 -0000 Subject: [Python-checkins] bpo-43013: Update idlelib code to 3.x (GH-24315) Message-ID: https://github.com/python/cpython/commit/8dfe15625e6ea4357a13fec7989a0e6ba2bf1359 commit: 8dfe15625e6ea4357a13fec7989a0e6ba2bf1359 branch: master author: Terry Jan Reedy committer: terryjreedy date: 2021-01-24T14:08:50-05:00 summary: bpo-43013: Update idlelib code to 3.x (GH-24315) Remove 9 remaining '(object)' occurrences in class headers in idlelib and 25 '()' occurrences in idlelib.idle_test class headers. files: M Lib/idlelib/editor.py M Lib/idlelib/idle_test/test_autocomplete.py M Lib/idlelib/idle_test/test_calltip.py M Lib/idlelib/idle_test/test_codecontext.py M Lib/idlelib/idle_test/test_format.py M Lib/idlelib/idle_test/test_help_about.py M Lib/idlelib/idle_test/test_pyparse.py M Lib/idlelib/rpc.py M Lib/idlelib/run.py M Lib/idlelib/tooltip.py diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index a178eaf93c013..a4d0c95362fa9 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -46,7 +46,7 @@ def _sphinx_version(): return release -class EditorWindow(object): +class EditorWindow: from idlelib.percolator import Percolator from idlelib.colorizer import ColorDelegator, color_config from idlelib.undo import UndoDelegator @@ -1546,7 +1546,7 @@ def get_line_indent(line, tabwidth): return m.end(), len(m.group().expandtabs(tabwidth)) -class IndentSearcher(object): +class IndentSearcher: # .run() chews over the Text widget, looking for a block opener # and the stmt following it. Returns a pair, diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py index 9c113bd893f13..642bb5db64dc3 100644 --- a/Lib/idlelib/idle_test/test_autocomplete.py +++ b/Lib/idlelib/idle_test/test_autocomplete.py @@ -195,7 +195,7 @@ def test_open_completions_none(self): self.assertFalse(acp.open_completions(ac.TAB)) self.text.delete('1.0', 'end') - class dummy_acw(): + class dummy_acw: __init__ = Func() show_window = Func(result=False) hide_window = Func() diff --git a/Lib/idlelib/idle_test/test_calltip.py b/Lib/idlelib/idle_test/test_calltip.py index a76829f3656c8..b23915c5ab784 100644 --- a/Lib/idlelib/idle_test/test_calltip.py +++ b/Lib/idlelib/idle_test/test_calltip.py @@ -10,7 +10,7 @@ # Test Class TC is used in multiple get_argspec test methods -class TC(): +class TC: 'doc' tip = "(ai=None, *b)" def __init__(self, ai=None, *b): 'doc' @@ -268,7 +268,7 @@ def test_good_entity(self): # open_calltip is about half the code; the others are fairly trivial. # The default mocks are what are needed for open_calltip. -class mock_Shell(): +class mock_Shell: "Return mock sufficient to pass to hyperparser." def __init__(self, text): text.tag_prevrange = Mock(return_value=None) diff --git a/Lib/idlelib/idle_test/test_codecontext.py b/Lib/idlelib/idle_test/test_codecontext.py index 9578cc731a6f9..6969ad73b01a8 100644 --- a/Lib/idlelib/idle_test/test_codecontext.py +++ b/Lib/idlelib/idle_test/test_codecontext.py @@ -20,7 +20,7 @@ } code_sample = """\ -class C1(): +class C1: # Class comment. def __init__(self, a, b): self.a = a @@ -178,29 +178,29 @@ def test_get_context(self): with self.assertRaises(AssertionError): gc(1, stopline=0) - eq(gc(3), ([(2, 0, 'class C1():', 'class')], 0)) + eq(gc(3), ([(2, 0, 'class C1:', 'class')], 0)) # Don't return comment. - eq(gc(4), ([(2, 0, 'class C1():', 'class')], 0)) + eq(gc(4), ([(2, 0, 'class C1:', 'class')], 0)) # Two indentation levels and no comment. - eq(gc(5), ([(2, 0, 'class C1():', 'class'), + eq(gc(5), ([(2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')], 0)) # Only one 'def' is returned, not both at the same indent level. - eq(gc(10), ([(2, 0, 'class C1():', 'class'), + eq(gc(10), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if')], 0)) # With 'elif', also show the 'if' even though it's at the same level. - eq(gc(11), ([(2, 0, 'class C1():', 'class'), + eq(gc(11), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')], 0)) # Set stop_line to not go back to first line in source code. # Return includes stop_line. - eq(gc(11, stopline=2), ([(2, 0, 'class C1():', 'class'), + eq(gc(11, stopline=2), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')], 0)) @@ -240,37 +240,37 @@ def test_update_code_context(self): # Scroll down to line 2. cc.text.yview(2) cc.update_code_context() - eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1():', 'class')]) + eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1:', 'class')]) eq(cc.topvisible, 3) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():') + eq(cc.context.get('1.0', 'end-1c'), 'class C1:') # Scroll down to line 3. Since it's a comment, nothing changes. cc.text.yview(3) cc.update_code_context() - eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1():', 'class')]) + eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1:', 'class')]) eq(cc.topvisible, 4) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():') + eq(cc.context.get('1.0', 'end-1c'), 'class C1:') # Scroll down to line 4. cc.text.yview(4) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')]) eq(cc.topvisible, 5) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def __init__(self, a, b):') # Scroll down to line 11. Last 'def' is removed. cc.text.yview(11) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')]) eq(cc.topvisible, 12) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def compare(self):\n' ' if a > b:\n' ' elif a < b:') @@ -279,12 +279,12 @@ def test_update_code_context(self): cc.update_code_context() cc.context_depth = 1 eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')]) eq(cc.topvisible, 12) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def compare(self):\n' ' if a > b:\n' ' elif a < b:') @@ -293,7 +293,7 @@ def test_update_code_context(self): cc.text.yview(5) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')]) eq(cc.topvisible, 6) # context_depth is 1. @@ -440,7 +440,7 @@ def test_get_line_info(self): # Line 1 is not a BLOCKOPENER. eq(gli(lines[0]), (codecontext.INFINITY, '', False)) # Line 2 is a BLOCKOPENER without an indent. - eq(gli(lines[1]), (0, 'class C1():', 'class')) + eq(gli(lines[1]), (0, 'class C1:', 'class')) # Line 3 is not a BLOCKOPENER and does not return the indent level. eq(gli(lines[2]), (codecontext.INFINITY, ' # Class comment.', False)) # Line 4 is a BLOCKOPENER and is indented. diff --git a/Lib/idlelib/idle_test/test_format.py b/Lib/idlelib/idle_test/test_format.py index a79bb515089e7..e5e903688597a 100644 --- a/Lib/idlelib/idle_test/test_format.py +++ b/Lib/idlelib/idle_test/test_format.py @@ -418,7 +418,7 @@ def tearDown(self): code_sample = """\ # WS line needed for test. -class C1(): +class C1: # Class comment. def __init__(self, a, b): self.a = a diff --git a/Lib/idlelib/idle_test/test_help_about.py b/Lib/idlelib/idle_test/test_help_about.py index 7c148d23a135b..b915535acac0c 100644 --- a/Lib/idlelib/idle_test/test_help_about.py +++ b/Lib/idlelib/idle_test/test_help_about.py @@ -134,7 +134,7 @@ def test_close(self): self.dialog.winfo_class() -class Dummy_about_dialog(): +class Dummy_about_dialog: # Dummy class for testing file display functions. idle_credits = About.show_idle_credits idle_readme = About.show_readme diff --git a/Lib/idlelib/idle_test/test_pyparse.py b/Lib/idlelib/idle_test/test_pyparse.py index f21baf7534420..fb5726db1d821 100644 --- a/Lib/idlelib/idle_test/test_pyparse.py +++ b/Lib/idlelib/idle_test/test_pyparse.py @@ -73,11 +73,12 @@ def char_in_string_false(index): return False # Split def across lines. setcode('"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a,\n' ' b=True):\n' ' pass\n' ) + pos0, pos = 33, 42 # Start of 'class...', ' def' lines. # Passing no value or non-callable should fail (issue 32989). with self.assertRaises(TypeError): @@ -91,40 +92,41 @@ def char_in_string_false(index): return False # Make all text look like it's not in a string. This means that it # found a good start position. - eq(start(char_in_string_false), 44) + eq(start(char_in_string_false), pos) # If the beginning of the def line is not in a string, then it # returns that as the index. - eq(start(is_char_in_string=lambda index: index > 44), 44) + eq(start(is_char_in_string=lambda index: index > pos), pos) # If the beginning of the def line is in a string, then it # looks for a previous index. - eq(start(is_char_in_string=lambda index: index >= 44), 33) + eq(start(is_char_in_string=lambda index: index >= pos), pos0) # If everything before the 'def' is in a string, then returns None. # The non-continuation def line returns 44 (see below). - eq(start(is_char_in_string=lambda index: index < 44), None) + eq(start(is_char_in_string=lambda index: index < pos), None) # Code without extra line break in def line - mostly returns the same # values. setcode('"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a, b=True):\n' ' pass\n' - ) - eq(start(char_in_string_false), 44) - eq(start(is_char_in_string=lambda index: index > 44), 44) - eq(start(is_char_in_string=lambda index: index >= 44), 33) + ) # Does not affect class, def positions. + eq(start(char_in_string_false), pos) + eq(start(is_char_in_string=lambda index: index > pos), pos) + eq(start(is_char_in_string=lambda index: index >= pos), pos0) # When the def line isn't split, this returns which doesn't match the # split line test. - eq(start(is_char_in_string=lambda index: index < 44), 44) + eq(start(is_char_in_string=lambda index: index < pos), pos) def test_set_lo(self): code = ( '"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a,\n' ' b=True):\n' ' pass\n' ) + pos = 42 p = self.parser p.set_code(code) @@ -137,8 +139,8 @@ def test_set_lo(self): self.assertEqual(p.code, code) # An index that is preceded by a newline. - p.set_lo(44) - self.assertEqual(p.code, code[44:]) + p.set_lo(pos) + self.assertEqual(p.code, code[pos:]) def test_study1(self): eq = self.assertEqual diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index aa8cbd36c4792..8efcf048fa3aa 100644 --- a/Lib/idlelib/rpc.py +++ b/Lib/idlelib/rpc.py @@ -125,7 +125,7 @@ def handle_error(self, request, client_address): response_queue = queue.Queue(0) -class SocketIO(object): +class SocketIO: nextseq = 0 @@ -486,7 +486,7 @@ def EOFhook(self): #----------------- end class SocketIO -------------------- -class RemoteObject(object): +class RemoteObject: # Token mix-in class pass @@ -497,7 +497,7 @@ def remoteref(obj): return RemoteProxy(oid) -class RemoteProxy(object): +class RemoteProxy: def __init__(self, oid): self.oid = oid @@ -547,7 +547,7 @@ def get_remote_proxy(self, oid): return RPCProxy(self, oid) -class RPCProxy(object): +class RPCProxy: __methods = None __attributes = None @@ -596,7 +596,7 @@ def _getattributes(obj, attributes): attributes[name] = 1 -class MethodProxy(object): +class MethodProxy: def __init__(self, sockio, oid, name): self.sockio = sockio diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 1e84ecc6584ef..ec575c3d48363 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -538,7 +538,7 @@ def decode_interrupthook(self): thread.interrupt_main() -class Executive(object): +class Executive: def __init__(self, rpchandler): self.rpchandler = rpchandler diff --git a/Lib/idlelib/tooltip.py b/Lib/idlelib/tooltip.py index 69658264dbd4a..d714318dae8ef 100644 --- a/Lib/idlelib/tooltip.py +++ b/Lib/idlelib/tooltip.py @@ -7,7 +7,7 @@ from tkinter import * -class TooltipBase(object): +class TooltipBase: """abstract base class for tooltips""" def __init__(self, anchor_widget): From webhook-mailer at python.org Sun Jan 24 17:16:33 2021 From: webhook-mailer at python.org (terryjreedy) Date: Sun, 24 Jan 2021 22:16:33 -0000 Subject: [Python-checkins] bpo-43013: Update idlelib code to 3.x (GH-24315) (#24317) Message-ID: https://github.com/python/cpython/commit/63ebba0d9430a0bc18fd8551ad27b9b25709a4be commit: 63ebba0d9430a0bc18fd8551ad27b9b25709a4be branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: terryjreedy date: 2021-01-24T17:16:03-05:00 summary: bpo-43013: Update idlelib code to 3.x (GH-24315) (#24317) Remove 9 remaining '(object)' occurrences in class headers in idlelib and 25 '()' occurrences in idlelib.idle_test class headers. (cherry picked from commit 8dfe15625e6ea4357a13fec7989a0e6ba2bf1359) Co-authored-by: Terry Jan Reedy files: M Lib/idlelib/editor.py M Lib/idlelib/idle_test/test_autocomplete.py M Lib/idlelib/idle_test/test_calltip.py M Lib/idlelib/idle_test/test_codecontext.py M Lib/idlelib/idle_test/test_format.py M Lib/idlelib/idle_test/test_help_about.py M Lib/idlelib/idle_test/test_pyparse.py M Lib/idlelib/rpc.py M Lib/idlelib/run.py M Lib/idlelib/tooltip.py diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index a178eaf93c013..a4d0c95362fa9 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -46,7 +46,7 @@ def _sphinx_version(): return release -class EditorWindow(object): +class EditorWindow: from idlelib.percolator import Percolator from idlelib.colorizer import ColorDelegator, color_config from idlelib.undo import UndoDelegator @@ -1546,7 +1546,7 @@ def get_line_indent(line, tabwidth): return m.end(), len(m.group().expandtabs(tabwidth)) -class IndentSearcher(object): +class IndentSearcher: # .run() chews over the Text widget, looking for a block opener # and the stmt following it. Returns a pair, diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py index 9c113bd893f13..642bb5db64dc3 100644 --- a/Lib/idlelib/idle_test/test_autocomplete.py +++ b/Lib/idlelib/idle_test/test_autocomplete.py @@ -195,7 +195,7 @@ def test_open_completions_none(self): self.assertFalse(acp.open_completions(ac.TAB)) self.text.delete('1.0', 'end') - class dummy_acw(): + class dummy_acw: __init__ = Func() show_window = Func(result=False) hide_window = Func() diff --git a/Lib/idlelib/idle_test/test_calltip.py b/Lib/idlelib/idle_test/test_calltip.py index a76829f3656c8..b23915c5ab784 100644 --- a/Lib/idlelib/idle_test/test_calltip.py +++ b/Lib/idlelib/idle_test/test_calltip.py @@ -10,7 +10,7 @@ # Test Class TC is used in multiple get_argspec test methods -class TC(): +class TC: 'doc' tip = "(ai=None, *b)" def __init__(self, ai=None, *b): 'doc' @@ -268,7 +268,7 @@ def test_good_entity(self): # open_calltip is about half the code; the others are fairly trivial. # The default mocks are what are needed for open_calltip. -class mock_Shell(): +class mock_Shell: "Return mock sufficient to pass to hyperparser." def __init__(self, text): text.tag_prevrange = Mock(return_value=None) diff --git a/Lib/idlelib/idle_test/test_codecontext.py b/Lib/idlelib/idle_test/test_codecontext.py index 9578cc731a6f9..6969ad73b01a8 100644 --- a/Lib/idlelib/idle_test/test_codecontext.py +++ b/Lib/idlelib/idle_test/test_codecontext.py @@ -20,7 +20,7 @@ } code_sample = """\ -class C1(): +class C1: # Class comment. def __init__(self, a, b): self.a = a @@ -178,29 +178,29 @@ def test_get_context(self): with self.assertRaises(AssertionError): gc(1, stopline=0) - eq(gc(3), ([(2, 0, 'class C1():', 'class')], 0)) + eq(gc(3), ([(2, 0, 'class C1:', 'class')], 0)) # Don't return comment. - eq(gc(4), ([(2, 0, 'class C1():', 'class')], 0)) + eq(gc(4), ([(2, 0, 'class C1:', 'class')], 0)) # Two indentation levels and no comment. - eq(gc(5), ([(2, 0, 'class C1():', 'class'), + eq(gc(5), ([(2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')], 0)) # Only one 'def' is returned, not both at the same indent level. - eq(gc(10), ([(2, 0, 'class C1():', 'class'), + eq(gc(10), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if')], 0)) # With 'elif', also show the 'if' even though it's at the same level. - eq(gc(11), ([(2, 0, 'class C1():', 'class'), + eq(gc(11), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')], 0)) # Set stop_line to not go back to first line in source code. # Return includes stop_line. - eq(gc(11, stopline=2), ([(2, 0, 'class C1():', 'class'), + eq(gc(11, stopline=2), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')], 0)) @@ -240,37 +240,37 @@ def test_update_code_context(self): # Scroll down to line 2. cc.text.yview(2) cc.update_code_context() - eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1():', 'class')]) + eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1:', 'class')]) eq(cc.topvisible, 3) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():') + eq(cc.context.get('1.0', 'end-1c'), 'class C1:') # Scroll down to line 3. Since it's a comment, nothing changes. cc.text.yview(3) cc.update_code_context() - eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1():', 'class')]) + eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1:', 'class')]) eq(cc.topvisible, 4) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():') + eq(cc.context.get('1.0', 'end-1c'), 'class C1:') # Scroll down to line 4. cc.text.yview(4) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')]) eq(cc.topvisible, 5) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def __init__(self, a, b):') # Scroll down to line 11. Last 'def' is removed. cc.text.yview(11) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')]) eq(cc.topvisible, 12) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def compare(self):\n' ' if a > b:\n' ' elif a < b:') @@ -279,12 +279,12 @@ def test_update_code_context(self): cc.update_code_context() cc.context_depth = 1 eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')]) eq(cc.topvisible, 12) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def compare(self):\n' ' if a > b:\n' ' elif a < b:') @@ -293,7 +293,7 @@ def test_update_code_context(self): cc.text.yview(5) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')]) eq(cc.topvisible, 6) # context_depth is 1. @@ -440,7 +440,7 @@ def test_get_line_info(self): # Line 1 is not a BLOCKOPENER. eq(gli(lines[0]), (codecontext.INFINITY, '', False)) # Line 2 is a BLOCKOPENER without an indent. - eq(gli(lines[1]), (0, 'class C1():', 'class')) + eq(gli(lines[1]), (0, 'class C1:', 'class')) # Line 3 is not a BLOCKOPENER and does not return the indent level. eq(gli(lines[2]), (codecontext.INFINITY, ' # Class comment.', False)) # Line 4 is a BLOCKOPENER and is indented. diff --git a/Lib/idlelib/idle_test/test_format.py b/Lib/idlelib/idle_test/test_format.py index a79bb515089e7..e5e903688597a 100644 --- a/Lib/idlelib/idle_test/test_format.py +++ b/Lib/idlelib/idle_test/test_format.py @@ -418,7 +418,7 @@ def tearDown(self): code_sample = """\ # WS line needed for test. -class C1(): +class C1: # Class comment. def __init__(self, a, b): self.a = a diff --git a/Lib/idlelib/idle_test/test_help_about.py b/Lib/idlelib/idle_test/test_help_about.py index 7c148d23a135b..b915535acac0c 100644 --- a/Lib/idlelib/idle_test/test_help_about.py +++ b/Lib/idlelib/idle_test/test_help_about.py @@ -134,7 +134,7 @@ def test_close(self): self.dialog.winfo_class() -class Dummy_about_dialog(): +class Dummy_about_dialog: # Dummy class for testing file display functions. idle_credits = About.show_idle_credits idle_readme = About.show_readme diff --git a/Lib/idlelib/idle_test/test_pyparse.py b/Lib/idlelib/idle_test/test_pyparse.py index f21baf7534420..fb5726db1d821 100644 --- a/Lib/idlelib/idle_test/test_pyparse.py +++ b/Lib/idlelib/idle_test/test_pyparse.py @@ -73,11 +73,12 @@ def char_in_string_false(index): return False # Split def across lines. setcode('"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a,\n' ' b=True):\n' ' pass\n' ) + pos0, pos = 33, 42 # Start of 'class...', ' def' lines. # Passing no value or non-callable should fail (issue 32989). with self.assertRaises(TypeError): @@ -91,40 +92,41 @@ def char_in_string_false(index): return False # Make all text look like it's not in a string. This means that it # found a good start position. - eq(start(char_in_string_false), 44) + eq(start(char_in_string_false), pos) # If the beginning of the def line is not in a string, then it # returns that as the index. - eq(start(is_char_in_string=lambda index: index > 44), 44) + eq(start(is_char_in_string=lambda index: index > pos), pos) # If the beginning of the def line is in a string, then it # looks for a previous index. - eq(start(is_char_in_string=lambda index: index >= 44), 33) + eq(start(is_char_in_string=lambda index: index >= pos), pos0) # If everything before the 'def' is in a string, then returns None. # The non-continuation def line returns 44 (see below). - eq(start(is_char_in_string=lambda index: index < 44), None) + eq(start(is_char_in_string=lambda index: index < pos), None) # Code without extra line break in def line - mostly returns the same # values. setcode('"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a, b=True):\n' ' pass\n' - ) - eq(start(char_in_string_false), 44) - eq(start(is_char_in_string=lambda index: index > 44), 44) - eq(start(is_char_in_string=lambda index: index >= 44), 33) + ) # Does not affect class, def positions. + eq(start(char_in_string_false), pos) + eq(start(is_char_in_string=lambda index: index > pos), pos) + eq(start(is_char_in_string=lambda index: index >= pos), pos0) # When the def line isn't split, this returns which doesn't match the # split line test. - eq(start(is_char_in_string=lambda index: index < 44), 44) + eq(start(is_char_in_string=lambda index: index < pos), pos) def test_set_lo(self): code = ( '"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a,\n' ' b=True):\n' ' pass\n' ) + pos = 42 p = self.parser p.set_code(code) @@ -137,8 +139,8 @@ def test_set_lo(self): self.assertEqual(p.code, code) # An index that is preceded by a newline. - p.set_lo(44) - self.assertEqual(p.code, code[44:]) + p.set_lo(pos) + self.assertEqual(p.code, code[pos:]) def test_study1(self): eq = self.assertEqual diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index aa8cbd36c4792..8efcf048fa3aa 100644 --- a/Lib/idlelib/rpc.py +++ b/Lib/idlelib/rpc.py @@ -125,7 +125,7 @@ def handle_error(self, request, client_address): response_queue = queue.Queue(0) -class SocketIO(object): +class SocketIO: nextseq = 0 @@ -486,7 +486,7 @@ def EOFhook(self): #----------------- end class SocketIO -------------------- -class RemoteObject(object): +class RemoteObject: # Token mix-in class pass @@ -497,7 +497,7 @@ def remoteref(obj): return RemoteProxy(oid) -class RemoteProxy(object): +class RemoteProxy: def __init__(self, oid): self.oid = oid @@ -547,7 +547,7 @@ def get_remote_proxy(self, oid): return RPCProxy(self, oid) -class RPCProxy(object): +class RPCProxy: __methods = None __attributes = None @@ -596,7 +596,7 @@ def _getattributes(obj, attributes): attributes[name] = 1 -class MethodProxy(object): +class MethodProxy: def __init__(self, sockio, oid, name): self.sockio = sockio diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 1e84ecc6584ef..ec575c3d48363 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -538,7 +538,7 @@ def decode_interrupthook(self): thread.interrupt_main() -class Executive(object): +class Executive: def __init__(self, rpchandler): self.rpchandler = rpchandler diff --git a/Lib/idlelib/tooltip.py b/Lib/idlelib/tooltip.py index 69658264dbd4a..d714318dae8ef 100644 --- a/Lib/idlelib/tooltip.py +++ b/Lib/idlelib/tooltip.py @@ -7,7 +7,7 @@ from tkinter import * -class TooltipBase(object): +class TooltipBase: """abstract base class for tooltips""" def __init__(self, anchor_widget): From webhook-mailer at python.org Sun Jan 24 18:36:37 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 24 Jan 2021 23:36:37 -0000 Subject: [Python-checkins] bpo-43013: Update idlelib code to 3.x (GH-24315) Message-ID: https://github.com/python/cpython/commit/ff06957710aa849f3402b082a7ddd34b0325d6de commit: ff06957710aa849f3402b082a7ddd34b0325d6de 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-24T15:36:02-08:00 summary: bpo-43013: Update idlelib code to 3.x (GH-24315) Remove 9 remaining '(object)' occurrences in class headers in idlelib and 25 '()' occurrences in idlelib.idle_test class headers. (cherry picked from commit 8dfe15625e6ea4357a13fec7989a0e6ba2bf1359) Co-authored-by: Terry Jan Reedy files: M Lib/idlelib/editor.py M Lib/idlelib/idle_test/test_autocomplete.py M Lib/idlelib/idle_test/test_calltip.py M Lib/idlelib/idle_test/test_codecontext.py M Lib/idlelib/idle_test/test_format.py M Lib/idlelib/idle_test/test_help_about.py M Lib/idlelib/idle_test/test_pyparse.py M Lib/idlelib/rpc.py M Lib/idlelib/run.py M Lib/idlelib/tooltip.py diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index a178eaf93c013..a4d0c95362fa9 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -46,7 +46,7 @@ def _sphinx_version(): return release -class EditorWindow(object): +class EditorWindow: from idlelib.percolator import Percolator from idlelib.colorizer import ColorDelegator, color_config from idlelib.undo import UndoDelegator @@ -1546,7 +1546,7 @@ def get_line_indent(line, tabwidth): return m.end(), len(m.group().expandtabs(tabwidth)) -class IndentSearcher(object): +class IndentSearcher: # .run() chews over the Text widget, looking for a block opener # and the stmt following it. Returns a pair, diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py index 9c113bd893f13..642bb5db64dc3 100644 --- a/Lib/idlelib/idle_test/test_autocomplete.py +++ b/Lib/idlelib/idle_test/test_autocomplete.py @@ -195,7 +195,7 @@ def test_open_completions_none(self): self.assertFalse(acp.open_completions(ac.TAB)) self.text.delete('1.0', 'end') - class dummy_acw(): + class dummy_acw: __init__ = Func() show_window = Func(result=False) hide_window = Func() diff --git a/Lib/idlelib/idle_test/test_calltip.py b/Lib/idlelib/idle_test/test_calltip.py index a76829f3656c8..b23915c5ab784 100644 --- a/Lib/idlelib/idle_test/test_calltip.py +++ b/Lib/idlelib/idle_test/test_calltip.py @@ -10,7 +10,7 @@ # Test Class TC is used in multiple get_argspec test methods -class TC(): +class TC: 'doc' tip = "(ai=None, *b)" def __init__(self, ai=None, *b): 'doc' @@ -268,7 +268,7 @@ def test_good_entity(self): # open_calltip is about half the code; the others are fairly trivial. # The default mocks are what are needed for open_calltip. -class mock_Shell(): +class mock_Shell: "Return mock sufficient to pass to hyperparser." def __init__(self, text): text.tag_prevrange = Mock(return_value=None) diff --git a/Lib/idlelib/idle_test/test_codecontext.py b/Lib/idlelib/idle_test/test_codecontext.py index 9578cc731a6f9..6969ad73b01a8 100644 --- a/Lib/idlelib/idle_test/test_codecontext.py +++ b/Lib/idlelib/idle_test/test_codecontext.py @@ -20,7 +20,7 @@ } code_sample = """\ -class C1(): +class C1: # Class comment. def __init__(self, a, b): self.a = a @@ -178,29 +178,29 @@ def test_get_context(self): with self.assertRaises(AssertionError): gc(1, stopline=0) - eq(gc(3), ([(2, 0, 'class C1():', 'class')], 0)) + eq(gc(3), ([(2, 0, 'class C1:', 'class')], 0)) # Don't return comment. - eq(gc(4), ([(2, 0, 'class C1():', 'class')], 0)) + eq(gc(4), ([(2, 0, 'class C1:', 'class')], 0)) # Two indentation levels and no comment. - eq(gc(5), ([(2, 0, 'class C1():', 'class'), + eq(gc(5), ([(2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')], 0)) # Only one 'def' is returned, not both at the same indent level. - eq(gc(10), ([(2, 0, 'class C1():', 'class'), + eq(gc(10), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if')], 0)) # With 'elif', also show the 'if' even though it's at the same level. - eq(gc(11), ([(2, 0, 'class C1():', 'class'), + eq(gc(11), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')], 0)) # Set stop_line to not go back to first line in source code. # Return includes stop_line. - eq(gc(11, stopline=2), ([(2, 0, 'class C1():', 'class'), + eq(gc(11, stopline=2), ([(2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')], 0)) @@ -240,37 +240,37 @@ def test_update_code_context(self): # Scroll down to line 2. cc.text.yview(2) cc.update_code_context() - eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1():', 'class')]) + eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1:', 'class')]) eq(cc.topvisible, 3) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():') + eq(cc.context.get('1.0', 'end-1c'), 'class C1:') # Scroll down to line 3. Since it's a comment, nothing changes. cc.text.yview(3) cc.update_code_context() - eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1():', 'class')]) + eq(cc.info, [(0, -1, '', False), (2, 0, 'class C1:', 'class')]) eq(cc.topvisible, 4) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():') + eq(cc.context.get('1.0', 'end-1c'), 'class C1:') # Scroll down to line 4. cc.text.yview(4) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')]) eq(cc.topvisible, 5) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def __init__(self, a, b):') # Scroll down to line 11. Last 'def' is removed. cc.text.yview(11) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')]) eq(cc.topvisible, 12) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def compare(self):\n' ' if a > b:\n' ' elif a < b:') @@ -279,12 +279,12 @@ def test_update_code_context(self): cc.update_code_context() cc.context_depth = 1 eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (7, 4, ' def compare(self):', 'def'), (8, 8, ' if a > b:', 'if'), (10, 8, ' elif a < b:', 'elif')]) eq(cc.topvisible, 12) - eq(cc.context.get('1.0', 'end-1c'), 'class C1():\n' + eq(cc.context.get('1.0', 'end-1c'), 'class C1:\n' ' def compare(self):\n' ' if a > b:\n' ' elif a < b:') @@ -293,7 +293,7 @@ def test_update_code_context(self): cc.text.yview(5) cc.update_code_context() eq(cc.info, [(0, -1, '', False), - (2, 0, 'class C1():', 'class'), + (2, 0, 'class C1:', 'class'), (4, 4, ' def __init__(self, a, b):', 'def')]) eq(cc.topvisible, 6) # context_depth is 1. @@ -440,7 +440,7 @@ def test_get_line_info(self): # Line 1 is not a BLOCKOPENER. eq(gli(lines[0]), (codecontext.INFINITY, '', False)) # Line 2 is a BLOCKOPENER without an indent. - eq(gli(lines[1]), (0, 'class C1():', 'class')) + eq(gli(lines[1]), (0, 'class C1:', 'class')) # Line 3 is not a BLOCKOPENER and does not return the indent level. eq(gli(lines[2]), (codecontext.INFINITY, ' # Class comment.', False)) # Line 4 is a BLOCKOPENER and is indented. diff --git a/Lib/idlelib/idle_test/test_format.py b/Lib/idlelib/idle_test/test_format.py index a79bb515089e7..e5e903688597a 100644 --- a/Lib/idlelib/idle_test/test_format.py +++ b/Lib/idlelib/idle_test/test_format.py @@ -418,7 +418,7 @@ def tearDown(self): code_sample = """\ # WS line needed for test. -class C1(): +class C1: # Class comment. def __init__(self, a, b): self.a = a diff --git a/Lib/idlelib/idle_test/test_help_about.py b/Lib/idlelib/idle_test/test_help_about.py index 7c148d23a135b..b915535acac0c 100644 --- a/Lib/idlelib/idle_test/test_help_about.py +++ b/Lib/idlelib/idle_test/test_help_about.py @@ -134,7 +134,7 @@ def test_close(self): self.dialog.winfo_class() -class Dummy_about_dialog(): +class Dummy_about_dialog: # Dummy class for testing file display functions. idle_credits = About.show_idle_credits idle_readme = About.show_readme diff --git a/Lib/idlelib/idle_test/test_pyparse.py b/Lib/idlelib/idle_test/test_pyparse.py index f21baf7534420..fb5726db1d821 100644 --- a/Lib/idlelib/idle_test/test_pyparse.py +++ b/Lib/idlelib/idle_test/test_pyparse.py @@ -73,11 +73,12 @@ def char_in_string_false(index): return False # Split def across lines. setcode('"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a,\n' ' b=True):\n' ' pass\n' ) + pos0, pos = 33, 42 # Start of 'class...', ' def' lines. # Passing no value or non-callable should fail (issue 32989). with self.assertRaises(TypeError): @@ -91,40 +92,41 @@ def char_in_string_false(index): return False # Make all text look like it's not in a string. This means that it # found a good start position. - eq(start(char_in_string_false), 44) + eq(start(char_in_string_false), pos) # If the beginning of the def line is not in a string, then it # returns that as the index. - eq(start(is_char_in_string=lambda index: index > 44), 44) + eq(start(is_char_in_string=lambda index: index > pos), pos) # If the beginning of the def line is in a string, then it # looks for a previous index. - eq(start(is_char_in_string=lambda index: index >= 44), 33) + eq(start(is_char_in_string=lambda index: index >= pos), pos0) # If everything before the 'def' is in a string, then returns None. # The non-continuation def line returns 44 (see below). - eq(start(is_char_in_string=lambda index: index < 44), None) + eq(start(is_char_in_string=lambda index: index < pos), None) # Code without extra line break in def line - mostly returns the same # values. setcode('"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a, b=True):\n' ' pass\n' - ) - eq(start(char_in_string_false), 44) - eq(start(is_char_in_string=lambda index: index > 44), 44) - eq(start(is_char_in_string=lambda index: index >= 44), 33) + ) # Does not affect class, def positions. + eq(start(char_in_string_false), pos) + eq(start(is_char_in_string=lambda index: index > pos), pos) + eq(start(is_char_in_string=lambda index: index >= pos), pos0) # When the def line isn't split, this returns which doesn't match the # split line test. - eq(start(is_char_in_string=lambda index: index < 44), 44) + eq(start(is_char_in_string=lambda index: index < pos), pos) def test_set_lo(self): code = ( '"""This is a module docstring"""\n' - 'class C():\n' + 'class C:\n' ' def __init__(self, a,\n' ' b=True):\n' ' pass\n' ) + pos = 42 p = self.parser p.set_code(code) @@ -137,8 +139,8 @@ def test_set_lo(self): self.assertEqual(p.code, code) # An index that is preceded by a newline. - p.set_lo(44) - self.assertEqual(p.code, code[44:]) + p.set_lo(pos) + self.assertEqual(p.code, code[pos:]) def test_study1(self): eq = self.assertEqual diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index aa8cbd36c4792..8efcf048fa3aa 100644 --- a/Lib/idlelib/rpc.py +++ b/Lib/idlelib/rpc.py @@ -125,7 +125,7 @@ def handle_error(self, request, client_address): response_queue = queue.Queue(0) -class SocketIO(object): +class SocketIO: nextseq = 0 @@ -486,7 +486,7 @@ def EOFhook(self): #----------------- end class SocketIO -------------------- -class RemoteObject(object): +class RemoteObject: # Token mix-in class pass @@ -497,7 +497,7 @@ def remoteref(obj): return RemoteProxy(oid) -class RemoteProxy(object): +class RemoteProxy: def __init__(self, oid): self.oid = oid @@ -547,7 +547,7 @@ def get_remote_proxy(self, oid): return RPCProxy(self, oid) -class RPCProxy(object): +class RPCProxy: __methods = None __attributes = None @@ -596,7 +596,7 @@ def _getattributes(obj, attributes): attributes[name] = 1 -class MethodProxy(object): +class MethodProxy: def __init__(self, sockio, oid, name): self.sockio = sockio diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 1e84ecc6584ef..ec575c3d48363 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -538,7 +538,7 @@ def decode_interrupthook(self): thread.interrupt_main() -class Executive(object): +class Executive: def __init__(self, rpchandler): self.rpchandler = rpchandler diff --git a/Lib/idlelib/tooltip.py b/Lib/idlelib/tooltip.py index 69658264dbd4a..d714318dae8ef 100644 --- a/Lib/idlelib/tooltip.py +++ b/Lib/idlelib/tooltip.py @@ -7,7 +7,7 @@ from tkinter import * -class TooltipBase(object): +class TooltipBase: """abstract base class for tooltips""" def __init__(self, anchor_widget): From webhook-mailer at python.org Mon Jan 25 04:46:03 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Mon, 25 Jan 2021 09:46:03 -0000 Subject: [Python-checkins] [3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318) Message-ID: https://github.com/python/cpython/commit/3d5434d5cbc945c58be663e3dbd5ef4875677b7a commit: 3d5434d5cbc945c58be663e3dbd5ef4875677b7a branch: 3.9 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-25T11:45:30+02:00 summary: [3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318) (cherry picked from commit 6713e869c4989c04318158b406c30a147ea52904) Co-authored-by: Cheryl Sabella files: A Lib/tkinter/test/test_tkinter/test_colorchooser.py A Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst M Lib/tkinter/__init__.py M Lib/tkinter/colorchooser.py M Lib/tkinter/test/test_tkinter/test_misc.py diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 98e95ad44866f..f15f6c5e57a50 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -1160,8 +1160,7 @@ def winfo_reqwidth(self): self.tk.call('winfo', 'reqwidth', self._w)) def winfo_rgb(self, color): - """Return tuple of decimal values for red, green, blue for - COLOR in this widget.""" + """Return a tuple of integer RGB values in range(65536) for color in this widget.""" return self._getints( self.tk.call('winfo', 'rgb', self._w, color)) diff --git a/Lib/tkinter/colorchooser.py b/Lib/tkinter/colorchooser.py index 3cfc06f6f1fae..e2fb69dba9276 100644 --- a/Lib/tkinter/colorchooser.py +++ b/Lib/tkinter/colorchooser.py @@ -8,57 +8,69 @@ # fixed initialcolor handling in August 1998 # -# -# options (all have default values): -# -# - initialcolor: color to mark as selected when dialog is displayed -# (given as an RGB triplet or a Tk color string) -# -# - parent: which window to place the dialog on top of -# -# - title: dialog title -# from tkinter.commondialog import Dialog __all__ = ["Chooser", "askcolor"] -# -# color chooser class - class Chooser(Dialog): - "Ask for a color" + """Create a dialog for the tk_chooseColor command. + + Args: + master: The master widget for this dialog. If not provided, + defaults to options['parent'] (if defined). + options: Dictionary of options for the tk_chooseColor call. + initialcolor: Specifies the selected color when the + dialog is first displayed. This can be a tk color + string or a 3-tuple of ints in the range (0, 255) + for an RGB triplet. + parent: The parent window of the color dialog. The + color dialog is displayed on top of this. + title: A string for the title of the dialog box. + """ command = "tk_chooseColor" def _fixoptions(self): + """Ensure initialcolor is a tk color string. + + Convert initialcolor from a RGB triplet to a color string. + """ try: - # make sure initialcolor is a tk color string color = self.options["initialcolor"] if isinstance(color, tuple): - # assume an RGB triplet + # Assume an RGB triplet. self.options["initialcolor"] = "#%02x%02x%02x" % color except KeyError: pass def _fixresult(self, widget, result): - # result can be somethings: an empty tuple, an empty string or - # a Tcl_Obj, so this somewhat weird check handles that + """Adjust result returned from call to tk_chooseColor. + + Return both an RGB tuple of ints in the range (0, 255) and the + tk color string in the form #rrggbb. + """ + # Result can be many things: an empty tuple, an empty string, or + # a _tkinter.Tcl_Obj, so this somewhat weird check handles that. if not result or not str(result): - return None, None # canceled + return None, None # canceled - # to simplify application code, the color chooser returns - # an RGB tuple together with the Tk color string + # To simplify application code, the color chooser returns + # an RGB tuple together with the Tk color string. r, g, b = widget.winfo_rgb(result) - return (r/256, g/256, b/256), str(result) + return (r//256, g//256, b//256), str(result) # # convenience stuff -def askcolor(color = None, **options): - "Ask for a color" +def askcolor(color=None, **options): + """Display dialog window for selection of a color. + + Convenience wrapper for the Chooser class. Displays the color + chooser dialog with color as the initial value. + """ if color: options = options.copy() diff --git a/Lib/tkinter/test/test_tkinter/test_colorchooser.py b/Lib/tkinter/test/test_tkinter/test_colorchooser.py new file mode 100644 index 0000000000000..4798bc9c26fc0 --- /dev/null +++ b/Lib/tkinter/test/test_tkinter/test_colorchooser.py @@ -0,0 +1,43 @@ +import unittest +import tkinter +from test.support import requires, run_unittest, swap_attr +from tkinter.test.support import AbstractTkTest +from tkinter import colorchooser + +requires('gui') + + +class ChooserTest(AbstractTkTest, unittest.TestCase): + + @classmethod + def setUpClass(cls): + AbstractTkTest.setUpClass.__func__(cls) + cls.cc = colorchooser.Chooser(initialcolor='dark blue slate') + + def test_fixoptions(self): + cc = self.cc + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], 'dark blue slate') + + cc.options['initialcolor'] = '#D2D269691E1E' + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], '#D2D269691E1E') + + cc.options['initialcolor'] = (210, 105, 30) + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], '#d2691e') + + def test_fixresult(self): + cc = self.cc + self.assertEqual(cc._fixresult(self.root, ()), (None, None)) + self.assertEqual(cc._fixresult(self.root, ''), (None, None)) + self.assertEqual(cc._fixresult(self.root, 'chocolate'), + ((210, 105, 30), 'chocolate')) + self.assertEqual(cc._fixresult(self.root, '#4a3c8c'), + ((74, 60, 140), '#4a3c8c')) + + +tests_gui = (ChooserTest,) + +if __name__ == "__main__": + run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index 585d81ddf9f2d..f6e5b4db1ae1f 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -192,6 +192,26 @@ def test_clipboard_astral(self): with self.assertRaises(tkinter.TclError): root.clipboard_get() + def test_winfo_rgb(self): + root = self.root + rgb = root.winfo_rgb + + # Color name. + self.assertEqual(rgb('red'), (65535, 0, 0)) + self.assertEqual(rgb('dark slate blue'), (18504, 15677, 35723)) + # #RGB - extends each 4-bit hex value to be 16-bit. + self.assertEqual(rgb('#F0F'), (0xFFFF, 0x0000, 0xFFFF)) + # #RRGGBB - extends each 8-bit hex value to be 16-bit. + self.assertEqual(rgb('#4a3c8c'), (0x4a4a, 0x3c3c, 0x8c8c)) + # #RRRRGGGGBBBB + self.assertEqual(rgb('#dede14143939'), (0xdede, 0x1414, 0x3939)) + # Invalid string. + with self.assertRaises(tkinter.TclError): + rgb('#123456789a') + # RGB triplet is invalid input. + with self.assertRaises(tkinter.TclError): + rgb((111, 78, 55)) + def test_event_repr_defaults(self): e = tkinter.Event() e.serial = 12345 diff --git a/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst b/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst new file mode 100644 index 0000000000000..52d9ac9dd902c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst @@ -0,0 +1,2 @@ +Correct call to :mod:`tkinter.colorchooser` to return RGB triplet of ints +instead of floats. Patch by Cheryl Sabella. From webhook-mailer at python.org Mon Jan 25 04:56:56 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Mon, 25 Jan 2021 09:56:56 -0000 Subject: [Python-checkins] bpo-27772: Make preceding width with 0 valid in string format. (GH-11270) Message-ID: https://github.com/python/cpython/commit/cf19cc3b920ca5995e1c202d2c3dd7a59ac8eac8 commit: cf19cc3b920ca5995e1c202d2c3dd7a59ac8eac8 branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-25T11:56:33+02:00 summary: bpo-27772: Make preceding width with 0 valid in string format. (GH-11270) Previously it was an error with confusing error message. files: A Misc/NEWS.d/next/Core and Builtins/2018-12-20-23-59-23.bpo-27772.idHEcj.rst M Doc/library/string.rst M Lib/test/test_unicode.py M Python/formatter_unicode.c diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 54786d0c2ab0d..1bfd518349b38 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -347,8 +347,8 @@ The meaning of the various alignment options is as follows: | ``'='`` | Forces the padding to be placed after the sign (if any) | | | but before the digits. This is used for printing fields | | | in the form '+000000120'. This alignment option is only | - | | valid for numeric types. It becomes the default when '0'| - | | immediately precedes the field width. | + | | valid for numeric types. It becomes the default for | + | | numbers when '0' immediately precedes the field width. | +---------+----------------------------------------------------------+ | ``'^'`` | Forces the field to be centered within the available | | | space. | @@ -424,6 +424,10 @@ When no explicit alignment is given, preceding the *width* field by a zero sign-aware zero-padding for numeric types. This is equivalent to a *fill* character of ``'0'`` with an *alignment* type of ``'='``. +.. versionchanged:: 3.10 + Preceding the *width* field by ``'0'`` no longer affects the default + alignment for strings. + The *precision* is a decimal number indicating how many digits should be displayed after the decimal point for a floating point value formatted with ``'f'`` and ``'F'``, or before and after the decimal point for a floating point diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 4f5636e1426f4..df8f2c92b38f8 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -1098,6 +1098,12 @@ def __repr__(self): self.assertEqual('{0:^8s}'.format('result'), ' result ') self.assertEqual('{0:^9s}'.format('result'), ' result ') self.assertEqual('{0:^10s}'.format('result'), ' result ') + self.assertEqual('{0:8s}'.format('result'), 'result ') + self.assertEqual('{0:0s}'.format('result'), 'result') + self.assertEqual('{0:08s}'.format('result'), 'result00') + self.assertEqual('{0:<08s}'.format('result'), 'result00') + self.assertEqual('{0:>08s}'.format('result'), '00result') + self.assertEqual('{0:^08s}'.format('result'), '0result0') self.assertEqual('{0:10000}'.format('a'), 'a' + ' ' * 9999) self.assertEqual('{0:10000}'.format(''), ' ' * 10000) self.assertEqual('{0:10000000}'.format(''), ' ' * 10000000) diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-12-20-23-59-23.bpo-27772.idHEcj.rst b/Misc/NEWS.d/next/Core and Builtins/2018-12-20-23-59-23.bpo-27772.idHEcj.rst new file mode 100644 index 0000000000000..7345152fee356 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2018-12-20-23-59-23.bpo-27772.idHEcj.rst @@ -0,0 +1,2 @@ +In string formatting, preceding the *width* field by ``'0'`` no longer +affects the default alignment for strings. diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index ed95f267d476c..5ccf9d303e34e 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -219,7 +219,7 @@ parse_internal_render_format_spec(PyObject *format_spec, /* The special case for 0-padding (backwards compat) */ if (!fill_char_specified && end-pos >= 1 && READ_spec(pos) == '0') { format->fill_char = '0'; - if (!align_specified) { + if (!align_specified && default_align == '>') { format->align = '='; } ++pos; From webhook-mailer at python.org Mon Jan 25 05:03:04 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 25 Jan 2021 10:03:04 -0000 Subject: [Python-checkins] [3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318) Message-ID: https://github.com/python/cpython/commit/96bcf6f4d4bed1cdf97883eb43e872ff1a92013d commit: 96bcf6f4d4bed1cdf97883eb43e872ff1a92013d 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-25T02:02:52-08:00 summary: [3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318) (cherry picked from commit 6713e869c4989c04318158b406c30a147ea52904) Co-authored-by: Cheryl Sabella (cherry picked from commit 3d5434d5cbc945c58be663e3dbd5ef4875677b7a) Co-authored-by: Serhiy Storchaka files: A Lib/tkinter/test/test_tkinter/test_colorchooser.py A Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst M Lib/tkinter/__init__.py M Lib/tkinter/colorchooser.py M Lib/tkinter/test/test_tkinter/test_misc.py diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 91a6d56480e63..4955c9e002f15 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -1160,8 +1160,7 @@ def winfo_reqwidth(self): self.tk.call('winfo', 'reqwidth', self._w)) def winfo_rgb(self, color): - """Return tuple of decimal values for red, green, blue for - COLOR in this widget.""" + """Return a tuple of integer RGB values in range(65536) for color in this widget.""" return self._getints( self.tk.call('winfo', 'rgb', self._w, color)) diff --git a/Lib/tkinter/colorchooser.py b/Lib/tkinter/colorchooser.py index 9dc9671336408..5fd4c347f0602 100644 --- a/Lib/tkinter/colorchooser.py +++ b/Lib/tkinter/colorchooser.py @@ -8,55 +8,67 @@ # fixed initialcolor handling in August 1998 # -# -# options (all have default values): -# -# - initialcolor: color to mark as selected when dialog is displayed -# (given as an RGB triplet or a Tk color string) -# -# - parent: which window to place the dialog on top of -# -# - title: dialog title -# from tkinter.commondialog import Dialog -# -# color chooser class - class Chooser(Dialog): - "Ask for a color" + """Create a dialog for the tk_chooseColor command. + + Args: + master: The master widget for this dialog. If not provided, + defaults to options['parent'] (if defined). + options: Dictionary of options for the tk_chooseColor call. + initialcolor: Specifies the selected color when the + dialog is first displayed. This can be a tk color + string or a 3-tuple of ints in the range (0, 255) + for an RGB triplet. + parent: The parent window of the color dialog. The + color dialog is displayed on top of this. + title: A string for the title of the dialog box. + """ command = "tk_chooseColor" def _fixoptions(self): + """Ensure initialcolor is a tk color string. + + Convert initialcolor from a RGB triplet to a color string. + """ try: - # make sure initialcolor is a tk color string color = self.options["initialcolor"] if isinstance(color, tuple): - # assume an RGB triplet + # Assume an RGB triplet. self.options["initialcolor"] = "#%02x%02x%02x" % color except KeyError: pass def _fixresult(self, widget, result): - # result can be somethings: an empty tuple, an empty string or - # a Tcl_Obj, so this somewhat weird check handles that + """Adjust result returned from call to tk_chooseColor. + + Return both an RGB tuple of ints in the range (0, 255) and the + tk color string in the form #rrggbb. + """ + # Result can be many things: an empty tuple, an empty string, or + # a _tkinter.Tcl_Obj, so this somewhat weird check handles that. if not result or not str(result): - return None, None # canceled + return None, None # canceled - # to simplify application code, the color chooser returns - # an RGB tuple together with the Tk color string + # To simplify application code, the color chooser returns + # an RGB tuple together with the Tk color string. r, g, b = widget.winfo_rgb(result) - return (r/256, g/256, b/256), str(result) + return (r//256, g//256, b//256), str(result) # # convenience stuff -def askcolor(color = None, **options): - "Ask for a color" +def askcolor(color=None, **options): + """Display dialog window for selection of a color. + + Convenience wrapper for the Chooser class. Displays the color + chooser dialog with color as the initial value. + """ if color: options = options.copy() diff --git a/Lib/tkinter/test/test_tkinter/test_colorchooser.py b/Lib/tkinter/test/test_tkinter/test_colorchooser.py new file mode 100644 index 0000000000000..4798bc9c26fc0 --- /dev/null +++ b/Lib/tkinter/test/test_tkinter/test_colorchooser.py @@ -0,0 +1,43 @@ +import unittest +import tkinter +from test.support import requires, run_unittest, swap_attr +from tkinter.test.support import AbstractTkTest +from tkinter import colorchooser + +requires('gui') + + +class ChooserTest(AbstractTkTest, unittest.TestCase): + + @classmethod + def setUpClass(cls): + AbstractTkTest.setUpClass.__func__(cls) + cls.cc = colorchooser.Chooser(initialcolor='dark blue slate') + + def test_fixoptions(self): + cc = self.cc + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], 'dark blue slate') + + cc.options['initialcolor'] = '#D2D269691E1E' + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], '#D2D269691E1E') + + cc.options['initialcolor'] = (210, 105, 30) + cc._fixoptions() + self.assertEqual(cc.options['initialcolor'], '#d2691e') + + def test_fixresult(self): + cc = self.cc + self.assertEqual(cc._fixresult(self.root, ()), (None, None)) + self.assertEqual(cc._fixresult(self.root, ''), (None, None)) + self.assertEqual(cc._fixresult(self.root, 'chocolate'), + ((210, 105, 30), 'chocolate')) + self.assertEqual(cc._fixresult(self.root, '#4a3c8c'), + ((74, 60, 140), '#4a3c8c')) + + +tests_gui = (ChooserTest,) + +if __name__ == "__main__": + run_unittest(*tests_gui) diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index 49fb6b16de09e..2011e7f8ecdd7 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -178,6 +178,26 @@ def test_clipboard_astral(self): with self.assertRaises(tkinter.TclError): root.clipboard_get() + def test_winfo_rgb(self): + root = self.root + rgb = root.winfo_rgb + + # Color name. + self.assertEqual(rgb('red'), (65535, 0, 0)) + self.assertEqual(rgb('dark slate blue'), (18504, 15677, 35723)) + # #RGB - extends each 4-bit hex value to be 16-bit. + self.assertEqual(rgb('#F0F'), (0xFFFF, 0x0000, 0xFFFF)) + # #RRGGBB - extends each 8-bit hex value to be 16-bit. + self.assertEqual(rgb('#4a3c8c'), (0x4a4a, 0x3c3c, 0x8c8c)) + # #RRRRGGGGBBBB + self.assertEqual(rgb('#dede14143939'), (0xdede, 0x1414, 0x3939)) + # Invalid string. + with self.assertRaises(tkinter.TclError): + rgb('#123456789a') + # RGB triplet is invalid input. + with self.assertRaises(tkinter.TclError): + rgb((111, 78, 55)) + def test_event_repr_defaults(self): e = tkinter.Event() e.serial = 12345 diff --git a/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst b/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst new file mode 100644 index 0000000000000..52d9ac9dd902c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-23-13-44-10.bpo-33289.anBnUr.rst @@ -0,0 +1,2 @@ +Correct call to :mod:`tkinter.colorchooser` to return RGB triplet of ints +instead of floats. Patch by Cheryl Sabella. From webhook-mailer at python.org Mon Jan 25 06:33:55 2021 From: webhook-mailer at python.org (terryjreedy) Date: Mon, 25 Jan 2021 11:33:55 -0000 Subject: [Python-checkins] bpo-43013: Fix old tkinter module names in idlelib (GH-24326) Message-ID: https://github.com/python/cpython/commit/879986d8a932c4524cb6ff822afc9537de16e28d commit: 879986d8a932c4524cb6ff822afc9537de16e28d branch: master author: Terry Jan Reedy committer: terryjreedy date: 2021-01-25T06:33:18-05:00 summary: bpo-43013: Fix old tkinter module names in idlelib (GH-24326) Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and 'tkMessageBox' and remove 'tk'. Just lowercase 'tkFont' as 'font' is already used. Adjust import. files: M Lib/idlelib/configdialog.py M Lib/idlelib/editor.py M Lib/idlelib/filelist.py M Lib/idlelib/idle_test/mock_tk.py M Lib/idlelib/idle_test/test_configdialog.py M Lib/idlelib/idle_test/test_replace.py M Lib/idlelib/idle_test/test_searchengine.py M Lib/idlelib/idle_test/test_squeezer.py M Lib/idlelib/iomenu.py M Lib/idlelib/pyshell.py M Lib/idlelib/runscript.py M Lib/idlelib/searchengine.py M Lib/idlelib/squeezer.py diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index 73e64852c69df..c52a04b503adb 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -18,8 +18,8 @@ HORIZONTAL, VERTICAL, ANCHOR, ACTIVE, END) from tkinter.ttk import (Frame, LabelFrame, Button, Checkbutton, Entry, Label, OptionMenu, Notebook, Radiobutton, Scrollbar, Style) -import tkinter.colorchooser as tkColorChooser -import tkinter.font as tkFont +from tkinter import colorchooser +import tkinter.font as tkfont from tkinter import messagebox from idlelib.config import idleConf, ConfigChanges @@ -609,7 +609,7 @@ def load_font_cfg(self): font_bold = configured_font[2]=='bold' # Set sorted no-duplicate editor font selection list and font_name. - fonts = sorted(set(tkFont.families(self))) + fonts = sorted(set(tkfont.families(self))) for font in fonts: self.fontlist.insert(END, font) self.font_name.set(font_name) @@ -663,7 +663,7 @@ def set_samples(self, event=None): Updates font_sample and highlight page highlight_sample. """ font_name = self.font_name.get() - font_weight = tkFont.BOLD if self.font_bold.get() else tkFont.NORMAL + font_weight = tkfont.BOLD if self.font_bold.get() else tkfont.NORMAL new_font = (font_name, self.font_size.get(), font_weight) self.font_sample['font'] = new_font self.highlight_sample['font'] = new_font @@ -1100,7 +1100,7 @@ def get_color(self): target = self.highlight_target.get() prev_color = self.style.lookup(self.frame_color_set['style'], 'background') - rgbTuplet, color_string = tkColorChooser.askcolor( + rgbTuplet, color_string = colorchooser.askcolor( parent=self, title='Pick new color for : '+target, initialcolor=prev_color) if color_string and (color_string != prev_color): diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index a4d0c95362fa9..66e9da5a9dccf 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -12,8 +12,8 @@ from tkinter import * from tkinter.font import Font from tkinter.ttk import Scrollbar -import tkinter.simpledialog as tkSimpleDialog -import tkinter.messagebox as tkMessageBox +from tkinter import simpledialog +from tkinter import messagebox from idlelib.config import idleConf from idlelib import configdialog @@ -295,9 +295,9 @@ def __init__(self, flist=None, filename=None, key=None, root=None): window.register_callback(self.postwindowsmenu) # Some abstractions so IDLE extensions are cross-IDE - self.askyesno = tkMessageBox.askyesno - self.askinteger = tkSimpleDialog.askinteger - self.showerror = tkMessageBox.showerror + self.askinteger = simpledialog.askinteger + self.askyesno = messagebox.askyesno + self.showerror = messagebox.showerror # Add pseudoevents for former extension fixed keys. # (This probably needs to be done once in the process.) @@ -596,7 +596,7 @@ def python_docs(self, event=None): try: os.startfile(self.help_url) except OSError as why: - tkMessageBox.showerror(title='Document Start Failure', + messagebox.showerror(title='Document Start Failure', message=str(why), parent=self.text) else: webbrowser.open(self.help_url) @@ -927,7 +927,7 @@ def display_extra_help(helpfile=helpfile): try: os.startfile(helpfile) except OSError as why: - tkMessageBox.showerror(title='Document Start Failure', + messagebox.showerror(title='Document Start Failure', message=str(why), parent=self.text) else: webbrowser.open(helpfile) @@ -963,7 +963,7 @@ def update_recent_files_list(self, new_file=None): except OSError as err: if not getattr(self.root, "recentfiles_message", False): self.root.recentfiles_message = True - tkMessageBox.showwarning(title='IDLE Warning', + messagebox.showwarning(title='IDLE Warning', message="Cannot save Recent Files list to disk.\n" f" {err}\n" "Select OK to continue.", diff --git a/Lib/idlelib/filelist.py b/Lib/idlelib/filelist.py index 0d200854ef000..254f5caf6b81b 100644 --- a/Lib/idlelib/filelist.py +++ b/Lib/idlelib/filelist.py @@ -1,7 +1,7 @@ "idlelib.filelist" import os -from tkinter import messagebox as tkMessageBox +from tkinter import messagebox class FileList: @@ -20,7 +20,7 @@ def open(self, filename, action=None): filename = self.canonize(filename) if os.path.isdir(filename): # This can happen when bad filename is passed on command line: - tkMessageBox.showerror( + messagebox.showerror( "File Error", "%r is a directory." % (filename,), master=self.root) @@ -88,7 +88,7 @@ def filename_changed_edit(self, edit): if newkey in self.dict: conflict = self.dict[newkey] self.inversedict[conflict] = None - tkMessageBox.showerror( + messagebox.showerror( "Name Conflict", "You now have multiple edit windows open for %r" % (filename,), master=self.root) diff --git a/Lib/idlelib/idle_test/mock_tk.py b/Lib/idlelib/idle_test/mock_tk.py index b736bd001da87..db583553838fb 100644 --- a/Lib/idlelib/idle_test/mock_tk.py +++ b/Lib/idlelib/idle_test/mock_tk.py @@ -59,27 +59,26 @@ def __call__(self, title, message, *args, **kwds): class Mbox: """Mock for tkinter.messagebox with an Mbox_func for each function. - This module was 'tkMessageBox' in 2.x; hence the 'import as' in 3.x. Example usage in test_module.py for testing functions in module.py: --- from idlelib.idle_test.mock_tk import Mbox import module -orig_mbox = module.tkMessageBox +orig_mbox = module.messagebox showerror = Mbox.showerror # example, for attribute access in test methods class Test(unittest.TestCase): @classmethod def setUpClass(cls): - module.tkMessageBox = Mbox + module.messagebox = Mbox @classmethod def tearDownClass(cls): - module.tkMessageBox = orig_mbox + module.messagebox = orig_mbox --- For 'ask' functions, set func.result return value before calling the method - that uses the message function. When tkMessageBox functions are the + that uses the message function. When messagebox functions are the only gui alls in a method, this replacement makes the method gui-free, """ askokcancel = Mbox_func() # True or False diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index 1fea6d41df811..98ddc67afdcc0 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -423,7 +423,7 @@ def test_custom_name(self): def test_color(self): d = self.page d.on_new_color_set = Func() - # self.color is only set in get_color through ColorChooser. + # self.color is only set in get_color through colorchooser. d.color.set('green') self.assertEqual(d.on_new_color_set.called, 1) del d.on_new_color_set @@ -540,8 +540,8 @@ def test_set_theme_type(self): def test_get_color(self): eq = self.assertEqual d = self.page - orig_chooser = configdialog.tkColorChooser.askcolor - chooser = configdialog.tkColorChooser.askcolor = Func() + orig_chooser = configdialog.colorchooser.askcolor + chooser = configdialog.colorchooser.askcolor = Func() gntn = d.get_new_theme_name = Func() d.highlight_target.set('Editor Breakpoint') @@ -582,7 +582,7 @@ def test_get_color(self): eq(d.color.get(), '#de0000') del d.get_new_theme_name - configdialog.tkColorChooser.askcolor = orig_chooser + configdialog.colorchooser.askcolor = orig_chooser def test_on_new_color_set(self): d = self.page diff --git a/Lib/idlelib/idle_test/test_replace.py b/Lib/idlelib/idle_test/test_replace.py index c3c5d2eeb9499..6c07389b29ad4 100644 --- a/Lib/idlelib/idle_test/test_replace.py +++ b/Lib/idlelib/idle_test/test_replace.py @@ -10,7 +10,7 @@ from idlelib.idle_test.mock_tk import Mbox import idlelib.searchengine as se -orig_mbox = se.tkMessageBox +orig_mbox = se.messagebox showerror = Mbox.showerror @@ -20,7 +20,7 @@ class ReplaceDialogTest(unittest.TestCase): def setUpClass(cls): cls.root = Tk() cls.root.withdraw() - se.tkMessageBox = Mbox + se.messagebox = Mbox cls.engine = se.SearchEngine(cls.root) cls.dialog = ReplaceDialog(cls.root, cls.engine) cls.dialog.bell = lambda: None @@ -32,7 +32,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - se.tkMessageBox = orig_mbox + se.messagebox = orig_mbox del cls.text, cls.dialog, cls.engine cls.root.destroy() del cls.root diff --git a/Lib/idlelib/idle_test/test_searchengine.py b/Lib/idlelib/idle_test/test_searchengine.py index f8401ce9380f2..9d97983941958 100644 --- a/Lib/idlelib/idle_test/test_searchengine.py +++ b/Lib/idlelib/idle_test/test_searchengine.py @@ -4,7 +4,7 @@ import unittest # from test.support import requires from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.idle_test.mock_tk import Var, Mbox from idlelib.idle_test.mock_tk import Text as mockText import re @@ -19,13 +19,13 @@ def setUpModule(): # Replace s-e module tkinter imports other than non-gui TclError. se.BooleanVar = Var se.StringVar = Var - se.tkMessageBox = Mbox + se.messagebox = Mbox def tearDownModule(): # Restore 'just in case', though other tests should also replace. se.BooleanVar = BooleanVar se.StringVar = StringVar - se.tkMessageBox = tkMessageBox + se.messagebox = messagebox class Mock: diff --git a/Lib/idlelib/idle_test/test_squeezer.py b/Lib/idlelib/idle_test/test_squeezer.py index e3912f4bbbec8..ee1bbd76b5056 100644 --- a/Lib/idlelib/idle_test/test_squeezer.py +++ b/Lib/idlelib/idle_test/test_squeezer.py @@ -396,7 +396,7 @@ def test_expand_dangerous_oupput(self): expandingbutton.base_text = expandingbutton.text # Patch the message box module to always return False. - with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox: + with patch('idlelib.squeezer.messagebox') as mock_msgbox: mock_msgbox.askokcancel.return_value = False mock_msgbox.askyesno.return_value = False # Trigger the expand event. @@ -407,7 +407,7 @@ def test_expand_dangerous_oupput(self): self.assertEqual(expandingbutton.text.get('1.0', 'end-1c'), '') # Patch the message box module to always return True. - with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox: + with patch('idlelib.squeezer.messagebox') as mock_msgbox: mock_msgbox.askokcancel.return_value = True mock_msgbox.askyesno.return_value = True # Trigger the expand event. diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py index 8bb2fa6a6e793..5ebf7089fb9ab 100644 --- a/Lib/idlelib/iomenu.py +++ b/Lib/idlelib/iomenu.py @@ -5,8 +5,8 @@ import tempfile import tokenize -import tkinter.filedialog as tkFileDialog -import tkinter.messagebox as tkMessageBox +from tkinter import filedialog +from tkinter import messagebox from tkinter.simpledialog import askstring import idlelib @@ -147,10 +147,10 @@ def loadfile(self, filename): eol_convention = f.newlines converted = True except OSError as err: - tkMessageBox.showerror("I/O Error", str(err), parent=self.text) + messagebox.showerror("I/O Error", str(err), parent=self.text) return False except UnicodeDecodeError: - tkMessageBox.showerror("Decoding Error", + messagebox.showerror("Decoding Error", "File %s\nFailed to Decode" % filename, parent=self.text) return False @@ -159,7 +159,7 @@ def loadfile(self, filename): # If the file does not contain line separators, it is None. # If the file contains mixed line separators, it is a tuple. if eol_convention is not None: - tkMessageBox.showwarning("Mixed Newlines", + messagebox.showwarning("Mixed Newlines", "Mixed newlines detected.\n" "The file will be changed on save.", parent=self.text) @@ -187,10 +187,10 @@ def maybesave(self): return "yes" message = "Do you want to save %s before closing?" % ( self.filename or "this untitled document") - confirm = tkMessageBox.askyesnocancel( + confirm = messagebox.askyesnocancel( title="Save On Close", message=message, - default=tkMessageBox.YES, + default=messagebox.YES, parent=self.text) if confirm: reply = "yes" @@ -249,7 +249,7 @@ def writefile(self, filename): os.fsync(f.fileno()) return True except OSError as msg: - tkMessageBox.showerror("I/O Error", str(msg), + messagebox.showerror("I/O Error", str(msg), parent=self.text) return False @@ -286,7 +286,7 @@ def encode(self, chars): failed = str(err) except UnicodeEncodeError: failed = "Invalid encoding '%s'" % enc - tkMessageBox.showerror( + messagebox.showerror( "I/O Error", "%s.\nSaving as UTF-8" % failed, parent=self.text) @@ -295,10 +295,10 @@ def encode(self, chars): return chars.encode('utf-8-sig') def print_window(self, event): - confirm = tkMessageBox.askokcancel( + confirm = messagebox.askokcancel( title="Print", message="Print to Default Printer", - default=tkMessageBox.OK, + default=messagebox.OK, parent=self.text) if not confirm: self.text.focus_set() @@ -336,10 +336,10 @@ def print_window(self, event): status + output if output: output = "Printing command: %s\n" % repr(command) + output - tkMessageBox.showerror("Print status", output, parent=self.text) + messagebox.showerror("Print status", output, parent=self.text) else: #no printing for this platform message = "Printing is not enabled for this platform: %s" % platform - tkMessageBox.showinfo("Print status", message, parent=self.text) + messagebox.showinfo("Print status", message, parent=self.text) if tempfilename: os.unlink(tempfilename) return "break" @@ -358,7 +358,7 @@ def print_window(self, event): def askopenfile(self): dir, base = self.defaultfilename("open") if not self.opendialog: - self.opendialog = tkFileDialog.Open(parent=self.text, + self.opendialog = filedialog.Open(parent=self.text, filetypes=self.filetypes) filename = self.opendialog.show(initialdir=dir, initialfile=base) return filename @@ -378,7 +378,7 @@ def defaultfilename(self, mode="open"): def asksavefile(self): dir, base = self.defaultfilename("save") if not self.savedialog: - self.savedialog = tkFileDialog.SaveAs( + self.savedialog = filedialog.SaveAs( parent=self.text, filetypes=self.filetypes, defaultextension=self.defaultextension) diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index abe8a85952bc9..0407ca9cfd8bf 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -21,13 +21,13 @@ except (ImportError, AttributeError, OSError): pass -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox if TkVersion < 8.5: root = Tk() # otherwise create root in main root.withdraw() from idlelib.run import fix_scaling fix_scaling(root) - tkMessageBox.showerror("Idle Cannot Start", + messagebox.showerror("Idle Cannot Start", "Idle requires tcl/tk 8.5+, not %s." % TkVersion, parent=root) raise SystemExit(1) @@ -261,7 +261,7 @@ def store_file_breaks(self): except OSError as err: if not getattr(self.root, "breakpoint_error_displayed", False): self.root.breakpoint_error_displayed = True - tkMessageBox.showerror(title='IDLE Error', + messagebox.showerror(title='IDLE Error', message='Unable to update breakpoint list:\n%s' % str(err), parent=self.text) @@ -771,7 +771,7 @@ def runcode(self, code): exec(code, self.locals) except SystemExit: if not self.tkconsole.closing: - if tkMessageBox.askyesno( + if messagebox.askyesno( "Exit?", "Do you want to exit altogether?", default="yes", @@ -805,7 +805,7 @@ def write(self, s): return self.tkconsole.stderr.write(s) def display_port_binding_error(self): - tkMessageBox.showerror( + messagebox.showerror( "Port Binding Error", "IDLE can't bind to a TCP/IP port, which is necessary to " "communicate with its Python execution server. This might be " @@ -816,7 +816,7 @@ def display_port_binding_error(self): parent=self.tkconsole.text) def display_no_subprocess_error(self): - tkMessageBox.showerror( + messagebox.showerror( "Subprocess Connection Error", "IDLE's subprocess didn't make connection.\n" "See the 'Startup failure' section of the IDLE doc, online at\n" @@ -824,7 +824,7 @@ def display_no_subprocess_error(self): parent=self.tkconsole.text) def display_executing_dialog(self): - tkMessageBox.showerror( + messagebox.showerror( "Already executing", "The Python Shell window is already executing a command; " "please wait until it is finished.", @@ -945,7 +945,7 @@ def get_warning_stream(self): def toggle_debugger(self, event=None): if self.executing: - tkMessageBox.showerror("Don't debug now", + messagebox.showerror("Don't debug now", "You can only toggle the debugger when idle", parent=self.text) self.set_debugger_indicator() @@ -1003,7 +1003,7 @@ def endexecuting(self): def close(self): "Extend EditorWindow.close()" if self.executing: - response = tkMessageBox.askokcancel( + response = messagebox.askokcancel( "Kill?", "Your program is still running!\n Do you want to kill it?", default="ok", @@ -1254,7 +1254,7 @@ def open_stack_viewer(self, event=None): try: sys.last_traceback except: - tkMessageBox.showerror("No stack trace", + messagebox.showerror("No stack trace", "There is no stack trace yet.\n" "(sys.last_traceback is not defined)", parent=self.text) diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py index 028b0dbd21dfe..55712e904603f 100644 --- a/Lib/idlelib/runscript.py +++ b/Lib/idlelib/runscript.py @@ -14,7 +14,7 @@ import time import tokenize -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.config import idleConf from idlelib import macosx @@ -195,15 +195,15 @@ def getfilename(self): def ask_save_dialog(self): msg = "Source Must Be Saved\n" + 5*' ' + "OK to Save?" - confirm = tkMessageBox.askokcancel(title="Save Before Run or Check", + confirm = messagebox.askokcancel(title="Save Before Run or Check", message=msg, - default=tkMessageBox.OK, + default=messagebox.OK, parent=self.editwin.text) return confirm def errorbox(self, title, message): # XXX This should really be a function of EditorWindow... - tkMessageBox.showerror(title, message, parent=self.editwin.text) + messagebox.showerror(title, message, parent=self.editwin.text) self.editwin.text.focus_set() self.perf = time.perf_counter() diff --git a/Lib/idlelib/searchengine.py b/Lib/idlelib/searchengine.py index a50038e282ba6..eddef581ab40a 100644 --- a/Lib/idlelib/searchengine.py +++ b/Lib/idlelib/searchengine.py @@ -2,7 +2,7 @@ import re from tkinter import StringVar, BooleanVar, TclError -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox def get(root): '''Return the singleton SearchEngine instance for the process. @@ -96,7 +96,7 @@ def report_error(self, pat, msg, col=None): msg = msg + "\nPattern: " + str(pat) if col is not None: msg = msg + "\nOffset: " + str(col) - tkMessageBox.showerror("Regular expression error", + messagebox.showerror("Regular expression error", msg, master=self.root) def search_text(self, text, prog=None, ok=0): diff --git a/Lib/idlelib/squeezer.py b/Lib/idlelib/squeezer.py index be1538a25fded..3046d803b74a4 100644 --- a/Lib/idlelib/squeezer.py +++ b/Lib/idlelib/squeezer.py @@ -17,7 +17,7 @@ import re import tkinter as tk -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.config import idleConf from idlelib.textview import view_text @@ -147,7 +147,7 @@ def expand(self, event=None): if self.is_dangerous is None: self.set_is_dangerous() if self.is_dangerous: - confirm = tkMessageBox.askokcancel( + confirm = messagebox.askokcancel( title="Expand huge output?", message="\n\n".join([ "The squeezed output is very long: %d lines, %d chars.", @@ -155,7 +155,7 @@ def expand(self, event=None): "It is recommended to view or copy the output instead.", "Really expand?" ]) % (self.numoflines, len(self.s)), - default=tkMessageBox.CANCEL, + default=messagebox.CANCEL, parent=self.text) if not confirm: return "break" From webhook-mailer at python.org Mon Jan 25 06:51:56 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 25 Jan 2021 11:51:56 -0000 Subject: [Python-checkins] bpo-43013: Fix old tkinter module names in idlelib (GH-24326) Message-ID: https://github.com/python/cpython/commit/7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 commit: 7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 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-25T03:51:49-08:00 summary: bpo-43013: Fix old tkinter module names in idlelib (GH-24326) Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and 'tkMessageBox' and remove 'tk'. Just lowercase 'tkFont' as 'font' is already used. Adjust import. (cherry picked from commit 879986d8a932c4524cb6ff822afc9537de16e28d) Co-authored-by: Terry Jan Reedy files: M Lib/idlelib/configdialog.py M Lib/idlelib/editor.py M Lib/idlelib/filelist.py M Lib/idlelib/idle_test/mock_tk.py M Lib/idlelib/idle_test/test_configdialog.py M Lib/idlelib/idle_test/test_replace.py M Lib/idlelib/idle_test/test_searchengine.py M Lib/idlelib/idle_test/test_squeezer.py M Lib/idlelib/iomenu.py M Lib/idlelib/pyshell.py M Lib/idlelib/runscript.py M Lib/idlelib/searchengine.py M Lib/idlelib/squeezer.py diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index 73e64852c69df..c52a04b503adb 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -18,8 +18,8 @@ HORIZONTAL, VERTICAL, ANCHOR, ACTIVE, END) from tkinter.ttk import (Frame, LabelFrame, Button, Checkbutton, Entry, Label, OptionMenu, Notebook, Radiobutton, Scrollbar, Style) -import tkinter.colorchooser as tkColorChooser -import tkinter.font as tkFont +from tkinter import colorchooser +import tkinter.font as tkfont from tkinter import messagebox from idlelib.config import idleConf, ConfigChanges @@ -609,7 +609,7 @@ def load_font_cfg(self): font_bold = configured_font[2]=='bold' # Set sorted no-duplicate editor font selection list and font_name. - fonts = sorted(set(tkFont.families(self))) + fonts = sorted(set(tkfont.families(self))) for font in fonts: self.fontlist.insert(END, font) self.font_name.set(font_name) @@ -663,7 +663,7 @@ def set_samples(self, event=None): Updates font_sample and highlight page highlight_sample. """ font_name = self.font_name.get() - font_weight = tkFont.BOLD if self.font_bold.get() else tkFont.NORMAL + font_weight = tkfont.BOLD if self.font_bold.get() else tkfont.NORMAL new_font = (font_name, self.font_size.get(), font_weight) self.font_sample['font'] = new_font self.highlight_sample['font'] = new_font @@ -1100,7 +1100,7 @@ def get_color(self): target = self.highlight_target.get() prev_color = self.style.lookup(self.frame_color_set['style'], 'background') - rgbTuplet, color_string = tkColorChooser.askcolor( + rgbTuplet, color_string = colorchooser.askcolor( parent=self, title='Pick new color for : '+target, initialcolor=prev_color) if color_string and (color_string != prev_color): diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index a4d0c95362fa9..66e9da5a9dccf 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -12,8 +12,8 @@ from tkinter import * from tkinter.font import Font from tkinter.ttk import Scrollbar -import tkinter.simpledialog as tkSimpleDialog -import tkinter.messagebox as tkMessageBox +from tkinter import simpledialog +from tkinter import messagebox from idlelib.config import idleConf from idlelib import configdialog @@ -295,9 +295,9 @@ def __init__(self, flist=None, filename=None, key=None, root=None): window.register_callback(self.postwindowsmenu) # Some abstractions so IDLE extensions are cross-IDE - self.askyesno = tkMessageBox.askyesno - self.askinteger = tkSimpleDialog.askinteger - self.showerror = tkMessageBox.showerror + self.askinteger = simpledialog.askinteger + self.askyesno = messagebox.askyesno + self.showerror = messagebox.showerror # Add pseudoevents for former extension fixed keys. # (This probably needs to be done once in the process.) @@ -596,7 +596,7 @@ def python_docs(self, event=None): try: os.startfile(self.help_url) except OSError as why: - tkMessageBox.showerror(title='Document Start Failure', + messagebox.showerror(title='Document Start Failure', message=str(why), parent=self.text) else: webbrowser.open(self.help_url) @@ -927,7 +927,7 @@ def display_extra_help(helpfile=helpfile): try: os.startfile(helpfile) except OSError as why: - tkMessageBox.showerror(title='Document Start Failure', + messagebox.showerror(title='Document Start Failure', message=str(why), parent=self.text) else: webbrowser.open(helpfile) @@ -963,7 +963,7 @@ def update_recent_files_list(self, new_file=None): except OSError as err: if not getattr(self.root, "recentfiles_message", False): self.root.recentfiles_message = True - tkMessageBox.showwarning(title='IDLE Warning', + messagebox.showwarning(title='IDLE Warning', message="Cannot save Recent Files list to disk.\n" f" {err}\n" "Select OK to continue.", diff --git a/Lib/idlelib/filelist.py b/Lib/idlelib/filelist.py index 0d200854ef000..254f5caf6b81b 100644 --- a/Lib/idlelib/filelist.py +++ b/Lib/idlelib/filelist.py @@ -1,7 +1,7 @@ "idlelib.filelist" import os -from tkinter import messagebox as tkMessageBox +from tkinter import messagebox class FileList: @@ -20,7 +20,7 @@ def open(self, filename, action=None): filename = self.canonize(filename) if os.path.isdir(filename): # This can happen when bad filename is passed on command line: - tkMessageBox.showerror( + messagebox.showerror( "File Error", "%r is a directory." % (filename,), master=self.root) @@ -88,7 +88,7 @@ def filename_changed_edit(self, edit): if newkey in self.dict: conflict = self.dict[newkey] self.inversedict[conflict] = None - tkMessageBox.showerror( + messagebox.showerror( "Name Conflict", "You now have multiple edit windows open for %r" % (filename,), master=self.root) diff --git a/Lib/idlelib/idle_test/mock_tk.py b/Lib/idlelib/idle_test/mock_tk.py index b736bd001da87..db583553838fb 100644 --- a/Lib/idlelib/idle_test/mock_tk.py +++ b/Lib/idlelib/idle_test/mock_tk.py @@ -59,27 +59,26 @@ def __call__(self, title, message, *args, **kwds): class Mbox: """Mock for tkinter.messagebox with an Mbox_func for each function. - This module was 'tkMessageBox' in 2.x; hence the 'import as' in 3.x. Example usage in test_module.py for testing functions in module.py: --- from idlelib.idle_test.mock_tk import Mbox import module -orig_mbox = module.tkMessageBox +orig_mbox = module.messagebox showerror = Mbox.showerror # example, for attribute access in test methods class Test(unittest.TestCase): @classmethod def setUpClass(cls): - module.tkMessageBox = Mbox + module.messagebox = Mbox @classmethod def tearDownClass(cls): - module.tkMessageBox = orig_mbox + module.messagebox = orig_mbox --- For 'ask' functions, set func.result return value before calling the method - that uses the message function. When tkMessageBox functions are the + that uses the message function. When messagebox functions are the only gui alls in a method, this replacement makes the method gui-free, """ askokcancel = Mbox_func() # True or False diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index 1fea6d41df811..98ddc67afdcc0 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -423,7 +423,7 @@ def test_custom_name(self): def test_color(self): d = self.page d.on_new_color_set = Func() - # self.color is only set in get_color through ColorChooser. + # self.color is only set in get_color through colorchooser. d.color.set('green') self.assertEqual(d.on_new_color_set.called, 1) del d.on_new_color_set @@ -540,8 +540,8 @@ def test_set_theme_type(self): def test_get_color(self): eq = self.assertEqual d = self.page - orig_chooser = configdialog.tkColorChooser.askcolor - chooser = configdialog.tkColorChooser.askcolor = Func() + orig_chooser = configdialog.colorchooser.askcolor + chooser = configdialog.colorchooser.askcolor = Func() gntn = d.get_new_theme_name = Func() d.highlight_target.set('Editor Breakpoint') @@ -582,7 +582,7 @@ def test_get_color(self): eq(d.color.get(), '#de0000') del d.get_new_theme_name - configdialog.tkColorChooser.askcolor = orig_chooser + configdialog.colorchooser.askcolor = orig_chooser def test_on_new_color_set(self): d = self.page diff --git a/Lib/idlelib/idle_test/test_replace.py b/Lib/idlelib/idle_test/test_replace.py index c3c5d2eeb9499..6c07389b29ad4 100644 --- a/Lib/idlelib/idle_test/test_replace.py +++ b/Lib/idlelib/idle_test/test_replace.py @@ -10,7 +10,7 @@ from idlelib.idle_test.mock_tk import Mbox import idlelib.searchengine as se -orig_mbox = se.tkMessageBox +orig_mbox = se.messagebox showerror = Mbox.showerror @@ -20,7 +20,7 @@ class ReplaceDialogTest(unittest.TestCase): def setUpClass(cls): cls.root = Tk() cls.root.withdraw() - se.tkMessageBox = Mbox + se.messagebox = Mbox cls.engine = se.SearchEngine(cls.root) cls.dialog = ReplaceDialog(cls.root, cls.engine) cls.dialog.bell = lambda: None @@ -32,7 +32,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - se.tkMessageBox = orig_mbox + se.messagebox = orig_mbox del cls.text, cls.dialog, cls.engine cls.root.destroy() del cls.root diff --git a/Lib/idlelib/idle_test/test_searchengine.py b/Lib/idlelib/idle_test/test_searchengine.py index f8401ce9380f2..9d97983941958 100644 --- a/Lib/idlelib/idle_test/test_searchengine.py +++ b/Lib/idlelib/idle_test/test_searchengine.py @@ -4,7 +4,7 @@ import unittest # from test.support import requires from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.idle_test.mock_tk import Var, Mbox from idlelib.idle_test.mock_tk import Text as mockText import re @@ -19,13 +19,13 @@ def setUpModule(): # Replace s-e module tkinter imports other than non-gui TclError. se.BooleanVar = Var se.StringVar = Var - se.tkMessageBox = Mbox + se.messagebox = Mbox def tearDownModule(): # Restore 'just in case', though other tests should also replace. se.BooleanVar = BooleanVar se.StringVar = StringVar - se.tkMessageBox = tkMessageBox + se.messagebox = messagebox class Mock: diff --git a/Lib/idlelib/idle_test/test_squeezer.py b/Lib/idlelib/idle_test/test_squeezer.py index e3912f4bbbec8..ee1bbd76b5056 100644 --- a/Lib/idlelib/idle_test/test_squeezer.py +++ b/Lib/idlelib/idle_test/test_squeezer.py @@ -396,7 +396,7 @@ def test_expand_dangerous_oupput(self): expandingbutton.base_text = expandingbutton.text # Patch the message box module to always return False. - with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox: + with patch('idlelib.squeezer.messagebox') as mock_msgbox: mock_msgbox.askokcancel.return_value = False mock_msgbox.askyesno.return_value = False # Trigger the expand event. @@ -407,7 +407,7 @@ def test_expand_dangerous_oupput(self): self.assertEqual(expandingbutton.text.get('1.0', 'end-1c'), '') # Patch the message box module to always return True. - with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox: + with patch('idlelib.squeezer.messagebox') as mock_msgbox: mock_msgbox.askokcancel.return_value = True mock_msgbox.askyesno.return_value = True # Trigger the expand event. diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py index 8bb2fa6a6e793..5ebf7089fb9ab 100644 --- a/Lib/idlelib/iomenu.py +++ b/Lib/idlelib/iomenu.py @@ -5,8 +5,8 @@ import tempfile import tokenize -import tkinter.filedialog as tkFileDialog -import tkinter.messagebox as tkMessageBox +from tkinter import filedialog +from tkinter import messagebox from tkinter.simpledialog import askstring import idlelib @@ -147,10 +147,10 @@ def loadfile(self, filename): eol_convention = f.newlines converted = True except OSError as err: - tkMessageBox.showerror("I/O Error", str(err), parent=self.text) + messagebox.showerror("I/O Error", str(err), parent=self.text) return False except UnicodeDecodeError: - tkMessageBox.showerror("Decoding Error", + messagebox.showerror("Decoding Error", "File %s\nFailed to Decode" % filename, parent=self.text) return False @@ -159,7 +159,7 @@ def loadfile(self, filename): # If the file does not contain line separators, it is None. # If the file contains mixed line separators, it is a tuple. if eol_convention is not None: - tkMessageBox.showwarning("Mixed Newlines", + messagebox.showwarning("Mixed Newlines", "Mixed newlines detected.\n" "The file will be changed on save.", parent=self.text) @@ -187,10 +187,10 @@ def maybesave(self): return "yes" message = "Do you want to save %s before closing?" % ( self.filename or "this untitled document") - confirm = tkMessageBox.askyesnocancel( + confirm = messagebox.askyesnocancel( title="Save On Close", message=message, - default=tkMessageBox.YES, + default=messagebox.YES, parent=self.text) if confirm: reply = "yes" @@ -249,7 +249,7 @@ def writefile(self, filename): os.fsync(f.fileno()) return True except OSError as msg: - tkMessageBox.showerror("I/O Error", str(msg), + messagebox.showerror("I/O Error", str(msg), parent=self.text) return False @@ -286,7 +286,7 @@ def encode(self, chars): failed = str(err) except UnicodeEncodeError: failed = "Invalid encoding '%s'" % enc - tkMessageBox.showerror( + messagebox.showerror( "I/O Error", "%s.\nSaving as UTF-8" % failed, parent=self.text) @@ -295,10 +295,10 @@ def encode(self, chars): return chars.encode('utf-8-sig') def print_window(self, event): - confirm = tkMessageBox.askokcancel( + confirm = messagebox.askokcancel( title="Print", message="Print to Default Printer", - default=tkMessageBox.OK, + default=messagebox.OK, parent=self.text) if not confirm: self.text.focus_set() @@ -336,10 +336,10 @@ def print_window(self, event): status + output if output: output = "Printing command: %s\n" % repr(command) + output - tkMessageBox.showerror("Print status", output, parent=self.text) + messagebox.showerror("Print status", output, parent=self.text) else: #no printing for this platform message = "Printing is not enabled for this platform: %s" % platform - tkMessageBox.showinfo("Print status", message, parent=self.text) + messagebox.showinfo("Print status", message, parent=self.text) if tempfilename: os.unlink(tempfilename) return "break" @@ -358,7 +358,7 @@ def print_window(self, event): def askopenfile(self): dir, base = self.defaultfilename("open") if not self.opendialog: - self.opendialog = tkFileDialog.Open(parent=self.text, + self.opendialog = filedialog.Open(parent=self.text, filetypes=self.filetypes) filename = self.opendialog.show(initialdir=dir, initialfile=base) return filename @@ -378,7 +378,7 @@ def defaultfilename(self, mode="open"): def asksavefile(self): dir, base = self.defaultfilename("save") if not self.savedialog: - self.savedialog = tkFileDialog.SaveAs( + self.savedialog = filedialog.SaveAs( parent=self.text, filetypes=self.filetypes, defaultextension=self.defaultextension) diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 6fa138219a24d..d32106c983874 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -21,13 +21,13 @@ except (ImportError, AttributeError, OSError): pass -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox if TkVersion < 8.5: root = Tk() # otherwise create root in main root.withdraw() from idlelib.run import fix_scaling fix_scaling(root) - tkMessageBox.showerror("Idle Cannot Start", + messagebox.showerror("Idle Cannot Start", "Idle requires tcl/tk 8.5+, not %s." % TkVersion, parent=root) raise SystemExit(1) @@ -261,7 +261,7 @@ def store_file_breaks(self): except OSError as err: if not getattr(self.root, "breakpoint_error_displayed", False): self.root.breakpoint_error_displayed = True - tkMessageBox.showerror(title='IDLE Error', + messagebox.showerror(title='IDLE Error', message='Unable to update breakpoint list:\n%s' % str(err), parent=self.text) @@ -771,7 +771,7 @@ def runcode(self, code): exec(code, self.locals) except SystemExit: if not self.tkconsole.closing: - if tkMessageBox.askyesno( + if messagebox.askyesno( "Exit?", "Do you want to exit altogether?", default="yes", @@ -805,7 +805,7 @@ def write(self, s): return self.tkconsole.stderr.write(s) def display_port_binding_error(self): - tkMessageBox.showerror( + messagebox.showerror( "Port Binding Error", "IDLE can't bind to a TCP/IP port, which is necessary to " "communicate with its Python execution server. This might be " @@ -816,7 +816,7 @@ def display_port_binding_error(self): parent=self.tkconsole.text) def display_no_subprocess_error(self): - tkMessageBox.showerror( + messagebox.showerror( "Subprocess Connection Error", "IDLE's subprocess didn't make connection.\n" "See the 'Startup failure' section of the IDLE doc, online at\n" @@ -824,7 +824,7 @@ def display_no_subprocess_error(self): parent=self.tkconsole.text) def display_executing_dialog(self): - tkMessageBox.showerror( + messagebox.showerror( "Already executing", "The Python Shell window is already executing a command; " "please wait until it is finished.", @@ -945,7 +945,7 @@ def get_warning_stream(self): def toggle_debugger(self, event=None): if self.executing: - tkMessageBox.showerror("Don't debug now", + messagebox.showerror("Don't debug now", "You can only toggle the debugger when idle", parent=self.text) self.set_debugger_indicator() @@ -1003,7 +1003,7 @@ def endexecuting(self): def close(self): "Extend EditorWindow.close()" if self.executing: - response = tkMessageBox.askokcancel( + response = messagebox.askokcancel( "Kill?", "Your program is still running!\n Do you want to kill it?", default="ok", @@ -1254,7 +1254,7 @@ def open_stack_viewer(self, event=None): try: sys.last_traceback except: - tkMessageBox.showerror("No stack trace", + messagebox.showerror("No stack trace", "There is no stack trace yet.\n" "(sys.last_traceback is not defined)", parent=self.text) diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py index 028b0dbd21dfe..55712e904603f 100644 --- a/Lib/idlelib/runscript.py +++ b/Lib/idlelib/runscript.py @@ -14,7 +14,7 @@ import time import tokenize -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.config import idleConf from idlelib import macosx @@ -195,15 +195,15 @@ def getfilename(self): def ask_save_dialog(self): msg = "Source Must Be Saved\n" + 5*' ' + "OK to Save?" - confirm = tkMessageBox.askokcancel(title="Save Before Run or Check", + confirm = messagebox.askokcancel(title="Save Before Run or Check", message=msg, - default=tkMessageBox.OK, + default=messagebox.OK, parent=self.editwin.text) return confirm def errorbox(self, title, message): # XXX This should really be a function of EditorWindow... - tkMessageBox.showerror(title, message, parent=self.editwin.text) + messagebox.showerror(title, message, parent=self.editwin.text) self.editwin.text.focus_set() self.perf = time.perf_counter() diff --git a/Lib/idlelib/searchengine.py b/Lib/idlelib/searchengine.py index a50038e282ba6..eddef581ab40a 100644 --- a/Lib/idlelib/searchengine.py +++ b/Lib/idlelib/searchengine.py @@ -2,7 +2,7 @@ import re from tkinter import StringVar, BooleanVar, TclError -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox def get(root): '''Return the singleton SearchEngine instance for the process. @@ -96,7 +96,7 @@ def report_error(self, pat, msg, col=None): msg = msg + "\nPattern: " + str(pat) if col is not None: msg = msg + "\nOffset: " + str(col) - tkMessageBox.showerror("Regular expression error", + messagebox.showerror("Regular expression error", msg, master=self.root) def search_text(self, text, prog=None, ok=0): diff --git a/Lib/idlelib/squeezer.py b/Lib/idlelib/squeezer.py index be1538a25fded..3046d803b74a4 100644 --- a/Lib/idlelib/squeezer.py +++ b/Lib/idlelib/squeezer.py @@ -17,7 +17,7 @@ import re import tkinter as tk -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.config import idleConf from idlelib.textview import view_text @@ -147,7 +147,7 @@ def expand(self, event=None): if self.is_dangerous is None: self.set_is_dangerous() if self.is_dangerous: - confirm = tkMessageBox.askokcancel( + confirm = messagebox.askokcancel( title="Expand huge output?", message="\n\n".join([ "The squeezed output is very long: %d lines, %d chars.", @@ -155,7 +155,7 @@ def expand(self, event=None): "It is recommended to view or copy the output instead.", "Really expand?" ]) % (self.numoflines, len(self.s)), - default=tkMessageBox.CANCEL, + default=messagebox.CANCEL, parent=self.text) if not confirm: return "break" From webhook-mailer at python.org Mon Jan 25 07:25:15 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 25 Jan 2021 12:25:15 -0000 Subject: [Python-checkins] bpo-42955: Add sys.modules_names (GH-24238) Message-ID: https://github.com/python/cpython/commit/db584bdad32d81e42b71871077a8008036f5c048 commit: db584bdad32d81e42b71871077a8008036f5c048 branch: master author: Victor Stinner committer: vstinner date: 2021-01-25T13:24:42+01:00 summary: bpo-42955: Add sys.modules_names (GH-24238) Add sys.module_names, containing the list of the standard library module names. files: A Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst M Doc/library/sys.rst M Doc/whatsnew/3.10.rst M Lib/test/test_capi.py M Lib/test/test_faulthandler.py M Lib/test/test_sys.py M Python/module_names.h M Python/pylifecycle.c M Python/sysmodule.c M Tools/scripts/generate_module_names.py diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 0f13adcf0e5b2..d536fc9322eb0 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -153,10 +153,12 @@ always available. .. data:: builtin_module_names - A tuple of strings giving the names of all modules that are compiled into this + A tuple of strings containing the names of all modules that are compiled into this Python interpreter. (This information is not available in any other way --- ``modules.keys()`` only lists the imported modules.) + See also the :attr:`sys.module_names` list. + .. function:: call_tracing(func, args) @@ -1060,6 +1062,24 @@ always available. This is still called as a fallback if a :data:`meta_path` entry doesn't have a :meth:`~importlib.abc.MetaPathFinder.find_spec` method. +.. data:: module_names + + A frozenset of strings containing the names of standard library modules. + + It is the same on all platforms. Modules which are not available on + some platforms and modules disabled at Python build are also listed. + All module kinds are listed: pure Python, built-in, frozen and extension + modules. Test modules are excluded. + + For packages, only sub-packages are listed, not sub-modules. For example, + ``concurrent`` package and ``concurrent.futures`` sub-package are listed, + but not ``concurrent.futures.base`` sub-module. + + See also the :attr:`sys.builtin_module_names` list. + + .. versionchanged:: 3.10 + + .. data:: modules This is a dictionary that maps module names to modules which have already been diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index d822dda09d2e1..a6c3fbbff916e 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -396,6 +396,10 @@ Add :data:`sys.orig_argv` attribute: the list of the original command line arguments passed to the Python executable. (Contributed by Victor Stinner in :issue:`23427`.) +Add :data:`sys.module_names`, containing the list of the standard library +module names. +(Contributed by Victor Stinner in :issue:`42955`.) + threading --------- diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 67175cd044a21..5f5c0d038d9f3 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -569,12 +569,23 @@ def check_fatal_error(self, code, expected, not_expected=()): self.assertEqual(len(modules), total) def test_fatal_error(self): + # By default, stdlib extension modules are ignored, + # but not test modules. expected = ('_testcapi',) - not_expected = ('sys', 'builtins', '_imp', '_thread', '_weakref', - '_io', 'marshal', '_signal', '_abc') - code = 'import _testcapi; _testcapi.fatal_error(b"MESSAGE")' + not_expected = ('sys',) + code = 'import _testcapi, sys; _testcapi.fatal_error(b"MESSAGE")' self.check_fatal_error(code, expected, not_expected) + # Mark _testcapi as stdlib module, but not sys + expected = ('sys',) + not_expected = ('_testcapi',) + code = textwrap.dedent(''' + import _testcapi, sys + sys.module_names = frozenset({"_testcapi"}) + _testcapi.fatal_error(b"MESSAGE") + ''') + self.check_fatal_error(code, expected) + class TestPendingCalls(unittest.TestCase): diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index b4a654f8a9cae..02077a69bb4d8 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -334,8 +334,9 @@ def test_disable(self): def test_dump_ext_modules(self): code = """ import faulthandler - # _testcapi is a test module and not considered as a stdlib module - import _testcapi + import sys + # Don't filter stdlib module names + sys.module_names = frozenset() faulthandler.enable() faulthandler._sigsegv() """ @@ -346,7 +347,8 @@ def test_dump_ext_modules(self): if not match: self.fail(f"Cannot find 'Extension modules:' in {stderr!r}") modules = set(match.group(1).strip().split(', ')) - self.assertIn('_testcapi', modules) + for name in ('sys', 'faulthandler'): + self.assertIn(name, modules) def test_is_enabled(self): orig_stderr = sys.stderr diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 3af5b117affde..729b8667fc857 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -986,6 +986,11 @@ def test_orig_argv(self): self.assertEqual(proc.stdout.rstrip().splitlines(), expected, proc) + def test_module_names(self): + self.assertIsInstance(sys.module_names, frozenset) + for name in sys.module_names: + self.assertIsInstance(name, str) + @test.support.cpython_only class UnraisableHookTest(unittest.TestCase): diff --git a/Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst b/Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst new file mode 100644 index 0000000000000..0631acd7a9870 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst @@ -0,0 +1,2 @@ +Add :data:`sys.module_names`, containing the list of the standard library +module names. Patch by Victor Stinner. diff --git a/Python/module_names.h b/Python/module_names.h index 533a73260efe9..0dc2633916d30 100644 --- a/Python/module_names.h +++ b/Python/module_names.h @@ -1,63 +1,123 @@ // Auto-generated by Tools/scripts/generate_module_names.py. +// List used to create sys.module_names. static const char* _Py_module_names[] = { - -// Built-in modules +"__future__", "_abc", +"_aix_support", "_ast", +"_asyncio", +"_bisect", +"_blake2", +"_bootsubprocess", +"_bz2", "_codecs", +"_codecs_cn", +"_codecs_hk", +"_codecs_iso2022", +"_codecs_jp", +"_codecs_kr", +"_codecs_tw", "_collections", +"_collections_abc", +"_compat_pickle", +"_compression", +"_contextvars", +"_crypt", +"_csv", +"_ctypes", +"_curses", +"_curses_panel", +"_datetime", +"_dbm", +"_decimal", +"_elementtree", "_functools", +"_gdbm", +"_hashlib", +"_heapq", "_imp", "_io", +"_json", "_locale", +"_lsprof", +"_lzma", +"_markupbase", +"_md5", +"_msi", +"_multibytecodec", +"_multiprocessing", +"_opcode", "_operator", +"_osx_support", +"_pickle", +"_posixshmem", +"_posixsubprocess", +"_py_abc", +"_pydecimal", +"_pyio", +"_queue", +"_random", +"_sha1", +"_sha256", +"_sha3", +"_sha512", "_signal", +"_sitebuiltins", +"_socket", +"_sqlite3", "_sre", +"_ssl", "_stat", +"_statistics", "_string", +"_strptime", +"_struct", "_symtable", "_thread", +"_threading_local", +"_tkinter", "_tracemalloc", +"_uuid", "_warnings", "_weakref", -"atexit", -"builtins", -"errno", -"faulthandler", -"gc", -"itertools", -"marshal", -"posix", -"pwd", -"sys", -"time", - -// Pure Python modules (Lib/*.py) -"__future__", +"_weakrefset", +"_winapi", +"_xxsubinterpreters", +"_zoneinfo", "abc", "aifc", "antigravity", "argparse", +"array", "ast", "asynchat", +"asyncio", "asyncore", +"atexit", +"audioop", "base64", "bdb", +"binascii", "binhex", "bisect", +"builtins", "bz2", "cProfile", "calendar", "cgi", "cgitb", "chunk", +"cmath", "cmd", "code", "codecs", "codeop", +"collections", "colorsys", "compileall", +"concurrent", +"concurrent.futures", "configparser", "contextlib", "contextvars", @@ -65,45 +125,80 @@ static const char* _Py_module_names[] = { "copyreg", "crypt", "csv", +"ctypes", +"ctypes.macholib", +"curses", "dataclasses", "datetime", +"dbm", "decimal", "difflib", "dis", +"distutils", +"distutils.command", "doctest", +"email", +"email.mime", +"encodings", +"ensurepip", +"ensurepip._bundled", "enum", +"errno", +"faulthandler", +"fcntl", "filecmp", "fileinput", "fnmatch", "fractions", "ftplib", "functools", +"gc", "genericpath", "getopt", "getpass", "gettext", "glob", "graphlib", +"grp", "gzip", "hashlib", "heapq", "hmac", +"html", +"http", +"idlelib", "imaplib", "imghdr", "imp", +"importlib", "inspect", "io", "ipaddress", +"itertools", +"json", "keyword", +"lib2to3", +"lib2to3.fixes", +"lib2to3.pgen2", "linecache", "locale", +"logging", "lzma", "mailbox", "mailcap", +"marshal", +"math", "mimetypes", +"mmap", "modulefinder", +"msilib", +"msvcrt", +"multiprocessing", +"multiprocessing.dummy", "netrc", +"nis", "nntplib", +"nt", "ntpath", "nturl2path", "numbers", @@ -111,6 +206,7 @@ static const char* _Py_module_names[] = { "operator", "optparse", "os", +"ossaudiodev", "pathlib", "pdb", "pickle", @@ -120,23 +216,30 @@ static const char* _Py_module_names[] = { "platform", "plistlib", "poplib", +"posix", "posixpath", "pprint", "profile", "pstats", "pty", +"pwd", "py_compile", "pyclbr", "pydoc", +"pydoc_data", +"pyexpat", "queue", "quopri", "random", "re", +"readline", "reprlib", +"resource", "rlcompleter", "runpy", "sched", "secrets", +"select", "selectors", "shelve", "shlex", @@ -148,6 +251,8 @@ static const char* _Py_module_names[] = { "sndhdr", "socket", "socketserver", +"spwd", +"sqlite3", "sre_compile", "sre_constants", "sre_parse", @@ -160,15 +265,20 @@ static const char* _Py_module_names[] = { "subprocess", "sunau", "symtable", +"sys", "sysconfig", +"syslog", "tabnanny", "tarfile", "telnetlib", "tempfile", +"termios", "textwrap", "this", "threading", +"time", "timeit", +"tkinter", "token", "tokenize", "trace", @@ -176,161 +286,32 @@ static const char* _Py_module_names[] = { "tracemalloc", "tty", "turtle", +"turtledemo", "types", "typing", +"unicodedata", +"unittest", +"urllib", "uu", "uuid", +"venv", "warnings", "wave", "weakref", "webbrowser", -"xdrlib", -"zipapp", -"zipfile", -"zipimport", - -// Packages and sub-packages -"asyncio", -"collections", -"concurrent", -"concurrent.futures", -"ctypes", -"ctypes.macholib", -"curses", -"dbm", -"distutils", -"distutils.command", -"email", -"email.mime", -"encodings", -"ensurepip", -"ensurepip._bundled", -"html", -"http", -"idlelib", -"importlib", -"json", -"lib2to3", -"lib2to3.fixes", -"lib2to3.pgen2", -"logging", -"msilib", -"multiprocessing", -"multiprocessing.dummy", -"pydoc_data", -"sqlite3", -"tkinter", -"turtledemo", -"unittest", -"urllib", -"venv", +"winreg", +"winsound", "wsgiref", +"xdrlib", "xml", "xml.dom", "xml.etree", "xml.parsers", "xml.sax", "xmlrpc", -"zoneinfo", - -// Extension modules built by setup.py -"_asyncio", -"_bisect", -"_blake2", -"_bz2", -"_codecs_cn", -"_codecs_hk", -"_codecs_iso2022", -"_codecs_jp", -"_codecs_kr", -"_codecs_tw", -"_contextvars", -"_crypt", -"_csv", -"_ctypes", -"_curses", -"_curses_panel", -"_datetime", -"_dbm", -"_decimal", -"_elementtree", -"_gdbm", -"_hashlib", -"_heapq", -"_json", -"_lsprof", -"_lzma", -"_md5", -"_multibytecodec", -"_multiprocessing", -"_opcode", -"_pickle", -"_posixshmem", -"_posixsubprocess", -"_queue", -"_random", -"_sha1", -"_sha256", -"_sha3", -"_sha512", -"_socket", -"_sqlite3", -"_ssl", -"_statistics", -"_struct", -"_tkinter", -"_uuid", -"_xxsubinterpreters", -"_zoneinfo", -"array", -"audioop", -"binascii", -"cmath", -"fcntl", -"grp", -"math", -"mmap", -"nis", -"ossaudiodev", -"pyexpat", -"readline", -"resource", -"select", -"spwd", -"syslog", -"termios", -"unicodedata", +"zipapp", +"zipfile", +"zipimport", "zlib", - -// Built-in and extension modules built by Modules/Setup -"_abc", -"_codecs", -"_collections", -"_functools", -"_io", -"_locale", -"_operator", -"_signal", -"_sre", -"_stat", -"_symtable", -"_thread", -"_tracemalloc", -"_weakref", -"atexit", -"errno", -"faulthandler", -"itertools", -"posix", -"pwd", -"time", - -// Windows extension modules -"_msi", -"_winapi", -"msvcrt", -"nt", -"winreg", -"winsound", - +"zoneinfo", }; diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index e9df8fb5d273a..a97f45d0d5dc4 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -18,8 +18,6 @@ #include "pycore_sysmodule.h" // _PySys_ClearAuditHooks() #include "pycore_traceback.h" // _Py_DumpTracebackThreads() -#include "module_names.h" // _Py_module_names - #include // setlocale() #ifdef HAVE_SIGNAL_H @@ -2499,7 +2497,7 @@ fatal_error_exit(int status) // Dump the list of extension modules of sys.modules, excluding stdlib modules -// (_Py_module_names), into fd file descriptor. +// (sys.module_names), into fd file descriptor. // // This function is called by a signal handler in faulthandler: avoid memory // allocations and keep the implementation simple. For example, the list is not @@ -2515,10 +2513,31 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp) return; } + Py_ssize_t pos; + PyObject *key, *value; + + // Avoid PyDict_GetItemString() which calls PyUnicode_FromString(), + // memory cannot be allocated on the heap in a signal handler. + // Iterate on the dict instead. + PyObject *module_names = NULL; + pos = 0; + while (PyDict_Next(interp->sysdict, &pos, &key, &value)) { + if (PyUnicode_Check(key) + && PyUnicode_CompareWithASCIIString(key, "module_names") == 0) { + module_names = value; + break; + } + } + // If we failed to get sys.module_names or it's not a frozenset, + // don't exclude stdlib modules. + if (module_names != NULL && !PyFrozenSet_Check(module_names)) { + module_names = NULL; + } + + // List extensions int header = 1; Py_ssize_t count = 0; - Py_ssize_t pos = 0; - PyObject *key, *value; + pos = 0; while (PyDict_Next(modules, &pos, &key, &value)) { if (!PyUnicode_Check(key)) { continue; @@ -2526,22 +2545,26 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp) if (!_PyModule_IsExtension(value)) { continue; } - - // Check if it is a stdlib extension module. // Use the module name from the sys.modules key, // don't attempt to get the module object name. - const Py_ssize_t names_len = Py_ARRAY_LENGTH(_Py_module_names); - int is_stdlib_mod = 0; - for (Py_ssize_t i=0; i < names_len; i++) { - const char *name = _Py_module_names[i]; - if (PyUnicode_CompareWithASCIIString(key, name) == 0) { - is_stdlib_mod = 1; - break; + if (module_names != NULL) { + int is_stdlib_ext = 0; + + Py_ssize_t i; + PyObject *item; + Py_hash_t hash; + for (i=0; _PySet_NextEntry(module_names, &i, &item, &hash); ) { + if (PyUnicode_Check(item) + && PyUnicode_Compare(key, item) == 0) + { + is_stdlib_ext = 1; + break; + } + } + if (is_stdlib_ext) { + // Ignore stdlib extension + continue; } - } - if (is_stdlib_mod) { - // Ignore stdlib extension module. - continue; } if (header) { diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 720532eade29b..e2f7e39f33329 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -29,6 +29,7 @@ Data members: #include "frameobject.h" // PyFrame_GetBack() #include "pydtrace.h" #include "osdefs.h" // DELIM +#include "module_names.h" // _Py_module_names #include #ifdef MS_WINDOWS @@ -2020,33 +2021,63 @@ static PyMethodDef sys_methods[] = { {NULL, NULL} /* sentinel */ }; + static PyObject * list_builtin_module_names(void) { PyObject *list = PyList_New(0); - int i; - if (list == NULL) + if (list == NULL) { return NULL; - for (i = 0; PyImport_Inittab[i].name != NULL; i++) { - PyObject *name = PyUnicode_FromString( - PyImport_Inittab[i].name); - if (name == NULL) - break; - PyList_Append(list, name); + } + for (Py_ssize_t i = 0; PyImport_Inittab[i].name != NULL; i++) { + PyObject *name = PyUnicode_FromString(PyImport_Inittab[i].name); + if (name == NULL) { + goto error; + } + if (PyList_Append(list, name) < 0) { + Py_DECREF(name); + goto error; + } Py_DECREF(name); } if (PyList_Sort(list) != 0) { - Py_DECREF(list); - list = NULL; + goto error; + } + PyObject *tuple = PyList_AsTuple(list); + Py_DECREF(list); + return tuple; + +error: + Py_DECREF(list); + return NULL; +} + + +static PyObject * +list_module_names(void) +{ + Py_ssize_t len = Py_ARRAY_LENGTH(_Py_module_names); + PyObject *names = PyTuple_New(len); + if (names == NULL) { + return NULL; } - if (list) { - PyObject *v = PyList_AsTuple(list); - Py_DECREF(list); - list = v; + + for (Py_ssize_t i = 0; i < len; i++) { + PyObject *name = PyUnicode_FromString(_Py_module_names[i]); + if (name == NULL) { + Py_DECREF(names); + return NULL; + } + PyTuple_SET_ITEM(names, i, name); } - return list; + + PyObject *set = PyObject_CallFunction((PyObject *)&PyFrozenSet_Type, + "(O)", names); + Py_DECREF(names); + return set; } + /* Pre-initialization support for sys.warnoptions and sys._xoptions * * Modern internal code paths: @@ -2753,6 +2784,7 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict) SET_SYS("hash_info", get_hash_info(tstate)); SET_SYS("maxunicode", PyLong_FromLong(0x10FFFF)); SET_SYS("builtin_module_names", list_builtin_module_names()); + SET_SYS("module_names", list_module_names()); #if PY_BIG_ENDIAN SET_SYS_FROM_STRING("byteorder", "big"); #else diff --git a/Tools/scripts/generate_module_names.py b/Tools/scripts/generate_module_names.py index 985a1a5e5a2d9..9d363aa04b300 100644 --- a/Tools/scripts/generate_module_names.py +++ b/Tools/scripts/generate_module_names.py @@ -17,27 +17,6 @@ '__pycache__', 'site-packages', - # Helper modules of public modules. - # For example, sysconfig uses _osx_support. - '_aix_support', - '_collections_abc', - '_compat_pickle', - '_compression', - '_markupbase', - '_osx_support', - '_sitebuiltins', - '_strptime', - '_threading_local', - '_weakrefset', - - # Used to bootstrap setup.py - '_bootsubprocess', - - # pure Python implementation - '_py_abc', - '_pydecimal', - '_pyio', - # test modules '__phello__.foo', '_ctypes_test', @@ -69,40 +48,20 @@ ) -def write_comment(fp, comment): - print(f"// {comment}", file=fp) - - -def write_modules(fp, names): - for name in sorted(names): - if name in IGNORE: - continue - print(f'"{name}",', file=fp) - print(file=fp) - - -def list_builtin_modules(fp): - write_comment(fp, "Built-in modules") - write_modules(fp, sys.builtin_module_names) - - # Pure Python modules (Lib/*.py) -def list_python_modules(fp): - write_comment(fp, "Pure Python modules (Lib/*.py)") - names = [] +def list_python_modules(names): for filename in os.listdir(STDLIB_PATH): if not filename.endswith(".py"): continue name = filename.removesuffix(".py") - names.append(name) - write_modules(fp, names) + names.add(name) def _list_sub_packages(path, names, parent=None): for name in os.listdir(path): - package_path = os.path.join(path, name) if name in IGNORE: continue + package_path = os.path.join(path, name) if not os.path.isdir(package_path): continue if not any(package_file.endswith(".py") @@ -114,40 +73,28 @@ def _list_sub_packages(path, names, parent=None): qualname = name if qualname in IGNORE: continue - names.append(qualname) + names.add(qualname) _list_sub_packages(package_path, names, qualname) # Packages and sub-packages -def list_packages(fp): - write_comment(fp, "Packages and sub-packages") - names = [] +def list_packages(names): _list_sub_packages(STDLIB_PATH, names) - write_modules(fp, names) - - -# Windows extensions -def list_windows_extensions(fp): - write_comment(fp, "Windows extension modules") - write_modules(fp, WINDOWS_MODULES) # Extension modules built by setup.py -def list_setup(fp): +def list_setup_extensions(names): cmd = [sys.executable, SETUP_PY, "-q", "build", "--list-module-names"] output = subprocess.check_output(cmd) output = output.decode("utf8") - names = output.splitlines() - - write_comment(fp, "Extension modules built by setup.py") - write_modules(fp, names) + extensions = output.splitlines() + names |= set(extensions) # Built-in and extension modules built by Modules/Setup -def list_modules_setup(fp): +def list_modules_setup_extensions(names): assign_var = re.compile("^[A-Z]+=") - names = [] with open(MODULES_SETUP, encoding="utf-8") as modules_fp: for line in modules_fp: # Strip comment @@ -165,25 +112,26 @@ def list_modules_setup(fp): continue # "errno errnomodule.c" => write "errno" name = parts[0] - names.append(name) + names.add(name) - write_comment(fp, "Built-in and extension modules built by Modules/Setup") - write_modules(fp, names) + +def list_modules(): + names = set(sys.builtin_module_names) | set(WINDOWS_MODULES) + list_modules_setup_extensions(names) + list_setup_extensions(names) + list_packages(names) + list_python_modules(names) + names -= set(IGNORE) + return names -def list_modules(fp): +def write_modules(fp, names): print("// Auto-generated by Tools/scripts/generate_module_names.py.", file=fp) + print("// List used to create sys.module_names.", file=fp) print(file=fp) print("static const char* _Py_module_names[] = {", file=fp) - print(file=fp) - - list_builtin_modules(fp) - list_python_modules(fp) - list_packages(fp) - list_setup(fp) - list_modules_setup(fp) - list_windows_extensions(fp) - + for name in sorted(names): + print(f'"{name}",', file=fp) print("};", file=fp) @@ -193,7 +141,9 @@ def main(): file=sys.stderr) sys.exit(1) - list_modules(sys.stdout) + fp = sys.stdout + names = list_modules() + write_modules(fp, names) if __name__ == "__main__": From webhook-mailer at python.org Mon Jan 25 07:59:11 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 25 Jan 2021 12:59:11 -0000 Subject: [Python-checkins] bpo-42955: Fix sys.module_names doc (GH-24329) Message-ID: https://github.com/python/cpython/commit/483359174e92489e13959977824806734f1a8cdd commit: 483359174e92489e13959977824806734f1a8cdd branch: master author: Victor Stinner committer: vstinner date: 2021-01-25T13:59:02+01:00 summary: bpo-42955: Fix sys.module_names doc (GH-24329) Replace versionchanged markup with versionadded. files: M Doc/library/sys.rst diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index d536fc9322eb0..f187895410cd4 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1077,7 +1077,7 @@ always available. See also the :attr:`sys.builtin_module_names` list. - .. versionchanged:: 3.10 + .. versionadded:: 3.10 .. data:: modules From webhook-mailer at python.org Mon Jan 25 08:25:45 2021 From: webhook-mailer at python.org (terryjreedy) Date: Mon, 25 Jan 2021 13:25:45 -0000 Subject: [Python-checkins] bpo-43013: Fix old tkinter module names in idlelib (GH-24326) Message-ID: https://github.com/python/cpython/commit/26af2fae189629d22a87aaf01b92d6f4de92b958 commit: 26af2fae189629d22a87aaf01b92d6f4de92b958 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: terryjreedy date: 2021-01-25T08:25:39-05:00 summary: bpo-43013: Fix old tkinter module names in idlelib (GH-24326) Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and 'tkMessageBox' and remove 'tk'. Just lowercase 'tkFont' as 'font' is already used. Adjust import. (cherry picked from commit 879986d8a932c4524cb6ff822afc9537de16e28d) Co-authored-by: Terry Jan Reedy files: M Lib/idlelib/configdialog.py M Lib/idlelib/editor.py M Lib/idlelib/filelist.py M Lib/idlelib/idle_test/mock_tk.py M Lib/idlelib/idle_test/test_configdialog.py M Lib/idlelib/idle_test/test_replace.py M Lib/idlelib/idle_test/test_searchengine.py M Lib/idlelib/idle_test/test_squeezer.py M Lib/idlelib/iomenu.py M Lib/idlelib/pyshell.py M Lib/idlelib/runscript.py M Lib/idlelib/searchengine.py M Lib/idlelib/squeezer.py diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index 73e64852c69df..c52a04b503adb 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -18,8 +18,8 @@ HORIZONTAL, VERTICAL, ANCHOR, ACTIVE, END) from tkinter.ttk import (Frame, LabelFrame, Button, Checkbutton, Entry, Label, OptionMenu, Notebook, Radiobutton, Scrollbar, Style) -import tkinter.colorchooser as tkColorChooser -import tkinter.font as tkFont +from tkinter import colorchooser +import tkinter.font as tkfont from tkinter import messagebox from idlelib.config import idleConf, ConfigChanges @@ -609,7 +609,7 @@ def load_font_cfg(self): font_bold = configured_font[2]=='bold' # Set sorted no-duplicate editor font selection list and font_name. - fonts = sorted(set(tkFont.families(self))) + fonts = sorted(set(tkfont.families(self))) for font in fonts: self.fontlist.insert(END, font) self.font_name.set(font_name) @@ -663,7 +663,7 @@ def set_samples(self, event=None): Updates font_sample and highlight page highlight_sample. """ font_name = self.font_name.get() - font_weight = tkFont.BOLD if self.font_bold.get() else tkFont.NORMAL + font_weight = tkfont.BOLD if self.font_bold.get() else tkfont.NORMAL new_font = (font_name, self.font_size.get(), font_weight) self.font_sample['font'] = new_font self.highlight_sample['font'] = new_font @@ -1100,7 +1100,7 @@ def get_color(self): target = self.highlight_target.get() prev_color = self.style.lookup(self.frame_color_set['style'], 'background') - rgbTuplet, color_string = tkColorChooser.askcolor( + rgbTuplet, color_string = colorchooser.askcolor( parent=self, title='Pick new color for : '+target, initialcolor=prev_color) if color_string and (color_string != prev_color): diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index a4d0c95362fa9..66e9da5a9dccf 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -12,8 +12,8 @@ from tkinter import * from tkinter.font import Font from tkinter.ttk import Scrollbar -import tkinter.simpledialog as tkSimpleDialog -import tkinter.messagebox as tkMessageBox +from tkinter import simpledialog +from tkinter import messagebox from idlelib.config import idleConf from idlelib import configdialog @@ -295,9 +295,9 @@ def __init__(self, flist=None, filename=None, key=None, root=None): window.register_callback(self.postwindowsmenu) # Some abstractions so IDLE extensions are cross-IDE - self.askyesno = tkMessageBox.askyesno - self.askinteger = tkSimpleDialog.askinteger - self.showerror = tkMessageBox.showerror + self.askinteger = simpledialog.askinteger + self.askyesno = messagebox.askyesno + self.showerror = messagebox.showerror # Add pseudoevents for former extension fixed keys. # (This probably needs to be done once in the process.) @@ -596,7 +596,7 @@ def python_docs(self, event=None): try: os.startfile(self.help_url) except OSError as why: - tkMessageBox.showerror(title='Document Start Failure', + messagebox.showerror(title='Document Start Failure', message=str(why), parent=self.text) else: webbrowser.open(self.help_url) @@ -927,7 +927,7 @@ def display_extra_help(helpfile=helpfile): try: os.startfile(helpfile) except OSError as why: - tkMessageBox.showerror(title='Document Start Failure', + messagebox.showerror(title='Document Start Failure', message=str(why), parent=self.text) else: webbrowser.open(helpfile) @@ -963,7 +963,7 @@ def update_recent_files_list(self, new_file=None): except OSError as err: if not getattr(self.root, "recentfiles_message", False): self.root.recentfiles_message = True - tkMessageBox.showwarning(title='IDLE Warning', + messagebox.showwarning(title='IDLE Warning', message="Cannot save Recent Files list to disk.\n" f" {err}\n" "Select OK to continue.", diff --git a/Lib/idlelib/filelist.py b/Lib/idlelib/filelist.py index 0d200854ef000..254f5caf6b81b 100644 --- a/Lib/idlelib/filelist.py +++ b/Lib/idlelib/filelist.py @@ -1,7 +1,7 @@ "idlelib.filelist" import os -from tkinter import messagebox as tkMessageBox +from tkinter import messagebox class FileList: @@ -20,7 +20,7 @@ def open(self, filename, action=None): filename = self.canonize(filename) if os.path.isdir(filename): # This can happen when bad filename is passed on command line: - tkMessageBox.showerror( + messagebox.showerror( "File Error", "%r is a directory." % (filename,), master=self.root) @@ -88,7 +88,7 @@ def filename_changed_edit(self, edit): if newkey in self.dict: conflict = self.dict[newkey] self.inversedict[conflict] = None - tkMessageBox.showerror( + messagebox.showerror( "Name Conflict", "You now have multiple edit windows open for %r" % (filename,), master=self.root) diff --git a/Lib/idlelib/idle_test/mock_tk.py b/Lib/idlelib/idle_test/mock_tk.py index b736bd001da87..db583553838fb 100644 --- a/Lib/idlelib/idle_test/mock_tk.py +++ b/Lib/idlelib/idle_test/mock_tk.py @@ -59,27 +59,26 @@ def __call__(self, title, message, *args, **kwds): class Mbox: """Mock for tkinter.messagebox with an Mbox_func for each function. - This module was 'tkMessageBox' in 2.x; hence the 'import as' in 3.x. Example usage in test_module.py for testing functions in module.py: --- from idlelib.idle_test.mock_tk import Mbox import module -orig_mbox = module.tkMessageBox +orig_mbox = module.messagebox showerror = Mbox.showerror # example, for attribute access in test methods class Test(unittest.TestCase): @classmethod def setUpClass(cls): - module.tkMessageBox = Mbox + module.messagebox = Mbox @classmethod def tearDownClass(cls): - module.tkMessageBox = orig_mbox + module.messagebox = orig_mbox --- For 'ask' functions, set func.result return value before calling the method - that uses the message function. When tkMessageBox functions are the + that uses the message function. When messagebox functions are the only gui alls in a method, this replacement makes the method gui-free, """ askokcancel = Mbox_func() # True or False diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index 1fea6d41df811..98ddc67afdcc0 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -423,7 +423,7 @@ def test_custom_name(self): def test_color(self): d = self.page d.on_new_color_set = Func() - # self.color is only set in get_color through ColorChooser. + # self.color is only set in get_color through colorchooser. d.color.set('green') self.assertEqual(d.on_new_color_set.called, 1) del d.on_new_color_set @@ -540,8 +540,8 @@ def test_set_theme_type(self): def test_get_color(self): eq = self.assertEqual d = self.page - orig_chooser = configdialog.tkColorChooser.askcolor - chooser = configdialog.tkColorChooser.askcolor = Func() + orig_chooser = configdialog.colorchooser.askcolor + chooser = configdialog.colorchooser.askcolor = Func() gntn = d.get_new_theme_name = Func() d.highlight_target.set('Editor Breakpoint') @@ -582,7 +582,7 @@ def test_get_color(self): eq(d.color.get(), '#de0000') del d.get_new_theme_name - configdialog.tkColorChooser.askcolor = orig_chooser + configdialog.colorchooser.askcolor = orig_chooser def test_on_new_color_set(self): d = self.page diff --git a/Lib/idlelib/idle_test/test_replace.py b/Lib/idlelib/idle_test/test_replace.py index c3c5d2eeb9499..6c07389b29ad4 100644 --- a/Lib/idlelib/idle_test/test_replace.py +++ b/Lib/idlelib/idle_test/test_replace.py @@ -10,7 +10,7 @@ from idlelib.idle_test.mock_tk import Mbox import idlelib.searchengine as se -orig_mbox = se.tkMessageBox +orig_mbox = se.messagebox showerror = Mbox.showerror @@ -20,7 +20,7 @@ class ReplaceDialogTest(unittest.TestCase): def setUpClass(cls): cls.root = Tk() cls.root.withdraw() - se.tkMessageBox = Mbox + se.messagebox = Mbox cls.engine = se.SearchEngine(cls.root) cls.dialog = ReplaceDialog(cls.root, cls.engine) cls.dialog.bell = lambda: None @@ -32,7 +32,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): - se.tkMessageBox = orig_mbox + se.messagebox = orig_mbox del cls.text, cls.dialog, cls.engine cls.root.destroy() del cls.root diff --git a/Lib/idlelib/idle_test/test_searchengine.py b/Lib/idlelib/idle_test/test_searchengine.py index f8401ce9380f2..9d97983941958 100644 --- a/Lib/idlelib/idle_test/test_searchengine.py +++ b/Lib/idlelib/idle_test/test_searchengine.py @@ -4,7 +4,7 @@ import unittest # from test.support import requires from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.idle_test.mock_tk import Var, Mbox from idlelib.idle_test.mock_tk import Text as mockText import re @@ -19,13 +19,13 @@ def setUpModule(): # Replace s-e module tkinter imports other than non-gui TclError. se.BooleanVar = Var se.StringVar = Var - se.tkMessageBox = Mbox + se.messagebox = Mbox def tearDownModule(): # Restore 'just in case', though other tests should also replace. se.BooleanVar = BooleanVar se.StringVar = StringVar - se.tkMessageBox = tkMessageBox + se.messagebox = messagebox class Mock: diff --git a/Lib/idlelib/idle_test/test_squeezer.py b/Lib/idlelib/idle_test/test_squeezer.py index e3912f4bbbec8..ee1bbd76b5056 100644 --- a/Lib/idlelib/idle_test/test_squeezer.py +++ b/Lib/idlelib/idle_test/test_squeezer.py @@ -396,7 +396,7 @@ def test_expand_dangerous_oupput(self): expandingbutton.base_text = expandingbutton.text # Patch the message box module to always return False. - with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox: + with patch('idlelib.squeezer.messagebox') as mock_msgbox: mock_msgbox.askokcancel.return_value = False mock_msgbox.askyesno.return_value = False # Trigger the expand event. @@ -407,7 +407,7 @@ def test_expand_dangerous_oupput(self): self.assertEqual(expandingbutton.text.get('1.0', 'end-1c'), '') # Patch the message box module to always return True. - with patch('idlelib.squeezer.tkMessageBox') as mock_msgbox: + with patch('idlelib.squeezer.messagebox') as mock_msgbox: mock_msgbox.askokcancel.return_value = True mock_msgbox.askyesno.return_value = True # Trigger the expand event. diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py index 8bb2fa6a6e793..5ebf7089fb9ab 100644 --- a/Lib/idlelib/iomenu.py +++ b/Lib/idlelib/iomenu.py @@ -5,8 +5,8 @@ import tempfile import tokenize -import tkinter.filedialog as tkFileDialog -import tkinter.messagebox as tkMessageBox +from tkinter import filedialog +from tkinter import messagebox from tkinter.simpledialog import askstring import idlelib @@ -147,10 +147,10 @@ def loadfile(self, filename): eol_convention = f.newlines converted = True except OSError as err: - tkMessageBox.showerror("I/O Error", str(err), parent=self.text) + messagebox.showerror("I/O Error", str(err), parent=self.text) return False except UnicodeDecodeError: - tkMessageBox.showerror("Decoding Error", + messagebox.showerror("Decoding Error", "File %s\nFailed to Decode" % filename, parent=self.text) return False @@ -159,7 +159,7 @@ def loadfile(self, filename): # If the file does not contain line separators, it is None. # If the file contains mixed line separators, it is a tuple. if eol_convention is not None: - tkMessageBox.showwarning("Mixed Newlines", + messagebox.showwarning("Mixed Newlines", "Mixed newlines detected.\n" "The file will be changed on save.", parent=self.text) @@ -187,10 +187,10 @@ def maybesave(self): return "yes" message = "Do you want to save %s before closing?" % ( self.filename or "this untitled document") - confirm = tkMessageBox.askyesnocancel( + confirm = messagebox.askyesnocancel( title="Save On Close", message=message, - default=tkMessageBox.YES, + default=messagebox.YES, parent=self.text) if confirm: reply = "yes" @@ -249,7 +249,7 @@ def writefile(self, filename): os.fsync(f.fileno()) return True except OSError as msg: - tkMessageBox.showerror("I/O Error", str(msg), + messagebox.showerror("I/O Error", str(msg), parent=self.text) return False @@ -286,7 +286,7 @@ def encode(self, chars): failed = str(err) except UnicodeEncodeError: failed = "Invalid encoding '%s'" % enc - tkMessageBox.showerror( + messagebox.showerror( "I/O Error", "%s.\nSaving as UTF-8" % failed, parent=self.text) @@ -295,10 +295,10 @@ def encode(self, chars): return chars.encode('utf-8-sig') def print_window(self, event): - confirm = tkMessageBox.askokcancel( + confirm = messagebox.askokcancel( title="Print", message="Print to Default Printer", - default=tkMessageBox.OK, + default=messagebox.OK, parent=self.text) if not confirm: self.text.focus_set() @@ -336,10 +336,10 @@ def print_window(self, event): status + output if output: output = "Printing command: %s\n" % repr(command) + output - tkMessageBox.showerror("Print status", output, parent=self.text) + messagebox.showerror("Print status", output, parent=self.text) else: #no printing for this platform message = "Printing is not enabled for this platform: %s" % platform - tkMessageBox.showinfo("Print status", message, parent=self.text) + messagebox.showinfo("Print status", message, parent=self.text) if tempfilename: os.unlink(tempfilename) return "break" @@ -358,7 +358,7 @@ def print_window(self, event): def askopenfile(self): dir, base = self.defaultfilename("open") if not self.opendialog: - self.opendialog = tkFileDialog.Open(parent=self.text, + self.opendialog = filedialog.Open(parent=self.text, filetypes=self.filetypes) filename = self.opendialog.show(initialdir=dir, initialfile=base) return filename @@ -378,7 +378,7 @@ def defaultfilename(self, mode="open"): def asksavefile(self): dir, base = self.defaultfilename("save") if not self.savedialog: - self.savedialog = tkFileDialog.SaveAs( + self.savedialog = filedialog.SaveAs( parent=self.text, filetypes=self.filetypes, defaultextension=self.defaultextension) diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 6fa138219a24d..d32106c983874 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -21,13 +21,13 @@ except (ImportError, AttributeError, OSError): pass -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox if TkVersion < 8.5: root = Tk() # otherwise create root in main root.withdraw() from idlelib.run import fix_scaling fix_scaling(root) - tkMessageBox.showerror("Idle Cannot Start", + messagebox.showerror("Idle Cannot Start", "Idle requires tcl/tk 8.5+, not %s." % TkVersion, parent=root) raise SystemExit(1) @@ -261,7 +261,7 @@ def store_file_breaks(self): except OSError as err: if not getattr(self.root, "breakpoint_error_displayed", False): self.root.breakpoint_error_displayed = True - tkMessageBox.showerror(title='IDLE Error', + messagebox.showerror(title='IDLE Error', message='Unable to update breakpoint list:\n%s' % str(err), parent=self.text) @@ -771,7 +771,7 @@ def runcode(self, code): exec(code, self.locals) except SystemExit: if not self.tkconsole.closing: - if tkMessageBox.askyesno( + if messagebox.askyesno( "Exit?", "Do you want to exit altogether?", default="yes", @@ -805,7 +805,7 @@ def write(self, s): return self.tkconsole.stderr.write(s) def display_port_binding_error(self): - tkMessageBox.showerror( + messagebox.showerror( "Port Binding Error", "IDLE can't bind to a TCP/IP port, which is necessary to " "communicate with its Python execution server. This might be " @@ -816,7 +816,7 @@ def display_port_binding_error(self): parent=self.tkconsole.text) def display_no_subprocess_error(self): - tkMessageBox.showerror( + messagebox.showerror( "Subprocess Connection Error", "IDLE's subprocess didn't make connection.\n" "See the 'Startup failure' section of the IDLE doc, online at\n" @@ -824,7 +824,7 @@ def display_no_subprocess_error(self): parent=self.tkconsole.text) def display_executing_dialog(self): - tkMessageBox.showerror( + messagebox.showerror( "Already executing", "The Python Shell window is already executing a command; " "please wait until it is finished.", @@ -945,7 +945,7 @@ def get_warning_stream(self): def toggle_debugger(self, event=None): if self.executing: - tkMessageBox.showerror("Don't debug now", + messagebox.showerror("Don't debug now", "You can only toggle the debugger when idle", parent=self.text) self.set_debugger_indicator() @@ -1003,7 +1003,7 @@ def endexecuting(self): def close(self): "Extend EditorWindow.close()" if self.executing: - response = tkMessageBox.askokcancel( + response = messagebox.askokcancel( "Kill?", "Your program is still running!\n Do you want to kill it?", default="ok", @@ -1254,7 +1254,7 @@ def open_stack_viewer(self, event=None): try: sys.last_traceback except: - tkMessageBox.showerror("No stack trace", + messagebox.showerror("No stack trace", "There is no stack trace yet.\n" "(sys.last_traceback is not defined)", parent=self.text) diff --git a/Lib/idlelib/runscript.py b/Lib/idlelib/runscript.py index 028b0dbd21dfe..55712e904603f 100644 --- a/Lib/idlelib/runscript.py +++ b/Lib/idlelib/runscript.py @@ -14,7 +14,7 @@ import time import tokenize -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.config import idleConf from idlelib import macosx @@ -195,15 +195,15 @@ def getfilename(self): def ask_save_dialog(self): msg = "Source Must Be Saved\n" + 5*' ' + "OK to Save?" - confirm = tkMessageBox.askokcancel(title="Save Before Run or Check", + confirm = messagebox.askokcancel(title="Save Before Run or Check", message=msg, - default=tkMessageBox.OK, + default=messagebox.OK, parent=self.editwin.text) return confirm def errorbox(self, title, message): # XXX This should really be a function of EditorWindow... - tkMessageBox.showerror(title, message, parent=self.editwin.text) + messagebox.showerror(title, message, parent=self.editwin.text) self.editwin.text.focus_set() self.perf = time.perf_counter() diff --git a/Lib/idlelib/searchengine.py b/Lib/idlelib/searchengine.py index a50038e282ba6..eddef581ab40a 100644 --- a/Lib/idlelib/searchengine.py +++ b/Lib/idlelib/searchengine.py @@ -2,7 +2,7 @@ import re from tkinter import StringVar, BooleanVar, TclError -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox def get(root): '''Return the singleton SearchEngine instance for the process. @@ -96,7 +96,7 @@ def report_error(self, pat, msg, col=None): msg = msg + "\nPattern: " + str(pat) if col is not None: msg = msg + "\nOffset: " + str(col) - tkMessageBox.showerror("Regular expression error", + messagebox.showerror("Regular expression error", msg, master=self.root) def search_text(self, text, prog=None, ok=0): diff --git a/Lib/idlelib/squeezer.py b/Lib/idlelib/squeezer.py index be1538a25fded..3046d803b74a4 100644 --- a/Lib/idlelib/squeezer.py +++ b/Lib/idlelib/squeezer.py @@ -17,7 +17,7 @@ import re import tkinter as tk -import tkinter.messagebox as tkMessageBox +from tkinter import messagebox from idlelib.config import idleConf from idlelib.textview import view_text @@ -147,7 +147,7 @@ def expand(self, event=None): if self.is_dangerous is None: self.set_is_dangerous() if self.is_dangerous: - confirm = tkMessageBox.askokcancel( + confirm = messagebox.askokcancel( title="Expand huge output?", message="\n\n".join([ "The squeezed output is very long: %d lines, %d chars.", @@ -155,7 +155,7 @@ def expand(self, event=None): "It is recommended to view or copy the output instead.", "Really expand?" ]) % (self.numoflines, len(self.s)), - default=tkMessageBox.CANCEL, + default=messagebox.CANCEL, parent=self.text) if not confirm: return "break" From webhook-mailer at python.org Mon Jan 25 09:46:18 2021 From: webhook-mailer at python.org (JulienPalard) Date: Mon, 25 Jan 2021 14:46:18 -0000 Subject: [Python-checkins] bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282) Message-ID: https://github.com/python/cpython/commit/5c1f15b4b1024cbf0acc85832f0c623d1a4605fd commit: 5c1f15b4b1024cbf0acc85832f0c623d1a4605fd branch: master author: Julien Palard committer: JulienPalard date: 2021-01-25T15:46:06+01:00 summary: bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282) files: M .azure-pipelines/docs-steps.yml M Doc/conf.py M Doc/library/asyncio-stream.rst M Doc/library/base64.rst M Doc/library/difflib.rst M Doc/library/doctest.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/.azure-pipelines/docs-steps.yml b/.azure-pipelines/docs-steps.yml index 8e72baf2b12fe..33d379b95aa3d 100644 --- a/.azure-pipelines/docs-steps.yml +++ b/.azure-pipelines/docs-steps.yml @@ -12,7 +12,7 @@ steps: inputs: versionSpec: '>=3.6' -- script: python -m pip install sphinx==3.2.1 blurb python-docs-theme +- script: python -m pip install sphinx==2.2.0 blurb python-docs-theme displayName: 'Install build dependencies' - ${{ if ne(parameters.latex, 'true') }}: diff --git a/Doc/conf.py b/Doc/conf.py index 6b88c23a44473..cf250981f5875 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -237,3 +237,5 @@ # bpo-40204: Disable warnings on Sphinx 2 syntax of the C domain since the # documentation is built with -W (warnings treated as errors). c_warn_on_allowed_pre_v3 = False + +strip_signature_backslash = True diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 9b456c14351e4..ad3c7442ad56c 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -185,7 +185,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 25b3a4ca2967c..2f24bb63912fb 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -199,7 +199,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/doctest.rst b/Doc/library/doctest.rst index 42ad0c9f06e23..a77322f83acbd 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -719,51 +719,36 @@ above. An example's doctest directives modify doctest's behavior for that single example. Use ``+`` to enable the named behavior, or ``-`` to disable it. -For example, this test passes: +For example, this test passes:: -.. doctest:: - :no-trim-doctest-flags: - - >>> print(list(range(20))) # doctest: +NORMALIZE_WHITESPACE + >>> print(list(range(20))) # doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] Without the directive it would fail, both because the actual output doesn't have two blanks before the single-digit list elements, and because the actual output is on a single line. This test also passes, and also requires a directive to do -so: - -.. doctest:: - :no-trim-doctest-flags: +so:: - >>> print(list(range(20))) # doctest: +ELLIPSIS + >>> print(list(range(20))) # doctest: +ELLIPSIS [0, 1, ..., 18, 19] Multiple directives can be used on a single physical line, separated by -commas: +commas:: -.. doctest:: - :no-trim-doctest-flags: - - >>> print(list(range(20))) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE + >>> print(list(range(20))) # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [0, 1, ..., 18, 19] If multiple directive comments are used for a single example, then they are -combined: - -.. doctest:: - :no-trim-doctest-flags: +combined:: - >>> print(list(range(20))) # doctest: +ELLIPSIS - ... # doctest: +NORMALIZE_WHITESPACE + >>> print(list(range(20))) # doctest: +ELLIPSIS + ... # doctest: +NORMALIZE_WHITESPACE [0, 1, ..., 18, 19] As the previous example shows, you can add ``...`` lines to your example containing only directives. This can be useful when an example is too long for -a directive to comfortably fit on the same line: - -.. doctest:: - :no-trim-doctest-flags: +a directive to comfortably fit on the same line:: >>> print(list(range(5)) + list(range(10, 20)) + list(range(30, 40))) ... # doctest: +ELLIPSIS @@ -808,23 +793,18 @@ instead. Another is to do :: There are others, but you get the idea. -Another bad idea is to print things that embed an object address, like - -.. doctest:: +Another bad idea is to print things that embed an object address, like :: - >>> id(1.0) # certain to fail some of the time # doctest: +SKIP + >>> id(1.0) # certain to fail some of the time 7948648 >>> class C: pass - >>> C() # the default repr() for instances embeds an address # doctest: +SKIP - - -The :const:`ELLIPSIS` directive gives a nice approach for the last example: + >>> C() # the default repr() for instances embeds an address + <__main__.C instance at 0x00AC18F0> -.. doctest:: - :no-trim-doctest-flags: +The :const:`ELLIPSIS` directive gives a nice approach for the last example:: - >>> C() # doctest: +ELLIPSIS - + >>> C() #doctest: +ELLIPSIS + <__main__.C instance at 0x...> Floating-point numbers are also subject to small output variations across platforms, because Python defers to the platform C library for float formatting, 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 f28d63b6b3d21..f84353ce391d1 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1334,7 +1334,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 25 09:50:23 2021 From: webhook-mailer at python.org (JulienPalard) Date: Mon, 25 Jan 2021 14:50:23 -0000 Subject: [Python-checkins] bpo-42869: Avoid an HTTP redirection. (GH-24174) Message-ID: https://github.com/python/cpython/commit/eb9983c59b0683270328b5c40a115bb028209511 commit: eb9983c59b0683270328b5c40a115bb028209511 branch: master author: Julien Palard committer: JulienPalard date: 2021-01-25T15:50:14+01:00 summary: bpo-42869: Avoid an HTTP redirection. (GH-24174) files: M Lib/pydoc.py diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 628f9fc7d1d1e..282a917998340 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -504,7 +504,7 @@ def getdocloc(self, object, basedir=sysconfig.get_path('stdlib')): not file.startswith(os.path.join(basedir, 'site-packages')))) and object.__name__ not in ('xml.etree', 'test.pydoc_mod')): if docloc.startswith(("http://", "https://")): - docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__.lower()) + docloc = "{}/{}.html".format(docloc.rstrip("/"), object.__name__.lower()) else: docloc = os.path.join(docloc, object.__name__.lower() + ".html") else: From webhook-mailer at python.org Mon Jan 25 16:02:39 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Mon, 25 Jan 2021 21:02:39 -0000 Subject: [Python-checkins] bpo-37319: Improve documentation, code and tests of randrange. (GH-19112) Message-ID: https://github.com/python/cpython/commit/f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32 commit: f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32 branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-25T23:02:04+02:00 summary: bpo-37319: Improve documentation, code and tests of randrange. (GH-19112) files: M Doc/library/random.rst M Doc/whatsnew/3.10.rst M Lib/random.py M Lib/test/test_random.py M Misc/NEWS.d/3.10.0a4.rst diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 07ee011521429..9d85c2b9958eb 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -141,8 +141,9 @@ Functions for integers ``randrange(10)``. In the future, this will raise a :exc:`TypeError`. .. deprecated:: 3.10 - The exception raised for non-integral values such as ``range(10.5)`` - will be changed from :exc:`ValueError` to :exc:`TypeError`. + The exception raised for non-integral values such as ``randrange(10.5)`` + or ``randrange('10')`` will be changed from :exc:`ValueError` to + :exc:`TypeError`. .. function:: randint(a, b) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index a6c3fbbff916e..3026a1ac0e542 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -530,6 +530,10 @@ Deprecated as appropriate to help identify code which needs updating during this transition. +* Non-integer arguments to :func:`random.randrange` are deprecated. + The :exc:`ValueError` is deprecated in favor of a :exc:`TypeError`. + (Contributed by Serhiy Storchaka and Raymond Hettinger in :issue:`37319`.) + * The various ``load_module()`` methods of :mod:`importlib` have been documented as deprecated since Python 3.6, but will now also trigger a :exc:`DeprecationWarning`. Use diff --git a/Lib/random.py b/Lib/random.py index 30186fc7a3b50..187b0a016947a 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -303,17 +303,15 @@ def randrange(self, start, stop=None, step=_ONE): try: istart = _index(start) except TypeError: - if int(start) == start: - istart = int(start) - _warn('Float arguments to randrange() have been deprecated\n' - 'since Python 3.10 and will be removed in a subsequent ' - 'version.', - DeprecationWarning, 2) - else: + istart = int(start) + if istart != start: _warn('randrange() will raise TypeError in the future', DeprecationWarning, 2) raise ValueError("non-integer arg 1 for randrange()") - + _warn('non-integer arguments to randrange() have been deprecated ' + 'since Python 3.10 and will be removed in a subsequent ' + 'version', + DeprecationWarning, 2) if stop is None: # We don't check for "step != 1" because it hasn't been # type checked and converted to an integer yet. @@ -327,31 +325,29 @@ def randrange(self, start, stop=None, step=_ONE): try: istop = _index(stop) except TypeError: - if int(stop) == stop: - istop = int(stop) - _warn('Float arguments to randrange() have been deprecated\n' - 'since Python 3.10 and will be removed in a subsequent ' - 'version.', - DeprecationWarning, 2) - else: + istop = int(stop) + if istop != stop: _warn('randrange() will raise TypeError in the future', DeprecationWarning, 2) raise ValueError("non-integer stop for randrange()") - + _warn('non-integer arguments to randrange() have been deprecated ' + 'since Python 3.10 and will be removed in a subsequent ' + 'version', + DeprecationWarning, 2) + width = istop - istart try: istep = _index(step) except TypeError: - if int(step) == step: - istep = int(step) - _warn('Float arguments to randrange() have been deprecated\n' - 'since Python 3.10 and will be removed in a subsequent ' - 'version.', - DeprecationWarning, 2) - else: + istep = int(step) + if istep != step: _warn('randrange() will raise TypeError in the future', DeprecationWarning, 2) raise ValueError("non-integer step for randrange()") - width = istop - istart + _warn('non-integer arguments to randrange() have been deprecated ' + 'since Python 3.10 and will be removed in a subsequent ' + 'version', + DeprecationWarning, 2) + # Fast path. if istep == 1: if width > 0: return istart + self._randbelow(width) diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index 35ae4e6c3c80c..66908868a6e9e 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -509,11 +509,24 @@ def test_randrange_errors(self): raises(-721) raises(0, 100, -12) # Non-integer start/stop - raises(3.14159) - raises(0, 2.71828) + self.assertWarns(DeprecationWarning, raises, 3.14159) + self.assertWarns(DeprecationWarning, self.gen.randrange, 3.0) + self.assertWarns(DeprecationWarning, self.gen.randrange, Fraction(3, 1)) + self.assertWarns(DeprecationWarning, raises, '3') + self.assertWarns(DeprecationWarning, raises, 0, 2.71828) + self.assertWarns(DeprecationWarning, self.gen.randrange, 0, 2.0) + self.assertWarns(DeprecationWarning, self.gen.randrange, 0, Fraction(2, 1)) + self.assertWarns(DeprecationWarning, raises, 0, '2') # Zero and non-integer step raises(0, 42, 0) - raises(0, 42, 3.14159) + self.assertWarns(DeprecationWarning, raises, 0, 42, 0.0) + self.assertWarns(DeprecationWarning, raises, 0, 0, 0.0) + self.assertWarns(DeprecationWarning, raises, 0, 42, 3.14159) + self.assertWarns(DeprecationWarning, self.gen.randrange, 0, 42, 3.0) + self.assertWarns(DeprecationWarning, self.gen.randrange, 0, 42, Fraction(3, 1)) + self.assertWarns(DeprecationWarning, raises, 0, 42, '3') + self.assertWarns(DeprecationWarning, self.gen.randrange, 0, 42, 1.0) + self.assertWarns(DeprecationWarning, raises, 0, 0, 1.0) def test_randrange_argument_handling(self): randrange = self.gen.randrange diff --git a/Misc/NEWS.d/3.10.0a4.rst b/Misc/NEWS.d/3.10.0a4.rst index 882e03d82169a..57da9254587b4 100644 --- a/Misc/NEWS.d/3.10.0a4.rst +++ b/Misc/NEWS.d/3.10.0a4.rst @@ -605,12 +605,12 @@ deprecated in Python 3.7. Patch by Erlend E. Aasland .. nonce: Cfl1eR .. section: Library -Harmonized random.randrange() argument handling to match range(). +Harmonized :func:`random.randrange` argument handling to match :func:`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*. +* The integer test and conversion in ``randrange()`` now uses + :func:`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.) From webhook-mailer at python.org Mon Jan 25 16:08:11 2021 From: webhook-mailer at python.org (gvanrossum) Date: Mon, 25 Jan 2021 21:08:11 -0000 Subject: [Python-checkins] bpo-42383: pdb: do not fail to restart the target if the current directory changed (#23412) Message-ID: https://github.com/python/cpython/commit/501d4a51e32c7bbba255598adc307660b5af891a commit: 501d4a51e32c7bbba255598adc307660b5af891a branch: master author: Andrey Bienkowski committer: gvanrossum date: 2021-01-25T13:08:01-08:00 summary: bpo-42383: pdb: do not fail to restart the target if the current directory changed (#23412) This commit only adds tests and a news entry. The actual bug was fixed in the earlier commit. files: A Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst M Lib/test/test_pdb.py diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 0a6f186d4be2f..51cd378648378 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1703,6 +1703,29 @@ def test_issue42384_symlink(self): self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + def test_issue42383(self): + with os_helper.temp_cwd() as cwd: + with open('foo.py', 'w') as f: + s = textwrap.dedent(""" + print('The correct file was executed') + + import os + os.chdir("subdir") + """) + f.write(s) + + subdir = os.path.join(cwd, 'subdir') + os.mkdir(subdir) + os.mkdir(os.path.join(subdir, 'subdir')) + wrong_file = os.path.join(subdir, 'foo.py') + + with open(wrong_file, 'w') as f: + f.write('print("The wrong file was executed")') + + stdout, stderr = self._run_pdb(['foo.py'], 'c\nc\nq') + expected = '(Pdb) The correct file was executed' + self.assertEqual(stdout.split('\n')[6].rstrip('\r'), expected) + def load_tests(*args): from test import test_pdb diff --git a/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst b/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst new file mode 100644 index 0000000000000..ccf2106f28a93 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst @@ -0,0 +1,2 @@ +Fix pdb: previously pdb would fail to restart the debugging target if it was +specified using a relative path and the current directory changed. From webhook-mailer at python.org Mon Jan 25 16:08:51 2021 From: webhook-mailer at python.org (gvanrossum) Date: Mon, 25 Jan 2021 21:08:51 -0000 Subject: [Python-checkins] [3.9] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24321) Message-ID: https://github.com/python/cpython/commit/f2df7958fb82cd927e17152b3a1bd2823a76dd3e commit: f2df7958fb82cd927e17152b3a1bd2823a76dd3e branch: 3.9 author: Andrey Bienkowski committer: gvanrossum date: 2021-01-25T13:08:41-08:00 summary: [3.9] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24321) files: A Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst M Lib/pdb.py M Lib/test/test_pdb.py diff --git a/Lib/pdb.py b/Lib/pdb.py index d7d957159458b..7a5192cbadc3a 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -1686,8 +1686,9 @@ def main(): sys.argv[:] = args # Hide "pdb.py" and pdb options from argument list - # Replace pdb's dir with script's dir in front of module search path. if not run_as_module: + mainpyfile = os.path.realpath(mainpyfile) + # Replace pdb's dir with script's dir in front of module search path. sys.path[0] = os.path.dirname(mainpyfile) # Note on saving/restoring sys.argv: it's a good idea when sys.argv was diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 8016f81e5ac51..e1a13cbaf3ef8 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1661,6 +1661,48 @@ def test_errors_in_command(self): '(Pdb) ', ]) + + def test_issue42384(self): + '''When running `python foo.py` sys.path[0] is an absolute path. `python -m pdb foo.py` should behave the same''' + script = textwrap.dedent(""" + import sys + print('sys.path[0] is', sys.path[0]) + """) + commands = 'c\nq' + + with support.temp_cwd() as cwd: + expected = f'(Pdb) sys.path[0] is {os.path.realpath(cwd)}' + + stdout, stderr = self.run_pdb_script(script, commands) + + self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + + @support.skip_unless_symlink + def test_issue42384_symlink(self): + '''When running `python foo.py` sys.path[0] resolves symlinks. `python -m pdb foo.py` should behave the same''' + script = textwrap.dedent(""" + import sys + print('sys.path[0] is', sys.path[0]) + """) + commands = 'c\nq' + + with support.temp_cwd() as cwd: + cwd = os.path.realpath(cwd) + dir_one = os.path.join(cwd, 'dir_one') + dir_two = os.path.join(cwd, 'dir_two') + expected = f'(Pdb) sys.path[0] is {dir_one}' + + os.mkdir(dir_one) + with open(os.path.join(dir_one, 'foo.py'), 'w') as f: + f.write(script) + os.mkdir(dir_two) + os.symlink(os.path.join(dir_one, 'foo.py'), os.path.join(dir_two, 'foo.py')) + + stdout, stderr = self._run_pdb([os.path.join('dir_two', 'foo.py')], commands) + + self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + + def load_tests(*args): from test import test_pdb suites = [ diff --git a/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst b/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst new file mode 100644 index 0000000000000..ae990162fbab7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst @@ -0,0 +1 @@ +Make pdb populate sys.path[0] exactly the same as regular python execution. From webhook-mailer at python.org Mon Jan 25 16:10:49 2021 From: webhook-mailer at python.org (gvanrossum) Date: Mon, 25 Jan 2021 21:10:49 -0000 Subject: [Python-checkins] [3.8] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24320) Message-ID: https://github.com/python/cpython/commit/c10180ea1458aa0ffd7793cb75629ebffe8a257e commit: c10180ea1458aa0ffd7793cb75629ebffe8a257e branch: 3.8 author: Andrey Bienkowski committer: gvanrossum date: 2021-01-25T13:10:40-08:00 summary: [3.8] bpo-42384: pdb: correctly populate sys.path[0] (GH-23338) (#24320) files: A Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst M Lib/pdb.py M Lib/test/test_pdb.py diff --git a/Lib/pdb.py b/Lib/pdb.py index d7d957159458b..7a5192cbadc3a 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -1686,8 +1686,9 @@ def main(): sys.argv[:] = args # Hide "pdb.py" and pdb options from argument list - # Replace pdb's dir with script's dir in front of module search path. if not run_as_module: + mainpyfile = os.path.realpath(mainpyfile) + # Replace pdb's dir with script's dir in front of module search path. sys.path[0] = os.path.dirname(mainpyfile) # Note on saving/restoring sys.argv: it's a good idea when sys.argv was diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 9c9471a8cc8df..74448747e3e1b 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1658,6 +1658,48 @@ def test_errors_in_command(self): '(Pdb) ', ]) + + def test_issue42384(self): + '''When running `python foo.py` sys.path[0] is an absolute path. `python -m pdb foo.py` should behave the same''' + script = textwrap.dedent(""" + import sys + print('sys.path[0] is', sys.path[0]) + """) + commands = 'c\nq' + + with support.temp_cwd() as cwd: + expected = f'(Pdb) sys.path[0] is {os.path.realpath(cwd)}' + + stdout, stderr = self.run_pdb_script(script, commands) + + self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + + @support.skip_unless_symlink + def test_issue42384_symlink(self): + '''When running `python foo.py` sys.path[0] resolves symlinks. `python -m pdb foo.py` should behave the same''' + script = textwrap.dedent(""" + import sys + print('sys.path[0] is', sys.path[0]) + """) + commands = 'c\nq' + + with support.temp_cwd() as cwd: + cwd = os.path.realpath(cwd) + dir_one = os.path.join(cwd, 'dir_one') + dir_two = os.path.join(cwd, 'dir_two') + expected = f'(Pdb) sys.path[0] is {dir_one}' + + os.mkdir(dir_one) + with open(os.path.join(dir_one, 'foo.py'), 'w') as f: + f.write(script) + os.mkdir(dir_two) + os.symlink(os.path.join(dir_one, 'foo.py'), os.path.join(dir_two, 'foo.py')) + + stdout, stderr = self._run_pdb([os.path.join('dir_two', 'foo.py')], commands) + + self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + + def load_tests(*args): from test import test_pdb suites = [ diff --git a/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst b/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst new file mode 100644 index 0000000000000..ae990162fbab7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-17-14-32-39.bpo-42384.1ZnQSn.rst @@ -0,0 +1 @@ +Make pdb populate sys.path[0] exactly the same as regular python execution. From webhook-mailer at python.org Mon Jan 25 17:13:19 2021 From: webhook-mailer at python.org (vstinner) Date: Mon, 25 Jan 2021 22:13:19 -0000 Subject: [Python-checkins] bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332) Message-ID: https://github.com/python/cpython/commit/9852cb38112a4f8d11e26c3423643ea994d5a14f commit: 9852cb38112a4f8d11e26c3423643ea994d5a14f branch: master author: Victor Stinner committer: vstinner date: 2021-01-25T23:12:50+01:00 summary: bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332) * Rename _Py_module_names to _Py_stdlib_module_names. * Rename Python/module_names.h to Python/stdlib_module_names.h. files: A Python/stdlib_module_names.h A Tools/scripts/generate_stdlib_module_names.py D Python/module_names.h D Tools/scripts/generate_module_names.py M .github/workflows/build.yml M .travis.yml M Doc/library/sys.rst M Doc/whatsnew/3.10.rst M Lib/test/test_capi.py M Lib/test/test_faulthandler.py M Lib/test/test_sys.py M Makefile.pre.in M Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst M PCbuild/pythoncore.vcxproj M PCbuild/pythoncore.vcxproj.filters M Python/pylifecycle.c M Python/sysmodule.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a41b51824546..48b5825db042f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: # Build Python with the libpython dynamic library ./configure --with-pydebug --enable-shared make -j4 regen-all - make regen-module-names + make regen-stdlib-module-names - name: Check for changes run: | changes=$(git status --porcelain) diff --git a/.travis.yml b/.travis.yml index c908891b2e322..6a22d20455b42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -172,7 +172,7 @@ before_script: - eval "$(pyenv init -)" - pyenv global 3.8 - PYTHON_FOR_REGEN=python3.8 make -j4 regen-all - - make regen-module-names + - make regen-stdlib-module-names - changes=`git status --porcelain` - | # Check for changes in regenerated files diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index f187895410cd4..0219ae8ceb65f 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -157,7 +157,7 @@ always available. Python interpreter. (This information is not available in any other way --- ``modules.keys()`` only lists the imported modules.) - See also the :attr:`sys.module_names` list. + See also the :attr:`sys.stdlib_module_names` list. .. function:: call_tracing(func, args) @@ -1062,24 +1062,6 @@ always available. This is still called as a fallback if a :data:`meta_path` entry doesn't have a :meth:`~importlib.abc.MetaPathFinder.find_spec` method. -.. data:: module_names - - A frozenset of strings containing the names of standard library modules. - - It is the same on all platforms. Modules which are not available on - some platforms and modules disabled at Python build are also listed. - All module kinds are listed: pure Python, built-in, frozen and extension - modules. Test modules are excluded. - - For packages, only sub-packages are listed, not sub-modules. For example, - ``concurrent`` package and ``concurrent.futures`` sub-package are listed, - but not ``concurrent.futures.base`` sub-module. - - See also the :attr:`sys.builtin_module_names` list. - - .. versionadded:: 3.10 - - .. data:: modules This is a dictionary that maps module names to modules which have already been @@ -1584,6 +1566,24 @@ always available. to a console and Python apps started with :program:`pythonw`. +.. data:: stdlib_module_names + + A frozenset of strings containing the names of standard library modules. + + It is the same on all platforms. Modules which are not available on + some platforms and modules disabled at Python build are also listed. + All module kinds are listed: pure Python, built-in, frozen and extension + modules. Test modules are excluded. + + For packages, only sub-packages are listed, not sub-modules. For example, + ``concurrent`` package and ``concurrent.futures`` sub-package are listed, + but not ``concurrent.futures.base`` sub-module. + + See also the :attr:`sys.builtin_module_names` list. + + .. versionadded:: 3.10 + + .. data:: thread_info A :term:`named tuple` holding information about the thread diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 3026a1ac0e542..30a82816444af 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -396,7 +396,7 @@ Add :data:`sys.orig_argv` attribute: the list of the original command line arguments passed to the Python executable. (Contributed by Victor Stinner in :issue:`23427`.) -Add :data:`sys.module_names`, containing the list of the standard library +Add :data:`sys.stdlib_module_names`, containing the list of the standard library module names. (Contributed by Victor Stinner in :issue:`42955`.) diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 5f5c0d038d9f3..8e92a50026c86 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -581,7 +581,7 @@ def test_fatal_error(self): not_expected = ('_testcapi',) code = textwrap.dedent(''' import _testcapi, sys - sys.module_names = frozenset({"_testcapi"}) + sys.stdlib_module_names = frozenset({"_testcapi"}) _testcapi.fatal_error(b"MESSAGE") ''') self.check_fatal_error(code, expected) diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 02077a69bb4d8..648624482e555 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -336,7 +336,7 @@ def test_dump_ext_modules(self): import faulthandler import sys # Don't filter stdlib module names - sys.module_names = frozenset() + sys.stdlib_module_names = frozenset() faulthandler.enable() faulthandler._sigsegv() """ diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 729b8667fc857..c4e053594800b 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -987,8 +987,8 @@ def test_orig_argv(self): proc) def test_module_names(self): - self.assertIsInstance(sys.module_names, frozenset) - for name in sys.module_names: + self.assertIsInstance(sys.stdlib_module_names, frozenset) + for name in sys.stdlib_module_names: self.assertIsInstance(name, str) diff --git a/Makefile.pre.in b/Makefile.pre.in index ca6b5189c7564..0b22bdd5591b9 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -760,7 +760,7 @@ regen-all: regen-opcode regen-opcode-targets regen-typeslots \ regen-token regen-ast regen-keyword regen-importlib clinic \ regen-pegen-metaparser regen-pegen @echo - @echo "Note: make regen-module-names and autoconf should be run manually" + @echo "Note: make regen-stdlib-module-names and autoconf should be run manually" ############################################################################ # Special rules for object files @@ -900,14 +900,14 @@ regen-keyword: $(srcdir)/Lib/keyword.py.new $(UPDATE_FILE) $(srcdir)/Lib/keyword.py $(srcdir)/Lib/keyword.py.new -.PHONY: regen-module-names -regen-module-names: build_all - # Regenerate Python/module_names.h - # using Tools/scripts/generate_module_names.py +.PHONY: regen-stdlib-module-names +regen-stdlib-module-names: build_all + # Regenerate Python/stdlib_module_names.h + # using Tools/scripts/generate_stdlib_module_names.py $(RUNSHARED) ./$(BUILDPYTHON) \ - $(srcdir)/Tools/scripts/generate_module_names.py \ - > $(srcdir)/Python/module_names.h.new - $(UPDATE_FILE) $(srcdir)/Python/module_names.h $(srcdir)/Python/module_names.h.new + $(srcdir)/Tools/scripts/generate_stdlib_module_names.py \ + > $(srcdir)/Python/stdlib_module_names.h.new + $(UPDATE_FILE) $(srcdir)/Python/stdlib_module_names.h $(srcdir)/Python/stdlib_module_names.h.new Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o: $(srcdir)/Include/Python-ast.h @@ -1160,7 +1160,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/internal/pycore_warnings.h \ $(DTRACE_HEADERS) \ \ - $(srcdir)/Python/module_names.h + $(srcdir)/Python/stdlib_module_names.h $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS) diff --git a/Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst b/Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst index 0631acd7a9870..373b829b0fb76 100644 --- a/Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst +++ b/Misc/NEWS.d/next/Library/2021-01-18-11-59-46.bpo-42955.CSWLC9.rst @@ -1,2 +1,2 @@ -Add :data:`sys.module_names`, containing the list of the standard library +Add :data:`sys.stdlib_module_names`, containing the list of the standard library module names. Patch by Victor Stinner. diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 6a260da65556a..f172f2a5786c6 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -291,7 +291,7 @@ - + diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 98e3ca2c9e6b8..3bafdb8d29711 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -360,7 +360,7 @@ Python - + Python diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index a97f45d0d5dc4..bf5dcdd107e20 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -2497,7 +2497,7 @@ fatal_error_exit(int status) // Dump the list of extension modules of sys.modules, excluding stdlib modules -// (sys.module_names), into fd file descriptor. +// (sys.stdlib_module_names), into fd file descriptor. // // This function is called by a signal handler in faulthandler: avoid memory // allocations and keep the implementation simple. For example, the list is not @@ -2519,19 +2519,19 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp) // Avoid PyDict_GetItemString() which calls PyUnicode_FromString(), // memory cannot be allocated on the heap in a signal handler. // Iterate on the dict instead. - PyObject *module_names = NULL; + PyObject *stdlib_module_names = NULL; pos = 0; while (PyDict_Next(interp->sysdict, &pos, &key, &value)) { if (PyUnicode_Check(key) - && PyUnicode_CompareWithASCIIString(key, "module_names") == 0) { - module_names = value; + && PyUnicode_CompareWithASCIIString(key, "stdlib_module_names") == 0) { + stdlib_module_names = value; break; } } - // If we failed to get sys.module_names or it's not a frozenset, + // If we failed to get sys.stdlib_module_names or it's not a frozenset, // don't exclude stdlib modules. - if (module_names != NULL && !PyFrozenSet_Check(module_names)) { - module_names = NULL; + if (stdlib_module_names != NULL && !PyFrozenSet_Check(stdlib_module_names)) { + stdlib_module_names = NULL; } // List extensions @@ -2547,13 +2547,13 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp) } // Use the module name from the sys.modules key, // don't attempt to get the module object name. - if (module_names != NULL) { + if (stdlib_module_names != NULL) { int is_stdlib_ext = 0; - Py_ssize_t i; + Py_ssize_t i = 0; PyObject *item; Py_hash_t hash; - for (i=0; _PySet_NextEntry(module_names, &i, &item, &hash); ) { + while (_PySet_NextEntry(stdlib_module_names, &i, &item, &hash)) { if (PyUnicode_Check(item) && PyUnicode_Compare(key, item) == 0) { diff --git a/Python/module_names.h b/Python/stdlib_module_names.h similarity index 95% rename from Python/module_names.h rename to Python/stdlib_module_names.h index 0dc2633916d30..8c430821d64b8 100644 --- a/Python/module_names.h +++ b/Python/stdlib_module_names.h @@ -1,7 +1,7 @@ -// Auto-generated by Tools/scripts/generate_module_names.py. -// List used to create sys.module_names. +// Auto-generated by Tools/scripts/generate_stdlib_module_names.py. +// List used to create sys.stdlib_module_names. -static const char* _Py_module_names[] = { +static const char* _Py_stdlib_module_names[] = { "__future__", "_abc", "_aix_support", diff --git a/Python/sysmodule.c b/Python/sysmodule.c index e2f7e39f33329..b9349effe3c87 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -29,7 +29,7 @@ Data members: #include "frameobject.h" // PyFrame_GetBack() #include "pydtrace.h" #include "osdefs.h" // DELIM -#include "module_names.h" // _Py_module_names +#include "stdlib_module_names.h" // _Py_stdlib_module_names #include #ifdef MS_WINDOWS @@ -2054,16 +2054,16 @@ list_builtin_module_names(void) static PyObject * -list_module_names(void) +list_stdlib_module_names(void) { - Py_ssize_t len = Py_ARRAY_LENGTH(_Py_module_names); + Py_ssize_t len = Py_ARRAY_LENGTH(_Py_stdlib_module_names); PyObject *names = PyTuple_New(len); if (names == NULL) { return NULL; } for (Py_ssize_t i = 0; i < len; i++) { - PyObject *name = PyUnicode_FromString(_Py_module_names[i]); + PyObject *name = PyUnicode_FromString(_Py_stdlib_module_names[i]); if (name == NULL) { Py_DECREF(names); return NULL; @@ -2784,7 +2784,7 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict) SET_SYS("hash_info", get_hash_info(tstate)); SET_SYS("maxunicode", PyLong_FromLong(0x10FFFF)); SET_SYS("builtin_module_names", list_builtin_module_names()); - SET_SYS("module_names", list_module_names()); + SET_SYS("stdlib_module_names", list_stdlib_module_names()); #if PY_BIG_ENDIAN SET_SYS_FROM_STRING("byteorder", "big"); #else diff --git a/Tools/scripts/generate_module_names.py b/Tools/scripts/generate_stdlib_module_names.py similarity index 92% rename from Tools/scripts/generate_module_names.py rename to Tools/scripts/generate_stdlib_module_names.py index 9d363aa04b300..02647691fc4d6 100644 --- a/Tools/scripts/generate_module_names.py +++ b/Tools/scripts/generate_stdlib_module_names.py @@ -1,5 +1,5 @@ # This script lists the names of standard library modules -# to update Python/module_names.h +# to update Python/stdlib_mod_names.h import os.path import re import subprocess @@ -126,10 +126,11 @@ def list_modules(): def write_modules(fp, names): - print("// Auto-generated by Tools/scripts/generate_module_names.py.", file=fp) - print("// List used to create sys.module_names.", file=fp) + print("// Auto-generated by Tools/scripts/generate_stdlib_module_names.py.", + file=fp) + print("// List used to create sys.stdlib_module_names.", file=fp) print(file=fp) - print("static const char* _Py_module_names[] = {", file=fp) + print("static const char* _Py_stdlib_module_names[] = {", file=fp) for name in sorted(names): print(f'"{name}",', file=fp) print("};", file=fp) From webhook-mailer at python.org Mon Jan 25 17:26:38 2021 From: webhook-mailer at python.org (ethanfurman) Date: Mon, 25 Jan 2021 22:26:38 -0000 Subject: [Python-checkins] bpo-38250: [Enum] single-bit flags are canonical (GH-24215) Message-ID: https://github.com/python/cpython/commit/7aaeb2a3d682ecba125c33511e4b4796021d2f82 commit: 7aaeb2a3d682ecba125c33511e4b4796021d2f82 branch: master author: Ethan Furman committer: ethanfurman date: 2021-01-25T14:26:19-08:00 summary: bpo-38250: [Enum] single-bit flags are canonical (GH-24215) Flag members are now divided by one-bit verses multi-bit, with multi-bit being treated as aliases. Iterating over a flag only returns the contained single-bit flags. Iterating, repr(), and str() show members in definition order. When constructing combined-member flags, any extra integer values are either discarded (CONFORM), turned into ints (EJECT) or treated as errors (STRICT). Flag classes can specify which of those three behaviors is desired: >>> class Test(Flag, boundary=CONFORM): ... ONE = 1 ... TWO = 2 ... >>> Test(5) Besides the three above behaviors, there is also KEEP, which should not be used unless necessary -- for example, _convert_ specifies KEEP as there are flag sets in the stdlib that are incomplete and/or inconsistent (e.g. ssl.Options). KEEP will, as the name suggests, keep all bits; however, iterating over a flag with extra bits will only return the canonical flags contained, not the extra bits. Iteration is now in member definition order. If member definition order matches increasing value order, then a more efficient method of flag decomposition is used; otherwise, sort() is called on the results of that method to get definition order. ``re`` module: repr() has been modified to support as closely as possible its previous output; the big difference is that inverted flags cannot be output as before because the inversion operation now always returns the comparable positive result; i.e. re.A|re.I|re.M|re.S is ~(re.L|re.U|re.S|re.T|re.DEBUG) in both of the above terms, the ``value`` is 282. re's tests have been updated to reflect the modifications to repr(). files: A Misc/NEWS.d/next/Library/2021-01-14-15-07-16.bpo-38250.1fvhOk.rst M Doc/library/enum.rst M Lib/enum.py M Lib/re.py M Lib/test/test_enum.py M Lib/test/test_re.py M Lib/types.py M Misc/ACKS diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index c532e2caec466..b27c5527c7f7c 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -197,7 +197,7 @@ Having two enum members with the same name is invalid:: ... Traceback (most recent call last): ... - TypeError: Attempted to reuse key: 'SQUARE' + TypeError: 'SQUARE' already defined as: 2 However, two enum members are allowed to have the same value. Given two members A and B with the same value (and A defined first), B is an alias to A. By-value @@ -422,7 +422,7 @@ any members. So this is forbidden:: ... Traceback (most recent call last): ... - TypeError: Cannot extend enumerations + TypeError: MoreColor: cannot extend enumeration 'Color' But this is allowed:: @@ -617,6 +617,7 @@ by extension, string enumerations of different types can also be compared to each other. :class:`StrEnum` exists to help avoid the problem of getting an incorrect member:: + >>> from enum import StrEnum >>> class Directions(StrEnum): ... NORTH = 'north', # notice the trailing comma ... SOUTH = 'south' @@ -638,12 +639,22 @@ IntFlag The next variation of :class:`Enum` provided, :class:`IntFlag`, is also based on :class:`int`. The difference being :class:`IntFlag` members can be combined using the bitwise operators (&, \|, ^, ~) and the result is still an -:class:`IntFlag` member. However, as the name implies, :class:`IntFlag` +:class:`IntFlag` member, if possible. However, as the name implies, :class:`IntFlag` members also subclass :class:`int` and can be used wherever an :class:`int` is -used. Any operation on an :class:`IntFlag` member besides the bit-wise -operations will lose the :class:`IntFlag` membership. +used. + +.. note:: + + Any operation on an :class:`IntFlag` member besides the bit-wise operations will + lose the :class:`IntFlag` membership. + +.. note:: + + Bit-wise operations that result in invalid :class:`IntFlag` values will lose the + :class:`IntFlag` membership. .. versionadded:: 3.6 +.. versionchanged:: 3.10 Sample :class:`IntFlag` class:: @@ -671,21 +682,41 @@ It is also possible to name the combinations:: >>> Perm.RWX >>> ~Perm.RWX - + + >>> Perm(7) + + +.. note:: + + Named combinations are considered aliases. Aliases do not show up during + iteration, but can be returned from by-value lookups. + +.. versionchanged:: 3.10 Another important difference between :class:`IntFlag` and :class:`Enum` is that if no flags are set (the value is 0), its boolean evaluation is :data:`False`:: >>> Perm.R & Perm.X - + >>> bool(Perm.R & Perm.X) False Because :class:`IntFlag` members are also subclasses of :class:`int` they can -be combined with them:: +be combined with them (but may lose :class:`IntFlag` membership:: + + >>> Perm.X | 4 + >>> Perm.X | 8 - + 9 + +.. note:: + + The negation operator, ``~``, always returns an :class:`IntFlag` member with a + positive value:: + + >>> (~Perm.X).value == (Perm.R|Perm.W).value == 6 + True :class:`IntFlag` members can also be iterated over:: @@ -717,7 +748,7 @@ flags being set, the boolean evaluation is :data:`False`:: ... GREEN = auto() ... >>> Color.RED & Color.GREEN - + >>> bool(Color.RED & Color.GREEN) False @@ -751,7 +782,7 @@ value:: >>> purple = Color.RED | Color.BLUE >>> list(purple) - [, ] + [, ] .. versionadded:: 3.10 @@ -953,7 +984,7 @@ to handle any extra arguments:: ... BLEACHED_CORAL = () # New color, no Pantone code yet! ... >>> Swatch.SEA_GREEN - + >>> Swatch.SEA_GREEN.pantone '1246' >>> Swatch.BLEACHED_CORAL.pantone @@ -1144,6 +1175,14 @@ Supported ``_sunder_`` names :class:`auto` to get an appropriate value for an enum member; may be overridden +.. note:: + + For standard :class:`Enum` classes the next value chosen is the last value seen + incremented by one. + + For :class:`Flag`-type classes the next value chosen will be the next highest + power-of-two, regardless of the last value seen. + .. versionadded:: 3.6 ``_missing_``, ``_order_``, ``_generate_next_value_`` .. versionadded:: 3.7 ``_ignore_`` @@ -1159,7 +1198,9 @@ and raise an error if the two do not match:: ... Traceback (most recent call last): ... - TypeError: member order does not match _order_ + TypeError: member order does not match _order_: + ['RED', 'BLUE', 'GREEN'] + ['RED', 'GREEN', 'BLUE'] .. note:: @@ -1179,11 +1220,9 @@ Private names are not converted to Enum members, but remain normal attributes. """""""""""""""""""" :class:`Enum` members are instances of their :class:`Enum` class, and are -normally accessed as ``EnumClass.member``. Under certain circumstances they -can also be accessed as ``EnumClass.member.member``, but you should never do -this as that lookup may fail or, worse, return something besides the -:class:`Enum` member you are looking for (this is another good reason to use -all-uppercase names for members):: +normally accessed as ``EnumClass.member``. In Python versions ``3.5`` to +``3.9`` you could access members from other members -- this practice was +discouraged, and in ``3.10`` :class:`Enum` has returned to not allowing it:: >>> class FieldTypes(Enum): ... name = 0 @@ -1191,11 +1230,12 @@ all-uppercase names for members):: ... size = 2 ... >>> FieldTypes.value.size - - >>> FieldTypes.size.value - 2 + Traceback (most recent call last): + ... + AttributeError: FieldTypes: no attribute 'size' .. versionchanged:: 3.5 +.. versionchanged:: 3.10 Creating members that are mixed with other data types @@ -1237,14 +1277,14 @@ but not of the class:: >>> dir(Planet) ['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__doc__', '__members__', '__module__'] >>> dir(Planet.EARTH) - ['__class__', '__doc__', '__module__', 'name', 'surface_gravity', 'value'] + ['__class__', '__doc__', '__module__', 'mass', 'name', 'radius', 'surface_gravity', 'value'] Combining members of ``Flag`` """"""""""""""""""""""""""""" -If a combination of Flag members is not named, the :func:`repr` will include -all named flags and all named combinations of flags that are in the value:: +Iterating over a combination of Flag members will only return the members that +are comprised of a single bit:: >>> class Color(Flag): ... RED = auto() @@ -1254,10 +1294,10 @@ all named flags and all named combinations of flags that are in the value:: ... YELLOW = RED | GREEN ... CYAN = GREEN | BLUE ... - >>> Color(3) # named combination + >>> Color(3) - >>> Color(7) # not named combination - + >>> Color(7) + ``StrEnum`` and :meth:`str.__str__` """"""""""""""""""""""""""""""""""" @@ -1269,3 +1309,71 @@ parts of Python will read the string data directly, while others will call :meth:`StrEnum.__str__` will be the same as :meth:`str.__str__` so that ``str(StrEnum.member) == StrEnum.member`` is true. +``Flag`` and ``IntFlag`` minutia +"""""""""""""""""""""""""""""""" + +The code sample:: + + >>> class Color(IntFlag): + ... BLACK = 0 + ... RED = 1 + ... GREEN = 2 + ... BLUE = 4 + ... PURPLE = RED | BLUE + ... WHITE = RED | GREEN | BLUE + ... + +- single-bit flags are canonical +- multi-bit and zero-bit flags are aliases +- only canonical flags are returned during iteration:: + + >>> list(Color.WHITE) + [, , ] + +- negating a flag or flag set returns a new flag/flag set with the + corresponding positive integer value:: + + >>> Color.GREEN + + + >>> ~Color.GREEN + + +- names of pseudo-flags are constructed from their members' names:: + + >>> (Color.RED | Color.GREEN).name + 'RED|GREEN' + +- multi-bit flags, aka aliases, can be returned from operations:: + + >>> Color.RED | Color.BLUE + + + >>> Color(7) # or Color(-1) + + +- membership / containment checking has changed slightly -- zero valued flags + are never considered to be contained:: + + >>> Color.BLACK in Color.WHITE + False + + otherwise, if all bits of one flag are in the other flag, True is returned:: + + >>> Color.PURPLE in Color.WHITE + True + +There is a new boundary mechanism that controls how out-of-range / invalid +bits are handled: ``STRICT``, ``CONFORM``, ``EJECT`', and ``KEEP``: + + * STRICT --> raises an exception when presented with invalid values + * CONFORM --> discards any invalid bits + * EJECT --> lose Flag status and become a normal int with the given value + * KEEP --> keep the extra bits + - keeps Flag status and extra bits + - extra bits do not show up in iteration + - extra bits do show up in repr() and str() + +The default for Flag is ``STRICT``, the default for ``IntFlag`` is ``DISCARD``, +and the default for ``_convert_`` is ``KEEP`` (see ``ssl.Options`` for an +example of when ``KEEP`` is needed). diff --git a/Lib/enum.py b/Lib/enum.py index 8ca385420da02..d4b11521ab27f 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -1,6 +1,6 @@ import sys from types import MappingProxyType, DynamicClassAttribute -from builtins import property as _bltin_property +from builtins import property as _bltin_property, bin as _bltin_bin __all__ = [ @@ -8,9 +8,15 @@ 'Enum', 'IntEnum', 'StrEnum', 'Flag', 'IntFlag', 'auto', 'unique', 'property', + 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', ] +# Dummy value for Enum and Flag as there are explicit checks for them +# before they have been created. +# This is also why there are checks in EnumMeta like `if Enum is not None` +Enum = Flag = EJECT = None + def _is_descriptor(obj): """ Returns True if obj is a descriptor, False otherwise. @@ -56,6 +62,15 @@ def _is_private(cls_name, name): else: return False +def _is_single_bit(num): + """ + True if only one bit set in num (should be an int) + """ + if num == 0: + return False + num &= num - 1 + return num == 0 + def _make_class_unpicklable(obj): """ Make the given obj un-picklable. @@ -71,6 +86,37 @@ def _break_on_call_reduce(self, proto): setattr(obj, '__reduce_ex__', _break_on_call_reduce) setattr(obj, '__module__', '') +def _iter_bits_lsb(num): + while num: + b = num & (~num + 1) + yield b + num ^= b + +def bin(num, max_bits=None): + """ + Like built-in bin(), except negative values are represented in + twos-compliment, and the leading bit always indicates sign + (0=positive, 1=negative). + + >>> bin(10) + '0b0 1010' + >>> bin(~10) # ~10 is -11 + '0b1 0101' + """ + + ceiling = 2 ** (num).bit_length() + if num >= 0: + s = _bltin_bin(num + ceiling).replace('1', '0', 1) + else: + s = _bltin_bin(~num ^ (ceiling - 1) + ceiling) + sign = s[:3] + digits = s[3:] + if max_bits is not None: + if len(digits) < max_bits: + digits = (sign[-1] * max_bits + digits)[-max_bits:] + return "%s %s" % (sign, digits) + + _auto_null = object() class auto: """ @@ -92,22 +138,30 @@ def __get__(self, instance, ownerclass=None): try: return ownerclass._member_map_[self.name] except KeyError: - raise AttributeError('%r not found in %r' % (self.name, ownerclass.__name__)) + raise AttributeError( + '%s: no attribute %r' % (ownerclass.__name__, self.name) + ) else: if self.fget is None: - raise AttributeError('%s: cannot read attribute %r' % (ownerclass.__name__, self.name)) + raise AttributeError( + '%s: no attribute %r' % (ownerclass.__name__, self.name) + ) else: return self.fget(instance) def __set__(self, instance, value): if self.fset is None: - raise AttributeError("%s: cannot set attribute %r" % (self.clsname, self.name)) + raise AttributeError( + "%s: cannot set attribute %r" % (self.clsname, self.name) + ) else: return self.fset(instance, value) def __delete__(self, instance): if self.fdel is None: - raise AttributeError("%s: cannot delete attribute %r" % (self.clsname, self.name)) + raise AttributeError( + "%s: cannot delete attribute %r" % (self.clsname, self.name) + ) else: return self.fdel(instance) @@ -148,11 +202,17 @@ def __set_name__(self, enum_class, member_name): if enum_class._member_type_ is object: enum_member._value_ = value else: - enum_member._value_ = enum_class._member_type_(*args) + try: + enum_member._value_ = enum_class._member_type_(*args) + except Exception as exc: + raise TypeError( + '_value_ not set in __new__, unable to create it' + ) from None value = enum_member._value_ enum_member._name_ = member_name enum_member.__objclass__ = enum_class enum_member.__init__(*args) + enum_member._sort_order_ = len(enum_class._member_names_) # If another member with the same value was already defined, the # new member becomes an alias to the existing one. for name, canonical_member in enum_class._member_map_.items(): @@ -160,8 +220,21 @@ def __set_name__(self, enum_class, member_name): enum_member = canonical_member break else: - # no other instances found, record this member in _member_names_ - enum_class._member_names_.append(member_name) + # this could still be an alias if the value is multi-bit and the + # class is a flag class + if ( + Flag is None + or not issubclass(enum_class, Flag) + ): + # no other instances found, record this member in _member_names_ + enum_class._member_names_.append(member_name) + elif ( + Flag is not None + and issubclass(enum_class, Flag) + and _is_single_bit(value) + ): + # no other instances found, record this member in _member_names_ + enum_class._member_names_.append(member_name) # get redirect in place before adding to _member_map_ # but check for other instances in parent classes first need_override = False @@ -193,7 +266,7 @@ def __set_name__(self, enum_class, member_name): # This may fail if value is not hashable. We can't add the value # to the map, and by-value lookups for this value will be # linear. - enum_class._value2member_map_[value] = enum_member + enum_class._value2member_map_.setdefault(value, enum_member) except TypeError: pass @@ -228,6 +301,7 @@ def __setitem__(self, key, value): if key not in ( '_order_', '_create_pseudo_member_', '_generate_next_value_', '_missing_', '_ignore_', + '_iter_member_', '_iter_member_by_value_', '_iter_member_by_def_', ): raise ValueError( '_sunder_ names, such as %r, are reserved for future Enum use' @@ -265,10 +339,7 @@ def __setitem__(self, key, value): if isinstance(value, auto): if value.value == _auto_null: value.value = self._generate_next_value( - key, - 1, - len(self._member_names), - self._last_values[:], + key, 1, len(self._member_names), self._last_values[:], ) self._auto_called = True value = value.value @@ -287,15 +358,11 @@ def update(self, members, **more_members): self[name] = value -# Dummy value for Enum as EnumMeta explicitly checks for it, but of course -# until EnumMeta finishes running the first time the Enum class doesn't exist. -# This is also why there are checks in EnumMeta like `if Enum is not None` -Enum = None - class EnumMeta(type): """ Metaclass for Enum """ + @classmethod def __prepare__(metacls, cls, bases, **kwds): # check that previous enum members do not exist @@ -311,7 +378,7 @@ def __prepare__(metacls, cls, bases, **kwds): ) return enum_dict - def __new__(metacls, cls, bases, classdict, **kwds): + def __new__(metacls, cls, bases, classdict, boundary=None, **kwds): # an Enum class is final once enumeration items have been defined; it # cannot be mixed with other types (int, float, etc.) if it has an # inherited __new__ unless a new __new__ is defined (or the resulting @@ -346,15 +413,29 @@ def __new__(metacls, cls, bases, classdict, **kwds): classdict['_use_args_'] = use_args # # convert future enum members into temporary _proto_members + # and record integer values in case this will be a Flag + flag_mask = 0 for name in member_names: - classdict[name] = _proto_member(classdict[name]) + value = classdict[name] + if isinstance(value, int): + flag_mask |= value + classdict[name] = _proto_member(value) # - # house keeping structures + # house-keeping structures classdict['_member_names_'] = [] classdict['_member_map_'] = {} classdict['_value2member_map_'] = {} classdict['_member_type_'] = member_type # + # Flag structures (will be removed if final class is not a Flag + classdict['_boundary_'] = ( + boundary + or getattr(first_enum, '_boundary_', None) + ) + classdict['_flag_mask_'] = flag_mask + classdict['_all_bits_'] = 2 ** ((flag_mask).bit_length()) - 1 + classdict['_inverted_'] = None + # # If a custom type is mixed into the Enum, and it does not know how # to pickle itself, pickle.dumps will succeed but pickle.loads will # fail. Rather than have the error show up later and possibly far @@ -408,11 +489,75 @@ def __new__(metacls, cls, bases, classdict, **kwds): enum_class.__new__ = Enum.__new__ # # py3 support for definition order (helps keep py2/py3 code in sync) + # + # _order_ checking is spread out into three/four steps + # - if enum_class is a Flag: + # - remove any non-single-bit flags from _order_ + # - remove any aliases from _order_ + # - check that _order_ and _member_names_ match + # + # step 1: ensure we have a list if _order_ is not None: if isinstance(_order_, str): _order_ = _order_.replace(',', ' ').split() + # + # remove Flag structures if final class is not a Flag + if ( + Flag is None and cls != 'Flag' + or Flag is not None and not issubclass(enum_class, Flag) + ): + delattr(enum_class, '_boundary_') + delattr(enum_class, '_flag_mask_') + delattr(enum_class, '_all_bits_') + delattr(enum_class, '_inverted_') + elif Flag is not None and issubclass(enum_class, Flag): + # ensure _all_bits_ is correct and there are no missing flags + single_bit_total = 0 + multi_bit_total = 0 + for flag in enum_class._member_map_.values(): + flag_value = flag._value_ + if _is_single_bit(flag_value): + single_bit_total |= flag_value + else: + # multi-bit flags are considered aliases + multi_bit_total |= flag_value + if enum_class._boundary_ is not KEEP: + missed = list(_iter_bits_lsb(multi_bit_total & ~single_bit_total)) + if missed: + raise TypeError( + 'invalid Flag %r -- missing values: %s' + % (cls, ', '.join((str(i) for i in missed))) + ) + enum_class._flag_mask_ = single_bit_total + # + # set correct __iter__ + member_list = [m._value_ for m in enum_class] + if member_list != sorted(member_list): + enum_class._iter_member_ = enum_class._iter_member_by_def_ + if _order_: + # _order_ step 2: remove any items from _order_ that are not single-bit + _order_ = [ + o + for o in _order_ + if o not in enum_class._member_map_ or _is_single_bit(enum_class[o]._value_) + ] + # + if _order_: + # _order_ step 3: remove aliases from _order_ + _order_ = [ + o + for o in _order_ + if ( + o not in enum_class._member_map_ + or + (o in enum_class._member_map_ and o in enum_class._member_names_) + )] + # _order_ step 4: verify that _order_ and _member_names_ match if _order_ != enum_class._member_names_: - raise TypeError('member order does not match _order_') + raise TypeError( + 'member order does not match _order_:\n%r\n%r' + % (enum_class._member_names_, _order_) + ) # return enum_class @@ -422,7 +567,7 @@ def __bool__(self): """ return True - def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, start=1): + def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None): """ Either returns an existing member, or creates a new enum class. @@ -457,6 +602,7 @@ def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, s qualname=qualname, type=type, start=start, + boundary=boundary, ) def __contains__(cls, member): @@ -539,7 +685,7 @@ def __setattr__(cls, name, value): raise AttributeError('Cannot reassign members.') super().__setattr__(name, value) - def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, start=1): + def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, start=1, boundary=None): """ Convenience method to create a new Enum class. @@ -589,9 +735,9 @@ def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, s if qualname is not None: classdict['__qualname__'] = qualname - return metacls.__new__(metacls, class_name, bases, classdict) + return metacls.__new__(metacls, class_name, bases, classdict, boundary=boundary) - def _convert_(cls, name, module, filter, source=None): + def _convert_(cls, name, module, filter, source=None, boundary=None): """ Create a new Enum subclass that replaces a collection of global constants """ @@ -618,7 +764,7 @@ def _convert_(cls, name, module, filter, source=None): except TypeError: # unless some values aren't comparable, in which case sort by name members.sort(key=lambda t: t[0]) - cls = cls(name, members, module=module) + cls = cls(name, members, module=module, boundary=boundary or KEEP) cls.__reduce_ex__ = _reduce_ex_by_name module_globals.update(cls.__members__) module_globals[name] = cls @@ -733,6 +879,7 @@ class Enum(metaclass=EnumMeta): Derive from this class to define new enumerations. """ + def __new__(cls, value): # all enum instances are actually created during class construction # without calling this method; this method is called by the metaclass' @@ -761,6 +908,11 @@ def __new__(cls, value): result = None if isinstance(result, cls): return result + elif ( + Flag is not None and issubclass(cls, Flag) + and cls._boundary_ is EJECT and isinstance(result, int) + ): + return result else: ve_exc = ValueError("%r is not a valid %s" % (value, cls.__qualname__)) if result is None and exc is None: @@ -770,7 +922,8 @@ def __new__(cls, value): 'error in %s._missing_: returned %r instead of None or a valid member' % (cls.__name__, result) ) - exc.__context__ = ve_exc + if not isinstance(exc, ValueError): + exc.__context__ = ve_exc raise exc def _generate_next_value_(name, start, count, last_values): @@ -875,14 +1028,14 @@ def __new__(cls, *values): # it must be a string if not isinstance(values[0], str): raise TypeError('%r is not a string' % (values[0], )) - if len(values) > 1: + if len(values) >= 2: # check that encoding argument is a string if not isinstance(values[1], str): raise TypeError('encoding must be a string, not %r' % (values[1], )) - if len(values) > 2: - # check that errors argument is a string - if not isinstance(values[2], str): - raise TypeError('errors must be a string, not %r' % (values[2], )) + if len(values) == 3: + # check that errors argument is a string + if not isinstance(values[2], str): + raise TypeError('errors must be a string, not %r' % (values[2])) value = str(*values) member = str.__new__(cls, value) member._value_ = value @@ -900,7 +1053,22 @@ def _generate_next_value_(name, start, count, last_values): def _reduce_ex_by_name(self, proto): return self.name -class Flag(Enum): +class FlagBoundary(StrEnum): + """ + control how out of range values are handled + "strict" -> error is raised [default for Flag] + "conform" -> extra bits are discarded + "eject" -> lose flag status [default for IntFlag] + "keep" -> keep flag status and all bits + """ + STRICT = auto() + CONFORM = auto() + EJECT = auto() + KEEP = auto() +STRICT, CONFORM, EJECT, KEEP = FlagBoundary + + +class Flag(Enum, boundary=STRICT): """ Support for flags """ @@ -916,45 +1084,108 @@ def _generate_next_value_(name, start, count, last_values): """ if not count: return start if start is not None else 1 - for last_value in reversed(last_values): - try: - high_bit = _high_bit(last_value) - break - except Exception: - raise TypeError('Invalid Flag value: %r' % last_value) from None + last_value = max(last_values) + try: + high_bit = _high_bit(last_value) + except Exception: + raise TypeError('Invalid Flag value: %r' % last_value) from None return 2 ** (high_bit+1) @classmethod - def _missing_(cls, value): + def _iter_member_by_value_(cls, value): """ - Returns member (possibly creating it) if one can be found for value. + Extract all members from the value in definition (i.e. increasing value) order. """ - original_value = value - if value < 0: - value = ~value - possible_member = cls._create_pseudo_member_(value) - if original_value < 0: - possible_member = ~possible_member - return possible_member + for val in _iter_bits_lsb(value & cls._flag_mask_): + yield cls._value2member_map_.get(val) + + _iter_member_ = _iter_member_by_value_ @classmethod - def _create_pseudo_member_(cls, value): + def _iter_member_by_def_(cls, value): + """ + Extract all members from the value in definition order. + """ + yield from sorted( + cls._iter_member_by_value_(value), + key=lambda m: m._sort_order_, + ) + + @classmethod + def _missing_(cls, value): """ Create a composite member iff value contains only members. """ - pseudo_member = cls._value2member_map_.get(value, None) - if pseudo_member is None: - # verify all bits are accounted for - _, extra_flags = _decompose(cls, value) - if extra_flags: - raise ValueError("%r is not a valid %s" % (value, cls.__qualname__)) + if not isinstance(value, int): + raise ValueError( + "%r is not a valid %s" % (value, cls.__qualname__) + ) + # check boundaries + # - value must be in range (e.g. -16 <-> +15, i.e. ~15 <-> 15) + # - value must not include any skipped flags (e.g. if bit 2 is not + # defined, then 0d10 is invalid) + flag_mask = cls._flag_mask_ + all_bits = cls._all_bits_ + neg_value = None + if ( + not ~all_bits <= value <= all_bits + or value & (all_bits ^ flag_mask) + ): + if cls._boundary_ is STRICT: + max_bits = max(value.bit_length(), flag_mask.bit_length()) + raise ValueError( + "%s: invalid value: %r\n given %s\n allowed %s" % ( + cls.__name__, value, bin(value, max_bits), bin(flag_mask, max_bits), + )) + elif cls._boundary_ is CONFORM: + value = value & flag_mask + elif cls._boundary_ is EJECT: + return value + elif cls._boundary_ is KEEP: + if value < 0: + value = ( + max(all_bits+1, 2**(value.bit_length())) + + value + ) + else: + raise ValueError( + 'unknown flag boundary: %r' % (cls._boundary_, ) + ) + if value < 0: + neg_value = value + value = all_bits + 1 + value + # get members and unknown + unknown = value & ~flag_mask + member_value = value & flag_mask + if unknown and cls._boundary_ is not KEEP: + raise ValueError( + '%s(%r) --> unknown values %r [%s]' + % (cls.__name__, value, unknown, bin(unknown)) + ) + # normal Flag? + __new__ = getattr(cls, '__new_member__', None) + if cls._member_type_ is object and not __new__: # construct a singleton enum pseudo-member pseudo_member = object.__new__(cls) - pseudo_member._name_ = None + else: + pseudo_member = (__new__ or cls._member_type_.__new__)(cls, value) + if not hasattr(pseudo_member, 'value'): pseudo_member._value_ = value - # use setdefault in case another thread already created a composite - # with this value + if member_value: + pseudo_member._name_ = '|'.join([ + m._name_ for m in cls._iter_member_(member_value) + ]) + if unknown: + pseudo_member._name_ += '|0x%x' % unknown + else: + pseudo_member._name_ = None + # use setdefault in case another thread already created a composite + # with this value, but only if all members are known + # note: zero is a special case -- add it + if not unknown: pseudo_member = cls._value2member_map_.setdefault(value, pseudo_member) + if neg_value is not None: + cls._value2member_map_[neg_value] = pseudo_member return pseudo_member def __contains__(self, other): @@ -965,38 +1196,33 @@ def __contains__(self, other): raise TypeError( "unsupported operand type(s) for 'in': '%s' and '%s'" % ( type(other).__qualname__, self.__class__.__qualname__)) + if other._value_ == 0 or self._value_ == 0: + return False return other._value_ & self._value_ == other._value_ def __iter__(self): """ - Returns flags in decreasing value order. + Returns flags in definition order. """ - members, extra_flags = _decompose(self.__class__, self.value) - return (m for m in members if m._value_ != 0) + yield from self._iter_member_(self._value_) + + def __len__(self): + return self._value_.bit_count() def __repr__(self): cls = self.__class__ if self._name_ is not None: return '<%s.%s: %r>' % (cls.__name__, self._name_, self._value_) - members, uncovered = _decompose(cls, self._value_) - return '<%s.%s: %r>' % ( - cls.__name__, - '|'.join([str(m._name_ or m._value_) for m in members]), - self._value_, - ) + else: + # only zero is unnamed by default + return '<%s: %r>' % (cls.__name__, self._value_) def __str__(self): cls = self.__class__ if self._name_ is not None: return '%s.%s' % (cls.__name__, self._name_) - members, uncovered = _decompose(cls, self._value_) - if len(members) == 1 and members[0]._name_ is None: - return '%s.%r' % (cls.__name__, members[0]._value_) else: - return '%s.%s' % ( - cls.__name__, - '|'.join([str(m._name_ or m._value_) for m in members]), - ) + return '%s(%s)' % (cls.__name__, self._value_) def __bool__(self): return bool(self._value_) @@ -1017,86 +1243,56 @@ def __xor__(self, other): return self.__class__(self._value_ ^ other._value_) def __invert__(self): - members, uncovered = _decompose(self.__class__, self._value_) - inverted = self.__class__(0) - for m in self.__class__: - if m not in members and not (m._value_ & self._value_): - inverted = inverted | m - return self.__class__(inverted) + if self._inverted_ is None: + if self._boundary_ is KEEP: + # use all bits + self._inverted_ = self.__class__(~self._value_) + else: + # calculate flags not in this member + self._inverted_ = self.__class__(self._flag_mask_ ^ self._value_) + self._inverted_._inverted_ = self + return self._inverted_ -class IntFlag(int, Flag): +class IntFlag(int, Flag, boundary=EJECT): """ Support for integer-based Flags """ - @classmethod - def _missing_(cls, value): - """ - Returns member (possibly creating it) if one can be found for value. - """ - if not isinstance(value, int): - raise ValueError("%r is not a valid %s" % (value, cls.__qualname__)) - new_member = cls._create_pseudo_member_(value) - return new_member - - @classmethod - def _create_pseudo_member_(cls, value): - """ - Create a composite member iff value contains only members. - """ - pseudo_member = cls._value2member_map_.get(value, None) - if pseudo_member is None: - need_to_create = [value] - # get unaccounted for bits - _, extra_flags = _decompose(cls, value) - # timer = 10 - while extra_flags: - # timer -= 1 - bit = _high_bit(extra_flags) - flag_value = 2 ** bit - if (flag_value not in cls._value2member_map_ and - flag_value not in need_to_create - ): - need_to_create.append(flag_value) - if extra_flags == -flag_value: - extra_flags = 0 - else: - extra_flags ^= flag_value - for value in reversed(need_to_create): - # construct singleton pseudo-members - pseudo_member = int.__new__(cls, value) - pseudo_member._name_ = None - pseudo_member._value_ = value - # use setdefault in case another thread already created a composite - # with this value - pseudo_member = cls._value2member_map_.setdefault(value, pseudo_member) - return pseudo_member - def __or__(self, other): - if not isinstance(other, (self.__class__, int)): + if isinstance(other, self.__class__): + other = other._value_ + elif isinstance(other, int): + other = other + else: return NotImplemented - result = self.__class__(self._value_ | self.__class__(other)._value_) - return result + value = self._value_ + return self.__class__(value | other) def __and__(self, other): - if not isinstance(other, (self.__class__, int)): + if isinstance(other, self.__class__): + other = other._value_ + elif isinstance(other, int): + other = other + else: return NotImplemented - return self.__class__(self._value_ & self.__class__(other)._value_) + value = self._value_ + return self.__class__(value & other) def __xor__(self, other): - if not isinstance(other, (self.__class__, int)): + if isinstance(other, self.__class__): + other = other._value_ + elif isinstance(other, int): + other = other + else: return NotImplemented - return self.__class__(self._value_ ^ self.__class__(other)._value_) + value = self._value_ + return self.__class__(value ^ other) __ror__ = __or__ __rand__ = __and__ __rxor__ = __xor__ - - def __invert__(self): - result = self.__class__(~self._value_) - return result - + __invert__ = Flag.__invert__ def _high_bit(value): """ @@ -1119,31 +1315,7 @@ def unique(enumeration): (enumeration, alias_details)) return enumeration -def _decompose(flag, value): - """ - Extract all members from the value. - """ - # _decompose is only called if the value is not named - not_covered = value - negative = value < 0 - members = [] - for member in flag: - member_value = member.value - if member_value and member_value & value == member_value: - members.append(member) - not_covered &= ~member_value - if not negative: - tmp = not_covered - while tmp: - flag_value = 2 ** _high_bit(tmp) - if flag_value in flag._value2member_map_: - members.append(flag._value2member_map_[flag_value]) - not_covered &= ~flag_value - tmp &= ~flag_value - if not members and value in flag._value2member_map_: - members.append(flag._value2member_map_[value]) - members.sort(key=lambda m: m._value_, reverse=True) - if len(members) > 1 and members[0].value == value: - # we have the breakdown, don't need the value member itself - members.pop(0) - return members, not_covered +def _power_of_two(value): + if value < 1: + return False + return value == 2 ** _high_bit(value) diff --git a/Lib/re.py b/Lib/re.py index bfb7b1ccd9346..a39ff047c26b2 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -142,7 +142,7 @@ __version__ = "2.2.1" -class RegexFlag(enum.IntFlag): +class RegexFlag(enum.IntFlag, boundary=enum.KEEP): ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale" IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case LOCALE = L = sre_compile.SRE_FLAG_LOCALE # assume current 8-bit locale @@ -155,26 +155,17 @@ class RegexFlag(enum.IntFlag): DEBUG = sre_compile.SRE_FLAG_DEBUG # dump pattern after compilation def __repr__(self): - if self._name_ is not None: - return f're.{self._name_}' - value = self._value_ - members = [] - negative = value < 0 - if negative: - value = ~value - for m in self.__class__: - if value & m._value_: - value &= ~m._value_ - members.append(f're.{m._name_}') - if value: - members.append(hex(value)) - res = '|'.join(members) - if negative: - if len(members) > 1: - res = f'~({res})' - else: - res = f'~{res}' + res = '' + if self._name_: + member_names = self._name_.split('|') + constant = None + if member_names[-1].startswith('0x'): + constant = member_names.pop() + res = 're.' + '|re.'.join(member_names) + if constant: + res += '|%s' % constant return res + __str__ = object.__str__ globals().update(RegexFlag.__members__) diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 3ea623e9c883c..daca2e3c83f27 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -1,4 +1,5 @@ import enum +import doctest import inspect import pydoc import sys @@ -6,6 +7,7 @@ import threading from collections import OrderedDict from enum import Enum, IntEnum, StrEnum, EnumMeta, Flag, IntFlag, unique, auto +from enum import STRICT, CONFORM, EJECT, KEEP from io import StringIO from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL from test import support @@ -13,6 +15,13 @@ from test.support import threading_helper from datetime import timedelta +def load_tests(loader, tests, ignore): + tests.addTests(doctest.DocTestSuite(enum)) + tests.addTests(doctest.DocFileSuite( + '../../Doc/library/enum.rst', + optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, + )) + return tests # for pickle tests try: @@ -2126,7 +2135,30 @@ class ThirdFailedStrEnum(StrEnum): one = '1' two = b'2', 'ascii', 9 - + def test_missing_value_error(self): + with self.assertRaisesRegex(TypeError, "_value_ not set in __new__"): + class Combined(str, Enum): + # + def __new__(cls, value, sequence): + enum = str.__new__(cls, value) + if '(' in value: + fis_name, segment = value.split('(', 1) + segment = segment.strip(' )') + else: + fis_name = value + segment = None + enum.fis_name = fis_name + enum.segment = segment + enum.sequence = sequence + return enum + # + def __repr__(self): + return "<%s.%s>" % (self.__class__.__name__, self._name_) + # + key_type = 'An$(1,2)', 0 + company_id = 'An$(3,2)', 1 + code = 'An$(5,1)', 2 + description = 'Bn$', 3 @unittest.skipUnless( sys.version_info[:2] == (3, 9), @@ -2264,9 +2296,12 @@ class Open(Flag): class Color(Flag): BLACK = 0 RED = 1 + ROJO = 1 GREEN = 2 BLUE = 4 PURPLE = RED|BLUE + WHITE = RED|GREEN|BLUE + BLANCO = RED|GREEN|BLUE def test_str(self): Perm = self.Perm @@ -2275,12 +2310,12 @@ def test_str(self): self.assertEqual(str(Perm.X), 'Perm.X') self.assertEqual(str(Perm.R | Perm.W), 'Perm.R|W') self.assertEqual(str(Perm.R | Perm.W | Perm.X), 'Perm.R|W|X') - self.assertEqual(str(Perm(0)), 'Perm.0') + self.assertEqual(str(Perm(0)), 'Perm(0)') self.assertEqual(str(~Perm.R), 'Perm.W|X') self.assertEqual(str(~Perm.W), 'Perm.R|X') self.assertEqual(str(~Perm.X), 'Perm.R|W') self.assertEqual(str(~(Perm.R | Perm.W)), 'Perm.X') - self.assertEqual(str(~(Perm.R | Perm.W | Perm.X)), 'Perm.0') + self.assertEqual(str(~(Perm.R | Perm.W | Perm.X)), 'Perm(0)') self.assertEqual(str(Perm(~0)), 'Perm.R|W|X') Open = self.Open @@ -2288,10 +2323,11 @@ def test_str(self): self.assertEqual(str(Open.WO), 'Open.WO') self.assertEqual(str(Open.AC), 'Open.AC') self.assertEqual(str(Open.RO | Open.CE), 'Open.CE') - self.assertEqual(str(Open.WO | Open.CE), 'Open.CE|WO') - self.assertEqual(str(~Open.RO), 'Open.CE|AC|RW|WO') - self.assertEqual(str(~Open.WO), 'Open.CE|RW') + self.assertEqual(str(Open.WO | Open.CE), 'Open.WO|CE') + self.assertEqual(str(~Open.RO), 'Open.WO|RW|CE') + self.assertEqual(str(~Open.WO), 'Open.RW|CE') self.assertEqual(str(~Open.AC), 'Open.CE') + self.assertEqual(str(~Open.CE), 'Open.AC') self.assertEqual(str(~(Open.RO | Open.CE)), 'Open.AC') self.assertEqual(str(~(Open.WO | Open.CE)), 'Open.RW') @@ -2302,12 +2338,12 @@ def test_repr(self): self.assertEqual(repr(Perm.X), '') self.assertEqual(repr(Perm.R | Perm.W), '') self.assertEqual(repr(Perm.R | Perm.W | Perm.X), '') - self.assertEqual(repr(Perm(0)), '') + self.assertEqual(repr(Perm(0)), '') self.assertEqual(repr(~Perm.R), '') self.assertEqual(repr(~Perm.W), '') self.assertEqual(repr(~Perm.X), '') self.assertEqual(repr(~(Perm.R | Perm.W)), '') - self.assertEqual(repr(~(Perm.R | Perm.W | Perm.X)), '') + self.assertEqual(repr(~(Perm.R | Perm.W | Perm.X)), '') self.assertEqual(repr(Perm(~0)), '') Open = self.Open @@ -2315,10 +2351,11 @@ def test_repr(self): self.assertEqual(repr(Open.WO), '') self.assertEqual(repr(Open.AC), '') self.assertEqual(repr(Open.RO | Open.CE), '') - self.assertEqual(repr(Open.WO | Open.CE), '') - self.assertEqual(repr(~Open.RO), '') - self.assertEqual(repr(~Open.WO), '') + self.assertEqual(repr(Open.WO | Open.CE), '') + self.assertEqual(repr(~Open.RO), '') + self.assertEqual(repr(~Open.WO), '') self.assertEqual(repr(~Open.AC), '') + self.assertEqual(repr(~Open.CE), '') self.assertEqual(repr(~(Open.RO | Open.CE)), '') self.assertEqual(repr(~(Open.WO | Open.CE)), '') @@ -2394,6 +2431,46 @@ def test_bool(self): for f in Open: self.assertEqual(bool(f.value), bool(f)) + def test_boundary(self): + self.assertIs(enum.Flag._boundary_, STRICT) + class Iron(Flag, boundary=STRICT): + ONE = 1 + TWO = 2 + EIGHT = 8 + self.assertIs(Iron._boundary_, STRICT) + # + class Water(Flag, boundary=CONFORM): + ONE = 1 + TWO = 2 + EIGHT = 8 + self.assertIs(Water._boundary_, CONFORM) + # + class Space(Flag, boundary=EJECT): + ONE = 1 + TWO = 2 + EIGHT = 8 + self.assertIs(Space._boundary_, EJECT) + # + class Bizarre(Flag, boundary=KEEP): + b = 3 + c = 4 + d = 6 + # + self.assertRaisesRegex(ValueError, 'invalid value: 7', Iron, 7) + self.assertIs(Water(7), Water.ONE|Water.TWO) + self.assertIs(Water(~9), Water.TWO) + self.assertEqual(Space(7), 7) + self.assertTrue(type(Space(7)) is int) + self.assertEqual(list(Bizarre), [Bizarre.c]) + self.assertIs(Bizarre(3), Bizarre.b) + self.assertIs(Bizarre(6), Bizarre.d) + + def test_iter(self): + Color = self.Color + Open = self.Open + self.assertEqual(list(Color), [Color.RED, Color.GREEN, Color.BLUE]) + self.assertEqual(list(Open), [Open.WO, Open.RW, Open.CE]) + def test_programatic_function_string(self): Perm = Flag('Perm', 'R W X') lst = list(Perm) @@ -2511,9 +2588,45 @@ def test_member_contains(self): def test_member_iter(self): Color = self.Color - self.assertEqual(list(Color.PURPLE), [Color.BLUE, Color.RED]) + self.assertEqual(list(Color.BLACK), []) + self.assertEqual(list(Color.PURPLE), [Color.RED, Color.BLUE]) self.assertEqual(list(Color.BLUE), [Color.BLUE]) self.assertEqual(list(Color.GREEN), [Color.GREEN]) + self.assertEqual(list(Color.WHITE), [Color.RED, Color.GREEN, Color.BLUE]) + self.assertEqual(list(Color.WHITE), [Color.RED, Color.GREEN, Color.BLUE]) + + def test_member_length(self): + self.assertEqual(self.Color.__len__(self.Color.BLACK), 0) + self.assertEqual(self.Color.__len__(self.Color.GREEN), 1) + self.assertEqual(self.Color.__len__(self.Color.PURPLE), 2) + self.assertEqual(self.Color.__len__(self.Color.BLANCO), 3) + + def test_number_reset_and_order_cleanup(self): + class Confused(Flag): + _order_ = 'ONE TWO FOUR DOS EIGHT SIXTEEN' + ONE = auto() + TWO = auto() + FOUR = auto() + DOS = 2 + EIGHT = auto() + SIXTEEN = auto() + self.assertEqual( + list(Confused), + [Confused.ONE, Confused.TWO, Confused.FOUR, Confused.EIGHT, Confused.SIXTEEN]) + self.assertIs(Confused.TWO, Confused.DOS) + self.assertEqual(Confused.DOS._value_, 2) + self.assertEqual(Confused.EIGHT._value_, 8) + self.assertEqual(Confused.SIXTEEN._value_, 16) + + def test_aliases(self): + Color = self.Color + self.assertEqual(Color(1).name, 'RED') + self.assertEqual(Color['ROJO'].name, 'RED') + self.assertEqual(Color(7).name, 'WHITE') + self.assertEqual(Color['BLANCO'].name, 'WHITE') + self.assertIs(Color.BLANCO, Color.WHITE) + Open = self.Open + self.assertIs(Open['AC'], Open.AC) def test_auto_number(self): class Color(Flag): @@ -2532,20 +2645,6 @@ class Color(Flag): red = 'not an int' blue = auto() - def test_cascading_failure(self): - class Bizarre(Flag): - c = 3 - d = 4 - f = 6 - # Bizarre.c | Bizarre.d - name = "TestFlag.test_cascading_failure..Bizarre" - self.assertRaisesRegex(ValueError, "5 is not a valid " + name, Bizarre, 5) - self.assertRaisesRegex(ValueError, "5 is not a valid " + name, Bizarre, 5) - self.assertRaisesRegex(ValueError, "2 is not a valid " + name, Bizarre, 2) - self.assertRaisesRegex(ValueError, "2 is not a valid " + name, Bizarre, 2) - self.assertRaisesRegex(ValueError, "1 is not a valid " + name, Bizarre, 1) - self.assertRaisesRegex(ValueError, "1 is not a valid " + name, Bizarre, 1) - def test_duplicate_auto(self): class Dupes(Enum): first = primero = auto() @@ -2554,11 +2653,11 @@ class Dupes(Enum): self.assertEqual([Dupes.first, Dupes.second, Dupes.third], list(Dupes)) def test_bizarre(self): - class Bizarre(Flag): - b = 3 - c = 4 - d = 6 - self.assertEqual(repr(Bizarre(7)), '') + with self.assertRaisesRegex(TypeError, "invalid Flag 'Bizarre' -- missing values: 1, 2"): + class Bizarre(Flag): + b = 3 + c = 4 + d = 6 def test_multiple_mixin(self): class AllMixin: @@ -2682,9 +2781,9 @@ class TestIntFlag(unittest.TestCase): """Tests of the IntFlags.""" class Perm(IntFlag): - X = 1 << 0 - W = 1 << 1 R = 1 << 2 + W = 1 << 1 + X = 1 << 0 class Open(IntFlag): RO = 0 @@ -2696,9 +2795,17 @@ class Open(IntFlag): class Color(IntFlag): BLACK = 0 RED = 1 + ROJO = 1 GREEN = 2 BLUE = 4 PURPLE = RED|BLUE + WHITE = RED|GREEN|BLUE + BLANCO = RED|GREEN|BLUE + + class Skip(IntFlag): + FIRST = 1 + SECOND = 2 + EIGHTH = 8 def test_type(self): Perm = self.Perm @@ -2723,31 +2830,35 @@ def test_str(self): self.assertEqual(str(Perm.X), 'Perm.X') self.assertEqual(str(Perm.R | Perm.W), 'Perm.R|W') self.assertEqual(str(Perm.R | Perm.W | Perm.X), 'Perm.R|W|X') - self.assertEqual(str(Perm.R | 8), 'Perm.8|R') - self.assertEqual(str(Perm(0)), 'Perm.0') - self.assertEqual(str(Perm(8)), 'Perm.8') + self.assertEqual(str(Perm.R | 8), '12') + self.assertEqual(str(Perm(0)), 'Perm(0)') + self.assertEqual(str(Perm(8)), '8') self.assertEqual(str(~Perm.R), 'Perm.W|X') self.assertEqual(str(~Perm.W), 'Perm.R|X') self.assertEqual(str(~Perm.X), 'Perm.R|W') self.assertEqual(str(~(Perm.R | Perm.W)), 'Perm.X') - self.assertEqual(str(~(Perm.R | Perm.W | Perm.X)), 'Perm.-8') - self.assertEqual(str(~(Perm.R | 8)), 'Perm.W|X') + self.assertEqual(str(~(Perm.R | Perm.W | Perm.X)), 'Perm(0)') + self.assertEqual(str(~(Perm.R | 8)), '-13') self.assertEqual(str(Perm(~0)), 'Perm.R|W|X') - self.assertEqual(str(Perm(~8)), 'Perm.R|W|X') + self.assertEqual(str(Perm(~8)), '-9') Open = self.Open self.assertEqual(str(Open.RO), 'Open.RO') self.assertEqual(str(Open.WO), 'Open.WO') self.assertEqual(str(Open.AC), 'Open.AC') self.assertEqual(str(Open.RO | Open.CE), 'Open.CE') - self.assertEqual(str(Open.WO | Open.CE), 'Open.CE|WO') - self.assertEqual(str(Open(4)), 'Open.4') - self.assertEqual(str(~Open.RO), 'Open.CE|AC|RW|WO') - self.assertEqual(str(~Open.WO), 'Open.CE|RW') + self.assertEqual(str(Open.WO | Open.CE), 'Open.WO|CE') + self.assertEqual(str(Open(4)), '4') + self.assertEqual(str(~Open.RO), 'Open.WO|RW|CE') + self.assertEqual(str(~Open.WO), 'Open.RW|CE') self.assertEqual(str(~Open.AC), 'Open.CE') - self.assertEqual(str(~(Open.RO | Open.CE)), 'Open.AC|RW|WO') + self.assertEqual(str(~Open.CE), 'Open.AC') + self.assertEqual(str(~(Open.RO | Open.CE)), 'Open.AC') self.assertEqual(str(~(Open.WO | Open.CE)), 'Open.RW') - self.assertEqual(str(Open(~4)), 'Open.CE|AC|RW|WO') + self.assertEqual(str(Open(~4)), '-5') + + Skip = self.Skip + self.assertEqual(str(Skip(~4)), 'Skip.FIRST|SECOND|EIGHTH') def test_repr(self): Perm = self.Perm @@ -2756,31 +2867,34 @@ def test_repr(self): self.assertEqual(repr(Perm.X), '') self.assertEqual(repr(Perm.R | Perm.W), '') self.assertEqual(repr(Perm.R | Perm.W | Perm.X), '') - self.assertEqual(repr(Perm.R | 8), '') - self.assertEqual(repr(Perm(0)), '') - self.assertEqual(repr(Perm(8)), '') - self.assertEqual(repr(~Perm.R), '') - self.assertEqual(repr(~Perm.W), '') - self.assertEqual(repr(~Perm.X), '') - self.assertEqual(repr(~(Perm.R | Perm.W)), '') - self.assertEqual(repr(~(Perm.R | Perm.W | Perm.X)), '') - self.assertEqual(repr(~(Perm.R | 8)), '') - self.assertEqual(repr(Perm(~0)), '') - self.assertEqual(repr(Perm(~8)), '') + self.assertEqual(repr(Perm.R | 8), '12') + self.assertEqual(repr(Perm(0)), '') + self.assertEqual(repr(Perm(8)), '8') + self.assertEqual(repr(~Perm.R), '') + self.assertEqual(repr(~Perm.W), '') + self.assertEqual(repr(~Perm.X), '') + self.assertEqual(repr(~(Perm.R | Perm.W)), '') + self.assertEqual(repr(~(Perm.R | Perm.W | Perm.X)), '') + self.assertEqual(repr(~(Perm.R | 8)), '-13') + self.assertEqual(repr(Perm(~0)), '') + self.assertEqual(repr(Perm(~8)), '-9') Open = self.Open self.assertEqual(repr(Open.RO), '') self.assertEqual(repr(Open.WO), '') self.assertEqual(repr(Open.AC), '') self.assertEqual(repr(Open.RO | Open.CE), '') - self.assertEqual(repr(Open.WO | Open.CE), '') - self.assertEqual(repr(Open(4)), '') - self.assertEqual(repr(~Open.RO), '') - self.assertEqual(repr(~Open.WO), '') - self.assertEqual(repr(~Open.AC), '') - self.assertEqual(repr(~(Open.RO | Open.CE)), '') - self.assertEqual(repr(~(Open.WO | Open.CE)), '') - self.assertEqual(repr(Open(~4)), '') + self.assertEqual(repr(Open.WO | Open.CE), '') + self.assertEqual(repr(Open(4)), '4') + self.assertEqual(repr(~Open.RO), '') + self.assertEqual(repr(~Open.WO), '') + self.assertEqual(repr(~Open.AC), '') + self.assertEqual(repr(~(Open.RO | Open.CE)), '') + self.assertEqual(repr(~(Open.WO | Open.CE)), '') + self.assertEqual(repr(Open(~4)), '-5') + + Skip = self.Skip + self.assertEqual(repr(Skip(~4)), '') def test_format(self): Perm = self.Perm @@ -2863,8 +2977,7 @@ def test_invert(self): RWX = Perm.R | Perm.W | Perm.X values = list(Perm) + [RW, RX, WX, RWX, Perm(0)] for i in values: - self.assertEqual(~i, ~i.value) - self.assertEqual((~i).value, ~i.value) + self.assertEqual(~i, (~i).value) self.assertIs(type(~i), Perm) self.assertEqual(~~i, i) for i in Perm: @@ -2873,6 +2986,46 @@ def test_invert(self): self.assertIs(Open.WO & ~Open.WO, Open.RO) self.assertIs((Open.WO|Open.CE) & ~Open.WO, Open.CE) + def test_boundary(self): + self.assertIs(enum.IntFlag._boundary_, EJECT) + class Iron(IntFlag, boundary=STRICT): + ONE = 1 + TWO = 2 + EIGHT = 8 + self.assertIs(Iron._boundary_, STRICT) + # + class Water(IntFlag, boundary=CONFORM): + ONE = 1 + TWO = 2 + EIGHT = 8 + self.assertIs(Water._boundary_, CONFORM) + # + class Space(IntFlag, boundary=EJECT): + ONE = 1 + TWO = 2 + EIGHT = 8 + self.assertIs(Space._boundary_, EJECT) + # + class Bizarre(IntFlag, boundary=KEEP): + b = 3 + c = 4 + d = 6 + # + self.assertRaisesRegex(ValueError, 'invalid value: 5', Iron, 5) + self.assertIs(Water(7), Water.ONE|Water.TWO) + self.assertIs(Water(~9), Water.TWO) + self.assertEqual(Space(7), 7) + self.assertTrue(type(Space(7)) is int) + self.assertEqual(list(Bizarre), [Bizarre.c]) + self.assertIs(Bizarre(3), Bizarre.b) + self.assertIs(Bizarre(6), Bizarre.d) + + def test_iter(self): + Color = self.Color + Open = self.Open + self.assertEqual(list(Color), [Color.RED, Color.GREEN, Color.BLUE]) + self.assertEqual(list(Open), [Open.WO, Open.RW, Open.CE]) + def test_programatic_function_string(self): Perm = IntFlag('Perm', 'R W X') lst = list(Perm) @@ -3014,9 +3167,27 @@ def test_member_contains(self): def test_member_iter(self): Color = self.Color - self.assertEqual(list(Color.PURPLE), [Color.BLUE, Color.RED]) + self.assertEqual(list(Color.BLACK), []) + self.assertEqual(list(Color.PURPLE), [Color.RED, Color.BLUE]) self.assertEqual(list(Color.BLUE), [Color.BLUE]) self.assertEqual(list(Color.GREEN), [Color.GREEN]) + self.assertEqual(list(Color.WHITE), [Color.RED, Color.GREEN, Color.BLUE]) + + def test_member_length(self): + self.assertEqual(self.Color.__len__(self.Color.BLACK), 0) + self.assertEqual(self.Color.__len__(self.Color.GREEN), 1) + self.assertEqual(self.Color.__len__(self.Color.PURPLE), 2) + self.assertEqual(self.Color.__len__(self.Color.BLANCO), 3) + + def test_aliases(self): + Color = self.Color + self.assertEqual(Color(1).name, 'RED') + self.assertEqual(Color['ROJO'].name, 'RED') + self.assertEqual(Color(7).name, 'WHITE') + self.assertEqual(Color['BLANCO'].name, 'WHITE') + self.assertIs(Color.BLANCO, Color.WHITE) + Open = self.Open + self.assertIs(Open['AC'], Open.AC) def test_bool(self): Perm = self.Perm @@ -3026,6 +3197,13 @@ def test_bool(self): for f in Open: self.assertEqual(bool(f.value), bool(f)) + def test_bizarre(self): + with self.assertRaisesRegex(TypeError, "invalid Flag 'Bizarre' -- missing values: 1, 2"): + class Bizarre(IntFlag): + b = 3 + c = 4 + d = 6 + def test_multiple_mixin(self): class AllMixin: @classproperty @@ -3176,7 +3354,7 @@ class Sillier(IntEnum): Help on class Color in module %s: class Color(enum.Enum) - | Color(value, names=None, *, module=None, qualname=None, type=None, start=1) + | Color(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None) |\x20\x20 | An enumeration. |\x20\x20 @@ -3328,7 +3506,7 @@ def test_inspect_classify_class_attrs(self): class MiscTestCase(unittest.TestCase): def test__all__(self): - support.check__all__(self, enum) + support.check__all__(self, enum, not_exported={'bin'}) # These are unordered here on purpose to ensure that declaration order diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index c1d02cfaf0dcb..bd689582523c3 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -2176,11 +2176,13 @@ def test_flags_repr(self): "re.IGNORECASE|re.DOTALL|re.VERBOSE") self.assertEqual(repr(re.I|re.S|re.X|(1<<20)), "re.IGNORECASE|re.DOTALL|re.VERBOSE|0x100000") - self.assertEqual(repr(~re.I), "~re.IGNORECASE") + self.assertEqual( + repr(~re.I), + "re.ASCII|re.LOCALE|re.UNICODE|re.MULTILINE|re.DOTALL|re.VERBOSE|re.TEMPLATE|re.DEBUG") self.assertEqual(repr(~(re.I|re.S|re.X)), - "~(re.IGNORECASE|re.DOTALL|re.VERBOSE)") + "re.ASCII|re.LOCALE|re.UNICODE|re.MULTILINE|re.TEMPLATE|re.DEBUG") self.assertEqual(repr(~(re.I|re.S|re.X|(1<<20))), - "~(re.IGNORECASE|re.DOTALL|re.VERBOSE|0x100000)") + "re.ASCII|re.LOCALE|re.UNICODE|re.MULTILINE|re.TEMPLATE|re.DEBUG|0xffe00") class ImplementationTest(unittest.TestCase): diff --git a/Lib/types.py b/Lib/types.py index 532f4806fc022..c509b242d5d8f 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -155,7 +155,12 @@ class DynamicClassAttribute: class's __getattr__ method; this is done by raising AttributeError. This allows one to have properties active on an instance, and have virtual - attributes on the class with the same name (see Enum for an example). + attributes on the class with the same name. (Enum used this between Python + versions 3.4 - 3.9 .) + + Subclass from this to use a different method of accessing virtual atributes + and still be treated properly by the inspect module. (Enum uses this since + Python 3.10 .) """ def __init__(self, fget=None, fset=None, fdel=None, doc=None): diff --git a/Misc/ACKS b/Misc/ACKS index 136266965a869..29ef9864f9827 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -141,6 +141,7 @@ Stefan Behnel Reimer Behrends Ben Bell Thomas Bellman +John Belmonte Alexander ?????? Belopolsky Eli Bendersky Nikhil Benesch diff --git a/Misc/NEWS.d/next/Library/2021-01-14-15-07-16.bpo-38250.1fvhOk.rst b/Misc/NEWS.d/next/Library/2021-01-14-15-07-16.bpo-38250.1fvhOk.rst new file mode 100644 index 0000000000000..e5a72468370fb --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-14-15-07-16.bpo-38250.1fvhOk.rst @@ -0,0 +1,5 @@ +[Enum] Flags consisting of a single bit are now considered canonical, and +will be the only flags returned from listing and iterating over a Flag class +or a Flag member. Multi-bit flags are considered aliases; they will be +returned from lookups and operations that result in their value. +Iteration for both Flag and Flag members is in definition order. From webhook-mailer at python.org Mon Jan 25 17:51:57 2021 From: webhook-mailer at python.org (miss-islington) Date: Mon, 25 Jan 2021 22:51:57 -0000 Subject: [Python-checkins] Typo in comment (GH-24199) Message-ID: https://github.com/python/cpython/commit/c7c3b7db29c4dda0519acdf7450e20d47a6409f4 commit: c7c3b7db29c4dda0519acdf7450e20d47a6409f4 branch: master author: borispopoff <58560689+borispopoff at users.noreply.github.com> committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-25T14:51:48-08:00 summary: Typo in comment (GH-24199) Automerge-Triggered-By: GH:Mariatta files: M Modules/main.c diff --git a/Modules/main.c b/Modules/main.c index ccf096352e928..2684d230672b9 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -87,7 +87,7 @@ static inline int config_run_code(const PyConfig *config) } -/* Return non-zero is stdin is a TTY or if -i command line option is used */ +/* Return non-zero if stdin is a TTY or if -i command line option is used */ static int stdin_is_interactive(const PyConfig *config) { From webhook-mailer at python.org Mon Jan 25 18:15:55 2021 From: webhook-mailer at python.org (pablogsal) Date: Mon, 25 Jan 2021 23:15:55 -0000 Subject: [Python-checkins] Document new parenthesized with statements (GH-24281) Message-ID: https://github.com/python/cpython/commit/7c8e0b03366e053e0673f1f2ae31eb464fae8c57 commit: 7c8e0b03366e053e0673f1f2ae31eb464fae8c57 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-25T23:15:51Z summary: Document new parenthesized with statements (GH-24281) files: M Doc/reference/compound_stmts.rst M Doc/whatsnew/3.10.rst diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 5bba3eea6f6c0..f22af8b44a112 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -411,7 +411,8 @@ This allows common :keyword:`try`...\ :keyword:`except`...\ :keyword:`finally` usage patterns to be encapsulated for convenient reuse. .. productionlist:: python-grammar - with_stmt: "with" `with_item` ("," `with_item`)* ":" `suite` + with_stmt: "with" ( "(" `with_stmt_contents` ","? ")" | `with_stmt_contents` ) ":" `suite` + with_stmt_contents: `with_item` ("," `with_item`)* with_item: `expression` ["as" `target`] The execution of the :keyword:`with` statement with one "item" proceeds as follows: @@ -488,9 +489,21 @@ is semantically equivalent to:: with B() as b: SUITE +You can also write multi-item context managers in multiple lines if +the items are surrounded by parentheses. For example:: + + with ( + A() as a, + B() as b, + ): + SUITE + .. versionchanged:: 3.1 Support for multiple context expressions. +.. versionchanged:: 3.10 + Support for using grouping parentheses to break the statement in multiple lines. + .. seealso:: :pep:`343` - The "with" statement diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 30a82816444af..16bb8fb28178a 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -72,6 +72,59 @@ New Features .. _whatsnew310-pep563: +Parenthesized context managers +------------------------------ + +Using enclosing parentheses for continuation across multiple lines +in context managers is now supported. This allows formatting a long +collection of context managers in multiple lines in a similar way +as it was previously possible with import statements. For instance, +all these examples are now valid: + +.. code-block:: python + + with (CtxManager() as example): + ... + + with ( + CtxManager1(), + CtxManager2() + ): + ... + + with (CtxManager1() as example, + CtxManager2()): + ... + + with (CtxManager1(), + CtxManager2() as example): + ... + + with ( + CtxManager1() as example1, + CtxManager2() as example2 + ): + ... + +it is also possible to use a trailing comma at the end of the +enclosed group: + +.. code-block:: python + + with ( + CtxManager1() as example1, + CtxManager2() as example2, + CtxManager3() as example3, + ): + ... + +This new syntax uses the non LL(1) capacities of the new parser. +Check :pep:`617` for more details. + +(Contributed by Guido van Rossum, Pablo Galindo and Lysandros Nikolaou +in :issue:`12782` and :issue:`40334`.) + + PEP 563: Postponed Evaluation of Annotations Becomes Default ------------------------------------------------------------ From webhook-mailer at python.org Mon Jan 25 18:23:40 2021 From: webhook-mailer at python.org (pablogsal) Date: Mon, 25 Jan 2021 23:23:40 -0000 Subject: [Python-checkins] Fix minor typo in the rest format in the enum docs (GH-24335) Message-ID: https://github.com/python/cpython/commit/c92cd0f3c8bab4e26a95cd29c127668907ff0869 commit: c92cd0f3c8bab4e26a95cd29c127668907ff0869 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-25T23:23:30Z summary: Fix minor typo in the rest format in the enum docs (GH-24335) files: M Doc/library/enum.rst diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index b27c5527c7f7c..4d6f2c3633613 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -1364,7 +1364,7 @@ The code sample:: True There is a new boundary mechanism that controls how out-of-range / invalid -bits are handled: ``STRICT``, ``CONFORM``, ``EJECT`', and ``KEEP``: +bits are handled: ``STRICT``, ``CONFORM``, ``EJECT``, and ``KEEP``: * STRICT --> raises an exception when presented with invalid values * CONFORM --> discards any invalid bits From webhook-mailer at python.org Tue Jan 26 05:17:18 2021 From: webhook-mailer at python.org (markshannon) Date: Tue, 26 Jan 2021 10:17:18 -0000 Subject: [Python-checkins] bpo-33387: update documentation for exception handling opcode changes (GH-24334) Message-ID: https://github.com/python/cpython/commit/dea5bf9d15999bfcc58095b157c0678d45b00bdd commit: dea5bf9d15999bfcc58095b157c0678d45b00bdd branch: master author: Irit Katriel committer: markshannon date: 2021-01-26T10:17:13Z summary: bpo-33387: update documentation for exception handling opcode changes (GH-24334) * bpo-33387: remove obsolete comment * bpo-33387: update SETUP_WITH opcode documentation files: M Doc/library/dis.rst M Python/compile.c diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index c09d8338d2c3b..f3b25383c53d1 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -742,7 +742,7 @@ iterations of the loop. This opcode performs several operations before a with block starts. First, it loads :meth:`~object.__exit__` from the context manager and pushes it onto - the stack for later use by :opcode:`WITH_CLEANUP_START`. Then, + the stack for later use by :opcode:`WITH_EXCEPT_START`. Then, :meth:`~object.__enter__` is called, and a finally block pointing to *delta* is pushed. Finally, the result of calling the ``__enter__()`` method is pushed onto the stack. The next opcode will either ignore it (:opcode:`POP_TOP`), or diff --git a/Python/compile.c b/Python/compile.c index 6aa74cc2d67e4..223c63637ff41 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -898,8 +898,6 @@ compiler_next_instr(basicblock *b) * 1 -- when jump * -1 -- maximal */ -/* XXX Make the stack effect of WITH_CLEANUP_START and - WITH_CLEANUP_FINISH deterministic. */ static int stack_effect(int opcode, int oparg, int jump) { From webhook-mailer at python.org Tue Jan 26 10:58:27 2021 From: webhook-mailer at python.org (gvanrossum) Date: Tue, 26 Jan 2021 15:58:27 -0000 Subject: [Python-checkins] [3.9] bpo-42383: pdb: do not fail to restart the target if the current directory changed (GH-23412) (#24322) Message-ID: https://github.com/python/cpython/commit/f8cfe54e5a7082edcec74a34b3d7e6afab051afd commit: f8cfe54e5a7082edcec74a34b3d7e6afab051afd branch: 3.9 author: Andrey Bienkowski committer: gvanrossum date: 2021-01-26T07:57:58-08:00 summary: [3.9] bpo-42383: pdb: do not fail to restart the target if the current directory changed (GH-23412) (#24322) files: A Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst M Lib/test/test_pdb.py diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index e1a13cbaf3ef8..6c4eaf318e448 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1702,6 +1702,29 @@ def test_issue42384_symlink(self): self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + def test_issue42383(self): + with support.temp_cwd() as cwd: + with open('foo.py', 'w') as f: + s = textwrap.dedent(""" + print('The correct file was executed') + + import os + os.chdir("subdir") + """) + f.write(s) + + subdir = os.path.join(cwd, 'subdir') + os.mkdir(subdir) + os.mkdir(os.path.join(subdir, 'subdir')) + wrong_file = os.path.join(subdir, 'foo.py') + + with open(wrong_file, 'w') as f: + f.write('print("The wrong file was executed")') + + stdout, stderr = self._run_pdb(['foo.py'], 'c\nc\nq') + expected = '(Pdb) The correct file was executed' + self.assertEqual(stdout.split('\n')[6].rstrip('\r'), expected) + def load_tests(*args): from test import test_pdb diff --git a/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst b/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst new file mode 100644 index 0000000000000..ccf2106f28a93 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst @@ -0,0 +1,2 @@ +Fix pdb: previously pdb would fail to restart the debugging target if it was +specified using a relative path and the current directory changed. From webhook-mailer at python.org Tue Jan 26 10:58:38 2021 From: webhook-mailer at python.org (gvanrossum) Date: Tue, 26 Jan 2021 15:58:38 -0000 Subject: [Python-checkins] [3.8] bpo-42383: pdb: do not fail to restart the target if the current directory changed (GH-23412) (#24323) Message-ID: https://github.com/python/cpython/commit/d863deeff27f00ac33e9f169d23ca56d69af3f86 commit: d863deeff27f00ac33e9f169d23ca56d69af3f86 branch: 3.8 author: Andrey Bienkowski committer: gvanrossum date: 2021-01-26T07:58:33-08:00 summary: [3.8] bpo-42383: pdb: do not fail to restart the target if the current directory changed (GH-23412) (#24323) files: A Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst M Lib/test/test_pdb.py diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 74448747e3e1b..f77c355077411 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1699,6 +1699,29 @@ def test_issue42384_symlink(self): self.assertEqual(stdout.split('\n')[2].rstrip('\r'), expected) + def test_issue42383(self): + with support.temp_cwd() as cwd: + with open('foo.py', 'w') as f: + s = textwrap.dedent(""" + print('The correct file was executed') + + import os + os.chdir("subdir") + """) + f.write(s) + + subdir = os.path.join(cwd, 'subdir') + os.mkdir(subdir) + os.mkdir(os.path.join(subdir, 'subdir')) + wrong_file = os.path.join(subdir, 'foo.py') + + with open(wrong_file, 'w') as f: + f.write('print("The wrong file was executed")') + + stdout, stderr = self._run_pdb(['foo.py'], 'c\nc\nq') + expected = '(Pdb) The correct file was executed' + self.assertEqual(stdout.split('\n')[6].rstrip('\r'), expected) + def load_tests(*args): from test import test_pdb diff --git a/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst b/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst new file mode 100644 index 0000000000000..ccf2106f28a93 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-17-14-30-12.bpo-42383.ubl0Y_.rst @@ -0,0 +1,2 @@ +Fix pdb: previously pdb would fail to restart the debugging target if it was +specified using a relative path and the current directory changed. From webhook-mailer at python.org Tue Jan 26 13:59:28 2021 From: webhook-mailer at python.org (terryjreedy) Date: Tue, 26 Jan 2021 18:59:28 -0000 Subject: [Python-checkins] [3.9] bpo-41841: Prepare IDLE NEWS for 3.9.2 (#GH-4343) Message-ID: https://github.com/python/cpython/commit/fd668bc62b7f6de95448344b6650e1c3c2a997fa commit: fd668bc62b7f6de95448344b6650e1c3c2a997fa branch: 3.9 author: Terry Jan Reedy committer: terryjreedy date: 2021-01-26T13:59:18-05:00 summary: [3.9] bpo-41841: Prepare IDLE NEWS for 3.9.2 (#GH-4343) files: M Lib/idlelib/NEWS.txt diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 0033e66f9b8a2..f9b09ed25df7a 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -1,5 +1,5 @@ -What's New in IDLE 3.9.1 -Released on 2020-12-07? +What's New in IDLE 3.9.2 +Released on 2021-02-15? ====================================== @@ -8,6 +8,11 @@ bpo-33065: Fix problem debugging user classes with __repr__ method. bpo-32631: Finish zzdummy example extension module: make menu entries work; add docstrings and tests with 100% coverage. + +What's New in IDLE 3.9.1 +Released on 2020-12-07 +====================================== + 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. From webhook-mailer at python.org Tue Jan 26 13:59:51 2021 From: webhook-mailer at python.org (terryjreedy) Date: Tue, 26 Jan 2021 18:59:51 -0000 Subject: [Python-checkins] [3.8] bpo-41841: Prepare IDLE NEWS for 3.8.8 (GH-24344) Message-ID: https://github.com/python/cpython/commit/a178473dd6a3b527a67ab3f9dc38ef8b1a60881a commit: a178473dd6a3b527a67ab3f9dc38ef8b1a60881a branch: 3.8 author: Terry Jan Reedy committer: terryjreedy date: 2021-01-26T13:59:42-05:00 summary: [3.8] bpo-41841: Prepare IDLE NEWS for 3.8.8 (GH-24344) files: M Lib/idlelib/NEWS.txt diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 44782fcb0cecd..c122e596b5cb1 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -1,5 +1,5 @@ -What's New in IDLE 3.8.7 -Released on 2020-12-?? +What's New in IDLE 3.8.8 +Released on 2021-02-15? ====================================== @@ -12,6 +12,10 @@ 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. +What's New in IDLE 3.8.7 +Released on 2020-12-27 +====================================== + bpo-42426: Fix reporting offset of the RE error in searchengine. bpo-42416: Get docstrings for IDLE calltips more often From webhook-mailer at python.org Tue Jan 26 15:53:17 2021 From: webhook-mailer at python.org (ethanfurman) Date: Tue, 26 Jan 2021 20:53:17 -0000 Subject: [Python-checkins] bpo-38250: [Enum] only include .rst test if file available (GH-24342) Message-ID: https://github.com/python/cpython/commit/01faf4542a8652adfbd3b3f897ba718e8ce43f5e commit: 01faf4542a8652adfbd3b3f897ba718e8ce43f5e branch: master author: Ethan Furman committer: ethanfurman date: 2021-01-26T12:52:52-08:00 summary: bpo-38250: [Enum] only include .rst test if file available (GH-24342) * [Enum] only include .rst test if file available In order to ensure the ReST documentation is up to date for Enum, use doctest to check it -- but only if the .rst files have not been stripped. files: M Lib/test/test_enum.py diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index daca2e3c83f27..96de878faf72d 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -1,6 +1,7 @@ import enum import doctest import inspect +import os import pydoc import sys import unittest @@ -17,10 +18,11 @@ def load_tests(loader, tests, ignore): tests.addTests(doctest.DocTestSuite(enum)) - tests.addTests(doctest.DocFileSuite( - '../../Doc/library/enum.rst', - optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, - )) + if os.path.exists('../../Doc/library/enum.rst'): + tests.addTests(doctest.DocFileSuite( + '../../Doc/library/enum.rst', + optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, + )) return tests # for pickle tests From webhook-mailer at python.org Tue Jan 26 18:56:06 2021 From: webhook-mailer at python.org (terryjreedy) Date: Tue, 26 Jan 2021 23:56:06 -0000 Subject: [Python-checkins] bpo-43008: Make IDLE respect sys.excepthook (GH-24302) Message-ID: https://github.com/python/cpython/commit/7a34380ad788886f5ad50d4175ceb2d5715b8cff commit: 7a34380ad788886f5ad50d4175ceb2d5715b8cff branch: master author: Ken committer: terryjreedy date: 2021-01-26T18:55:52-05:00 summary: bpo-43008: Make IDLE respect sys.excepthook (GH-24302) Co-authored-by: Terry Jan Reedy files: A Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst M Doc/library/idle.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/idle_test/test_run.py M Lib/idlelib/run.py diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index a59a5d3a46570..e7eaabd8bfa25 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -250,7 +250,7 @@ View Last Restart Scroll the shell window to the last Shell restart. Restart Shell - Restart the shell to clean the environment. + Restart the shell to clean the environment and reset display and exception handling. Previous History Cycle through earlier commands in history which match the current entry. diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 26200981eb8d9..f1abb38eee2e5 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2021-10-04? ====================================== +bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, +2-process mode. + bpo-33065: Fix problem debugging user classes with __repr__ method. bpo-32631: Finish zzdummy example extension module: make menu entries diff --git a/Lib/idlelib/idle_test/test_run.py b/Lib/idlelib/idle_test/test_run.py index 37c0d4525e56c..a31671ee0485f 100644 --- a/Lib/idlelib/idle_test/test_run.py +++ b/Lib/idlelib/idle_test/test_run.py @@ -1,16 +1,18 @@ "Test run, coverage 49%." from idlelib import run +import io +import sys +from test.support import captured_output, captured_stderr import unittest from unittest import mock +import idlelib from idlelib.idle_test.mock_idle import Func -from test.support import captured_output, captured_stderr -import io -import sys +idlelib.testing = True # Use {} for executing test user code. -class RunTest(unittest.TestCase): +class PrintExceptionTest(unittest.TestCase): def test_print_exception_unhashable(self): class UnhashableException(Exception): @@ -351,5 +353,38 @@ def test_fatal_error(self): self.assertIn('IndexError', msg) eq(func.called, 2) + +class ExecRuncodeTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.addClassCleanup(setattr,run,'print_exception',run.print_exception) + cls.prt = Func() # Need reference. + run.print_exception = cls.prt + mockrpc = mock.Mock() + mockrpc.console.getvar = Func(result=False) + cls.ex = run.Executive(mockrpc) + + @classmethod + def tearDownClass(cls): + assert sys.excepthook == sys.__excepthook__ + + def test_exceptions(self): + ex = self.ex + ex.runcode('1/0') + self.assertIs(ex.user_exc_info[0], ZeroDivisionError) + + self.addCleanup(setattr, sys, 'excepthook', sys.__excepthook__) + sys.excepthook = lambda t, e, tb: run.print_exception(t) + ex.runcode('1/0') + self.assertIs(self.prt.args[0], ZeroDivisionError) + + sys.excepthook = lambda: None + ex.runcode('1/0') + t, e, tb = ex.user_exc_info + self.assertIs(t, TypeError) + self.assertTrue(isinstance(e.__context__, ZeroDivisionError)) + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index ec575c3d48363..07e9a2bf9ceea 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -16,6 +16,7 @@ import threading import warnings +import idlelib # testing from idlelib import autocomplete # AutoComplete, fetch_encodings from idlelib import calltip # Calltip from idlelib import debugger_r # start_debugger @@ -542,14 +543,17 @@ class Executive: def __init__(self, rpchandler): self.rpchandler = rpchandler - self.locals = __main__.__dict__ - self.calltip = calltip.Calltip() - self.autocomplete = autocomplete.AutoComplete() + if idlelib.testing is False: + self.locals = __main__.__dict__ + self.calltip = calltip.Calltip() + self.autocomplete = autocomplete.AutoComplete() + else: + self.locals = {} def runcode(self, code): global interruptable try: - self.usr_exc_info = None + self.user_exc_info = None interruptable = True try: exec(code, self.locals) @@ -562,10 +566,17 @@ def runcode(self, code): print('SystemExit: ' + str(ob), file=sys.stderr) # Return to the interactive prompt. except: - self.usr_exc_info = sys.exc_info() + self.user_exc_info = sys.exc_info() # For testing, hook, viewer. if quitting: exit() - print_exception() + if sys.excepthook is sys.__excepthook__: + print_exception() + else: + try: + sys.excepthook(*self.user_exc_info) + except: + self.user_exc_info = sys.exc_info() # For testing. + print_exception() jit = self.rpchandler.console.getvar("<>") if jit: self.rpchandler.interp.open_remote_stack_viewer() @@ -590,8 +601,8 @@ def get_the_completion_list(self, what, mode): return self.autocomplete.fetch_completions(what, mode) def stackviewer(self, flist_oid=None): - if self.usr_exc_info: - typ, val, tb = self.usr_exc_info + if self.user_exc_info: + typ, val, tb = self.user_exc_info else: return None flist = None diff --git a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst new file mode 100644 index 0000000000000..3e0b80a909d72 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst @@ -0,0 +1 @@ +Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. From webhook-mailer at python.org Tue Jan 26 19:24:24 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 27 Jan 2021 00:24:24 -0000 Subject: [Python-checkins] bpo-43008: Make IDLE respect sys.excepthook (GH-24302) Message-ID: https://github.com/python/cpython/commit/68102fb9987338a70d69a0162917866e5710458d commit: 68102fb9987338a70d69a0162917866e5710458d 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-26T16:24:14-08:00 summary: bpo-43008: Make IDLE respect sys.excepthook (GH-24302) Co-authored-by: Terry Jan Reedy (cherry picked from commit 7a34380ad788886f5ad50d4175ceb2d5715b8cff) Co-authored-by: Ken files: A Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst M Doc/library/idle.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/idle_test/test_run.py M Lib/idlelib/run.py diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index a59a5d3a46570..e7eaabd8bfa25 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -250,7 +250,7 @@ View Last Restart Scroll the shell window to the last Shell restart. Restart Shell - Restart the shell to clean the environment. + Restart the shell to clean the environment and reset display and exception handling. Previous History Cycle through earlier commands in history which match the current entry. diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index f9b09ed25df7a..2c52295e4184f 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2021-02-15? ====================================== +bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, +2-process mode. + bpo-33065: Fix problem debugging user classes with __repr__ method. bpo-32631: Finish zzdummy example extension module: make menu entries diff --git a/Lib/idlelib/idle_test/test_run.py b/Lib/idlelib/idle_test/test_run.py index 37c0d4525e56c..a31671ee0485f 100644 --- a/Lib/idlelib/idle_test/test_run.py +++ b/Lib/idlelib/idle_test/test_run.py @@ -1,16 +1,18 @@ "Test run, coverage 49%." from idlelib import run +import io +import sys +from test.support import captured_output, captured_stderr import unittest from unittest import mock +import idlelib from idlelib.idle_test.mock_idle import Func -from test.support import captured_output, captured_stderr -import io -import sys +idlelib.testing = True # Use {} for executing test user code. -class RunTest(unittest.TestCase): +class PrintExceptionTest(unittest.TestCase): def test_print_exception_unhashable(self): class UnhashableException(Exception): @@ -351,5 +353,38 @@ def test_fatal_error(self): self.assertIn('IndexError', msg) eq(func.called, 2) + +class ExecRuncodeTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.addClassCleanup(setattr,run,'print_exception',run.print_exception) + cls.prt = Func() # Need reference. + run.print_exception = cls.prt + mockrpc = mock.Mock() + mockrpc.console.getvar = Func(result=False) + cls.ex = run.Executive(mockrpc) + + @classmethod + def tearDownClass(cls): + assert sys.excepthook == sys.__excepthook__ + + def test_exceptions(self): + ex = self.ex + ex.runcode('1/0') + self.assertIs(ex.user_exc_info[0], ZeroDivisionError) + + self.addCleanup(setattr, sys, 'excepthook', sys.__excepthook__) + sys.excepthook = lambda t, e, tb: run.print_exception(t) + ex.runcode('1/0') + self.assertIs(self.prt.args[0], ZeroDivisionError) + + sys.excepthook = lambda: None + ex.runcode('1/0') + t, e, tb = ex.user_exc_info + self.assertIs(t, TypeError) + self.assertTrue(isinstance(e.__context__, ZeroDivisionError)) + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index ec575c3d48363..07e9a2bf9ceea 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -16,6 +16,7 @@ import threading import warnings +import idlelib # testing from idlelib import autocomplete # AutoComplete, fetch_encodings from idlelib import calltip # Calltip from idlelib import debugger_r # start_debugger @@ -542,14 +543,17 @@ class Executive: def __init__(self, rpchandler): self.rpchandler = rpchandler - self.locals = __main__.__dict__ - self.calltip = calltip.Calltip() - self.autocomplete = autocomplete.AutoComplete() + if idlelib.testing is False: + self.locals = __main__.__dict__ + self.calltip = calltip.Calltip() + self.autocomplete = autocomplete.AutoComplete() + else: + self.locals = {} def runcode(self, code): global interruptable try: - self.usr_exc_info = None + self.user_exc_info = None interruptable = True try: exec(code, self.locals) @@ -562,10 +566,17 @@ def runcode(self, code): print('SystemExit: ' + str(ob), file=sys.stderr) # Return to the interactive prompt. except: - self.usr_exc_info = sys.exc_info() + self.user_exc_info = sys.exc_info() # For testing, hook, viewer. if quitting: exit() - print_exception() + if sys.excepthook is sys.__excepthook__: + print_exception() + else: + try: + sys.excepthook(*self.user_exc_info) + except: + self.user_exc_info = sys.exc_info() # For testing. + print_exception() jit = self.rpchandler.console.getvar("<>") if jit: self.rpchandler.interp.open_remote_stack_viewer() @@ -590,8 +601,8 @@ def get_the_completion_list(self, what, mode): return self.autocomplete.fetch_completions(what, mode) def stackviewer(self, flist_oid=None): - if self.usr_exc_info: - typ, val, tb = self.usr_exc_info + if self.user_exc_info: + typ, val, tb = self.user_exc_info else: return None flist = None diff --git a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst new file mode 100644 index 0000000000000..3e0b80a909d72 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst @@ -0,0 +1 @@ +Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. From webhook-mailer at python.org Tue Jan 26 19:24:40 2021 From: webhook-mailer at python.org (miss-islington) Date: Wed, 27 Jan 2021 00:24:40 -0000 Subject: [Python-checkins] bpo-43008: Make IDLE respect sys.excepthook (GH-24302) Message-ID: https://github.com/python/cpython/commit/6f0346d09f78180886982e070cc92425ada96144 commit: 6f0346d09f78180886982e070cc92425ada96144 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-26T16:24:30-08:00 summary: bpo-43008: Make IDLE respect sys.excepthook (GH-24302) Co-authored-by: Terry Jan Reedy (cherry picked from commit 7a34380ad788886f5ad50d4175ceb2d5715b8cff) Co-authored-by: Ken files: A Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst M Doc/library/idle.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/idle_test/test_run.py M Lib/idlelib/run.py diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index a59a5d3a46570..e7eaabd8bfa25 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -250,7 +250,7 @@ View Last Restart Scroll the shell window to the last Shell restart. Restart Shell - Restart the shell to clean the environment. + Restart the shell to clean the environment and reset display and exception handling. Previous History Cycle through earlier commands in history which match the current entry. diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index c122e596b5cb1..0affc55da8f0a 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2021-02-15? ====================================== +bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, +2-process mode. + bpo-33065: Fix problem debugging user classes with __repr__ method. bpo-32631: Finish zzdummy example extension module: make menu entries diff --git a/Lib/idlelib/idle_test/test_run.py b/Lib/idlelib/idle_test/test_run.py index 37c0d4525e56c..a31671ee0485f 100644 --- a/Lib/idlelib/idle_test/test_run.py +++ b/Lib/idlelib/idle_test/test_run.py @@ -1,16 +1,18 @@ "Test run, coverage 49%." from idlelib import run +import io +import sys +from test.support import captured_output, captured_stderr import unittest from unittest import mock +import idlelib from idlelib.idle_test.mock_idle import Func -from test.support import captured_output, captured_stderr -import io -import sys +idlelib.testing = True # Use {} for executing test user code. -class RunTest(unittest.TestCase): +class PrintExceptionTest(unittest.TestCase): def test_print_exception_unhashable(self): class UnhashableException(Exception): @@ -351,5 +353,38 @@ def test_fatal_error(self): self.assertIn('IndexError', msg) eq(func.called, 2) + +class ExecRuncodeTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.addClassCleanup(setattr,run,'print_exception',run.print_exception) + cls.prt = Func() # Need reference. + run.print_exception = cls.prt + mockrpc = mock.Mock() + mockrpc.console.getvar = Func(result=False) + cls.ex = run.Executive(mockrpc) + + @classmethod + def tearDownClass(cls): + assert sys.excepthook == sys.__excepthook__ + + def test_exceptions(self): + ex = self.ex + ex.runcode('1/0') + self.assertIs(ex.user_exc_info[0], ZeroDivisionError) + + self.addCleanup(setattr, sys, 'excepthook', sys.__excepthook__) + sys.excepthook = lambda t, e, tb: run.print_exception(t) + ex.runcode('1/0') + self.assertIs(self.prt.args[0], ZeroDivisionError) + + sys.excepthook = lambda: None + ex.runcode('1/0') + t, e, tb = ex.user_exc_info + self.assertIs(t, TypeError) + self.assertTrue(isinstance(e.__context__, ZeroDivisionError)) + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index ec575c3d48363..07e9a2bf9ceea 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -16,6 +16,7 @@ import threading import warnings +import idlelib # testing from idlelib import autocomplete # AutoComplete, fetch_encodings from idlelib import calltip # Calltip from idlelib import debugger_r # start_debugger @@ -542,14 +543,17 @@ class Executive: def __init__(self, rpchandler): self.rpchandler = rpchandler - self.locals = __main__.__dict__ - self.calltip = calltip.Calltip() - self.autocomplete = autocomplete.AutoComplete() + if idlelib.testing is False: + self.locals = __main__.__dict__ + self.calltip = calltip.Calltip() + self.autocomplete = autocomplete.AutoComplete() + else: + self.locals = {} def runcode(self, code): global interruptable try: - self.usr_exc_info = None + self.user_exc_info = None interruptable = True try: exec(code, self.locals) @@ -562,10 +566,17 @@ def runcode(self, code): print('SystemExit: ' + str(ob), file=sys.stderr) # Return to the interactive prompt. except: - self.usr_exc_info = sys.exc_info() + self.user_exc_info = sys.exc_info() # For testing, hook, viewer. if quitting: exit() - print_exception() + if sys.excepthook is sys.__excepthook__: + print_exception() + else: + try: + sys.excepthook(*self.user_exc_info) + except: + self.user_exc_info = sys.exc_info() # For testing. + print_exception() jit = self.rpchandler.console.getvar("<>") if jit: self.rpchandler.interp.open_remote_stack_viewer() @@ -590,8 +601,8 @@ def get_the_completion_list(self, what, mode): return self.autocomplete.fetch_completions(what, mode) def stackviewer(self, flist_oid=None): - if self.usr_exc_info: - typ, val, tb = self.usr_exc_info + if self.user_exc_info: + typ, val, tb = self.user_exc_info else: return None flist = None diff --git a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst new file mode 100644 index 0000000000000..3e0b80a909d72 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst @@ -0,0 +1 @@ +Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. From webhook-mailer at python.org Wed Jan 27 03:16:52 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Wed, 27 Jan 2021 08:16:52 -0000 Subject: [Python-checkins] bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345) Message-ID: https://github.com/python/cpython/commit/5327f370344a627f1578d8183d197feb286371c6 commit: 5327f370344a627f1578d8183d197feb286371c6 branch: master author: Zackery Spytz committer: serhiy-storchaka date: 2021-01-27T10:16:20+02:00 summary: bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345) files: M Modules/_zoneinfo.c diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index d1e09340d1df8..4a4cbdbee38d1 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -2525,7 +2525,11 @@ zoneinfo_init_subclass(PyTypeObject *cls, PyObject *args, PyObject **kwargs) return NULL; } - PyObject_SetAttrString((PyObject *)cls, "_weak_cache", weak_cache); + if (PyObject_SetAttrString((PyObject *)cls, "_weak_cache", + weak_cache) < 0) { + Py_DECREF(weak_cache); + return NULL; + } Py_DECREF(weak_cache); Py_RETURN_NONE; } From webhook-mailer at python.org Wed Jan 27 04:40:54 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Wed, 27 Jan 2021 09:40:54 -0000 Subject: [Python-checkins] bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345) (GH-24349) Message-ID: https://github.com/python/cpython/commit/cb77c5e1ddd9328e4706f8fdf893aa6bf697942c commit: cb77c5e1ddd9328e4706f8fdf893aa6bf697942c branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: serhiy-storchaka date: 2021-01-27T11:40:31+02:00 summary: bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345) (GH-24349) (cherry picked from commit 5327f370344a627f1578d8183d197feb286371c6) Co-authored-by: Zackery Spytz files: M Modules/_zoneinfo.c diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index d87a20100a221..0913860a4d497 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -2530,7 +2530,11 @@ zoneinfo_init_subclass(PyTypeObject *cls, PyObject *args, PyObject **kwargs) return NULL; } - PyObject_SetAttrString((PyObject *)cls, "_weak_cache", weak_cache); + if (PyObject_SetAttrString((PyObject *)cls, "_weak_cache", + weak_cache) < 0) { + Py_DECREF(weak_cache); + return NULL; + } Py_DECREF(weak_cache); Py_RETURN_NONE; } From webhook-mailer at python.org Wed Jan 27 05:16:31 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 27 Jan 2021 10:16:31 -0000 Subject: [Python-checkins] bpo-43031: Set a timeout when running tests in PGO build (GH-24339) Message-ID: https://github.com/python/cpython/commit/6790005a9a30ae3eca69d1957fb072171643a366 commit: 6790005a9a30ae3eca69d1957fb072171643a366 branch: master author: Victor Stinner committer: vstinner date: 2021-01-27T11:16:15+01:00 summary: bpo-43031: Set a timeout when running tests in PGO build (GH-24339) Pass --timeout=$(TESTTIMEOUT) option to the default profile task "./python -m test --pgo" command. files: A Misc/NEWS.d/next/Build/2021-01-26-14-48-40.bpo-43031.44nK9U.rst M configure M configure.ac diff --git a/Misc/NEWS.d/next/Build/2021-01-26-14-48-40.bpo-43031.44nK9U.rst b/Misc/NEWS.d/next/Build/2021-01-26-14-48-40.bpo-43031.44nK9U.rst new file mode 100644 index 0000000000000..6e8377fb30612 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-01-26-14-48-40.bpo-43031.44nK9U.rst @@ -0,0 +1,2 @@ +Pass ``--timeout=$(TESTTIMEOUT)`` option to the default profile task +``./python -m test --pgo`` command. diff --git a/configure b/configure index 37ee3691bb6b4..39fb15f5c7959 100755 --- a/configure +++ b/configure @@ -6532,7 +6532,7 @@ fi $as_echo_n "checking PROFILE_TASK... " >&6; } if test -z "$PROFILE_TASK" then - PROFILE_TASK='-m test --pgo' + PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5 $as_echo "$PROFILE_TASK" >&6; } diff --git a/configure.ac b/configure.ac index 99077e9c3a923..1f5a008388a1e 100644 --- a/configure.ac +++ b/configure.ac @@ -1325,7 +1325,7 @@ AC_ARG_VAR(PROFILE_TASK, Python args for PGO generation task) AC_MSG_CHECKING(PROFILE_TASK) if test -z "$PROFILE_TASK" then - PROFILE_TASK='-m test --pgo' + PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)' fi AC_MSG_RESULT($PROFILE_TASK) From webhook-mailer at python.org Wed Jan 27 05:23:43 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 27 Jan 2021 10:23:43 -0000 Subject: [Python-checkins] bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333) Message-ID: https://github.com/python/cpython/commit/eeb701adc0fc29ba803fddf133d917ff45639a00 commit: eeb701adc0fc29ba803fddf133d917ff45639a00 branch: master author: Hai Shi committer: vstinner date: 2021-01-27T11:23:33+01:00 summary: bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333) Importing datetime can fail. files: M Modules/_zoneinfo.c diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index 4a4cbdbee38d1..d0c462fb86ab5 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -2629,6 +2629,9 @@ static int zoneinfomodule_exec(PyObject *m) { PyDateTime_IMPORT; + if (PyDateTimeAPI == NULL) { + goto error; + } PyZoneInfo_ZoneInfoType.tp_base = PyDateTimeAPI->TZInfoType; if (PyType_Ready(&PyZoneInfo_ZoneInfoType) < 0) { goto error; From webhook-mailer at python.org Wed Jan 27 06:09:06 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 27 Jan 2021 11:09:06 -0000 Subject: [Python-checkins] bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333) (GH-24351) Message-ID: https://github.com/python/cpython/commit/895591c1f0bdec5ad357fe6a5fd0875990061357 commit: 895591c1f0bdec5ad357fe6a5fd0875990061357 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: vstinner date: 2021-01-27T12:08:45+01:00 summary: bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333) (GH-24351) Importing datetime can fail. (cherry picked from commit eeb701adc0fc29ba803fddf133d917ff45639a00) Co-authored-by: Hai Shi Co-authored-by: Hai Shi files: M Modules/_zoneinfo.c diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index 0913860a4d497..0a4b38a6dc5ad 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -2634,6 +2634,9 @@ static int zoneinfomodule_exec(PyObject *m) { PyDateTime_IMPORT; + if (PyDateTimeAPI == NULL) { + goto error; + } PyZoneInfo_ZoneInfoType.tp_base = PyDateTimeAPI->TZInfoType; if (PyType_Ready(&PyZoneInfo_ZoneInfoType) < 0) { goto error; From webhook-mailer at python.org Wed Jan 27 11:39:43 2021 From: webhook-mailer at python.org (markshannon) Date: Wed, 27 Jan 2021 16:39:43 -0000 Subject: [Python-checkins] bpo-42979: Enhance abstract.c assertions checking slot result (GH-24352) Message-ID: https://github.com/python/cpython/commit/c9b8e9c421b57acdcaf24fab0c93bc29b3ef7c67 commit: c9b8e9c421b57acdcaf24fab0c93bc29b3ef7c67 branch: master author: Victor Stinner committer: markshannon date: 2021-01-27T16:39:16Z summary: bpo-42979: Enhance abstract.c assertions checking slot result (GH-24352) * bpo-42979: Enhance abstract.c assertions checking slot result Add _Py_CheckSlotResult() function which fails with a fatal error if a slot function succeeded with an exception set or failed with no exception set: write the slot name, the type name and the current exception (if an exception is set). files: M Include/cpython/abstract.h M Include/internal/pycore_object.h M Lib/test/test_capi.py M Modules/_testcapimodule.c M Objects/abstract.c M Objects/call.c diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index 1083942c14929..7a4219c8b338b 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -376,4 +376,4 @@ PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index, PyAPI_FUNC(int) _Py_convert_optional_to_ssize_t(PyObject *, void *); /* Same as PyNumber_Index but can return an instance of a subclass of int. */ -PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o); \ No newline at end of file +PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o); diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 3975765a46cc4..3cd27b035c2c7 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -168,6 +168,12 @@ _PyObject_IS_GC(PyObject *obj) // Fast inlined version of PyType_IS_GC() #define _PyType_IS_GC(t) _PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC) +// Usage: assert(_Py_CheckSlotResult(obj, "__getitem__", result != NULL))); +extern int _Py_CheckSlotResult( + PyObject *obj, + const char *slot_name, + int success); + #ifdef __cplusplus } #endif diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 8e92a50026c86..1b18bfad55300 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -2,6 +2,8 @@ # these are all functions _testcapi exports whose name begins with 'test_'. from collections import OrderedDict +import importlib.machinery +import importlib.util import os import pickle import random @@ -13,8 +15,6 @@ import time import unittest import weakref -import importlib.machinery -import importlib.util from test import support from test.support import MISSING_C_DOCSTRINGS from test.support import import_helper @@ -35,6 +35,10 @@ Py_DEBUG = hasattr(sys, 'gettotalrefcount') +def decode_stderr(err): + return err.decode('utf-8', 'replace').replace('\r', '') + + def testfunction(self): """some doc""" return self @@ -207,23 +211,22 @@ def test_return_null_without_error(self): _testcapi.return_null_without_error() """) rc, out, err = assert_python_failure('-c', code) - self.assertRegex(err.replace(b'\r', b''), - br'Fatal Python error: _Py_CheckFunctionResult: ' - br'a function returned NULL ' - br'without setting an error\n' - br'Python runtime state: initialized\n' - br'SystemError: returned NULL ' - br'without setting an error\n' - br'\n' - br'Current thread.*:\n' - br' File .*", line 6 in ') + err = decode_stderr(err) + self.assertRegex(err, + r'Fatal Python error: _Py_CheckFunctionResult: ' + r'a function returned NULL without setting an exception\n' + r'Python runtime state: initialized\n' + r'SystemError: ' + r'returned NULL without setting an exception\n' + r'\n' + r'Current thread.*:\n' + r' File .*", line 6 in \n') else: with self.assertRaises(SystemError) as cm: _testcapi.return_null_without_error() self.assertRegex(str(cm.exception), 'return_null_without_error.* ' - 'returned NULL without setting an error') + 'returned NULL without setting an exception') def test_return_result_with_error(self): # Issue #23571: A function must not return a result with an error set @@ -236,28 +239,58 @@ def test_return_result_with_error(self): _testcapi.return_result_with_error() """) rc, out, err = assert_python_failure('-c', code) - self.assertRegex(err.replace(b'\r', b''), - br'Fatal Python error: _Py_CheckFunctionResult: ' - br'a function returned a result ' - br'with an error set\n' - br'Python runtime state: initialized\n' - br'ValueError\n' - br'\n' - br'The above exception was the direct cause ' - br'of the following exception:\n' - br'\n' - br'SystemError: ' - br'returned a result with an error set\n' - br'\n' - br'Current thread.*:\n' - br' File .*, line 6 in ') + err = decode_stderr(err) + self.assertRegex(err, + r'Fatal Python error: _Py_CheckFunctionResult: ' + r'a function returned a result with an exception set\n' + r'Python runtime state: initialized\n' + r'ValueError\n' + r'\n' + r'The above exception was the direct cause ' + r'of the following exception:\n' + r'\n' + r'SystemError: ' + r'returned a result with an exception set\n' + r'\n' + r'Current thread.*:\n' + r' File .*, line 6 in \n') else: with self.assertRaises(SystemError) as cm: _testcapi.return_result_with_error() self.assertRegex(str(cm.exception), 'return_result_with_error.* ' - 'returned a result with an error set') + 'returned a result with an exception set') + + def test_getitem_with_error(self): + # Test _Py_CheckSlotResult(). Raise an exception and then calls + # PyObject_GetItem(): check that the assertion catchs the bug. + # PyObject_GetItem() must not be called with an exception set. + code = textwrap.dedent(""" + import _testcapi + from test import support + + with support.SuppressCrashReport(): + _testcapi.getitem_with_error({1: 2}, 1) + """) + rc, out, err = assert_python_failure('-c', code) + err = decode_stderr(err) + if 'SystemError: ' not in err: + self.assertRegex(err, + r'Fatal Python error: _Py_CheckSlotResult: ' + r'Slot __getitem__ of type dict succeeded ' + r'with an exception set\n' + r'Python runtime state: initialized\n' + r'ValueError: bug\n' + r'\n' + r'Current thread .* \(most recent call first\):\n' + r' File .*, line 6 in \n' + r'\n' + r'Extension modules: _testcapi \(total: 1\)\n') + else: + # Python built with NDEBUG macro defined: + # test _Py_CheckFunctionResult() instead. + self.assertIn('returned a result with an exception set', err) def test_buildvalue_N(self): _testcapi.test_buildvalue_N() @@ -551,7 +584,7 @@ def check_fatal_error(self, code, expected, not_expected=()): with support.SuppressCrashReport(): rc, out, err = assert_python_failure('-sSI', '-c', code) - err = err.replace(b'\r', b'').decode('ascii', 'replace') + err = decode_stderr(err) self.assertIn('Fatal Python error: test_fatal_error: MESSAGE\n', err) diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 2a5b3d9c50b62..ed59c32e9c5e7 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -4736,6 +4736,18 @@ return_result_with_error(PyObject *self, PyObject *args) Py_RETURN_NONE; } +static PyObject* +getitem_with_error(PyObject *self, PyObject *args) +{ + PyObject *map, *key; + if (!PyArg_ParseTuple(args, "OO", &map, &key)) { + return NULL; + } + + PyErr_SetString(PyExc_ValueError, "bug"); + return PyObject_GetItem(map, key); +} + static PyObject * test_pytime_fromseconds(PyObject *self, PyObject *args) { @@ -5901,10 +5913,9 @@ static PyMethodDef TestMethods[] = { pymarshal_read_last_object_from_file, METH_VARARGS}, {"pymarshal_read_object_from_file", pymarshal_read_object_from_file, METH_VARARGS}, - {"return_null_without_error", - return_null_without_error, METH_NOARGS}, - {"return_result_with_error", - return_result_with_error, METH_NOARGS}, + {"return_null_without_error", return_null_without_error, METH_NOARGS}, + {"return_result_with_error", return_result_with_error, METH_NOARGS}, + {"getitem_with_error", getitem_with_error, METH_VARARGS}, {"PyTime_FromSeconds", test_pytime_fromseconds, METH_VARARGS}, {"PyTime_FromSecondsObject", test_pytime_fromsecondsobject, METH_VARARGS}, {"PyTime_AsSecondsDouble", test_pytime_assecondsdouble, METH_VARARGS}, diff --git a/Objects/abstract.c b/Objects/abstract.c index 44ed5b3932bf2..cc452eaaf3daa 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1,11 +1,12 @@ /* Abstract Object Interface (many thanks to Jim Fulton) */ #include "Python.h" -#include "pycore_unionobject.h" // _Py_UnionType && _Py_Union() #include "pycore_abstract.h" // _PyIndex_Check() #include "pycore_ceval.h" // _Py_EnterRecursiveCall() +#include "pycore_object.h" // _Py_CheckSlotResult() #include "pycore_pyerrors.h" // _PyErr_Occurred() #include "pycore_pystate.h" // _PyThreadState_GET() +#include "pycore_unionobject.h" // _Py_UnionType && _Py_Union() #include #include // offsetof() #include "longintrepr.h" @@ -61,7 +62,7 @@ PyObject_Size(PyObject *o) m = Py_TYPE(o)->tp_as_sequence; if (m && m->sq_length) { Py_ssize_t len = m->sq_length(o); - assert(len >= 0 || PyErr_Occurred()); + assert(_Py_CheckSlotResult(o, "__len__", len >= 0)); return len; } @@ -160,7 +161,7 @@ PyObject_GetItem(PyObject *o, PyObject *key) m = Py_TYPE(o)->tp_as_mapping; if (m && m->mp_subscript) { PyObject *item = m->mp_subscript(o, key); - assert((item != NULL) ^ (PyErr_Occurred() != NULL)); + assert(_Py_CheckSlotResult(o, "__getitem__", item != NULL)); return item; } @@ -1564,7 +1565,7 @@ PySequence_Size(PyObject *s) m = Py_TYPE(s)->tp_as_sequence; if (m && m->sq_length) { Py_ssize_t len = m->sq_length(s); - assert(len >= 0 || PyErr_Occurred()); + assert(_Py_CheckSlotResult(s, "__len__", len >= 0)); return len; } @@ -1708,8 +1709,8 @@ PySequence_GetItem(PyObject *s, Py_ssize_t i) if (i < 0) { if (m->sq_length) { Py_ssize_t l = (*m->sq_length)(s); + assert(_Py_CheckSlotResult(s, "__len__", l >= 0)); if (l < 0) { - assert(PyErr_Occurred()); return NULL; } i += l; @@ -1762,8 +1763,8 @@ PySequence_SetItem(PyObject *s, Py_ssize_t i, PyObject *o) if (i < 0) { if (m->sq_length) { Py_ssize_t l = (*m->sq_length)(s); + assert(_Py_CheckSlotResult(s, "__len__", l >= 0)); if (l < 0) { - assert(PyErr_Occurred()); return -1; } i += l; @@ -1795,8 +1796,8 @@ PySequence_DelItem(PyObject *s, Py_ssize_t i) if (i < 0) { if (m->sq_length) { Py_ssize_t l = (*m->sq_length)(s); + assert(_Py_CheckSlotResult(s, "__len__", l >= 0)); if (l < 0) { - assert(PyErr_Occurred()); return -1; } i += l; @@ -2145,7 +2146,7 @@ PyMapping_Size(PyObject *o) m = Py_TYPE(o)->tp_as_mapping; if (m && m->mp_length) { Py_ssize_t len = m->mp_length(o); - assert(len >= 0 || PyErr_Occurred()); + assert(_Py_CheckSlotResult(o, "__len__", len >= 0)); return len; } diff --git a/Objects/call.c b/Objects/call.c index 35b06a9b9c4d7..1fb85efab6169 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -39,16 +39,16 @@ _Py_CheckFunctionResult(PyThreadState *tstate, PyObject *callable, if (!_PyErr_Occurred(tstate)) { if (callable) _PyErr_Format(tstate, PyExc_SystemError, - "%R returned NULL without setting an error", + "%R returned NULL without setting an exception", callable); else _PyErr_Format(tstate, PyExc_SystemError, - "%s returned NULL without setting an error", + "%s returned NULL without setting an exception", where); #ifdef Py_DEBUG /* Ensure that the bug is caught in debug mode. Py_FatalError() logs the SystemError exception raised above. */ - Py_FatalError("a function returned NULL without setting an error"); + Py_FatalError("a function returned NULL without setting an exception"); #endif return NULL; } @@ -60,17 +60,17 @@ _Py_CheckFunctionResult(PyThreadState *tstate, PyObject *callable, if (callable) { _PyErr_FormatFromCauseTstate( tstate, PyExc_SystemError, - "%R returned a result with an error set", callable); + "%R returned a result with an exception set", callable); } else { _PyErr_FormatFromCauseTstate( tstate, PyExc_SystemError, - "%s returned a result with an error set", where); + "%s returned a result with an exception set", where); } #ifdef Py_DEBUG /* Ensure that the bug is caught in debug mode. Py_FatalError() logs the SystemError exception raised above. */ - Py_FatalError("a function returned a result with an error set"); + Py_FatalError("a function returned a result with an exception set"); #endif return NULL; } @@ -79,6 +79,30 @@ _Py_CheckFunctionResult(PyThreadState *tstate, PyObject *callable, } +int +_Py_CheckSlotResult(PyObject *obj, const char *slot_name, int success) +{ + PyThreadState *tstate = _PyThreadState_GET(); + if (!success) { + if (!_PyErr_Occurred(tstate)) { + _Py_FatalErrorFormat(__func__, + "Slot %s of type %s failed " + "without setting an exception", + slot_name, Py_TYPE(obj)->tp_name); + } + } + else { + if (_PyErr_Occurred(tstate)) { + _Py_FatalErrorFormat(__func__, + "Slot %s of type %s succeeded " + "with an exception set", + slot_name, Py_TYPE(obj)->tp_name); + } + } + return 1; +} + + /* --- Core PyObject call functions ------------------------------- */ /* Call a callable Python object without any arguments */ From webhook-mailer at python.org Wed Jan 27 18:03:31 2021 From: webhook-mailer at python.org (vstinner) Date: Wed, 27 Jan 2021 23:03:31 -0000 Subject: [Python-checkins] bpo-42955: Remove sub-packages from sys.stdlib_module_names (GH-24353) Message-ID: https://github.com/python/cpython/commit/64fc105b2d2faaeadd1026d2417b83915af6622f commit: 64fc105b2d2faaeadd1026d2417b83915af6622f branch: master author: Victor Stinner committer: vstinner date: 2021-01-28T00:03:23+01:00 summary: bpo-42955: Remove sub-packages from sys.stdlib_module_names (GH-24353) files: M Doc/library/sys.rst M Python/stdlib_module_names.h M Tools/scripts/generate_stdlib_module_names.py diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 0219ae8ceb65f..80b30d01f91aa 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1575,9 +1575,10 @@ always available. All module kinds are listed: pure Python, built-in, frozen and extension modules. Test modules are excluded. - For packages, only sub-packages are listed, not sub-modules. For example, - ``concurrent`` package and ``concurrent.futures`` sub-package are listed, - but not ``concurrent.futures.base`` sub-module. + For packages, only the main package is listed: sub-packages and sub-modules + are not listed. For example, the ``email`` package is listed, but the + ``email.mime`` sub-package and the ``email.message`` sub-module are not + listed. See also the :attr:`sys.builtin_module_names` list. diff --git a/Python/stdlib_module_names.h b/Python/stdlib_module_names.h index 8c430821d64b8..01aa6753e4201 100644 --- a/Python/stdlib_module_names.h +++ b/Python/stdlib_module_names.h @@ -117,7 +117,6 @@ static const char* _Py_stdlib_module_names[] = { "colorsys", "compileall", "concurrent", -"concurrent.futures", "configparser", "contextlib", "contextvars", @@ -126,7 +125,6 @@ static const char* _Py_stdlib_module_names[] = { "crypt", "csv", "ctypes", -"ctypes.macholib", "curses", "dataclasses", "datetime", @@ -135,13 +133,10 @@ static const char* _Py_stdlib_module_names[] = { "difflib", "dis", "distutils", -"distutils.command", "doctest", "email", -"email.mime", "encodings", "ensurepip", -"ensurepip._bundled", "enum", "errno", "faulthandler", @@ -178,8 +173,6 @@ static const char* _Py_stdlib_module_names[] = { "json", "keyword", "lib2to3", -"lib2to3.fixes", -"lib2to3.pgen2", "linecache", "locale", "logging", @@ -194,7 +187,6 @@ static const char* _Py_stdlib_module_names[] = { "msilib", "msvcrt", "multiprocessing", -"multiprocessing.dummy", "netrc", "nis", "nntplib", @@ -304,10 +296,6 @@ static const char* _Py_stdlib_module_names[] = { "wsgiref", "xdrlib", "xml", -"xml.dom", -"xml.etree", -"xml.parsers", -"xml.sax", "xmlrpc", "zipapp", "zipfile", diff --git a/Tools/scripts/generate_stdlib_module_names.py b/Tools/scripts/generate_stdlib_module_names.py index 02647691fc4d6..379b262e822db 100644 --- a/Tools/scripts/generate_stdlib_module_names.py +++ b/Tools/scripts/generate_stdlib_module_names.py @@ -57,29 +57,17 @@ def list_python_modules(names): names.add(name) -def _list_sub_packages(path, names, parent=None): - for name in os.listdir(path): +# Packages in Lib/ +def list_packages(names): + for name in os.listdir(STDLIB_PATH): if name in IGNORE: continue - package_path = os.path.join(path, name) + package_path = os.path.join(STDLIB_PATH, name) if not os.path.isdir(package_path): continue - if not any(package_file.endswith(".py") - for package_file in os.listdir(package_path)): - continue - if parent: - qualname = f"{parent}.{name}" - else: - qualname = name - if qualname in IGNORE: - continue - names.add(qualname) - _list_sub_packages(package_path, names, qualname) - - -# Packages and sub-packages -def list_packages(names): - _list_sub_packages(STDLIB_PATH, names) + if any(package_file.endswith(".py") + for package_file in os.listdir(package_path)): + names.add(name) # Extension modules built by setup.py From webhook-mailer at python.org Thu Jan 28 09:54:11 2021 From: webhook-mailer at python.org (ned-deily) Date: Thu, 28 Jan 2021 14:54:11 -0000 Subject: [Python-checkins] bpo-29076: Add fish support to macOS installer (GH-23302) (GH-23937) Message-ID: https://github.com/python/cpython/commit/e9c6c26aff08e4c7bc6f1e8015cdd8edcc92dbef commit: e9c6c26aff08e4c7bc6f1e8015cdd8edcc92dbef branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-28T09:54:03-05:00 summary: bpo-29076: Add fish support to macOS installer (GH-23302) (GH-23937) (cherry picked from commit 7f162e867c674f57c308a87fffcdcca3540c8933) Co-authored-by: Erlend Egeberg Aasland files: A Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst M Mac/BuildScript/scripts/postflight.patch-profile diff --git a/Mac/BuildScript/scripts/postflight.patch-profile b/Mac/BuildScript/scripts/postflight.patch-profile index 0a62e327f51b3..68b8e4bb044e1 100755 --- a/Mac/BuildScript/scripts/postflight.patch-profile +++ b/Mac/BuildScript/scripts/postflight.patch-profile @@ -20,7 +20,7 @@ fi # Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH. BSH="`basename "${theShell}"`" case "${BSH}" in -bash|ksh|sh|*csh|zsh) +bash|ksh|sh|*csh|zsh|fish) if [ `id -ur` = 0 ]; then P=`su - ${USER} -c 'echo A-X-4-X@@$PATH@@X-4-X-A' | grep 'A-X-4-X@@.*@@X-4-X-A' | sed -e 's/^A-X-4-X@@//g' -e 's/@@X-4-X-A$//g'` else @@ -76,6 +76,22 @@ bash) PR="${HOME}/.bash_profile" fi ;; +fish) + CONFIG_DIR="${HOME}/.config/fish" + RC="${CONFIG_DIR}/config.fish" + mkdir -p "$CONFIG_DIR" + if [ -f "${RC}" ]; then + cp -fp "${RC}" "${RC}.pysave" + fi + echo "" >> "${RC}" + echo "# Setting PATH for Python ${PYVER}" >> "${RC}" + echo "# The original version is saved in ${RC}.pysave" >> "${RC}" + echo "set -x PATH \"${PYTHON_ROOT}/bin\" \"\$PATH\"" >> "${RC}" + if [ `id -ur` = 0 ]; then + chown "${USER}" "${RC}" + fi + exit 0 + ;; zsh) PR="${HOME}/.zprofile" ;; 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 new file mode 100644 index 0000000000000..b38beb0586951 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst @@ -0,0 +1 @@ +Add fish shell support to macOS installer. From webhook-mailer at python.org Thu Jan 28 09:55:06 2021 From: webhook-mailer at python.org (ned-deily) Date: Thu, 28 Jan 2021 14:55:06 -0000 Subject: [Python-checkins] bpo-29076: Add fish support to macOS installer (GH-23302) (GH-23938) Message-ID: https://github.com/python/cpython/commit/81b23a9b148b60f8f541e4b06e1d88c58644e3b8 commit: 81b23a9b148b60f8f541e4b06e1d88c58644e3b8 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-28T09:54:57-05:00 summary: bpo-29076: Add fish support to macOS installer (GH-23302) (GH-23938) (cherry picked from commit 7f162e867c674f57c308a87fffcdcca3540c8933) Co-authored-by: Erlend Egeberg Aasland files: A Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst M Mac/BuildScript/scripts/postflight.patch-profile diff --git a/Mac/BuildScript/scripts/postflight.patch-profile b/Mac/BuildScript/scripts/postflight.patch-profile index 0a62e327f51b3..68b8e4bb044e1 100755 --- a/Mac/BuildScript/scripts/postflight.patch-profile +++ b/Mac/BuildScript/scripts/postflight.patch-profile @@ -20,7 +20,7 @@ fi # Make sure the directory ${PYTHON_ROOT}/bin is on the users PATH. BSH="`basename "${theShell}"`" case "${BSH}" in -bash|ksh|sh|*csh|zsh) +bash|ksh|sh|*csh|zsh|fish) if [ `id -ur` = 0 ]; then P=`su - ${USER} -c 'echo A-X-4-X@@$PATH@@X-4-X-A' | grep 'A-X-4-X@@.*@@X-4-X-A' | sed -e 's/^A-X-4-X@@//g' -e 's/@@X-4-X-A$//g'` else @@ -76,6 +76,22 @@ bash) PR="${HOME}/.bash_profile" fi ;; +fish) + CONFIG_DIR="${HOME}/.config/fish" + RC="${CONFIG_DIR}/config.fish" + mkdir -p "$CONFIG_DIR" + if [ -f "${RC}" ]; then + cp -fp "${RC}" "${RC}.pysave" + fi + echo "" >> "${RC}" + echo "# Setting PATH for Python ${PYVER}" >> "${RC}" + echo "# The original version is saved in ${RC}.pysave" >> "${RC}" + echo "set -x PATH \"${PYTHON_ROOT}/bin\" \"\$PATH\"" >> "${RC}" + if [ `id -ur` = 0 ]; then + chown "${USER}" "${RC}" + fi + exit 0 + ;; zsh) PR="${HOME}/.zprofile" ;; 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 new file mode 100644 index 0000000000000..b38beb0586951 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-02-28-14-33-15.bpo-29076.Gtixi5.rst @@ -0,0 +1 @@ +Add fish shell support to macOS installer. From webhook-mailer at python.org Thu Jan 28 18:13:55 2021 From: webhook-mailer at python.org (terryjreedy) Date: Thu, 28 Jan 2021 23:13:55 -0000 Subject: [Python-checkins] bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) Message-ID: https://github.com/python/cpython/commit/23a567c11ca36eedde0e119443c85cc16075deaf commit: 23a567c11ca36eedde0e119443c85cc16075deaf branch: master author: Zackery Spytz committer: terryjreedy date: 2021-01-28T18:13:22-05:00 summary: bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE. Co-authored-by: Terry Jan Reedy files: A Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/codecontext.py M Lib/idlelib/editor.py M Lib/idlelib/idle_test/test_mainmenu.py M Lib/idlelib/pyshell.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index f1abb38eee2e5..87024c00a8580 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2021-10-04? ====================================== +bpo-23544: Disable Debug=>Stack Viewer when user code is running or +Debugger is active, to prevent hang or crash. Patch by Zackery Spytz. + bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py index eb19773f56e34..f2f44f5f8d4e6 100644 --- a/Lib/idlelib/codecontext.py +++ b/Lib/idlelib/codecontext.py @@ -142,7 +142,7 @@ def toggle_code_context_event(self, event=None): self.text.after_cancel(self.t1) self._reset() menu_status = 'Show' - self.editwin.update_menu_label(menu='options', index='* Code Context', + self.editwin.update_menu_label(menu='options', index='*ode*ontext', label=f'{menu_status} Code Context') return "break" diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 66e9da5a9dccf..b9cb50264ff06 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -339,7 +339,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): text.bind("<>", self.code_context.toggle_code_context_event) else: - self.update_menu_state('options', '*Code Context', 'disabled') + self.update_menu_state('options', '*ode*ontext', 'disabled') if self.allow_line_numbers: self.line_numbers = self.LineNumbers(self) if idleConf.GetOption('main', 'EditorWindow', @@ -347,7 +347,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): self.toggle_line_numbers_event() text.bind("<>", self.toggle_line_numbers_event) else: - self.update_menu_state('options', '*Line Numbers', 'disabled') + self.update_menu_state('options', '*ine*umbers', 'disabled') def handle_winconfig(self, event=None): self.set_width() @@ -450,7 +450,9 @@ def createmenubar(self): self.menudict = menudict = {} for name, label in self.menu_specs: underline, label = prepstr(label) - menudict[name] = menu = Menu(mbar, name=name, tearoff=0) + postcommand = getattr(self, f'{name}_menu_postcommand', None) + menudict[name] = menu = Menu(mbar, name=name, tearoff=0, + postcommand=postcommand) mbar.add_cascade(label=label, menu=menu, underline=underline) if macosx.isCarbonTk(): # Insert the application menu @@ -1527,7 +1529,7 @@ def toggle_line_numbers_event(self, event=None): else: self.line_numbers.show_sidebar() menu_label = "Hide" - self.update_menu_label(menu='options', index='*Line Numbers', + self.update_menu_label(menu='options', index='*ine*umbers', label=f'{menu_label} Line Numbers') # "line.col" -> line, as an int diff --git a/Lib/idlelib/idle_test/test_mainmenu.py b/Lib/idlelib/idle_test/test_mainmenu.py index 7ec0368371c7d..51d2accfe48a1 100644 --- a/Lib/idlelib/idle_test/test_mainmenu.py +++ b/Lib/idlelib/idle_test/test_mainmenu.py @@ -2,6 +2,7 @@ # Reported as 88%; mocking turtledemo absence would have no point. from idlelib import mainmenu +import re import unittest @@ -16,6 +17,26 @@ def test_menudefs(self): def test_default_keydefs(self): self.assertGreaterEqual(len(mainmenu.default_keydefs), 50) + def test_tcl_indexes(self): + # Test tcl patterns used to find menuitem to alter. + # On failure, change pattern here and in function(s). + # Patterns here have '.*' for re instead of '*' for tcl. + for menu, pattern in ( + ('debug', '.*tack.*iewer'), # PyShell.debug_menu_postcommand + ('options', '.*ode.*ontext'), # EW.__init__, CodeContext.toggle... + ('options', '.*ine.*umbers'), # EW.__init__, EW.toggle...event. + ): + with self.subTest(menu=menu, pattern=pattern): + for menutup in mainmenu.menudefs: + if menutup[0] == menu: + break + else: + self.assertTrue(0, f"{menu} not in menudefs") + self.assertTrue(any(re.search(pattern, menuitem[0]) + for menuitem in menutup[1] + if menuitem is not None), # Separator. + f"{pattern} not in {menu}") + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 0407ca9cfd8bf..0ee2254807fe8 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -989,6 +989,10 @@ def open_debugger(self): self.showprompt() self.set_debugger_indicator() + def debug_menu_postcommand(self): + state = 'disabled' if self.executing else 'normal' + self.update_menu_state('debug', '*tack*iewer', state) + def beginexecuting(self): "Helper for ModifiedInterpreter" self.resetoutput() diff --git a/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst b/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst new file mode 100644 index 0000000000000..eb4a56bf100b5 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst @@ -0,0 +1,2 @@ +Disable Debug=>Stack Viewer when user code is running or Debugger +is active, to prevent hang or crash. Patch by Zackery Spytz. From webhook-mailer at python.org Thu Jan 28 18:38:55 2021 From: webhook-mailer at python.org (miss-islington) Date: Thu, 28 Jan 2021 23:38:55 -0000 Subject: [Python-checkins] bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) Message-ID: https://github.com/python/cpython/commit/6d87dec5818667168cc7e4ad972dde8aeec6d900 commit: 6d87dec5818667168cc7e4ad972dde8aeec6d900 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-28T15:38:19-08:00 summary: bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE. Co-authored-by: Terry Jan Reedy (cherry picked from commit 23a567c11ca36eedde0e119443c85cc16075deaf) Co-authored-by: Zackery Spytz files: A Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/codecontext.py M Lib/idlelib/editor.py M Lib/idlelib/idle_test/test_mainmenu.py M Lib/idlelib/pyshell.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 2c52295e4184f..e7d2f16e7a5a6 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2021-02-15? ====================================== +bpo-23544: Disable Debug=>Stack Viewer when user code is running or +Debugger is active, to prevent hang or crash. Patch by Zackery Spytz. + bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py index eb19773f56e34..f2f44f5f8d4e6 100644 --- a/Lib/idlelib/codecontext.py +++ b/Lib/idlelib/codecontext.py @@ -142,7 +142,7 @@ def toggle_code_context_event(self, event=None): self.text.after_cancel(self.t1) self._reset() menu_status = 'Show' - self.editwin.update_menu_label(menu='options', index='* Code Context', + self.editwin.update_menu_label(menu='options', index='*ode*ontext', label=f'{menu_status} Code Context') return "break" diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 66e9da5a9dccf..b9cb50264ff06 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -339,7 +339,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): text.bind("<>", self.code_context.toggle_code_context_event) else: - self.update_menu_state('options', '*Code Context', 'disabled') + self.update_menu_state('options', '*ode*ontext', 'disabled') if self.allow_line_numbers: self.line_numbers = self.LineNumbers(self) if idleConf.GetOption('main', 'EditorWindow', @@ -347,7 +347,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): self.toggle_line_numbers_event() text.bind("<>", self.toggle_line_numbers_event) else: - self.update_menu_state('options', '*Line Numbers', 'disabled') + self.update_menu_state('options', '*ine*umbers', 'disabled') def handle_winconfig(self, event=None): self.set_width() @@ -450,7 +450,9 @@ def createmenubar(self): self.menudict = menudict = {} for name, label in self.menu_specs: underline, label = prepstr(label) - menudict[name] = menu = Menu(mbar, name=name, tearoff=0) + postcommand = getattr(self, f'{name}_menu_postcommand', None) + menudict[name] = menu = Menu(mbar, name=name, tearoff=0, + postcommand=postcommand) mbar.add_cascade(label=label, menu=menu, underline=underline) if macosx.isCarbonTk(): # Insert the application menu @@ -1527,7 +1529,7 @@ def toggle_line_numbers_event(self, event=None): else: self.line_numbers.show_sidebar() menu_label = "Hide" - self.update_menu_label(menu='options', index='*Line Numbers', + self.update_menu_label(menu='options', index='*ine*umbers', label=f'{menu_label} Line Numbers') # "line.col" -> line, as an int diff --git a/Lib/idlelib/idle_test/test_mainmenu.py b/Lib/idlelib/idle_test/test_mainmenu.py index 7ec0368371c7d..51d2accfe48a1 100644 --- a/Lib/idlelib/idle_test/test_mainmenu.py +++ b/Lib/idlelib/idle_test/test_mainmenu.py @@ -2,6 +2,7 @@ # Reported as 88%; mocking turtledemo absence would have no point. from idlelib import mainmenu +import re import unittest @@ -16,6 +17,26 @@ def test_menudefs(self): def test_default_keydefs(self): self.assertGreaterEqual(len(mainmenu.default_keydefs), 50) + def test_tcl_indexes(self): + # Test tcl patterns used to find menuitem to alter. + # On failure, change pattern here and in function(s). + # Patterns here have '.*' for re instead of '*' for tcl. + for menu, pattern in ( + ('debug', '.*tack.*iewer'), # PyShell.debug_menu_postcommand + ('options', '.*ode.*ontext'), # EW.__init__, CodeContext.toggle... + ('options', '.*ine.*umbers'), # EW.__init__, EW.toggle...event. + ): + with self.subTest(menu=menu, pattern=pattern): + for menutup in mainmenu.menudefs: + if menutup[0] == menu: + break + else: + self.assertTrue(0, f"{menu} not in menudefs") + self.assertTrue(any(re.search(pattern, menuitem[0]) + for menuitem in menutup[1] + if menuitem is not None), # Separator. + f"{pattern} not in {menu}") + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index d32106c983874..fea3762461e99 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -989,6 +989,10 @@ def open_debugger(self): self.showprompt() self.set_debugger_indicator() + def debug_menu_postcommand(self): + state = 'disabled' if self.executing else 'normal' + self.update_menu_state('debug', '*tack*iewer', state) + def beginexecuting(self): "Helper for ModifiedInterpreter" self.resetoutput() diff --git a/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst b/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst new file mode 100644 index 0000000000000..eb4a56bf100b5 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst @@ -0,0 +1,2 @@ +Disable Debug=>Stack Viewer when user code is running or Debugger +is active, to prevent hang or crash. Patch by Zackery Spytz. From webhook-mailer at python.org Thu Jan 28 20:48:12 2021 From: webhook-mailer at python.org (terryjreedy) Date: Fri, 29 Jan 2021 01:48:12 -0000 Subject: [Python-checkins] bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) (#24366) Message-ID: https://github.com/python/cpython/commit/901a9834420e516c07d6cad356d2be481db6d8d1 commit: 901a9834420e516c07d6cad356d2be481db6d8d1 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: terryjreedy date: 2021-01-28T20:47:41-05:00 summary: bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163) (#24366) Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE. Co-authored-by: Zackery Spytz Co-authored-by: Terry Jan Reedy (cherry picked from commit 23a567c11ca36eedde0e119443c85cc16075deaf) files: A Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst M Lib/idlelib/NEWS.txt M Lib/idlelib/codecontext.py M Lib/idlelib/editor.py M Lib/idlelib/idle_test/test_mainmenu.py M Lib/idlelib/pyshell.py diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 0affc55da8f0a..522ce59f61692 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ Released on 2021-02-15? ====================================== +bpo-23544: Disable Debug=>Stack Viewer when user code is running or +Debugger is active, to prevent hang or crash. Patch by Zackery Spytz. + bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py index eb19773f56e34..f2f44f5f8d4e6 100644 --- a/Lib/idlelib/codecontext.py +++ b/Lib/idlelib/codecontext.py @@ -142,7 +142,7 @@ def toggle_code_context_event(self, event=None): self.text.after_cancel(self.t1) self._reset() menu_status = 'Show' - self.editwin.update_menu_label(menu='options', index='* Code Context', + self.editwin.update_menu_label(menu='options', index='*ode*ontext', label=f'{menu_status} Code Context') return "break" diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 66e9da5a9dccf..b9cb50264ff06 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -339,7 +339,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): text.bind("<>", self.code_context.toggle_code_context_event) else: - self.update_menu_state('options', '*Code Context', 'disabled') + self.update_menu_state('options', '*ode*ontext', 'disabled') if self.allow_line_numbers: self.line_numbers = self.LineNumbers(self) if idleConf.GetOption('main', 'EditorWindow', @@ -347,7 +347,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None): self.toggle_line_numbers_event() text.bind("<>", self.toggle_line_numbers_event) else: - self.update_menu_state('options', '*Line Numbers', 'disabled') + self.update_menu_state('options', '*ine*umbers', 'disabled') def handle_winconfig(self, event=None): self.set_width() @@ -450,7 +450,9 @@ def createmenubar(self): self.menudict = menudict = {} for name, label in self.menu_specs: underline, label = prepstr(label) - menudict[name] = menu = Menu(mbar, name=name, tearoff=0) + postcommand = getattr(self, f'{name}_menu_postcommand', None) + menudict[name] = menu = Menu(mbar, name=name, tearoff=0, + postcommand=postcommand) mbar.add_cascade(label=label, menu=menu, underline=underline) if macosx.isCarbonTk(): # Insert the application menu @@ -1527,7 +1529,7 @@ def toggle_line_numbers_event(self, event=None): else: self.line_numbers.show_sidebar() menu_label = "Hide" - self.update_menu_label(menu='options', index='*Line Numbers', + self.update_menu_label(menu='options', index='*ine*umbers', label=f'{menu_label} Line Numbers') # "line.col" -> line, as an int diff --git a/Lib/idlelib/idle_test/test_mainmenu.py b/Lib/idlelib/idle_test/test_mainmenu.py index 7ec0368371c7d..51d2accfe48a1 100644 --- a/Lib/idlelib/idle_test/test_mainmenu.py +++ b/Lib/idlelib/idle_test/test_mainmenu.py @@ -2,6 +2,7 @@ # Reported as 88%; mocking turtledemo absence would have no point. from idlelib import mainmenu +import re import unittest @@ -16,6 +17,26 @@ def test_menudefs(self): def test_default_keydefs(self): self.assertGreaterEqual(len(mainmenu.default_keydefs), 50) + def test_tcl_indexes(self): + # Test tcl patterns used to find menuitem to alter. + # On failure, change pattern here and in function(s). + # Patterns here have '.*' for re instead of '*' for tcl. + for menu, pattern in ( + ('debug', '.*tack.*iewer'), # PyShell.debug_menu_postcommand + ('options', '.*ode.*ontext'), # EW.__init__, CodeContext.toggle... + ('options', '.*ine.*umbers'), # EW.__init__, EW.toggle...event. + ): + with self.subTest(menu=menu, pattern=pattern): + for menutup in mainmenu.menudefs: + if menutup[0] == menu: + break + else: + self.assertTrue(0, f"{menu} not in menudefs") + self.assertTrue(any(re.search(pattern, menuitem[0]) + for menuitem in menutup[1] + if menuitem is not None), # Separator. + f"{pattern} not in {menu}") + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index d32106c983874..fea3762461e99 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -989,6 +989,10 @@ def open_debugger(self): self.showprompt() self.set_debugger_indicator() + def debug_menu_postcommand(self): + state = 'disabled' if self.executing else 'normal' + self.update_menu_state('debug', '*tack*iewer', state) + def beginexecuting(self): "Helper for ModifiedInterpreter" self.resetoutput() diff --git a/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst b/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst new file mode 100644 index 0000000000000..eb4a56bf100b5 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2019-11-14-23-41-07.bpo-23544.3etemb.rst @@ -0,0 +1,2 @@ +Disable Debug=>Stack Viewer when user code is running or Debugger +is active, to prevent hang or crash. Patch by Zackery Spytz. From webhook-mailer at python.org Fri Jan 29 08:25:08 2021 From: webhook-mailer at python.org (markshannon) Date: Fri, 29 Jan 2021 13:25:08 -0000 Subject: [Python-checkins] bpo-42990: Introduce 'frame constructor' struct to simplify API for PyEval_CodeEval and friends (GH-24298) Message-ID: https://github.com/python/cpython/commit/d6c33fbd346765c6a8654dccacb2338006bf2b47 commit: d6c33fbd346765c6a8654dccacb2338006bf2b47 branch: master author: Mark Shannon committer: markshannon date: 2021-01-29T13:24:55Z summary: bpo-42990: Introduce 'frame constructor' struct to simplify API for PyEval_CodeEval and friends (GH-24298) * Introduce 'frame constructor' to simplify API for frame creation * Embed struct using a macro to conform to PEP 7 files: M Include/cpython/frameobject.h M Include/funcobject.h M Include/internal/pycore_ceval.h M Lib/test/test_sys.py M Objects/call.c M Objects/frameobject.c M Objects/funcobject.c M Python/ceval.c diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h index 28170615a0433..f162e2465f3a4 100644 --- a/Include/cpython/frameobject.h +++ b/Include/cpython/frameobject.h @@ -72,7 +72,7 @@ PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, /* only internal use */ PyFrameObject* _PyFrame_New_NoTrack(PyThreadState *, PyCodeObject *, - PyObject *, PyObject *); + PyObject *, PyObject *, PyObject *); /* The rest of the interface is specific for frame objects */ @@ -92,3 +92,5 @@ PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *); PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out); PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame); + +PyObject *_PyEval_BuiltinsFromGlobals(PyObject *globals); diff --git a/Include/funcobject.h b/Include/funcobject.h index c5cc9d261a314..d7acd18c6519e 100644 --- a/Include/funcobject.h +++ b/Include/funcobject.h @@ -7,6 +7,21 @@ extern "C" { #endif + +#define COMMON_FIELDS(PREFIX) \ + PyObject *PREFIX ## globals; \ + PyObject *PREFIX ## builtins; \ + PyObject *PREFIX ## name; \ + PyObject *PREFIX ## qualname; \ + PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ \ + PyObject *PREFIX ## defaults; /* NULL or a tuple */ \ + PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ \ + PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */ + +typedef struct { + COMMON_FIELDS(fc_) +} PyFrameConstructor; + /* Function objects and code objects should not be confused with each other: * * Function objects are created by the execution of the 'def' statement. @@ -20,18 +35,12 @@ extern "C" { typedef struct { PyObject_HEAD - PyObject *func_code; /* A code object, the __code__ attribute */ - PyObject *func_globals; /* A dictionary (other mappings won't do) */ - PyObject *func_defaults; /* NULL or a tuple */ - PyObject *func_kwdefaults; /* NULL or a dict */ - PyObject *func_closure; /* NULL or a tuple of cell objects */ + COMMON_FIELDS(func_) PyObject *func_doc; /* The __doc__ attribute, can be anything */ - PyObject *func_name; /* The __name__ attribute, a string object */ PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */ PyObject *func_weakreflist; /* List of weak references */ PyObject *func_module; /* The __module__ attribute, can be anything */ PyObject *func_annotations; /* Annotations, a dict or NULL */ - PyObject *func_qualname; /* The qualified name */ vectorcallfunc vectorcall; /* Invariant: @@ -84,6 +93,9 @@ PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall( #define PyFunction_GET_ANNOTATIONS(func) \ (((PyFunctionObject *)func) -> func_annotations) +#define PyFunction_AS_FRAME_CONSTRUCTOR(func) \ + ((PyFrameConstructor *)&((PyFunctionObject *)(func))->func_globals) + /* The classmethod and staticmethod types lives here, too */ PyAPI_DATA(PyTypeObject) PyClassMethod_Type; PyAPI_DATA(PyTypeObject) PyStaticMethod_Type; diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h index 38fd681f20c45..a9da8b8f45073 100644 --- a/Include/internal/pycore_ceval.h +++ b/Include/internal/pycore_ceval.h @@ -42,13 +42,10 @@ _PyEval_EvalFrame(PyThreadState *tstate, PyFrameObject *f, int throwflag) extern PyObject *_PyEval_EvalCode( PyThreadState *tstate, - PyObject *_co, PyObject *globals, PyObject *locals, + PyFrameConstructor *desc, PyObject *locals, PyObject *const *args, Py_ssize_t argcount, PyObject *const *kwnames, PyObject *const *kwargs, - Py_ssize_t kwcount, int kwstep, - PyObject *const *defs, Py_ssize_t defcount, - PyObject *kwdefs, PyObject *closure, - PyObject *name, PyObject *qualname); + Py_ssize_t kwcount, int kwstep); #ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS extern int _PyEval_ThreadsInitialized(PyInterpreterState *interp); diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index c4e053594800b..fca05e6f88f30 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1280,7 +1280,7 @@ class C(object): pass check(x, vsize('4Pi2c4P3ic' + CO_MAXBLOCKS*'3i' + 'P' + extras*'P')) # function def func(): pass - check(func, size('13P')) + check(func, size('14P')) class c(): @staticmethod def foo(): diff --git a/Objects/call.c b/Objects/call.c index 1fb85efab6169..7972693918bbb 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -331,16 +331,16 @@ PyCFunction_Call(PyObject *callable, PyObject *args, PyObject *kwargs) static PyObject* _Py_HOT_FUNCTION function_code_fastcall(PyThreadState *tstate, PyCodeObject *co, PyObject *const *args, Py_ssize_t nargs, - PyObject *globals) + PyFunctionObject *func) { assert(tstate != NULL); - assert(globals != NULL); + assert(func != NULL); /* XXX Perhaps we should create a specialized _PyFrame_New_NoTrack() that doesn't take locals, but does take builtins without sanity checking them. */ - PyFrameObject *f = _PyFrame_New_NoTrack(tstate, co, globals, NULL); + PyFrameObject *f = _PyFrame_New_NoTrack(tstate, co, func->func_globals, func->func_builtins, NULL); if (f == NULL) { return NULL; } @@ -381,14 +381,13 @@ _PyFunction_Vectorcall(PyObject *func, PyObject* const* stack, PyThreadState *tstate = _PyThreadState_GET(); PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); - PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); if (co->co_kwonlyargcount == 0 && nkwargs == 0 && (co->co_flags & ~PyCF_MASK) == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { - return function_code_fastcall(tstate, co, stack, nargs, globals); + return function_code_fastcall(tstate, co, stack, nargs, (PyFunctionObject *)func); } else if (nargs == 0 && argdefs != NULL && co->co_argcount == PyTuple_GET_SIZE(argdefs)) { @@ -397,34 +396,16 @@ _PyFunction_Vectorcall(PyObject *func, PyObject* const* stack, stack = _PyTuple_ITEMS(argdefs); return function_code_fastcall(tstate, co, stack, PyTuple_GET_SIZE(argdefs), - globals); + (PyFunctionObject *)func); } } - PyObject *kwdefs = PyFunction_GET_KW_DEFAULTS(func); - PyObject *closure = PyFunction_GET_CLOSURE(func); - PyObject *name = ((PyFunctionObject *)func) -> func_name; - PyObject *qualname = ((PyFunctionObject *)func) -> func_qualname; - - PyObject **d; - Py_ssize_t nd; - if (argdefs != NULL) { - d = _PyTuple_ITEMS(argdefs); - nd = PyTuple_GET_SIZE(argdefs); - assert(nd <= INT_MAX); - } - else { - d = NULL; - nd = 0; - } return _PyEval_EvalCode(tstate, - (PyObject*)co, globals, (PyObject *)NULL, + PyFunction_AS_FRAME_CONSTRUCTOR(func), (PyObject *)NULL, stack, nargs, nkwargs ? _PyTuple_ITEMS(kwnames) : NULL, stack + nargs, - nkwargs, 1, - d, (int)nd, kwdefs, - closure, name, qualname); + nkwargs, 1); } diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 4c5eaa23d345b..45a275bd90124 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -22,7 +22,6 @@ static PyMemberDef frame_memberlist[] = { {NULL} /* Sentinel */ }; - static struct _Py_frame_state * get_frame_state(void) { @@ -816,54 +815,12 @@ frame_alloc(PyCodeObject *code) } -static inline PyObject * -frame_get_builtins(PyFrameObject *back, PyObject *globals) -{ - PyObject *builtins; - - if (back != NULL && back->f_globals == globals) { - /* If we share the globals, we share the builtins. - Save a lookup and a call. */ - builtins = back->f_builtins; - assert(builtins != NULL); - Py_INCREF(builtins); - return builtins; - } - - builtins = _PyDict_GetItemIdWithError(globals, &PyId___builtins__); - if (builtins != NULL && PyModule_Check(builtins)) { - builtins = PyModule_GetDict(builtins); - assert(builtins != NULL); - } - if (builtins != NULL) { - Py_INCREF(builtins); - return builtins; - } - - if (PyErr_Occurred()) { - return NULL; - } - - /* No builtins! Make up a minimal one. - Give them 'None', at least. */ - builtins = PyDict_New(); - if (builtins == NULL) { - return NULL; - } - if (PyDict_SetItemString(builtins, "None", Py_None) < 0) { - Py_DECREF(builtins); - return NULL; - } - return builtins; -} - - PyFrameObject* _Py_HOT_FUNCTION _PyFrame_New_NoTrack(PyThreadState *tstate, PyCodeObject *code, - PyObject *globals, PyObject *locals) + PyObject *globals, PyObject *builtins, PyObject *locals) { #ifdef Py_DEBUG - if (code == NULL || globals == NULL || !PyDict_Check(globals) || + if (code == NULL || globals == NULL || builtins == NULL || (locals != NULL && !PyMapping_Check(locals))) { PyErr_BadInternalCall(); return NULL; @@ -871,18 +828,14 @@ _PyFrame_New_NoTrack(PyThreadState *tstate, PyCodeObject *code, #endif PyFrameObject *back = tstate->frame; - PyObject *builtins = frame_get_builtins(back, globals); - if (builtins == NULL) { - return NULL; - } PyFrameObject *f = frame_alloc(code); if (f == NULL) { - Py_DECREF(builtins); return NULL; } f->f_stackdepth = 0; + Py_INCREF(builtins); f->f_builtins = builtins; Py_XINCREF(back); f->f_back = back; @@ -902,8 +855,9 @@ _PyFrame_New_NoTrack(PyThreadState *tstate, PyCodeObject *code, f->f_locals = locals; } else { - if (locals == NULL) + if (locals == NULL) { locals = globals; + } Py_INCREF(locals); f->f_locals = locals; } @@ -925,7 +879,9 @@ PyFrameObject* PyFrame_New(PyThreadState *tstate, PyCodeObject *code, PyObject *globals, PyObject *locals) { - PyFrameObject *f = _PyFrame_New_NoTrack(tstate, code, globals, locals); + PyObject *builtins = _PyEval_BuiltinsFromGlobals(globals); + PyFrameObject *f = _PyFrame_New_NoTrack(tstate, code, globals, builtins, locals); + Py_DECREF(builtins); if (f) _PyObject_GC_TRACK(f); return f; @@ -1223,3 +1179,28 @@ PyFrame_GetBack(PyFrameObject *frame) Py_XINCREF(back); return back; } + +PyObject *_PyEval_BuiltinsFromGlobals(PyObject *globals) { + PyObject *builtins = _PyDict_GetItemIdWithError(globals, &PyId___builtins__); + if (builtins) { + if (PyModule_Check(builtins)) { + builtins = PyModule_GetDict(builtins); + assert(builtins != NULL); + } + } + if (builtins == NULL) { + if (PyErr_Occurred()) { + return NULL; + } + /* No builtins! Make up a minimal one + Give them 'None', at least. */ + builtins = PyDict_New(); + if (builtins == NULL || + PyDict_SetItemString( + builtins, "None", Py_None) < 0) + return NULL; + } + else + Py_INCREF(builtins); + return builtins; +} diff --git a/Objects/funcobject.c b/Objects/funcobject.c index e7961b3e6eb4b..f839d7b429e0b 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -3,6 +3,7 @@ #include "Python.h" #include "pycore_object.h" +#include "frameobject.h" #include "code.h" #include "structmember.h" // PyMemberDef @@ -40,8 +41,14 @@ PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname op->func_weakreflist = NULL; Py_INCREF(code); op->func_code = code; + assert(globals != NULL); Py_INCREF(globals); op->func_globals = globals; + PyObject *builtins = _PyEval_BuiltinsFromGlobals(globals); + if (builtins == NULL) { + return NULL; + } + op->func_builtins = builtins; op->func_name = ((PyCodeObject *)code)->co_name; Py_INCREF(op->func_name); op->func_defaults = NULL; /* No default arguments */ @@ -592,15 +599,16 @@ func_clear(PyFunctionObject *op) { Py_CLEAR(op->func_code); Py_CLEAR(op->func_globals); - Py_CLEAR(op->func_module); + Py_CLEAR(op->func_builtins); Py_CLEAR(op->func_name); + Py_CLEAR(op->func_qualname); + Py_CLEAR(op->func_module); Py_CLEAR(op->func_defaults); Py_CLEAR(op->func_kwdefaults); Py_CLEAR(op->func_doc); Py_CLEAR(op->func_dict); Py_CLEAR(op->func_closure); Py_CLEAR(op->func_annotations); - Py_CLEAR(op->func_qualname); return 0; } @@ -627,6 +635,7 @@ func_traverse(PyFunctionObject *f, visitproc visit, void *arg) { Py_VISIT(f->func_code); Py_VISIT(f->func_globals); + Py_VISIT(f->func_builtins); Py_VISIT(f->func_module); Py_VISIT(f->func_defaults); Py_VISIT(f->func_kwdefaults); diff --git a/Python/ceval.c b/Python/ceval.c index 5e2a160f0ed35..be9ea24454768 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3888,7 +3888,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) if (oparg & 0x08) { assert(PyTuple_CheckExact(TOP())); - func ->func_closure = POP(); + func->func_closure = POP(); } if (oparg & 0x04) { assert(PyTuple_CheckExact(TOP())); @@ -4233,7 +4233,7 @@ missing_arguments(PyThreadState *tstate, PyCodeObject *co, static void too_many_positional(PyThreadState *tstate, PyCodeObject *co, - Py_ssize_t given, Py_ssize_t defcount, + Py_ssize_t given, PyObject *defaults, PyObject **fastlocals, PyObject *qualname) { int plural; @@ -4249,6 +4249,7 @@ too_many_positional(PyThreadState *tstate, PyCodeObject *co, kwonly_given++; } } + Py_ssize_t defcount = defaults == NULL ? 0 : PyTuple_GET_SIZE(defaults); if (defcount) { Py_ssize_t atleast = co_argcount - defcount; plural = 1; @@ -4356,41 +4357,20 @@ positional_only_passed_as_keyword(PyThreadState *tstate, PyCodeObject *co, PyObject * _PyEval_EvalCode(PyThreadState *tstate, - PyObject *_co, PyObject *globals, PyObject *locals, + PyFrameConstructor *con, PyObject *locals, PyObject *const *args, Py_ssize_t argcount, PyObject *const *kwnames, PyObject *const *kwargs, - Py_ssize_t kwcount, int kwstep, - PyObject *const *defs, Py_ssize_t defcount, - PyObject *kwdefs, PyObject *closure, - PyObject *name, PyObject *qualname) + Py_ssize_t kwcount, int kwstep) { assert(is_tstate_valid(tstate)); - PyCodeObject *co = (PyCodeObject*)_co; - - if (!name) { - name = co->co_name; - } - assert(name != NULL); - assert(PyUnicode_Check(name)); - - if (!qualname) { - qualname = name; - } - assert(qualname != NULL); - assert(PyUnicode_Check(qualname)); - + PyCodeObject *co = (PyCodeObject*)con->fc_code; + assert(con->fc_defaults == NULL || PyTuple_CheckExact(con->fc_defaults)); PyObject *retval = NULL; const Py_ssize_t total_args = co->co_argcount + co->co_kwonlyargcount; - if (globals == NULL) { - _PyErr_SetString(tstate, PyExc_SystemError, - "PyEval_EvalCodeEx: NULL globals"); - return NULL; - } - /* Create the frame */ - PyFrameObject *f = _PyFrame_New_NoTrack(tstate, co, globals, locals); + PyFrameObject *f = _PyFrame_New_NoTrack(tstate, co, con->fc_globals, con->fc_builtins, locals); if (f == NULL) { return NULL; } @@ -4448,7 +4428,7 @@ _PyEval_EvalCode(PyThreadState *tstate, if (keyword == NULL || !PyUnicode_Check(keyword)) { _PyErr_Format(tstate, PyExc_TypeError, "%U() keywords must be strings", - qualname); + con->fc_qualname); goto fail; } @@ -4480,14 +4460,14 @@ _PyEval_EvalCode(PyThreadState *tstate, if (co->co_posonlyargcount && positional_only_passed_as_keyword(tstate, co, kwcount, kwnames, - qualname)) + con->fc_qualname)) { goto fail; } _PyErr_Format(tstate, PyExc_TypeError, "%U() got an unexpected keyword argument '%S'", - qualname, keyword); + con->fc_qualname, keyword); goto fail; } @@ -4500,7 +4480,7 @@ _PyEval_EvalCode(PyThreadState *tstate, if (GETLOCAL(j) != NULL) { _PyErr_Format(tstate, PyExc_TypeError, "%U() got multiple values for argument '%S'", - qualname, keyword); + con->fc_qualname, keyword); goto fail; } Py_INCREF(value); @@ -4509,13 +4489,14 @@ _PyEval_EvalCode(PyThreadState *tstate, /* Check the number of positional arguments */ if ((argcount > co->co_argcount) && !(co->co_flags & CO_VARARGS)) { - too_many_positional(tstate, co, argcount, defcount, fastlocals, - qualname); + too_many_positional(tstate, co, argcount, con->fc_defaults, fastlocals, + con->fc_qualname); goto fail; } /* Add missing positional arguments (copy default values from defs) */ if (argcount < co->co_argcount) { + Py_ssize_t defcount = con->fc_defaults == NULL ? 0 : PyTuple_GET_SIZE(con->fc_defaults); Py_ssize_t m = co->co_argcount - defcount; Py_ssize_t missing = 0; for (i = argcount; i < m; i++) { @@ -4525,18 +4506,21 @@ _PyEval_EvalCode(PyThreadState *tstate, } if (missing) { missing_arguments(tstate, co, missing, defcount, fastlocals, - qualname); + con->fc_qualname); goto fail; } if (n > m) i = n - m; else i = 0; - for (; i < defcount; i++) { - if (GETLOCAL(m+i) == NULL) { - PyObject *def = defs[i]; - Py_INCREF(def); - SETLOCAL(m+i, def); + if (defcount) { + PyObject **defs = &PyTuple_GET_ITEM(con->fc_defaults, 0); + for (; i < defcount; i++) { + if (GETLOCAL(m+i) == NULL) { + PyObject *def = defs[i]; + Py_INCREF(def); + SETLOCAL(m+i, def); + } } } } @@ -4548,8 +4532,8 @@ _PyEval_EvalCode(PyThreadState *tstate, if (GETLOCAL(i) != NULL) continue; PyObject *varname = PyTuple_GET_ITEM(co->co_varnames, i); - if (kwdefs != NULL) { - PyObject *def = PyDict_GetItemWithError(kwdefs, varname); + if (con->fc_kwdefaults != NULL) { + PyObject *def = PyDict_GetItemWithError(con->fc_kwdefaults, varname); if (def) { Py_INCREF(def); SETLOCAL(i, def); @@ -4563,7 +4547,7 @@ _PyEval_EvalCode(PyThreadState *tstate, } if (missing) { missing_arguments(tstate, co, missing, -1, fastlocals, - qualname); + con->fc_qualname); goto fail; } } @@ -4590,7 +4574,7 @@ _PyEval_EvalCode(PyThreadState *tstate, /* Copy closure variables to free variables */ for (i = 0; i < PyTuple_GET_SIZE(co->co_freevars); ++i) { - PyObject *o = PyTuple_GET_ITEM(closure, i); + PyObject *o = PyTuple_GET_ITEM(con->fc_closure, i); Py_INCREF(o); freevars[PyTuple_GET_SIZE(co->co_cellvars) + i] = o; } @@ -4607,11 +4591,11 @@ _PyEval_EvalCode(PyThreadState *tstate, /* Create a new generator that owns the ready to run frame * and return that as the value. */ if (is_coro) { - gen = PyCoro_New(f, name, qualname); + gen = PyCoro_New(f, con->fc_name, con->fc_qualname); } else if (co->co_flags & CO_ASYNC_GENERATOR) { - gen = PyAsyncGen_New(f, name, qualname); + gen = PyAsyncGen_New(f, con->fc_name, con->fc_qualname); } else { - gen = PyGen_NewWithQualName(f, name, qualname); + gen = PyGen_NewWithQualName(f, con->fc_name, con->fc_qualname); } if (gen == NULL) { return NULL; @@ -4643,7 +4627,7 @@ _PyEval_EvalCode(PyThreadState *tstate, return retval; } - +/* Legacy API */ PyObject * _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals, PyObject *const *args, Py_ssize_t argcount, @@ -4653,16 +4637,36 @@ _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals, PyObject *kwdefs, PyObject *closure, PyObject *name, PyObject *qualname) { + PyObject *defaults = _PyTuple_FromArray(defs, defcount); + if (defaults == NULL) { + return NULL; + } + PyObject *builtins = _PyEval_BuiltinsFromGlobals(globals); + if (builtins == NULL) { + Py_DECREF(defaults); + return NULL; + } + PyFrameConstructor constr = { + .fc_globals = globals, + .fc_builtins = builtins, + .fc_name = name, + .fc_qualname = qualname, + .fc_code = _co, + .fc_defaults = defaults, + .fc_kwdefaults = kwdefs, + .fc_closure = closure + }; PyThreadState *tstate = _PyThreadState_GET(); - return _PyEval_EvalCode(tstate, _co, globals, locals, - args, argcount, - kwnames, kwargs, - kwcount, kwstep, - defs, defcount, - kwdefs, closure, - name, qualname); + PyObject *res = _PyEval_EvalCode(tstate, &constr, locals, + args, argcount, + kwnames, kwargs, + kwcount, kwstep); + Py_DECREF(defaults); + Py_DECREF(builtins); + return res; } +/* Legacy API */ PyObject * PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals, PyObject *const *args, int argcount, @@ -4670,13 +4674,15 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals, PyObject *const *defs, int defcount, PyObject *kwdefs, PyObject *closure) { - return _PyEval_EvalCodeWithName(_co, globals, locals, - args, argcount, - kws, kws != NULL ? kws + 1 : NULL, - kwcount, 2, - defs, defcount, - kwdefs, closure, - NULL, NULL); + return _PyEval_EvalCodeWithName( + _co, globals, locals, + args, argcount, + kws, kws != NULL ? kws + 1 : NULL, + kwcount, 2, + defs, defcount, + kwdefs, closure, + ((PyCodeObject *)_co)->co_name, + ((PyCodeObject *)_co)->co_name); } static PyObject * From webhook-mailer at python.org Fri Jan 29 10:53:37 2021 From: webhook-mailer at python.org (vstinner) Date: Fri, 29 Jan 2021 15:53:37 -0000 Subject: [Python-checkins] bpo-42979: Use _Py_CheckSlotResult() to check slots result (GH-24356) Message-ID: https://github.com/python/cpython/commit/a6192635f1e62af2bb8a435487ebb51800edd671 commit: a6192635f1e62af2bb8a435487ebb51800edd671 branch: master author: Victor Stinner committer: vstinner date: 2021-01-29T16:53:03+01:00 summary: bpo-42979: Use _Py_CheckSlotResult() to check slots result (GH-24356) When Python is built in debug mode (with C assertions), calling a type slot like sq_length (__len__() in Python) now fails with a fatal error if the slot succeeded with an exception set, or failed with no exception set. The error message contains the slot, the type name, and the current exception (if an exception is set). * Check the result of all slots using _Py_CheckSlotResult(). * No longer pass op_name to ternary_op() in release mode. * Replace operator with dunder Python method name in error messages. For example, replace "*" with "__mul__". * Fix compiler_exit_scope() when an exception is set. * Fix bytearray.extend() when an exception is set: don't call bytearray_setslice() with an exception set. files: A Misc/NEWS.d/next/C API/2021-01-28-01-11-59.bpo-42979.JrGkrm.rst M Objects/abstract.c M Objects/bytearrayobject.c M Python/compile.c diff --git a/Misc/NEWS.d/next/C API/2021-01-28-01-11-59.bpo-42979.JrGkrm.rst b/Misc/NEWS.d/next/C API/2021-01-28-01-11-59.bpo-42979.JrGkrm.rst new file mode 100644 index 0000000000000..15fd86bee9dba --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-01-28-01-11-59.bpo-42979.JrGkrm.rst @@ -0,0 +1,5 @@ +When Python is built in debug mode (with C assertions), calling a type slot +like ``sq_length`` (``__len__()`` in Python) now fails with a fatal error if +the slot succeeded with an exception set, or failed with no exception set. The +error message contains the slot, the type name, and the current exception (if +an exception is set). Patch by Victor Stinner. diff --git a/Objects/abstract.c b/Objects/abstract.c index cc452eaaf3daa..74a73ee469866 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -52,14 +52,12 @@ PyObject_Type(PyObject *o) Py_ssize_t PyObject_Size(PyObject *o) { - PySequenceMethods *m; - if (o == NULL) { null_error(); return -1; } - m = Py_TYPE(o)->tp_as_sequence; + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (m && m->sq_length) { Py_ssize_t len = m->sq_length(o); assert(_Py_CheckSlotResult(o, "__len__", len >= 0)); @@ -151,21 +149,18 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) PyObject * PyObject_GetItem(PyObject *o, PyObject *key) { - PyMappingMethods *m; - PySequenceMethods *ms; - if (o == NULL || key == NULL) { return null_error(); } - m = Py_TYPE(o)->tp_as_mapping; + PyMappingMethods *m = Py_TYPE(o)->tp_as_mapping; if (m && m->mp_subscript) { PyObject *item = m->mp_subscript(o, key); assert(_Py_CheckSlotResult(o, "__getitem__", item != NULL)); return item; } - ms = Py_TYPE(o)->tp_as_sequence; + PySequenceMethods *ms = Py_TYPE(o)->tp_as_sequence; if (ms && ms->sq_item) { if (_PyIndex_Check(key)) { Py_ssize_t key_value; @@ -205,15 +200,17 @@ PyObject_GetItem(PyObject *o, PyObject *key) int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *value) { - PyMappingMethods *m; - if (o == NULL || key == NULL || value == NULL) { null_error(); return -1; } - m = Py_TYPE(o)->tp_as_mapping; - if (m && m->mp_ass_subscript) - return m->mp_ass_subscript(o, key, value); + + PyMappingMethods *m = Py_TYPE(o)->tp_as_mapping; + if (m && m->mp_ass_subscript) { + int res = m->mp_ass_subscript(o, key, value); + assert(_Py_CheckSlotResult(o, "__setitem__", res >= 0)); + return res; + } if (Py_TYPE(o)->tp_as_sequence) { if (_PyIndex_Check(key)) { @@ -237,15 +234,17 @@ PyObject_SetItem(PyObject *o, PyObject *key, PyObject *value) int PyObject_DelItem(PyObject *o, PyObject *key) { - PyMappingMethods *m; - if (o == NULL || key == NULL) { null_error(); return -1; } - m = Py_TYPE(o)->tp_as_mapping; - if (m && m->mp_ass_subscript) - return m->mp_ass_subscript(o, key, (PyObject*)NULL); + + PyMappingMethods *m = Py_TYPE(o)->tp_as_mapping; + if (m && m->mp_ass_subscript) { + int res = m->mp_ass_subscript(o, key, (PyObject*)NULL); + assert(_Py_CheckSlotResult(o, "__delitem__", res >= 0)); + return res; + } if (Py_TYPE(o)->tp_as_sequence) { if (_PyIndex_Check(key)) { @@ -307,7 +306,9 @@ PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags) Py_TYPE(obj)->tp_name); return -1; } - return (*pb->bf_getbuffer)(obj, view, flags); + int res = (*pb->bf_getbuffer)(obj, view, flags); + assert(_Py_CheckSlotResult(obj, "getbuffer", res >= 0)); + return res; } static int @@ -676,8 +677,9 @@ PyBuffer_Release(Py_buffer *view) if (obj == NULL) return; pb = Py_TYPE(obj)->tp_as_buffer; - if (pb && pb->bf_releasebuffer) + if (pb && pb->bf_releasebuffer) { pb->bf_releasebuffer(obj, view); + } view->obj = NULL; Py_DECREF(obj); } @@ -773,21 +775,33 @@ PyNumber_Check(PyObject *o) */ static PyObject * -binary_op1(PyObject *v, PyObject *w, const int op_slot) -{ - PyObject *x; - binaryfunc slotv = NULL; - binaryfunc slotw = NULL; - - if (Py_TYPE(v)->tp_as_number != NULL) +binary_op1(PyObject *v, PyObject *w, const int op_slot +#ifndef NDEBUG + , const char *op_name +#endif + ) +{ + binaryfunc slotv; + if (Py_TYPE(v)->tp_as_number != NULL) { slotv = NB_BINOP(Py_TYPE(v)->tp_as_number, op_slot); - if (!Py_IS_TYPE(w, Py_TYPE(v)) && - Py_TYPE(w)->tp_as_number != NULL) { + } + else { + slotv = NULL; + } + + binaryfunc slotw; + if (!Py_IS_TYPE(w, Py_TYPE(v)) && Py_TYPE(w)->tp_as_number != NULL) { slotw = NB_BINOP(Py_TYPE(w)->tp_as_number, op_slot); - if (slotw == slotv) + if (slotw == slotv) { slotw = NULL; + } + } + else { + slotw = NULL; } + if (slotv) { + PyObject *x; if (slotw && PyType_IsSubtype(Py_TYPE(w), Py_TYPE(v))) { x = slotw(v, w); if (x != Py_NotImplemented) @@ -796,19 +810,29 @@ binary_op1(PyObject *v, PyObject *w, const int op_slot) slotw = NULL; } x = slotv(v, w); - if (x != Py_NotImplemented) + assert(_Py_CheckSlotResult(v, op_name, x != NULL)); + if (x != Py_NotImplemented) { return x; + } Py_DECREF(x); /* can't do it */ } if (slotw) { - x = slotw(v, w); - if (x != Py_NotImplemented) + PyObject *x = slotw(v, w); + assert(_Py_CheckSlotResult(w, op_name, x != NULL)); + if (x != Py_NotImplemented) { return x; + } Py_DECREF(x); /* can't do it */ } Py_RETURN_NOTIMPLEMENTED; } +#ifdef NDEBUG +# define BINARY_OP1(v, w, op_slot, op_name) binary_op1(v, w, op_slot) +#else +# define BINARY_OP1(v, w, op_slot, op_name) binary_op1(v, w, op_slot, op_name) +#endif + static PyObject * binop_type_error(PyObject *v, PyObject *w, const char *op_name) { @@ -824,7 +848,7 @@ binop_type_error(PyObject *v, PyObject *w, const char *op_name) static PyObject * binary_op(PyObject *v, PyObject *w, const int op_slot, const char *op_name) { - PyObject *result = binary_op1(v, w, op_slot); + PyObject *result = BINARY_OP1(v, w, op_slot, op_name); if (result == Py_NotImplemented) { Py_DECREF(result); @@ -858,64 +882,85 @@ static PyObject * ternary_op(PyObject *v, PyObject *w, PyObject *z, - const int op_slot, - const char *op_name) -{ - PyNumberMethods *mv, *mw, *mz; - PyObject *x = NULL; - ternaryfunc slotv = NULL; - ternaryfunc slotw = NULL; - ternaryfunc slotz = NULL; - - mv = Py_TYPE(v)->tp_as_number; - mw = Py_TYPE(w)->tp_as_number; - if (mv != NULL) + const int op_slot +#ifndef NDEBUG + , const char *op_name +#endif + ) +{ + PyNumberMethods *mv = Py_TYPE(v)->tp_as_number; + PyNumberMethods *mw = Py_TYPE(w)->tp_as_number; + + ternaryfunc slotv; + if (mv != NULL) { slotv = NB_TERNOP(mv, op_slot); + } + else { + slotv = NULL; + } + + ternaryfunc slotw; if (!Py_IS_TYPE(w, Py_TYPE(v)) && mw != NULL) { slotw = NB_TERNOP(mw, op_slot); - if (slotw == slotv) + if (slotw == slotv) { slotw = NULL; + } + } + else { + slotw = NULL; } + if (slotv) { + PyObject *x; if (slotw && PyType_IsSubtype(Py_TYPE(w), Py_TYPE(v))) { x = slotw(v, w, z); - if (x != Py_NotImplemented) + if (x != Py_NotImplemented) { return x; + } Py_DECREF(x); /* can't do it */ slotw = NULL; } x = slotv(v, w, z); - if (x != Py_NotImplemented) + assert(_Py_CheckSlotResult(v, op_name, x != NULL)); + if (x != Py_NotImplemented) { return x; + } Py_DECREF(x); /* can't do it */ } if (slotw) { - x = slotw(v, w, z); - if (x != Py_NotImplemented) + PyObject *x = slotw(v, w, z); + assert(_Py_CheckSlotResult(w, op_name, x != NULL)); + if (x != Py_NotImplemented) { return x; + } Py_DECREF(x); /* can't do it */ } - mz = Py_TYPE(z)->tp_as_number; + + PyNumberMethods *mz = Py_TYPE(z)->tp_as_number; if (mz != NULL) { - slotz = NB_TERNOP(mz, op_slot); - if (slotz == slotv || slotz == slotw) + ternaryfunc slotz = NB_TERNOP(mz, op_slot); + if (slotz == slotv || slotz == slotw) { slotz = NULL; + } if (slotz) { - x = slotz(v, w, z); - if (x != Py_NotImplemented) + PyObject *x = slotz(v, w, z); + assert(_Py_CheckSlotResult(z, op_name, x != NULL)); + if (x != Py_NotImplemented) { return x; + } Py_DECREF(x); /* can't do it */ } } - if (z == Py_None) + if (z == Py_None) { PyErr_Format( PyExc_TypeError, "unsupported operand type(s) for ** or pow(): " "'%.100s' and '%.100s'", Py_TYPE(v)->tp_name, Py_TYPE(w)->tp_name); - else + } + else { PyErr_Format( PyExc_TypeError, "unsupported operand type(s) for pow(): " @@ -923,9 +968,17 @@ ternary_op(PyObject *v, Py_TYPE(v)->tp_name, Py_TYPE(w)->tp_name, Py_TYPE(z)->tp_name); + } return NULL; } +#ifdef NDEBUG +# define TERNARY_OP(v, w, z, op_slot, op_name) ternary_op(v, w, z, op_slot) +#else +# define TERNARY_OP(v, w, z, op_slot, op_name) ternary_op(v, w, z, op_slot, op_name) +#endif + + #define BINARY_FUNC(func, op, op_name) \ PyObject * \ func(PyObject *v, PyObject *w) { \ @@ -943,16 +996,20 @@ BINARY_FUNC(PyNumber_Divmod, nb_divmod, "divmod()") PyObject * PyNumber_Add(PyObject *v, PyObject *w) { - PyObject *result = binary_op1(v, w, NB_SLOT(nb_add)); - if (result == Py_NotImplemented) { - PySequenceMethods *m = Py_TYPE(v)->tp_as_sequence; - Py_DECREF(result); - if (m && m->sq_concat) { - return (*m->sq_concat)(v, w); - } - result = binop_type_error(v, w, "+"); + PyObject *result = BINARY_OP1(v, w, NB_SLOT(nb_add), "+"); + if (result != Py_NotImplemented) { + return result; } - return result; + Py_DECREF(result); + + PySequenceMethods *m = Py_TYPE(v)->tp_as_sequence; + if (m && m->sq_concat) { + result = (*m->sq_concat)(v, w); + assert(_Py_CheckSlotResult(v, "+", result != NULL)); + return result; + } + + return binop_type_error(v, w, "+"); } static PyObject * @@ -961,20 +1018,23 @@ sequence_repeat(ssizeargfunc repeatfunc, PyObject *seq, PyObject *n) Py_ssize_t count; if (_PyIndex_Check(n)) { count = PyNumber_AsSsize_t(n, PyExc_OverflowError); - if (count == -1 && PyErr_Occurred()) + if (count == -1 && PyErr_Occurred()) { return NULL; + } } else { return type_error("can't multiply sequence by " "non-int of type '%.200s'", n); } - return (*repeatfunc)(seq, count); + PyObject *res = (*repeatfunc)(seq, count); + assert(_Py_CheckSlotResult(seq, "*", res != NULL)); + return res; } PyObject * PyNumber_Multiply(PyObject *v, PyObject *w) { - PyObject *result = binary_op1(v, w, NB_SLOT(nb_multiply)); + PyObject *result = BINARY_OP1(v, w, NB_SLOT(nb_multiply), "*"); if (result == Py_NotImplemented) { PySequenceMethods *mv = Py_TYPE(v)->tp_as_sequence; PySequenceMethods *mw = Py_TYPE(w)->tp_as_sequence; @@ -1017,7 +1077,7 @@ PyNumber_Remainder(PyObject *v, PyObject *w) PyObject * PyNumber_Power(PyObject *v, PyObject *w, PyObject *z) { - return ternary_op(v, w, z, NB_SLOT(nb_power), "** or pow()"); + return TERNARY_OP(v, w, z, NB_SLOT(nb_power), "** or pow()"); } /* Binary in-place operators */ @@ -1037,27 +1097,42 @@ PyNumber_Power(PyObject *v, PyObject *w, PyObject *z) */ static PyObject * -binary_iop1(PyObject *v, PyObject *w, const int iop_slot, const int op_slot) +binary_iop1(PyObject *v, PyObject *w, const int iop_slot, const int op_slot +#ifndef NDEBUG + , const char *op_name +#endif + ) { PyNumberMethods *mv = Py_TYPE(v)->tp_as_number; if (mv != NULL) { binaryfunc slot = NB_BINOP(mv, iop_slot); if (slot) { PyObject *x = (slot)(v, w); + assert(_Py_CheckSlotResult(v, op_name, x != NULL)); if (x != Py_NotImplemented) { return x; } Py_DECREF(x); } } +#ifdef NDEBUG return binary_op1(v, w, op_slot); +#else + return binary_op1(v, w, op_slot, op_name); +#endif } +#ifdef NDEBUG +# define BINARY_IOP1(v, w, iop_slot, op_slot, op_name) binary_iop1(v, w, iop_slot, op_slot) +#else +# define BINARY_IOP1(v, w, iop_slot, op_slot, op_name) binary_iop1(v, w, iop_slot, op_slot, op_name) +#endif + static PyObject * binary_iop(PyObject *v, PyObject *w, const int iop_slot, const int op_slot, const char *op_name) { - PyObject *result = binary_iop1(v, w, iop_slot, op_slot); + PyObject *result = BINARY_IOP1(v, w, iop_slot, op_slot, op_name); if (result == Py_NotImplemented) { Py_DECREF(result); return binop_type_error(v, w, op_name); @@ -1096,18 +1171,20 @@ PyNumber_InPlaceTrueDivide(PyObject *v, PyObject *w) PyObject * PyNumber_InPlaceAdd(PyObject *v, PyObject *w) { - PyObject *result = binary_iop1(v, w, NB_SLOT(nb_inplace_add), - NB_SLOT(nb_add)); + PyObject *result = BINARY_IOP1(v, w, NB_SLOT(nb_inplace_add), + NB_SLOT(nb_add), "+="); if (result == Py_NotImplemented) { PySequenceMethods *m = Py_TYPE(v)->tp_as_sequence; Py_DECREF(result); if (m != NULL) { - binaryfunc f = NULL; - f = m->sq_inplace_concat; - if (f == NULL) - f = m->sq_concat; - if (f != NULL) - return (*f)(v, w); + binaryfunc func = m->sq_inplace_concat; + if (func == NULL) + func = m->sq_concat; + if (func != NULL) { + result = func(v, w); + assert(_Py_CheckSlotResult(v, "+=", result != NULL)); + return result; + } } result = binop_type_error(v, w, "+="); } @@ -1117,8 +1194,8 @@ PyNumber_InPlaceAdd(PyObject *v, PyObject *w) PyObject * PyNumber_InPlaceMultiply(PyObject *v, PyObject *w) { - PyObject *result = binary_iop1(v, w, NB_SLOT(nb_inplace_multiply), - NB_SLOT(nb_multiply)); + PyObject *result = BINARY_IOP1(v, w, NB_SLOT(nb_inplace_multiply), + NB_SLOT(nb_multiply), "*="); if (result == Py_NotImplemented) { ssizeargfunc f = NULL; PySequenceMethods *mv = Py_TYPE(v)->tp_as_sequence; @@ -1162,10 +1239,10 @@ PyNumber_InPlacePower(PyObject *v, PyObject *w, PyObject *z) { if (Py_TYPE(v)->tp_as_number && Py_TYPE(v)->tp_as_number->nb_inplace_power != NULL) { - return ternary_op(v, w, z, NB_SLOT(nb_inplace_power), "**="); + return TERNARY_OP(v, w, z, NB_SLOT(nb_inplace_power), "**="); } else { - return ternary_op(v, w, z, NB_SLOT(nb_power), "**="); + return TERNARY_OP(v, w, z, NB_SLOT(nb_power), "**="); } } @@ -1175,15 +1252,16 @@ PyNumber_InPlacePower(PyObject *v, PyObject *w, PyObject *z) PyObject * PyNumber_Negative(PyObject *o) { - PyNumberMethods *m; - if (o == NULL) { return null_error(); } - m = Py_TYPE(o)->tp_as_number; - if (m && m->nb_negative) - return (*m->nb_negative)(o); + PyNumberMethods *m = Py_TYPE(o)->tp_as_number; + if (m && m->nb_negative) { + PyObject *res = (*m->nb_negative)(o); + assert(_Py_CheckSlotResult(o, "__neg__", res != NULL)); + return res; + } return type_error("bad operand type for unary -: '%.200s'", o); } @@ -1191,15 +1269,16 @@ PyNumber_Negative(PyObject *o) PyObject * PyNumber_Positive(PyObject *o) { - PyNumberMethods *m; - if (o == NULL) { return null_error(); } - m = Py_TYPE(o)->tp_as_number; - if (m && m->nb_positive) - return (*m->nb_positive)(o); + PyNumberMethods *m = Py_TYPE(o)->tp_as_number; + if (m && m->nb_positive) { + PyObject *res = (*m->nb_positive)(o); + assert(_Py_CheckSlotResult(o, "__pos__", res != NULL)); + return res; + } return type_error("bad operand type for unary +: '%.200s'", o); } @@ -1207,15 +1286,16 @@ PyNumber_Positive(PyObject *o) PyObject * PyNumber_Invert(PyObject *o) { - PyNumberMethods *m; - if (o == NULL) { return null_error(); } - m = Py_TYPE(o)->tp_as_number; - if (m && m->nb_invert) - return (*m->nb_invert)(o); + PyNumberMethods *m = Py_TYPE(o)->tp_as_number; + if (m && m->nb_invert) { + PyObject *res = (*m->nb_invert)(o); + assert(_Py_CheckSlotResult(o, "__invert__", res != NULL)); + return res; + } return type_error("bad operand type for unary ~: '%.200s'", o); } @@ -1223,15 +1303,16 @@ PyNumber_Invert(PyObject *o) PyObject * PyNumber_Absolute(PyObject *o) { - PyNumberMethods *m; - if (o == NULL) { return null_error(); } - m = Py_TYPE(o)->tp_as_number; - if (m && m->nb_absolute) - return m->nb_absolute(o); + PyNumberMethods *m = Py_TYPE(o)->tp_as_number; + if (m && m->nb_absolute) { + PyObject *res = m->nb_absolute(o); + assert(_Py_CheckSlotResult(o, "__abs__", res != NULL)); + return res; + } return type_error("bad operand type for abs(): '%.200s'", o); } @@ -1252,7 +1333,6 @@ PyIndex_Check(PyObject *obj) PyObject * _PyNumber_Index(PyObject *item) { - PyObject *result = NULL; if (item == NULL) { return null_error(); } @@ -1267,9 +1347,13 @@ _PyNumber_Index(PyObject *item) "as an integer", Py_TYPE(item)->tp_name); return NULL; } - result = Py_TYPE(item)->tp_as_number->nb_index(item); - if (!result || PyLong_CheckExact(result)) + + PyObject *result = Py_TYPE(item)->tp_as_number->nb_index(item); + assert(_Py_CheckSlotResult(item, "__index__", result != NULL)); + if (!result || PyLong_CheckExact(result)) { return result; + } + if (!PyLong_Check(result)) { PyErr_Format(PyExc_TypeError, "__index__ returned non-int (type %.200s)", @@ -1378,8 +1462,11 @@ PyNumber_Long(PyObject *o) /* Convert using the nb_int slot, which should return something of exact type int. */ result = m->nb_int(o); - if (!result || PyLong_CheckExact(result)) + assert(_Py_CheckSlotResult(o, "__int__", result != NULL)); + if (!result || PyLong_CheckExact(result)) { return result; + } + if (!PyLong_Check(result)) { PyErr_Format(PyExc_TypeError, "__int__ returned non-int (type %.200s)", @@ -1468,23 +1555,22 @@ PyNumber_Long(PyObject *o) PyObject * PyNumber_Float(PyObject *o) { - PyNumberMethods *m; - if (o == NULL) { return null_error(); } if (PyFloat_CheckExact(o)) { - Py_INCREF(o); - return o; + return Py_NewRef(o); } - m = Py_TYPE(o)->tp_as_number; + + PyNumberMethods *m = Py_TYPE(o)->tp_as_number; if (m && m->nb_float) { /* This should include subclasses of float */ PyObject *res = m->nb_float(o); - double val; + assert(_Py_CheckSlotResult(o, "__float__", res != NULL)); if (!res || PyFloat_CheckExact(res)) { return res; } + if (!PyFloat_Check(res)) { PyErr_Format(PyExc_TypeError, "%.50s.__float__ returned non-float (type %.50s)", @@ -1501,10 +1587,11 @@ PyNumber_Float(PyObject *o) Py_DECREF(res); return NULL; } - val = PyFloat_AS_DOUBLE(res); + double val = PyFloat_AS_DOUBLE(res); Py_DECREF(res); return PyFloat_FromDouble(val); } + if (m && m->nb_index) { PyObject *res = _PyNumber_Index(o); if (!res) { @@ -1517,7 +1604,9 @@ PyNumber_Float(PyObject *o) } return PyFloat_FromDouble(val); } - if (PyFloat_Check(o)) { /* A float subclass with nb_float == NULL */ + + /* A float subclass with nb_float == NULL */ + if (PyFloat_Check(o)) { return PyFloat_FromDouble(PyFloat_AS_DOUBLE(o)); } return PyFloat_FromString(o); @@ -1555,14 +1644,12 @@ PySequence_Check(PyObject *s) Py_ssize_t PySequence_Size(PyObject *s) { - PySequenceMethods *m; - if (s == NULL) { null_error(); return -1; } - m = Py_TYPE(s)->tp_as_sequence; + PySequenceMethods *m = Py_TYPE(s)->tp_as_sequence; if (m && m->sq_length) { Py_ssize_t len = m->sq_length(s); assert(_Py_CheckSlotResult(s, "__len__", len >= 0)); @@ -1588,21 +1675,22 @@ PySequence_Length(PyObject *s) PyObject * PySequence_Concat(PyObject *s, PyObject *o) { - PySequenceMethods *m; - if (s == NULL || o == NULL) { return null_error(); } - m = Py_TYPE(s)->tp_as_sequence; - if (m && m->sq_concat) - return m->sq_concat(s, o); + PySequenceMethods *m = Py_TYPE(s)->tp_as_sequence; + if (m && m->sq_concat) { + PyObject *res = m->sq_concat(s, o); + assert(_Py_CheckSlotResult(s, "+", res != NULL)); + return res; + } /* Instances of user classes defining an __add__() method only have an nb_add slot, not an sq_concat slot. So we fall back to nb_add if both arguments appear to be sequences. */ if (PySequence_Check(s) && PySequence_Check(o)) { - PyObject *result = binary_op1(s, o, NB_SLOT(nb_add)); + PyObject *result = BINARY_OP1(s, o, NB_SLOT(nb_add), "+"); if (result != Py_NotImplemented) return result; Py_DECREF(result); @@ -1613,15 +1701,16 @@ PySequence_Concat(PyObject *s, PyObject *o) PyObject * PySequence_Repeat(PyObject *o, Py_ssize_t count) { - PySequenceMethods *m; - if (o == NULL) { return null_error(); } - m = Py_TYPE(o)->tp_as_sequence; - if (m && m->sq_repeat) - return m->sq_repeat(o, count); + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (m && m->sq_repeat) { + PyObject *res = m->sq_repeat(o, count); + assert(_Py_CheckSlotResult(o, "*", res != NULL)); + return res; + } /* Instances of user classes defining a __mul__() method only have an nb_multiply slot, not an sq_repeat slot. so we fall back @@ -1631,7 +1720,7 @@ PySequence_Repeat(PyObject *o, Py_ssize_t count) n = PyLong_FromSsize_t(count); if (n == NULL) return NULL; - result = binary_op1(o, n, NB_SLOT(nb_multiply)); + result = BINARY_OP1(o, n, NB_SLOT(nb_multiply), "*"); Py_DECREF(n); if (result != Py_NotImplemented) return result; @@ -1643,21 +1732,25 @@ PySequence_Repeat(PyObject *o, Py_ssize_t count) PyObject * PySequence_InPlaceConcat(PyObject *s, PyObject *o) { - PySequenceMethods *m; - if (s == NULL || o == NULL) { return null_error(); } - m = Py_TYPE(s)->tp_as_sequence; - if (m && m->sq_inplace_concat) - return m->sq_inplace_concat(s, o); - if (m && m->sq_concat) - return m->sq_concat(s, o); + PySequenceMethods *m = Py_TYPE(s)->tp_as_sequence; + if (m && m->sq_inplace_concat) { + PyObject *res = m->sq_inplace_concat(s, o); + assert(_Py_CheckSlotResult(s, "+=", res != NULL)); + return res; + } + if (m && m->sq_concat) { + PyObject *res = m->sq_concat(s, o); + assert(_Py_CheckSlotResult(s, "+", res != NULL)); + return res; + } if (PySequence_Check(s) && PySequence_Check(o)) { - PyObject *result = binary_iop1(s, o, NB_SLOT(nb_inplace_add), - NB_SLOT(nb_add)); + PyObject *result = BINARY_IOP1(s, o, NB_SLOT(nb_inplace_add), + NB_SLOT(nb_add), "+="); if (result != Py_NotImplemented) return result; Py_DECREF(result); @@ -1668,25 +1761,29 @@ PySequence_InPlaceConcat(PyObject *s, PyObject *o) PyObject * PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count) { - PySequenceMethods *m; - if (o == NULL) { return null_error(); } - m = Py_TYPE(o)->tp_as_sequence; - if (m && m->sq_inplace_repeat) - return m->sq_inplace_repeat(o, count); - if (m && m->sq_repeat) - return m->sq_repeat(o, count); + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (m && m->sq_inplace_repeat) { + PyObject *res = m->sq_inplace_repeat(o, count); + assert(_Py_CheckSlotResult(o, "*=", res != NULL)); + return res; + } + if (m && m->sq_repeat) { + PyObject *res = m->sq_repeat(o, count); + assert(_Py_CheckSlotResult(o, "*", res != NULL)); + return res; + } if (PySequence_Check(o)) { PyObject *n, *result; n = PyLong_FromSsize_t(count); if (n == NULL) return NULL; - result = binary_iop1(o, n, NB_SLOT(nb_inplace_multiply), - NB_SLOT(nb_multiply)); + result = BINARY_IOP1(o, n, NB_SLOT(nb_inplace_multiply), + NB_SLOT(nb_multiply), "*="); Py_DECREF(n); if (result != Py_NotImplemented) return result; @@ -1698,13 +1795,11 @@ PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count) PyObject * PySequence_GetItem(PyObject *s, Py_ssize_t i) { - PySequenceMethods *m; - if (s == NULL) { return null_error(); } - m = Py_TYPE(s)->tp_as_sequence; + PySequenceMethods *m = Py_TYPE(s)->tp_as_sequence; if (m && m->sq_item) { if (i < 0) { if (m->sq_length) { @@ -1716,7 +1811,9 @@ PySequence_GetItem(PyObject *s, Py_ssize_t i) i += l; } } - return m->sq_item(s, i); + PyObject *res = m->sq_item(s, i); + assert(_Py_CheckSlotResult(s, "__getitem__", res != NULL)); + return res; } if (Py_TYPE(s)->tp_as_mapping && Py_TYPE(s)->tp_as_mapping->mp_subscript) { @@ -1728,19 +1825,18 @@ PySequence_GetItem(PyObject *s, Py_ssize_t i) PyObject * PySequence_GetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2) { - PyMappingMethods *mp; - if (!s) { return null_error(); } - mp = Py_TYPE(s)->tp_as_mapping; + PyMappingMethods *mp = Py_TYPE(s)->tp_as_mapping; if (mp && mp->mp_subscript) { - PyObject *res; PyObject *slice = _PySlice_FromIndices(i1, i2); - if (!slice) + if (!slice) { return NULL; - res = mp->mp_subscript(s, slice); + } + PyObject *res = mp->mp_subscript(s, slice); + assert(_Py_CheckSlotResult(s, "__getitem__", res != NULL)); Py_DECREF(slice); return res; } @@ -1751,14 +1847,12 @@ PySequence_GetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2) int PySequence_SetItem(PyObject *s, Py_ssize_t i, PyObject *o) { - PySequenceMethods *m; - if (s == NULL) { null_error(); return -1; } - m = Py_TYPE(s)->tp_as_sequence; + PySequenceMethods *m = Py_TYPE(s)->tp_as_sequence; if (m && m->sq_ass_item) { if (i < 0) { if (m->sq_length) { @@ -1770,7 +1864,9 @@ PySequence_SetItem(PyObject *s, Py_ssize_t i, PyObject *o) i += l; } } - return m->sq_ass_item(s, i, o); + int res = m->sq_ass_item(s, i, o); + assert(_Py_CheckSlotResult(s, "__setitem__", res >= 0)); + return res; } if (Py_TYPE(s)->tp_as_mapping && Py_TYPE(s)->tp_as_mapping->mp_ass_subscript) { @@ -1784,14 +1880,12 @@ PySequence_SetItem(PyObject *s, Py_ssize_t i, PyObject *o) int PySequence_DelItem(PyObject *s, Py_ssize_t i) { - PySequenceMethods *m; - if (s == NULL) { null_error(); return -1; } - m = Py_TYPE(s)->tp_as_sequence; + PySequenceMethods *m = Py_TYPE(s)->tp_as_sequence; if (m && m->sq_ass_item) { if (i < 0) { if (m->sq_length) { @@ -1803,7 +1897,9 @@ PySequence_DelItem(PyObject *s, Py_ssize_t i) i += l; } } - return m->sq_ass_item(s, i, (PyObject *)NULL); + int res = m->sq_ass_item(s, i, (PyObject *)NULL); + assert(_Py_CheckSlotResult(s, "__delitem__", res >= 0)); + return res; } if (Py_TYPE(s)->tp_as_mapping && Py_TYPE(s)->tp_as_mapping->mp_ass_subscript) { @@ -1817,20 +1913,18 @@ PySequence_DelItem(PyObject *s, Py_ssize_t i) int PySequence_SetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2, PyObject *o) { - PyMappingMethods *mp; - if (s == NULL) { null_error(); return -1; } - mp = Py_TYPE(s)->tp_as_mapping; + PyMappingMethods *mp = Py_TYPE(s)->tp_as_mapping; if (mp && mp->mp_ass_subscript) { - int res; PyObject *slice = _PySlice_FromIndices(i1, i2); if (!slice) return -1; - res = mp->mp_ass_subscript(s, slice, o); + int res = mp->mp_ass_subscript(s, slice, o); + assert(_Py_CheckSlotResult(s, "__setitem__", res >= 0)); Py_DECREF(slice); return res; } @@ -1842,20 +1936,19 @@ PySequence_SetSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2, PyObject *o) int PySequence_DelSlice(PyObject *s, Py_ssize_t i1, Py_ssize_t i2) { - PyMappingMethods *mp; - if (s == NULL) { null_error(); return -1; } - mp = Py_TYPE(s)->tp_as_mapping; + PyMappingMethods *mp = Py_TYPE(s)->tp_as_mapping; if (mp && mp->mp_ass_subscript) { - int res; PyObject *slice = _PySlice_FromIndices(i1, i2); - if (!slice) + if (!slice) { return -1; - res = mp->mp_ass_subscript(s, slice, NULL); + } + int res = mp->mp_ass_subscript(s, slice, NULL); + assert(_Py_CheckSlotResult(s, "__delitem__", res >= 0)); Py_DECREF(slice); return res; } @@ -2102,11 +2195,13 @@ PySequence_Count(PyObject *s, PyObject *o) int PySequence_Contains(PyObject *seq, PyObject *ob) { - Py_ssize_t result; PySequenceMethods *sqm = Py_TYPE(seq)->tp_as_sequence; - if (sqm != NULL && sqm->sq_contains != NULL) - return (*sqm->sq_contains)(seq, ob); - result = _PySequence_IterSearch(seq, ob, PY_ITERSEARCH_CONTAINS); + if (sqm != NULL && sqm->sq_contains != NULL) { + int res = (*sqm->sq_contains)(seq, ob); + assert(_Py_CheckSlotResult(seq, "__contains__", res >= 0)); + return res; + } + Py_ssize_t result = _PySequence_IterSearch(seq, ob, PY_ITERSEARCH_CONTAINS); return Py_SAFE_DOWNCAST(result, Py_ssize_t, int); } @@ -2136,14 +2231,12 @@ PyMapping_Check(PyObject *o) Py_ssize_t PyMapping_Size(PyObject *o) { - PyMappingMethods *m; - if (o == NULL) { null_error(); return -1; } - m = Py_TYPE(o)->tp_as_mapping; + PyMappingMethods *m = Py_TYPE(o)->tp_as_mapping; if (m && m->mp_length) { Py_ssize_t len = m->mp_length(o); assert(_Py_CheckSlotResult(o, "__len__", len >= 0)); @@ -2679,7 +2772,9 @@ PyIter_Send(PyObject *iter, PyObject *arg, PyObject **result) if (PyType_HasFeature(Py_TYPE(iter), Py_TPFLAGS_HAVE_AM_SEND)) { assert (Py_TYPE(iter)->tp_as_async != NULL); assert (Py_TYPE(iter)->tp_as_async->am_send != NULL); - return Py_TYPE(iter)->tp_as_async->am_send(iter, arg, result); + PySendResult res = Py_TYPE(iter)->tp_as_async->am_send(iter, arg, result); + assert(_Py_CheckSlotResult(iter, "am_send", res != PYGEN_ERROR)); + return res; } if (arg == Py_None && PyIter_Check(iter)) { *result = Py_TYPE(iter)->tp_iternext(iter); diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 2eaca5cec4290..a4c10d695adf0 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -1736,6 +1736,11 @@ bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints) } Py_DECREF(it); + if (PyErr_Occurred()) { + Py_DECREF(bytearray_obj); + return NULL; + } + /* Resize down to exact size. */ if (PyByteArray_Resize((PyObject *)bytearray_obj, len) < 0) { Py_DECREF(bytearray_obj); @@ -1748,10 +1753,7 @@ bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints) } Py_DECREF(bytearray_obj); - if (PyErr_Occurred()) { - return NULL; - } - + assert(!PyErr_Occurred()); Py_RETURN_NONE; } diff --git a/Python/compile.c b/Python/compile.c index 223c63637ff41..d8fea9d047d0c 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -667,25 +667,29 @@ compiler_enter_scope(struct compiler *c, identifier name, static void compiler_exit_scope(struct compiler *c) { - Py_ssize_t n; - PyObject *capsule; + // Don't call PySequence_DelItem() with an exception raised + PyObject *exc_type, *exc_val, *exc_tb; + PyErr_Fetch(&exc_type, &exc_val, &exc_tb); c->c_nestlevel--; compiler_unit_free(c->u); /* Restore c->u to the parent unit. */ - n = PyList_GET_SIZE(c->c_stack) - 1; + Py_ssize_t n = PyList_GET_SIZE(c->c_stack) - 1; if (n >= 0) { - capsule = PyList_GET_ITEM(c->c_stack, n); + PyObject *capsule = PyList_GET_ITEM(c->c_stack, n); c->u = (struct compiler_unit *)PyCapsule_GetPointer(capsule, CAPSULE_NAME); assert(c->u); /* we are deleting from a list so this really shouldn't fail */ - if (PySequence_DelItem(c->c_stack, n) < 0) - Py_FatalError("compiler_exit_scope()"); + if (PySequence_DelItem(c->c_stack, n) < 0) { + Py_FatalError("PySequence_DelItem failed"); + } compiler_unit_check(c->u); } - else + else { c->u = NULL; + } + PyErr_Restore(exc_type, exc_val, exc_tb); } static int From webhook-mailer at python.org Fri Jan 29 12:47:15 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 29 Jan 2021 17:47:15 -0000 Subject: [Python-checkins] Fixed typo in turtle.rst (GH-24371) Message-ID: https://github.com/python/cpython/commit/6372a4ceba126aa0a9f00eee0f8023308f13e77b commit: 6372a4ceba126aa0a9f00eee0f8023308f13e77b branch: master author: Jules Lasne committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-29T09:46:39-08:00 summary: Fixed typo in turtle.rst (GH-24371) Found it while translating it to french ? Automerge-Triggered-By: GH:JulienPalard files: M Doc/library/turtle.rst diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 2084d75b3a57a..7bd7e96610912 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -662,7 +662,7 @@ Tell Turtle's state Return the angle between the line from turtle position to position specified by (x,y), the vector or the other turtle. This depends on the turtle's start - orientation which depends on the mode - "standard"/"world" or "logo"). + orientation which depends on the mode - "standard"/"world" or "logo". .. doctest:: :skipif: _tkinter is None From webhook-mailer at python.org Fri Jan 29 13:02:35 2021 From: webhook-mailer at python.org (terryjreedy) Date: Fri, 29 Jan 2021 18:02:35 -0000 Subject: [Python-checkins] bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) Message-ID: https://github.com/python/cpython/commit/11d75ec807f05eff1148c049e38b808d11c23b8a commit: 11d75ec807f05eff1148c049e38b808d11c23b8a branch: master author: Terry Jan Reedy committer: terryjreedy date: 2021-01-29T13:02:05-05:00 summary: bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) files: M Lib/idlelib/NEWS.txt M Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 87024c00a8580..840fc622ca95e 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -7,7 +7,7 @@ bpo-23544: Disable Debug=>Stack Viewer when user code is running or Debugger is active, to prevent hang or crash. Patch by Zackery Spytz. bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, -2-process mode. +2-process mode. Patch by Ken Hilton. bpo-33065: Fix problem debugging user classes with __repr__ method. diff --git a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst index 3e0b80a909d72..55ab67ca94959 100644 --- a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst +++ b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst @@ -1 +1,2 @@ Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. +Patch by Ken Hilton. From webhook-mailer at python.org Fri Jan 29 13:22:56 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 29 Jan 2021 18:22:56 -0000 Subject: [Python-checkins] bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) Message-ID: https://github.com/python/cpython/commit/cf883827496d0fbe2c5fe39e4778cd7525f6f7bc commit: cf883827496d0fbe2c5fe39e4778cd7525f6f7bc 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-29T10:22:18-08:00 summary: bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) (cherry picked from commit 11d75ec807f05eff1148c049e38b808d11c23b8a) Co-authored-by: Terry Jan Reedy files: M Lib/idlelib/NEWS.txt M Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 522ce59f61692..cf80b9efe2389 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -7,7 +7,7 @@ bpo-23544: Disable Debug=>Stack Viewer when user code is running or Debugger is active, to prevent hang or crash. Patch by Zackery Spytz. bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, -2-process mode. +2-process mode. Patch by Ken Hilton. bpo-33065: Fix problem debugging user classes with __repr__ method. diff --git a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst index 3e0b80a909d72..55ab67ca94959 100644 --- a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst +++ b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst @@ -1 +1,2 @@ Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. +Patch by Ken Hilton. From webhook-mailer at python.org Fri Jan 29 13:51:58 2021 From: webhook-mailer at python.org (terryjreedy) Date: Fri, 29 Jan 2021 18:51:58 -0000 Subject: [Python-checkins] bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) (#24374) Message-ID: https://github.com/python/cpython/commit/bf782b2636880dd634281f905ae43b8555450ee2 commit: bf782b2636880dd634281f905ae43b8555450ee2 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: terryjreedy date: 2021-01-29T13:51:46-05:00 summary: bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) (#24374) (cherry picked from commit 11d75ec807f05eff1148c049e38b808d11c23b8a) Co-authored-by: Terry Jan Reedy files: M Lib/idlelib/NEWS.txt M Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index e7d2f16e7a5a6..4bc4aefd1ac35 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -7,7 +7,7 @@ bpo-23544: Disable Debug=>Stack Viewer when user code is running or Debugger is active, to prevent hang or crash. Patch by Zackery Spytz. bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, -2-process mode. +2-process mode. Patch by Ken Hilton. bpo-33065: Fix problem debugging user classes with __repr__ method. diff --git a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst index 3e0b80a909d72..55ab67ca94959 100644 --- a/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst +++ b/Misc/NEWS.d/next/IDLE/2021-01-26-18-12-17.bpo-43008.mbQUc7.rst @@ -1 +1,2 @@ Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. +Patch by Ken Hilton. From webhook-mailer at python.org Fri Jan 29 16:38:28 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 29 Jan 2021 21:38:28 -0000 Subject: [Python-checkins] Fixed typo in turtle.rst (GH-24371) Message-ID: https://github.com/python/cpython/commit/44cd24452a03fd7c851293aaaff9b7ee47060ea0 commit: 44cd24452a03fd7c851293aaaff9b7ee47060ea0 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-29T13:38:16-08:00 summary: Fixed typo in turtle.rst (GH-24371) Found it while translating it to french ? Automerge-Triggered-By: GH:JulienPalard (cherry picked from commit 6372a4ceba126aa0a9f00eee0f8023308f13e77b) Co-authored-by: Jules Lasne files: M Doc/library/turtle.rst diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 2084d75b3a57a..7bd7e96610912 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -662,7 +662,7 @@ Tell Turtle's state Return the angle between the line from turtle position to position specified by (x,y), the vector or the other turtle. This depends on the turtle's start - orientation which depends on the mode - "standard"/"world" or "logo"). + orientation which depends on the mode - "standard"/"world" or "logo". .. doctest:: :skipif: _tkinter is None From webhook-mailer at python.org Fri Jan 29 16:39:07 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 29 Jan 2021 21:39:07 -0000 Subject: [Python-checkins] Fixed typo in turtle.rst (GH-24371) Message-ID: https://github.com/python/cpython/commit/c644db441f82be6d4167021eb0615675d0fc1d15 commit: c644db441f82be6d4167021eb0615675d0fc1d15 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-29T13:39:03-08:00 summary: Fixed typo in turtle.rst (GH-24371) Found it while translating it to french ? Automerge-Triggered-By: GH:JulienPalard (cherry picked from commit 6372a4ceba126aa0a9f00eee0f8023308f13e77b) Co-authored-by: Jules Lasne files: M Doc/library/turtle.rst diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 2084d75b3a57a..7bd7e96610912 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -662,7 +662,7 @@ Tell Turtle's state Return the angle between the line from turtle position to position specified by (x,y), the vector or the other turtle. This depends on the turtle's start - orientation which depends on the mode - "standard"/"world" or "logo"). + orientation which depends on the mode - "standard"/"world" or "logo". .. doctest:: :skipif: _tkinter is None From webhook-mailer at python.org Fri Jan 29 16:40:50 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 29 Jan 2021 21:40:50 -0000 Subject: [Python-checkins] Fixing typos in turtle.rst (GH-24376) Message-ID: https://github.com/python/cpython/commit/6baaae589d596ed3bb668448f2a22c5f62fc5fdf commit: 6baaae589d596ed3bb668448f2a22c5f62fc5fdf branch: master author: Jules Lasne committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-29T13:40:45-08:00 summary: Fixing typos in turtle.rst (GH-24376) Automerge-Triggered-By: GH:JulienPalard files: M Doc/library/turtle.rst diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 7bd7e96610912..6a9d61916ad1a 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -1105,7 +1105,7 @@ More drawing control :param font: a triple (fontname, fontsize, fonttype) Write text - the string representation of *arg* - at the current turtle - position according to *align* ("left", "center" or right") and with the given + position according to *align* ("left", "center" or "right") and with the given font. If *move* is true, the pen is moved to the bottom-right corner of the text. By default, *move* is ``False``. @@ -1192,7 +1192,7 @@ Appearance :func:`shapesize`. - "noresize": no adaption of the turtle's appearance takes place. - resizemode("user") is called by :func:`shapesize` when used with arguments. + ``resizemode("user")`` is called by :func:`shapesize` when used with arguments. .. doctest:: :skipif: _tkinter is None @@ -1330,7 +1330,7 @@ Appearance matrix as a tuple of 4 elements. Otherwise set the given elements and transform the turtleshape according to the matrix consisting of first row t11, t12 and - second row t21, 22. The determinant t11 * t22 - t12 * t21 must not be + second row t21, t22. The determinant t11 * t22 - t12 * t21 must not be zero, otherwise an error is raised. Modify stretchfactor, shearfactor and tiltangle according to the given matrix. @@ -1513,7 +1513,7 @@ Special Turtle methods :param size: an integer or ``None`` - Set or disable undobuffer. If *size* is an integer an empty undobuffer of + Set or disable undobuffer. If *size* is an integer, an empty undobuffer of given size is installed. *size* gives the maximum number of turtle actions that can be undone by the :func:`undo` method/function. If *size* is ``None``, the undobuffer is disabled. @@ -1821,7 +1821,7 @@ Using screen events existing bindings are removed. Example for a TurtleScreen instance named ``screen`` and a Turtle instance - named turtle: + named ``turtle``: .. doctest:: :skipif: _tkinter is None @@ -2048,7 +2048,7 @@ Methods specific to Screen, not inherited from TurtleScreen .. function:: exitonclick() - Bind bye() method to mouse clicks on the Screen. + Bind ``bye()`` method to mouse clicks on the Screen. If the value "using_IDLE" in the configuration dictionary is ``False`` From webhook-mailer at python.org Fri Jan 29 16:49:02 2021 From: webhook-mailer at python.org (zooba) Date: Fri, 29 Jan 2021 21:49:02 -0000 Subject: [Python-checkins] bpo-41282: Add deprecation warning and docs for distutils (PEP 632) (GH-24355) Message-ID: https://github.com/python/cpython/commit/62949f697fdefbf0c8bbba7a8354b9376afa35ba commit: 62949f697fdefbf0c8bbba7a8354b9376afa35ba branch: master author: Steve Dower committer: zooba date: 2021-01-29T21:48:55Z summary: bpo-41282: Add deprecation warning and docs for distutils (PEP 632) (GH-24355) files: A Misc/NEWS.d/next/Library/2021-01-27-20-49-32.bpo-41282.SEPdV0.rst M Doc/distutils/index.rst M Doc/install/index.rst M Doc/library/distutils.rst M Doc/whatsnew/3.10.rst M Lib/distutils/__init__.py diff --git a/Doc/distutils/index.rst b/Doc/distutils/index.rst index 1f72a25542494..2ccddc38b5f26 100644 --- a/Doc/distutils/index.rst +++ b/Doc/distutils/index.rst @@ -12,6 +12,13 @@ :ref:`distributing-index` The up to date module distribution documentations +.. note:: + + The entire ``distutils`` package has been deprecated and will be + removed in Python 3.12. This documentation is retained as a + reference only, and will be removed with the package. See the + :ref:`What's New ` entry for more information. + .. include:: ./_setuptools_disclaimer.rst .. note:: diff --git a/Doc/install/index.rst b/Doc/install/index.rst index e6d5a3e6ebde6..b6b7085fb35aa 100644 --- a/Doc/install/index.rst +++ b/Doc/install/index.rst @@ -10,6 +10,13 @@ .. TODO: Fill in XXX comments +.. note:: + + The entire ``distutils`` package has been deprecated and will be + removed in Python 3.12. This documentation is retained as a + reference only, and will be removed with the package. See the + :ref:`What's New ` entry for more information. + .. seealso:: :ref:`installing-index` diff --git a/Doc/library/distutils.rst b/Doc/library/distutils.rst index 62abc85ac397a..31c4ae5b23906 100644 --- a/Doc/library/distutils.rst +++ b/Doc/library/distutils.rst @@ -9,6 +9,11 @@ -------------- +:mod:`distutils` is deprecated with removal planned for Python 3.12. +See the :ref:`What's New ` entry for more information. + +-------------- + The :mod:`distutils` package provides support for building and installing additional modules into a Python installation. The new modules may be either 100%-pure Python, or may be extension modules written in C, or may be diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 16bb8fb28178a..cf7d1e80758a0 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -341,9 +341,21 @@ The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if they are provided by the underlying curses library. (Contributed by Zackery Spytz in :issue:`39273`.) +.. _distutils-deprecated: + distutils --------- +The entire ``distutils`` package is deprecated, to be removed in Python +3.12. Its functionality for specifying package builds has already been +completely replaced by third-party packages ``setuptools`` and +``packaging``, and most other commonly used APIs are available elsewhere +in the standard library (such as :mod:`platform`, :mod:`shutil`, +:mod:`subprocess` or :mod:`sysconfig`). There are no plans to migrate +any other functionality from ``distutils``, and applications that are +using other functions should plan to make private copies of the code. +Refer to :pep:`632` for discussion. + The ``bdist_wininst`` command deprecated in Python 3.8 has been removed. The ``bdist_wheel`` command is now recommended to distribute binary packages on Windows. @@ -583,6 +595,10 @@ Deprecated as appropriate to help identify code which needs updating during this transition. +* The entire ``distutils`` namespace is deprecated, to be removed in + Python 3.12. Refer to the :ref:`module changes ` + section for more information. + * Non-integer arguments to :func:`random.randrange` are deprecated. The :exc:`ValueError` is deprecated in favor of a :exc:`TypeError`. (Contributed by Serhiy Storchaka and Raymond Hettinger in :issue:`37319`.) diff --git a/Lib/distutils/__init__.py b/Lib/distutils/__init__.py index d823d040a1c1e..5ddb95923809c 100644 --- a/Lib/distutils/__init__.py +++ b/Lib/distutils/__init__.py @@ -9,5 +9,11 @@ """ import sys +import warnings __version__ = sys.version[:sys.version.index(' ')] + +warnings.warn("The distutils package deprecated and slated for " + "removal in Python 3.12. Use setuptools or check " + "PEP 632 for potential alternatives", + DeprecationWarning) diff --git a/Misc/NEWS.d/next/Library/2021-01-27-20-49-32.bpo-41282.SEPdV0.rst b/Misc/NEWS.d/next/Library/2021-01-27-20-49-32.bpo-41282.SEPdV0.rst new file mode 100644 index 0000000000000..c7b6b5233e8f2 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-27-20-49-32.bpo-41282.SEPdV0.rst @@ -0,0 +1 @@ +Deprecate ``distutils`` in documentation and add warning on import. From webhook-mailer at python.org Fri Jan 29 16:50:02 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 29 Jan 2021 21:50:02 -0000 Subject: [Python-checkins] Fixing typos in turtle.rst (GH-24376) Message-ID: https://github.com/python/cpython/commit/0b93a558f566a7a9d699a91ad529b3e8969ffa5f commit: 0b93a558f566a7a9d699a91ad529b3e8969ffa5f 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-29T13:49:57-08:00 summary: Fixing typos in turtle.rst (GH-24376) Automerge-Triggered-By: GH:JulienPalard (cherry picked from commit 6baaae589d596ed3bb668448f2a22c5f62fc5fdf) Co-authored-by: Jules Lasne files: M Doc/library/turtle.rst diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 7bd7e96610912..6a9d61916ad1a 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -1105,7 +1105,7 @@ More drawing control :param font: a triple (fontname, fontsize, fonttype) Write text - the string representation of *arg* - at the current turtle - position according to *align* ("left", "center" or right") and with the given + position according to *align* ("left", "center" or "right") and with the given font. If *move* is true, the pen is moved to the bottom-right corner of the text. By default, *move* is ``False``. @@ -1192,7 +1192,7 @@ Appearance :func:`shapesize`. - "noresize": no adaption of the turtle's appearance takes place. - resizemode("user") is called by :func:`shapesize` when used with arguments. + ``resizemode("user")`` is called by :func:`shapesize` when used with arguments. .. doctest:: :skipif: _tkinter is None @@ -1330,7 +1330,7 @@ Appearance matrix as a tuple of 4 elements. Otherwise set the given elements and transform the turtleshape according to the matrix consisting of first row t11, t12 and - second row t21, 22. The determinant t11 * t22 - t12 * t21 must not be + second row t21, t22. The determinant t11 * t22 - t12 * t21 must not be zero, otherwise an error is raised. Modify stretchfactor, shearfactor and tiltangle according to the given matrix. @@ -1513,7 +1513,7 @@ Special Turtle methods :param size: an integer or ``None`` - Set or disable undobuffer. If *size* is an integer an empty undobuffer of + Set or disable undobuffer. If *size* is an integer, an empty undobuffer of given size is installed. *size* gives the maximum number of turtle actions that can be undone by the :func:`undo` method/function. If *size* is ``None``, the undobuffer is disabled. @@ -1821,7 +1821,7 @@ Using screen events existing bindings are removed. Example for a TurtleScreen instance named ``screen`` and a Turtle instance - named turtle: + named ``turtle``: .. doctest:: :skipif: _tkinter is None @@ -2048,7 +2048,7 @@ Methods specific to Screen, not inherited from TurtleScreen .. function:: exitonclick() - Bind bye() method to mouse clicks on the Screen. + Bind ``bye()`` method to mouse clicks on the Screen. If the value "using_IDLE" in the configuration dictionary is ``False`` From webhook-mailer at python.org Fri Jan 29 17:03:48 2021 From: webhook-mailer at python.org (miss-islington) Date: Fri, 29 Jan 2021 22:03:48 -0000 Subject: [Python-checkins] Fixing typos in turtle.rst (GH-24376) Message-ID: https://github.com/python/cpython/commit/d34be1ed57bf99298f1b7f9d7259d25019a29cb2 commit: d34be1ed57bf99298f1b7f9d7259d25019a29cb2 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-29T14:03:18-08:00 summary: Fixing typos in turtle.rst (GH-24376) Automerge-Triggered-By: GH:JulienPalard (cherry picked from commit 6baaae589d596ed3bb668448f2a22c5f62fc5fdf) Co-authored-by: Jules Lasne files: M Doc/library/turtle.rst diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 7bd7e96610912..6a9d61916ad1a 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -1105,7 +1105,7 @@ More drawing control :param font: a triple (fontname, fontsize, fonttype) Write text - the string representation of *arg* - at the current turtle - position according to *align* ("left", "center" or right") and with the given + position according to *align* ("left", "center" or "right") and with the given font. If *move* is true, the pen is moved to the bottom-right corner of the text. By default, *move* is ``False``. @@ -1192,7 +1192,7 @@ Appearance :func:`shapesize`. - "noresize": no adaption of the turtle's appearance takes place. - resizemode("user") is called by :func:`shapesize` when used with arguments. + ``resizemode("user")`` is called by :func:`shapesize` when used with arguments. .. doctest:: :skipif: _tkinter is None @@ -1330,7 +1330,7 @@ Appearance matrix as a tuple of 4 elements. Otherwise set the given elements and transform the turtleshape according to the matrix consisting of first row t11, t12 and - second row t21, 22. The determinant t11 * t22 - t12 * t21 must not be + second row t21, t22. The determinant t11 * t22 - t12 * t21 must not be zero, otherwise an error is raised. Modify stretchfactor, shearfactor and tiltangle according to the given matrix. @@ -1513,7 +1513,7 @@ Special Turtle methods :param size: an integer or ``None`` - Set or disable undobuffer. If *size* is an integer an empty undobuffer of + Set or disable undobuffer. If *size* is an integer, an empty undobuffer of given size is installed. *size* gives the maximum number of turtle actions that can be undone by the :func:`undo` method/function. If *size* is ``None``, the undobuffer is disabled. @@ -1821,7 +1821,7 @@ Using screen events existing bindings are removed. Example for a TurtleScreen instance named ``screen`` and a Turtle instance - named turtle: + named ``turtle``: .. doctest:: :skipif: _tkinter is None @@ -2048,7 +2048,7 @@ Methods specific to Screen, not inherited from TurtleScreen .. function:: exitonclick() - Bind bye() method to mouse clicks on the Screen. + Bind ``bye()`` method to mouse clicks on the Screen. If the value "using_IDLE" in the configuration dictionary is ``False`` From webhook-mailer at python.org Fri Jan 29 17:04:54 2021 From: webhook-mailer at python.org (vstinner) Date: Fri, 29 Jan 2021 22:04:54 -0000 Subject: [Python-checkins] bpo-42323: Fix math.nextafter() on AIX (GH-24381) Message-ID: https://github.com/python/cpython/commit/0837f99d3367ecf200033bbddfa05d061ae9f483 commit: 0837f99d3367ecf200033bbddfa05d061ae9f483 branch: master author: Victor Stinner committer: vstinner date: 2021-01-29T23:04:50+01:00 summary: bpo-42323: Fix math.nextafter() on AIX (GH-24381) math_nextafter_impl() must return a Python object, not a C double. files: M Modules/mathmodule.c diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 8133d6b3aaefb..d0df58c63e110 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -3474,10 +3474,10 @@ math_nextafter_impl(PyObject *module, double x, double y) return PyFloat_FromDouble(y); } if (Py_IS_NAN(x)) { - return x; + return PyFloat_FromDouble(x); } if (Py_IS_NAN(y)) { - return y; + return PyFloat_FromDouble(y); } #endif return PyFloat_FromDouble(nextafter(x, y)); From webhook-mailer at python.org Fri Jan 29 17:41:08 2021 From: webhook-mailer at python.org (pablogsal) Date: Fri, 29 Jan 2021 22:41:08 -0000 Subject: [Python-checkins] Fix a reference leak in the compiler for compiler_lambda() (GH-24382) Message-ID: https://github.com/python/cpython/commit/7fdab8331b90e1ffcedef05a006b6e72457b793a commit: 7fdab8331b90e1ffcedef05a006b6e72457b793a branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-29T22:40:59Z summary: Fix a reference leak in the compiler for compiler_lambda() (GH-24382) files: M Python/compile.c diff --git a/Python/compile.c b/Python/compile.c index d8fea9d047d0c..5d06a8342d32e 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2692,8 +2692,10 @@ compiler_lambda(struct compiler *c, expr_ty e) qualname = c->u->u_qualname; Py_INCREF(qualname); compiler_exit_scope(c); - if (co == NULL) + if (co == NULL) { + Py_DECREF(qualname); return 0; + } compiler_make_closure(c, co, funcflags, qualname); Py_DECREF(qualname); From webhook-mailer at python.org Fri Jan 29 19:46:47 2021 From: webhook-mailer at python.org (vstinner) Date: Sat, 30 Jan 2021 00:46:47 -0000 Subject: [Python-checkins] bpo-38631: Replace compiler fatal errors with exceptions (GH-24369) Message-ID: https://github.com/python/cpython/commit/ba7a99ddb52a45c8dec1f7e9f1648add0ace82ab commit: ba7a99ddb52a45c8dec1f7e9f1648add0ace82ab branch: master author: Victor Stinner committer: vstinner date: 2021-01-30T01:46:44+01:00 summary: bpo-38631: Replace compiler fatal errors with exceptions (GH-24369) * Replace Py_FatalError() calls with regular SystemError exceptions. * compiler_exit_scope() calls _PyErr_WriteUnraisableMsg() to log the PySequence_DelItem() failure. * compiler_unit_check() uses _PyMem_IsPtrFreed(). * compiler_make_closure(): remove "(reftype == FREE)" comment since reftype can also be LOCAL or GLOBAL_EXPLICIT. files: A Misc/NEWS.d/next/Core and Builtins/2021-01-29-17-48-44.bpo-38631.jR-3kC.rst M Python/compile.c diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-29-17-48-44.bpo-38631.jR-3kC.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-29-17-48-44.bpo-38631.jR-3kC.rst new file mode 100644 index 0000000000000..485607e66126d --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-29-17-48-44.bpo-38631.jR-3kC.rst @@ -0,0 +1,2 @@ +Replace :c:func:`Py_FatalError` calls in the compiler with regular +:exc:`SystemError` exceptions. Patch by Victor Stinner. diff --git a/Python/compile.c b/Python/compile.c index 5d06a8342d32e..8abb5bb5dc655 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -22,6 +22,7 @@ */ #include "Python.h" +#include "pycore_pymem.h" // _PyMem_IsPtrFreed() #include "pycore_long.h" // _PyLong_GetZero() #include "Python-ast.h" @@ -520,9 +521,7 @@ compiler_unit_check(struct compiler_unit *u) { basicblock *block; for (block = u->u_blocks; block != NULL; block = block->b_list) { - assert((uintptr_t)block != 0xcbcbcbcbU); - assert((uintptr_t)block != 0xfbfbfbfbU); - assert((uintptr_t)block != 0xdbdbdbdbU); + assert(!_PyMem_IsPtrFreed(block)); if (block->b_instr != NULL) { assert(block->b_ialloc > 0); assert(block->b_iused >= 0); @@ -681,7 +680,8 @@ compiler_exit_scope(struct compiler *c) assert(c->u); /* we are deleting from a list so this really shouldn't fail */ if (PySequence_DelItem(c->c_stack, n) < 0) { - Py_FatalError("PySequence_DelItem failed"); + _PyErr_WriteUnraisableMsg("on removing the last compiler " + "stack item", NULL); } compiler_unit_check(c->u); } @@ -1898,17 +1898,15 @@ get_ref_type(struct compiler *c, PyObject *name) return CELL; scope = PyST_GetScope(c->u->u_ste, name); if (scope == 0) { - _Py_FatalErrorFormat(__func__, - "unknown scope for %.100s in %.100s(%s)\n" - "symbols: %s\nlocals: %s\nglobals: %s", - PyUnicode_AsUTF8(name), - PyUnicode_AsUTF8(c->u->u_name), - PyUnicode_AsUTF8(PyObject_Repr(c->u->u_ste->ste_id)), - PyUnicode_AsUTF8(PyObject_Repr(c->u->u_ste->ste_symbols)), - PyUnicode_AsUTF8(PyObject_Repr(c->u->u_varnames)), - PyUnicode_AsUTF8(PyObject_Repr(c->u->u_names))); + PyErr_Format(PyExc_SystemError, + "PyST_GetScope(name=%R) failed: " + "unknown scope in unit %S (%R); " + "symbols: %R; locals: %R; globals: %R", + name, + c->u->u_name, c->u->u_ste->ste_id, + c->u->u_ste->ste_symbols, c->u->u_varnames, c->u->u_names); + return -1; } - return scope; } @@ -1923,7 +1921,8 @@ compiler_lookup_arg(PyObject *dict, PyObject *name) } static int -compiler_make_closure(struct compiler *c, PyCodeObject *co, Py_ssize_t flags, PyObject *qualname) +compiler_make_closure(struct compiler *c, PyCodeObject *co, Py_ssize_t flags, + PyObject *qualname) { Py_ssize_t i, free = PyCode_GetNumFree(co); if (qualname == NULL) @@ -1935,7 +1934,6 @@ compiler_make_closure(struct compiler *c, PyCodeObject *co, Py_ssize_t flags, Py LOAD_DEREF but LOAD_CLOSURE is needed. */ PyObject *name = PyTuple_GET_ITEM(co->co_freevars, i); - int arg, reftype; /* Special case: If a class contains a method with a free variable that has the same name as a method, @@ -1943,20 +1941,27 @@ compiler_make_closure(struct compiler *c, PyCodeObject *co, Py_ssize_t flags, Py class. It should be handled by the closure, as well as by the normal name lookup logic. */ - reftype = get_ref_type(c, name); - if (reftype == CELL) + int reftype = get_ref_type(c, name); + if (reftype == -1) { + return 0; + } + int arg; + if (reftype == CELL) { arg = compiler_lookup_arg(c->u->u_cellvars, name); - else /* (reftype == FREE) */ + } + else { arg = compiler_lookup_arg(c->u->u_freevars, name); + } if (arg == -1) { - _Py_FatalErrorFormat(__func__, - "lookup %s in %s %d %d\n" - "freevars of %s: %s\n", - PyUnicode_AsUTF8(PyObject_Repr(name)), - PyUnicode_AsUTF8(c->u->u_name), - reftype, arg, - PyUnicode_AsUTF8(co->co_name), - PyUnicode_AsUTF8(PyObject_Repr(co->co_freevars))); + PyErr_Format(PyExc_SystemError, + "compiler_lookup_arg(name=%R) with reftype=%d failed in %S; " + "freevars of code %S: %R", + name, + reftype, + c->u->u_name, + co->co_name, + co->co_freevars); + return 0; } ADDOP_I(c, LOAD_CLOSURE, arg); } @@ -2294,7 +2299,11 @@ compiler_function(struct compiler *c, stmt_ty s, int is_async) return 0; } - compiler_make_closure(c, co, funcflags, qualname); + if (!compiler_make_closure(c, co, funcflags, qualname)) { + Py_DECREF(qualname); + Py_DECREF(co); + return 0; + } Py_DECREF(qualname); Py_DECREF(co); @@ -2419,7 +2428,10 @@ compiler_class(struct compiler *c, stmt_ty s) ADDOP(c, LOAD_BUILD_CLASS); /* 3. load a function (or closure) made from the code object */ - compiler_make_closure(c, co, 0, NULL); + if (!compiler_make_closure(c, co, 0, NULL)) { + Py_DECREF(co); + return 0; + } Py_DECREF(co); /* 4. load class name */ @@ -2697,7 +2709,11 @@ compiler_lambda(struct compiler *c, expr_ty e) return 0; } - compiler_make_closure(c, co, funcflags, qualname); + if (!compiler_make_closure(c, co, funcflags, qualname)) { + Py_DECREF(qualname); + Py_DECREF(co); + return 0; + } Py_DECREF(qualname); Py_DECREF(co); @@ -4660,8 +4676,9 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type, if (co == NULL) goto error; - if (!compiler_make_closure(c, co, 0, qualname)) + if (!compiler_make_closure(c, co, 0, qualname)) { goto error; + } Py_DECREF(qualname); Py_DECREF(co); @@ -5468,8 +5485,10 @@ stackdepth(struct compiler *c) struct instr *instr = &b->b_instr[i]; int effect = stack_effect(instr->i_opcode, instr->i_oparg, 0); if (effect == PY_INVALID_STACK_EFFECT) { - _Py_FatalErrorFormat(__func__, - "opcode = %d", instr->i_opcode); + PyErr_Format(PyExc_SystemError, + "compiler stack_effect(opcode=%d, arg=%i) failed", + instr->i_opcode, instr->i_oparg); + return -1; } int new_depth = depth + effect; if (new_depth > maxdepth) { @@ -6675,4 +6694,3 @@ PyCode_Optimize(PyObject *code, PyObject* Py_UNUSED(consts), Py_INCREF(code); return code; } - From webhook-mailer at python.org Fri Jan 29 21:02:33 2021 From: webhook-mailer at python.org (gvanrossum) Date: Sat, 30 Jan 2021 02:02:33 -0000 Subject: [Python-checkins] bpo-42927: Inline cache for attributes defined with '__slots__' (#24216) Message-ID: https://github.com/python/cpython/commit/5c5a938573ce665f00e362c7766912d9b3f3b44e commit: 5c5a938573ce665f00e362c7766912d9b3f3b44e branch: master author: Guido van Rossum committer: gvanrossum date: 2021-01-29T18:02:29-08:00 summary: bpo-42927: Inline cache for attributes defined with '__slots__' (#24216) files: A Misc/NEWS.d/next/Core and Builtins/2021-01-15-20-05-56.bpo-42927.GI-l-7.rst M Python/ceval.c diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-15-20-05-56.bpo-42927.GI-l-7.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-15-20-05-56.bpo-42927.GI-l-7.rst new file mode 100644 index 0000000000000..8ee578e816215 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-15-20-05-56.bpo-42927.GI-l-7.rst @@ -0,0 +1,2 @@ +The inline cache for ``LOAD_ATTR`` now also optimizes access to attributes defined by ``__slots__``. +This makes reading such attribute up to 30% faster. \ No newline at end of file diff --git a/Python/ceval.c b/Python/ceval.c index be9ea24454768..3aa2aa2c9bc19 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -29,6 +29,7 @@ #include "opcode.h" #include "pydtrace.h" #include "setobject.h" +#include "structmember.h" // struct PyMemberDef, T_OFFSET_EX #include @@ -3169,106 +3170,157 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) if (co_opcache != NULL && PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG)) { if (co_opcache->optimized > 0) { - /* Fast path -- cache hit makes LOAD_ATTR ~30% faster */ + // Fast path -- cache hit makes LOAD_ATTR ~30% faster. la = &co_opcache->u.la; if (la->type == type && la->tp_version_tag == type->tp_version_tag) { - assert(type->tp_dict != NULL); - assert(type->tp_dictoffset > 0); - - dictptr = (PyObject **) ((char *)owner + type->tp_dictoffset); - dict = *dictptr; - if (dict != NULL && PyDict_CheckExact(dict)) { - Py_ssize_t hint = la->hint; - Py_INCREF(dict); - res = NULL; - la->hint = _PyDict_GetItemHint((PyDictObject*)dict, name, hint, &res); - + // Hint >= 0 is a dict index; hint == -1 is a dict miss. + // Hint < -1 is an inverted slot offset: offset is strictly > 0, + // so ~offset is strictly < -1 (assuming 2's complement). + if (la->hint < -1) { + // Even faster path -- slot hint. + Py_ssize_t offset = ~la->hint; + // fprintf(stderr, "Using hint for offset %zd\n", offset); + char *addr = (char *)owner + offset; + res = *(PyObject **)addr; if (res != NULL) { - if (la->hint == hint && hint >= 0) { - /* Our hint has helped -- cache hit. */ - OPCACHE_STAT_ATTR_HIT(); - } else { - /* The hint we provided didn't work. - Maybe next time? */ - OPCACHE_MAYBE_DEOPT_LOAD_ATTR(); - } - Py_INCREF(res); SET_TOP(res); Py_DECREF(owner); - Py_DECREF(dict); DISPATCH(); + } + // Else slot is NULL. Fall through to slow path to raise AttributeError(name). + // Don't DEOPT, since the slot is still there. + } else { + // Fast path for dict. + assert(type->tp_dict != NULL); + assert(type->tp_dictoffset > 0); + + dictptr = (PyObject **) ((char *)owner + type->tp_dictoffset); + dict = *dictptr; + if (dict != NULL && PyDict_CheckExact(dict)) { + Py_ssize_t hint = la->hint; + Py_INCREF(dict); + res = NULL; + la->hint = _PyDict_GetItemHint((PyDictObject*)dict, name, hint, &res); + + if (res != NULL) { + if (la->hint == hint && hint >= 0) { + // Our hint has helped -- cache hit. + OPCACHE_STAT_ATTR_HIT(); + } else { + // The hint we provided didn't work. + // Maybe next time? + OPCACHE_MAYBE_DEOPT_LOAD_ATTR(); + } + + Py_INCREF(res); + SET_TOP(res); + Py_DECREF(owner); + Py_DECREF(dict); + DISPATCH(); + } else { + // This attribute can be missing sometimes; + // we don't want to optimize this lookup. + OPCACHE_DEOPT_LOAD_ATTR(); + Py_DECREF(dict); + } } else { - // This attribute can be missing sometimes -- we - // don't want to optimize this lookup. + // There is no dict, or __dict__ doesn't satisfy PyDict_CheckExact. OPCACHE_DEOPT_LOAD_ATTR(); - Py_DECREF(dict); } - } else { - // There is no dict, or __dict__ doesn't satisfy PyDict_CheckExact - OPCACHE_DEOPT_LOAD_ATTR(); } } else { // The type of the object has either been updated, // or is different. Maybe it will stabilize? OPCACHE_MAYBE_DEOPT_LOAD_ATTR(); } - OPCACHE_STAT_ATTR_MISS(); } - if (co_opcache != NULL && /* co_opcache can be NULL after a DEOPT() call. */ + if (co_opcache != NULL && // co_opcache can be NULL after a DEOPT() call. type->tp_getattro == PyObject_GenericGetAttr) { - Py_ssize_t ret; - - if (type->tp_dictoffset > 0) { - if (type->tp_dict == NULL) { - if (PyType_Ready(type) < 0) { - Py_DECREF(owner); - SET_TOP(NULL); - goto error; - } + if (type->tp_dict == NULL) { + if (PyType_Ready(type) < 0) { + Py_DECREF(owner); + SET_TOP(NULL); + goto error; } - if (_PyType_Lookup(type, name) == NULL) { - dictptr = (PyObject **) ((char *)owner + type->tp_dictoffset); - dict = *dictptr; + } + PyObject *descr = _PyType_Lookup(type, name); + if (descr != NULL) { + // We found an attribute with a data-like descriptor. + PyTypeObject *dtype = Py_TYPE(descr); + if (dtype == &PyMemberDescr_Type) { // It's a slot + PyMemberDescrObject *member = (PyMemberDescrObject *)descr; + struct PyMemberDef *dmem = member->d_member; + if (dmem->type == T_OBJECT_EX) { + Py_ssize_t offset = dmem->offset; + assert(offset > 0); // 0 would be confused with dict hint == -1 (miss). + + if (co_opcache->optimized == 0) { + // First time we optimize this opcode. + OPCACHE_STAT_ATTR_OPT(); + co_opcache->optimized = OPCODE_CACHE_MAX_TRIES; + // fprintf(stderr, "Setting hint for %s, offset %zd\n", dmem->name, offset); + } - if (dict != NULL && PyDict_CheckExact(dict)) { - Py_INCREF(dict); - res = NULL; - ret = _PyDict_GetItemHint((PyDictObject*)dict, name, -1, &res); + la = &co_opcache->u.la; + la->type = type; + la->tp_version_tag = type->tp_version_tag; + la->hint = ~offset; + + char *addr = (char *)owner + offset; + res = *(PyObject **)addr; if (res != NULL) { Py_INCREF(res); - Py_DECREF(dict); Py_DECREF(owner); SET_TOP(res); - if (co_opcache->optimized == 0) { - // First time we optimize this opcode. */ - OPCACHE_STAT_ATTR_OPT(); - co_opcache->optimized = OPCODE_CACHE_MAX_TRIES; - } - - la = &co_opcache->u.la; - la->type = type; - la->tp_version_tag = type->tp_version_tag; - la->hint = ret; - DISPATCH(); } + // Else slot is NULL. Fall through to slow path to raise AttributeError(name). + } + // Else it's a slot of a different type. We don't handle those. + } + // Else it's some other kind of descriptor that we don't handle. + OPCACHE_DEOPT_LOAD_ATTR(); + } else if (type->tp_dictoffset > 0) { + // We found an instance with a __dict__. + dictptr = (PyObject **) ((char *)owner + type->tp_dictoffset); + dict = *dictptr; + + if (dict != NULL && PyDict_CheckExact(dict)) { + Py_INCREF(dict); + res = NULL; + Py_ssize_t hint = _PyDict_GetItemHint((PyDictObject*)dict, name, -1, &res); + if (res != NULL) { + Py_INCREF(res); Py_DECREF(dict); - } else { - // There is no dict, or __dict__ doesn't satisfy PyDict_CheckExact - OPCACHE_DEOPT_LOAD_ATTR(); + Py_DECREF(owner); + SET_TOP(res); + + if (co_opcache->optimized == 0) { + // First time we optimize this opcode. + OPCACHE_STAT_ATTR_OPT(); + co_opcache->optimized = OPCODE_CACHE_MAX_TRIES; + } + + la = &co_opcache->u.la; + la->type = type; + la->tp_version_tag = type->tp_version_tag; + la->hint = hint; + + DISPATCH(); } + Py_DECREF(dict); } else { - // We failed to find an attribute without a data-like descriptor + // There is no dict, or __dict__ doesn't satisfy PyDict_CheckExact. OPCACHE_DEOPT_LOAD_ATTR(); } } else { - // The object's class does not have a tp_dictoffset we can use + // The object's class does not have a tp_dictoffset we can use. OPCACHE_DEOPT_LOAD_ATTR(); } } else if (type->tp_getattro != PyObject_GenericGetAttr) { @@ -3276,7 +3328,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) } } - /* slow path */ + // Slow path. res = PyObject_GetAttr(owner, name); Py_DECREF(owner); SET_TOP(res); From webhook-mailer at python.org Sat Jan 30 05:37:44 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 30 Jan 2021 10:37:44 -0000 Subject: [Python-checkins] bpo-43047: logging.config formatters documentation update (GH-24358) Message-ID: https://github.com/python/cpython/commit/62437a2fa9ebd2352dc1e15ae310895eef6ff981 commit: 62437a2fa9ebd2352dc1e15ae310895eef6ff981 branch: master author: Ian Wienand committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-30T02:37:15-08:00 summary: bpo-43047: logging.config formatters documentation update (GH-24358) The documentation for some parts of the logging.config formatters has fallen behind the code. For example, the dictionary-schema section does not list the "class" attribute, however it is discussed in the file/ini discussion; and neither references the style argument which has been added. This modifies the dictionary-schema formatters documentation to list the keys available and overall makes it clearer these are passed to create a logging.Formatter object. The logging.Formatter documentation describes the default values of format/datefmt and the various formatting options. Since we have now more clearly described how the configuration is created via this type of object, we remove the discussion in this document to avoid duplication and rely on users reading the referenced logging.Formatter documenation directly for such details. Instead of duplicating the discussion for the two config types, the file/ini section is modified to link back to the dictionary-schema discussion, making it clear the same arguments are accepted. Automerge-Triggered-By: GH:vsajip files: M Doc/library/logging.config.rst diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst index 0b5e2fc2a658d..76ff83c5b0284 100644 --- a/Doc/library/logging.config.rst +++ b/Doc/library/logging.config.rst @@ -218,18 +218,29 @@ custom instantiation is required. If so, the mechanism described in :ref:`logging-config-dict-userdef` below is used to create an instance; otherwise, the context is used to determine what to instantiate. +.. _logging-config-dictschema-formatters: + * *formatters* - the corresponding value will be a dict in which each key is a formatter id and each value is a dict describing how to configure the corresponding :class:`~logging.Formatter` instance. - The configuring dict is searched for keys ``format`` and ``datefmt`` - (with defaults of ``None``) and these are used to construct a - :class:`~logging.Formatter` instance. + The configuring dict is searched for the following optional keys + which correspond to the arguments passed to create a + :class:`~logging.Formatter` object: + + * ``format`` + * ``datefmt`` + * ``style`` + * ``validate`` (since version >=3.8) - .. versionchanged:: 3.8 - a ``validate`` key (with default of ``True``) can be added into - the ``formatters`` section of the configuring dict, this is to - validate the format. + An optional ``class`` key indicates the name of the formatter's + class (as a dotted module and class name). The instantiation + arguments are as for :class:`~logging.Formatter`, thus this key is + most useful for instantiating a customised subclass of + :class:`~logging.Formatter`. For example, the alternative class + might present exception tracebacks in an expanded or condensed + format. If your formatter requires different or extra configuration + keys, you should use :ref:`logging-config-dict-userdef`. * *filters* - the corresponding value will be a dict in which each key is a filter id and each value is a dict describing how to configure @@ -791,20 +802,13 @@ Sections which specify formatter configuration are typified by the following. [formatter_form01] format=F1 %(asctime)s %(levelname)s %(message)s datefmt= + style='%' + validate=True class=logging.Formatter -The ``format`` entry is the overall format string, and the ``datefmt`` entry is -the :func:`strftime`\ -compatible date/time format string. If empty, the -package substitutes something which is almost equivalent to specifying the date -format string ``'%Y-%m-%d %H:%M:%S'``. This format also specifies milliseconds, -which are appended to the result of using the above format string, with a comma -separator. An example time in this format is ``2003-01-23 00:29:50,411``. - -The ``class`` entry is optional. It indicates the name of the formatter's class -(as a dotted module and class name.) This option is useful for instantiating a -:class:`~logging.Formatter` subclass. Subclasses of -:class:`~logging.Formatter` can present exception tracebacks in an expanded or -condensed format. +The arguments for the formatter configuration are the same as the keys +in the dictionary schema :ref:`formatters section +`. .. note:: From webhook-mailer at python.org Sat Jan 30 05:38:48 2021 From: webhook-mailer at python.org (miss-islington) Date: Sat, 30 Jan 2021 10:38:48 -0000 Subject: [Python-checkins] [doc] Document VIRTUAL_ENV environment variable (GH-21970) Message-ID: https://github.com/python/cpython/commit/08867a0bfc756b40b1d889b4edccc8137a291e81 commit: 08867a0bfc756b40b1d889b4edccc8137a291e81 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-30T02:38:44-08:00 summary: [doc] Document VIRTUAL_ENV environment variable (GH-21970) (cherry picked from commit 3584d4b64a5373440f78237eac734831cfd83f79) Co-authored-by: Andre Delfino files: M Doc/using/venv-create.inc diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index 5e724cd5794ce..ddb36f94667d9 100644 --- a/Doc/using/venv-create.inc +++ b/Doc/using/venv-create.inc @@ -126,6 +126,10 @@ directory containing the virtual environment): | | PowerShell | PS C:\\> \\Scripts\\Activate.ps1 | +-------------+-----------------+-----------------------------------------+ +When a virtual environment is active, the :envvar:`VIRTUAL_ENV` environment +variable is set to the path of the virtual environment. This can be used to +check if one is running inside a virtual environment. + You don't specifically *need* to activate an environment; activation just prepends the virtual environment's binary directory to your path, so that "python" invokes the virtual environment's Python interpreter and you can run From webhook-mailer at python.org Sat Jan 30 08:54:59 2021 From: webhook-mailer at python.org (corona10) Date: Sat, 30 Jan 2021 13:54:59 -0000 Subject: [Python-checkins] bpo-40455: Fix gcc10+ warning about writing into a section of offset 0 (GH-24384) Message-ID: https://github.com/python/cpython/commit/86e322f1412be6c5a6c8fa8e73af68b99c42bb18 commit: 86e322f1412be6c5a6c8fa8e73af68b99c42bb18 branch: master author: Pablo Galindo committer: corona10 date: 2021-01-30T22:54:22+09:00 summary: bpo-40455: Fix gcc10+ warning about writing into a section of offset 0 (GH-24384) files: M Objects/codeobject.c M Python/compile.c diff --git a/Objects/codeobject.c b/Objects/codeobject.c index f7613e8fd21b1..69cb31c1ababc 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -408,8 +408,8 @@ emit_pair(PyObject **bytes, int *offset, int a, int b) if (_PyBytes_Resize(bytes, len * 2) < 0) return 0; } - unsigned char *lnotab = (unsigned char *) - PyBytes_AS_STRING(*bytes) + *offset; + unsigned char *lnotab = (unsigned char *) PyBytes_AS_STRING(*bytes); + lnotab += *offset; *lnotab++ = a; *lnotab++ = b; *offset += 2; diff --git a/Python/compile.c b/Python/compile.c index 8abb5bb5dc655..9927f5abfb964 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -5577,9 +5577,8 @@ assemble_emit_linetable_pair(struct assembler *a, int bdelta, int ldelta) if (_PyBytes_Resize(&a->a_lnotab, len * 2) < 0) return 0; } - unsigned char *lnotab = (unsigned char *) - PyBytes_AS_STRING(a->a_lnotab) + a->a_lnotab_off; - + unsigned char *lnotab = (unsigned char *) PyBytes_AS_STRING(a->a_lnotab); + lnotab += a->a_lnotab_off; a->a_lnotab_off += 2; *lnotab++ = bdelta; *lnotab++ = ldelta; From webhook-mailer at python.org Sat Jan 30 11:43:06 2021 From: webhook-mailer at python.org (pfmoore) Date: Sat, 30 Jan 2021 16:43:06 -0000 Subject: [Python-checkins] bpo-43077: Update bundled pip to 21.0.1 and setuptools to 52.0.0 (GH-24386) Message-ID: https://github.com/python/cpython/commit/4d11ecbb5ed78e6259ee27289c7638aad795f473 commit: 4d11ecbb5ed78e6259ee27289c7638aad795f473 branch: master author: Paul Moore committer: pfmoore date: 2021-01-30T16:42:36Z summary: bpo-43077: Update bundled pip to 21.0.1 and setuptools to 52.0.0 (GH-24386) Update bundled pip to 21.0.1 and setuptools to 52.0.0 files: A Lib/ensurepip/_bundled/pip-21.0.1-py3-none-any.whl A Lib/ensurepip/_bundled/setuptools-52.0.0-py3-none-any.whl A Misc/NEWS.d/next/Library/2021-01-30-15-20-06.bpo-43077.Owk61z.rst D Lib/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl D Lib/ensurepip/_bundled/setuptools-47.1.0-py3-none-any.whl M Lib/ensurepip/__init__.py diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py index 2276fd7fd8f3b..74530706be5c7 100644 --- a/Lib/ensurepip/__init__.py +++ b/Lib/ensurepip/__init__.py @@ -11,11 +11,11 @@ __all__ = ["version", "bootstrap"] _PACKAGE_NAMES = ('setuptools', 'pip') -_SETUPTOOLS_VERSION = "47.1.0" -_PIP_VERSION = "20.2.3" +_SETUPTOOLS_VERSION = "52.0.0" +_PIP_VERSION = "21.0.1" _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), - ("pip", _PIP_VERSION, "py2.py3"), + ("pip", _PIP_VERSION, "py3"), ] # Packages bundled in ensurepip._bundled have wheel_name set. diff --git a/Lib/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl b/Lib/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl deleted file mode 100644 index 7ebdc0f31d4e3..0000000000000 Binary files a/Lib/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl and /dev/null differ diff --git a/Lib/ensurepip/_bundled/pip-21.0.1-py3-none-any.whl b/Lib/ensurepip/_bundled/pip-21.0.1-py3-none-any.whl new file mode 100644 index 0000000000000..6d55137b94125 Binary files /dev/null and b/Lib/ensurepip/_bundled/pip-21.0.1-py3-none-any.whl differ diff --git a/Lib/ensurepip/_bundled/setuptools-47.1.0-py3-none-any.whl b/Lib/ensurepip/_bundled/setuptools-47.1.0-py3-none-any.whl deleted file mode 100644 index f87867ff98254..0000000000000 Binary files a/Lib/ensurepip/_bundled/setuptools-47.1.0-py3-none-any.whl and /dev/null differ diff --git a/Lib/ensurepip/_bundled/setuptools-52.0.0-py3-none-any.whl b/Lib/ensurepip/_bundled/setuptools-52.0.0-py3-none-any.whl new file mode 100644 index 0000000000000..9eb776ecfba27 Binary files /dev/null and b/Lib/ensurepip/_bundled/setuptools-52.0.0-py3-none-any.whl differ diff --git a/Misc/NEWS.d/next/Library/2021-01-30-15-20-06.bpo-43077.Owk61z.rst b/Misc/NEWS.d/next/Library/2021-01-30-15-20-06.bpo-43077.Owk61z.rst new file mode 100644 index 0000000000000..e555002433b4d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-30-15-20-06.bpo-43077.Owk61z.rst @@ -0,0 +1 @@ +Update the bundled pip to 21.0.1 and setuptools to 52.0.0. \ No newline at end of file From webhook-mailer at python.org Sun Jan 31 00:19:11 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Sun, 31 Jan 2021 05:19:11 -0000 Subject: [Python-checkins] bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364) Message-ID: https://github.com/python/cpython/commit/e60344364245a23a7a1b25d5ebce6833652a656c commit: e60344364245a23a7a1b25d5ebce6833652a656c branch: master author: L <3177243+LukeLR at users.noreply.github.com> committer: berkerpeksag date: 2021-01-31T07:19:07+02:00 summary: bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364) files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index d80e952ce9924..c017dacff8897 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -100,10 +100,6 @@ This example uses the iterator form:: .. seealso:: - https://github.com/ghaering/pysqlite - The pysqlite web page -- sqlite3 is developed externally under the name - "pysqlite". - https://www.sqlite.org The SQLite web page; the documentation describes the syntax and the available data types for the supported SQL dialect. From webhook-mailer at python.org Sun Jan 31 00:21:32 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Sun, 31 Jan 2021 05:21:32 -0000 Subject: [Python-checkins] bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364) Message-ID: https://github.com/python/cpython/commit/926ca51be4b9b80c41a647bbc2fb9c40ff108ff0 commit: 926ca51be4b9b80c41a647bbc2fb9c40ff108ff0 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: berkerpeksag date: 2021-01-31T07:21:28+02:00 summary: bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364) (cherry picked from commit e60344364245a23a7a1b25d5ebce6833652a656c) Co-authored-by: L <3177243+LukeLR at users.noreply.github.com> files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 7dc2cc48c4753..2e2e5e9cdae37 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -99,10 +99,6 @@ This example uses the iterator form:: .. seealso:: - https://github.com/ghaering/pysqlite - The pysqlite web page -- sqlite3 is developed externally under the name - "pysqlite". - https://www.sqlite.org The SQLite web page; the documentation describes the syntax and the available data types for the supported SQL dialect. From webhook-mailer at python.org Sun Jan 31 00:21:58 2021 From: webhook-mailer at python.org (berkerpeksag) Date: Sun, 31 Jan 2021 05:21:58 -0000 Subject: [Python-checkins] bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364) Message-ID: https://github.com/python/cpython/commit/de76ce540ed013a31d4c80bca2587a2dd7c23652 commit: de76ce540ed013a31d4c80bca2587a2dd7c23652 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: berkerpeksag date: 2021-01-31T07:21:54+02:00 summary: bpo-43059: Remove reference to legacy external sqlite3 repository (GH-24364) (cherry picked from commit e60344364245a23a7a1b25d5ebce6833652a656c) Co-authored-by: L <3177243+LukeLR at users.noreply.github.com> files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index e2e7312c27735..92d5ffaf3971c 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -99,10 +99,6 @@ This example uses the iterator form:: .. seealso:: - https://github.com/ghaering/pysqlite - The pysqlite web page -- sqlite3 is developed externally under the name - "pysqlite". - https://www.sqlite.org The SQLite web page; the documentation describes the syntax and the available data types for the supported SQL dialect. From webhook-mailer at python.org Sun Jan 31 01:07:19 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 31 Jan 2021 06:07:19 -0000 Subject: [Python-checkins] Doc: errors tutorial improvements (GH-16269) Message-ID: https://github.com/python/cpython/commit/89294e30fffe6b86c44247cbde39cc965d01d555 commit: 89294e30fffe6b86c44247cbde39cc965d01d555 branch: master author: Adorilson Bezerra committer: miss-islington <31488909+miss-islington at users.noreply.github.com> date: 2021-01-30T22:07:11-08:00 summary: Doc: errors tutorial improvements (GH-16269) Improvements: - Improvements in how try clause works section This suggestion is because the execution continues after *except*, not after *try* but before *except*. I guess this form more clear. - Surrounding some keywords with \*...\* For uniformity the highlighted terms - Adjust the number of chars per line to 80 files: M Doc/tutorial/errors.rst diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index 4a25861a050e6..fd0477f078949 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -101,29 +101,29 @@ The :keyword:`try` statement works as follows. * If no exception occurs, the *except clause* is skipped and execution of the :keyword:`try` statement is finished. -* If an exception occurs during execution of the try clause, the rest of the - clause is skipped. Then if its type matches the exception named after the - :keyword:`except` keyword, the except clause is executed, and then execution - continues after the :keyword:`try` statement. +* If an exception occurs during execution of the :keyword:`try` clause, the rest of the + clause is skipped. Then, if its type matches the exception named after the + :keyword:`except` keyword, the *except clause* is executed, and then execution + continues after the try/except block. -* If an exception occurs which does not match the exception named in the except - clause, it is passed on to outer :keyword:`try` statements; if no handler is +* If an exception occurs which does not match the exception named in the *except + clause*, it is passed on to outer :keyword:`try` statements; if no handler is found, it is an *unhandled exception* and execution stops with a message as shown above. -A :keyword:`try` statement may have more than one except clause, to specify +A :keyword:`try` statement may have more than one *except clause*, to specify handlers for different exceptions. At most one handler will be executed. -Handlers only handle exceptions that occur in the corresponding try clause, not -in other handlers of the same :keyword:`!try` statement. An except clause may -name multiple exceptions as a parenthesized tuple, for example:: +Handlers only handle exceptions that occur in the corresponding *try clause*, +not in other handlers of the same :keyword:`!try` statement. An *except clause* +may name multiple exceptions as a parenthesized tuple, for example:: ... except (RuntimeError, TypeError, NameError): ... pass A class in an :keyword:`except` clause is compatible with an exception if it is the same class or a base class thereof (but not the other way around --- an -except clause listing a derived class is not compatible with a base class). For -example, the following code will print B, C, D in that order:: +*except clause* listing a derived class is not compatible with a base class). +For example, the following code will print B, C, D in that order:: class B(Exception): pass @@ -144,10 +144,10 @@ example, the following code will print B, C, D in that order:: except B: print("B") -Note that if the except clauses were reversed (with ``except B`` first), it -would have printed B, B, B --- the first matching except clause is triggered. +Note that if the *except clauses* were reversed (with ``except B`` first), it +would have printed B, B, B --- the first matching *except clause* is triggered. -The last except clause may omit the exception name(s), to serve as a wildcard. +The last *except clause* may omit the exception name(s), to serve as a wildcard. Use this with extreme caution, since it is easy to mask a real programming error in this way! It can also be used to print an error message and then re-raise the exception (allowing a caller to handle the exception as well):: @@ -167,9 +167,9 @@ the exception (allowing a caller to handle the exception as well):: raise The :keyword:`try` ... :keyword:`except` statement has an optional *else -clause*, which, when present, must follow all except clauses. It is useful for -code that must be executed if the try clause does not raise an exception. For -example:: +clause*, which, when present, must follow all *except clauses*. It is useful +for code that must be executed if the *try clause* does not raise an exception. +For example:: for arg in sys.argv[1:]: try: @@ -189,7 +189,7 @@ When an exception occurs, it may have an associated value, also known as the exception's *argument*. The presence and type of the argument depend on the exception type. -The except clause may specify a variable after the exception name. The +The *except clause* may specify a variable after the exception name. The variable is bound to an exception instance with the arguments stored in ``instance.args``. For convenience, the exception instance defines :meth:`__str__` so the arguments can be printed directly without having to @@ -217,8 +217,8 @@ If an exception has arguments, they are printed as the last part ('detail') of the message for unhandled exceptions. Exception handlers don't just handle exceptions if they occur immediately in the -try clause, but also if they occur inside functions that are called (even -indirectly) in the try clause. For example:: +*try clause*, but also if they occur inside functions that are called (even +indirectly) in the *try clause*. For example:: >>> def this_fails(): ... x = 1/0 From webhook-mailer at python.org Sun Jan 31 08:55:22 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 13:55:22 -0000 Subject: [Python-checkins] bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350) Message-ID: https://github.com/python/cpython/commit/42b1806af90b86ec393ca7da14e99ce95ec6c53b commit: 42b1806af90b86ec393ca7da14e99ce95ec6c53b branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-31T15:55:13+02:00 summary: bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350) files: A Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst M Include/cpython/unicodeobject.h diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index f1b44554e3078..a4057fd2a13ed 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -22,7 +22,7 @@ */ #define Py_UNICODE_ISSPACE(ch) \ - ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) + ((Py_UCS4)(ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) #define Py_UNICODE_ISLOWER(ch) _PyUnicode_IsLowercase(ch) #define Py_UNICODE_ISUPPER(ch) _PyUnicode_IsUppercase(ch) diff --git a/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst new file mode 100644 index 0000000000000..7a432522db8a1 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst @@ -0,0 +1,2 @@ +Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with +signed ``wchar_t``. From webhook-mailer at python.org Sun Jan 31 09:20:19 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 31 Jan 2021 14:20:19 -0000 Subject: [Python-checkins] bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350) Message-ID: https://github.com/python/cpython/commit/995a6c015024f050b99ba8f9837dfc6b82d83f7d commit: 995a6c015024f050b99ba8f9837dfc6b82d83f7d 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-31T06:20:14-08:00 summary: bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350) (cherry picked from commit 42b1806af90b86ec393ca7da14e99ce95ec6c53b) Co-authored-by: Serhiy Storchaka files: A Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst M Include/cpython/unicodeobject.h diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 1fc732abeb555..503b079db275a 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -22,7 +22,7 @@ extern "C" { */ #define Py_UNICODE_ISSPACE(ch) \ - ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) + ((Py_UCS4)(ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) #define Py_UNICODE_ISLOWER(ch) _PyUnicode_IsLowercase(ch) #define Py_UNICODE_ISUPPER(ch) _PyUnicode_IsUppercase(ch) diff --git a/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst new file mode 100644 index 0000000000000..7a432522db8a1 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst @@ -0,0 +1,2 @@ +Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with +signed ``wchar_t``. From webhook-mailer at python.org Sun Jan 31 09:46:26 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 14:46:26 -0000 Subject: [Python-checkins] bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350) (GH-24397) Message-ID: https://github.com/python/cpython/commit/229ef39bcc14ee7838968dfda51d045304e5cf39 commit: 229ef39bcc14ee7838968dfda51d045304e5cf39 branch: 3.8 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: serhiy-storchaka date: 2021-01-31T16:46:17+02:00 summary: bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350) (GH-24397) (cherry picked from commit 42b1806af90b86ec393ca7da14e99ce95ec6c53b) Co-authored-by: Serhiy Storchaka files: A Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst M Include/cpython/unicodeobject.h diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 54a13e32ba22b..87ff31ddbc101 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -22,7 +22,7 @@ extern "C" { */ #define Py_UNICODE_ISSPACE(ch) \ - ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) + ((Py_UCS4)(ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) #define Py_UNICODE_ISLOWER(ch) _PyUnicode_IsLowercase(ch) #define Py_UNICODE_ISUPPER(ch) _PyUnicode_IsUppercase(ch) diff --git a/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst new file mode 100644 index 0000000000000..7a432522db8a1 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst @@ -0,0 +1,2 @@ +Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with +signed ``wchar_t``. From webhook-mailer at python.org Sun Jan 31 10:22:31 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 15:22:31 -0000 Subject: [Python-checkins] bpo-43016: Rewrite tests for curses (GH-24312) Message-ID: https://github.com/python/cpython/commit/d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b commit: d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-31T17:22:27+02:00 summary: bpo-43016: Rewrite tests for curses (GH-24312) files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index f2cad05b2c92e..29286bce99e89 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -1,18 +1,9 @@ -# -# Test script for the curses module -# -# 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() -# Only called, not tested: getmouse(), ungetmouse() -# - +import functools +import inspect import os import string import sys import tempfile -import functools import unittest from test.support import requires, verbose, SaveSignals @@ -21,7 +12,6 @@ # Optionally test curses module. This currently requires that the # 'curses' resource be given on the regrtest command line using the -u # option. If not available, nothing after this line will be executed. -import inspect requires('curses') # If either of these don't exist, skip the tests. @@ -37,6 +27,17 @@ def requires_curses_func(name): return unittest.skipUnless(hasattr(curses, name), 'requires curses.%s' % name) +def requires_curses_window_meth(name): + def deco(test): + @functools.wraps(test) + def wrapped(self, *args, **kwargs): + if not hasattr(self.stdscr, name): + raise unittest.SkipTest('requires curses.window.%s' % name) + test(self, *args, **kwargs) + return wrapped + return deco + + def requires_colors(test): @functools.wraps(test) def wrapped(self, *args, **kwargs): @@ -111,213 +112,732 @@ def setUp(self): curses.savetty() self.addCleanup(curses.endwin) self.addCleanup(curses.resetty) + self.stdscr.erase() + + @requires_curses_func('filter') + def test_filter(self): + # TODO: Should be called before initscr() or newterm() are called. + # TODO: nofilter() + curses.filter() + + @requires_curses_func('use_env') + def test_use_env(self): + # TODO: Should be called before initscr() or newterm() are called. + # TODO: use_tioctl() + curses.use_env(False) + curses.use_env(True) + + def test_create_windows(self): + win = curses.newwin(5, 10) + self.assertEqual(win.getbegyx(), (0, 0)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (5, 10)) + + win = curses.newwin(10, 15, 2, 5) + self.assertEqual(win.getbegyx(), (2, 5)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (10, 15)) + + win2 = win.subwin(3, 7) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (9, 13)) + + win2 = win.subwin(5, 10, 3, 7) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + + win3 = win.derwin(2, 3) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (8, 12)) + + win3 = win.derwin(6, 11, 2, 3) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + win.mvwin(0, 1) + self.assertEqual(win.getbegyx(), (0, 1)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (10, 15)) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + win2.mvderwin(2, 1) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (2, 1)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + + win3.mvderwin(2, 1) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 1)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + def test_move_cursor(self): + stdscr = self.stdscr + win = stdscr.subwin(10, 15, 2, 5) + stdscr.move(1, 2) + win.move(2, 4) + self.assertEqual(stdscr.getyx(), (1, 2)) + self.assertEqual(win.getyx(), (2, 4)) + + win.cursyncup() + self.assertEqual(stdscr.getyx(), (4, 9)) - def test_window_funcs(self): - "Test the methods of windows" + def test_refresh_control(self): + stdscr = self.stdscr + # touchwin()/untouchwin()/is_wintouched() + stdscr.refresh() + self.assertIs(stdscr.is_wintouched(), False) + stdscr.touchwin() + self.assertIs(stdscr.is_wintouched(), True) + stdscr.refresh() + self.assertIs(stdscr.is_wintouched(), False) + stdscr.touchwin() + self.assertIs(stdscr.is_wintouched(), True) + stdscr.untouchwin() + self.assertIs(stdscr.is_wintouched(), False) + + # touchline()/untouchline()/is_linetouched() + stdscr.touchline(5, 2) + self.assertIs(stdscr.is_linetouched(5), True) + self.assertIs(stdscr.is_linetouched(6), True) + self.assertIs(stdscr.is_wintouched(), True) + stdscr.touchline(5, 1, False) + self.assertIs(stdscr.is_linetouched(5), False) + + # syncup() + win = stdscr.subwin(10, 15, 2, 5) + win2 = win.subwin(5, 10, 3, 7) + win2.touchwin() + stdscr.untouchwin() + win2.syncup() + self.assertIs(win.is_wintouched(), True) + self.assertIs(stdscr.is_wintouched(), True) + + # syncdown() + stdscr.touchwin() + win.untouchwin() + win2.untouchwin() + win2.syncdown() + self.assertIs(win2.is_wintouched(), True) + + # syncok() + if hasattr(stdscr, 'syncok') and not sys.platform.startswith("sunos"): + win.untouchwin() + stdscr.untouchwin() + for syncok in [False, True]: + win2.syncok(syncok) + win2.addch('a') + self.assertIs(win.is_wintouched(), syncok) + self.assertIs(stdscr.is_wintouched(), syncok) + + def test_output_character(self): + stdscr = self.stdscr + # addch() + stdscr.refresh() + stdscr.move(0, 0) + stdscr.addch('A') + stdscr.addch(b'A') + stdscr.addch(65) + stdscr.addch('\u20ac') + stdscr.addch('A', curses.A_BOLD) + stdscr.addch(1, 2, 'A') + stdscr.addch(2, 3, 'A', curses.A_BOLD) + self.assertIs(stdscr.is_wintouched(), True) + + # echochar() + stdscr.refresh() + stdscr.move(0, 0) + stdscr.echochar('A') + stdscr.echochar(b'A') + stdscr.echochar(65) + self.assertRaises(OverflowError, stdscr.echochar, '\u20ac') + stdscr.echochar('A', curses.A_BOLD) + self.assertIs(stdscr.is_wintouched(), False) + + def test_output_string(self): + stdscr = self.stdscr + # addstr()/insstr() + for func in [stdscr.addstr, stdscr.insstr]: + with self.subTest(func.__qualname__): + stdscr.move(0, 0) + func('abcd') + func(b'abcd') + func('????') + func('abcd', curses.A_BOLD) + func(1, 2, 'abcd') + func(2, 3, 'abcd', curses.A_BOLD) + + # addnstr()/insnstr() + for func in [stdscr.addnstr, stdscr.insnstr]: + with self.subTest(func.__qualname__): + stdscr.move(0, 0) + func('1234', 3) + func(b'1234', 3) + func('\u0661\u0662\u0663\u0664', 3) + func('1234', 5) + func('1234', 3, curses.A_BOLD) + func(1, 2, '1234', 3) + func(2, 3, '1234', 3, curses.A_BOLD) + + def test_output_string_embedded_null_chars(self): + # reject embedded null bytes and characters stdscr = self.stdscr - win = curses.newwin(10,10) - win = curses.newwin(5,5, 5,5) - win2 = curses.newwin(15,15, 5,5) - - for meth in [stdscr.addch, stdscr.addstr]: - for args in [('a',), ('a', curses.A_BOLD), - (4,4, 'a'), (5,5, 'a', curses.A_BOLD)]: - with self.subTest(meth=meth.__qualname__, args=args): - meth(*args) - - for meth in [stdscr.clear, stdscr.clrtobot, - stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, - stdscr.deleteln, stdscr.erase, stdscr.getbegyx, - stdscr.getbkgd, stdscr.getmaxyx, - stdscr.getparyx, stdscr.getyx, stdscr.inch, - stdscr.insertln, stdscr.instr, stdscr.is_wintouched, - win.noutrefresh, stdscr.redrawwin, stdscr.refresh, - stdscr.standout, stdscr.standend, stdscr.syncdown, - stdscr.syncup, stdscr.touchwin, stdscr.untouchwin]: - with self.subTest(meth=meth.__qualname__): - meth() - - stdscr.addnstr('1234', 3) - stdscr.addnstr('1234', 3, curses.A_BOLD) - stdscr.addnstr(4,4, '1234', 3) - stdscr.addnstr(5,5, '1234', 3, curses.A_BOLD) - - stdscr.attron(curses.A_BOLD) - stdscr.attroff(curses.A_BOLD) - stdscr.attrset(curses.A_BOLD) - stdscr.bkgd(' ') - stdscr.bkgd(' ', curses.A_REVERSE) - stdscr.bkgdset(' ') - stdscr.bkgdset(' ', curses.A_REVERSE) + for arg in ['a\0', b'a\0']: + with self.subTest(arg=arg): + self.assertRaises(ValueError, stdscr.addstr, arg) + self.assertRaises(ValueError, stdscr.addnstr, arg, 1) + self.assertRaises(ValueError, stdscr.insstr, arg) + self.assertRaises(ValueError, stdscr.insnstr, arg, 1) - win.border(65, 66, 67, 68, - 69, 70, 71, 72) + def test_read_from_window(self): + stdscr = self.stdscr + stdscr.addstr(0, 1, 'ABCD', curses.A_BOLD) + # inch() + stdscr.move(0, 1) + self.assertEqual(stdscr.inch(), 65 | curses.A_BOLD) + self.assertEqual(stdscr.inch(0, 3), 67 | curses.A_BOLD) + stdscr.move(0, 0) + # instr() + self.assertEqual(stdscr.instr()[:6], b' ABCD ') + self.assertEqual(stdscr.instr(3)[:6], b' AB') + self.assertEqual(stdscr.instr(0, 2)[:4], b'BCD ') + self.assertEqual(stdscr.instr(0, 2, 4), b'BCD ') + self.assertRaises(ValueError, stdscr.instr, -2) + self.assertRaises(ValueError, stdscr.instr, 0, 2, -2) + + def test_getch(self): + win = curses.newwin(5, 12, 5, 2) + + # TODO: Test with real input by writing to master fd. + for c in 'spam\n'[::-1]: + curses.ungetch(c) + self.assertEqual(win.getch(3, 1), b's'[0]) + self.assertEqual(win.getyx(), (3, 1)) + self.assertEqual(win.getch(3, 4), b'p'[0]) + self.assertEqual(win.getyx(), (3, 4)) + self.assertEqual(win.getch(), b'a'[0]) + self.assertEqual(win.getyx(), (3, 4)) + self.assertEqual(win.getch(), b'm'[0]) + self.assertEqual(win.getch(), b'\n'[0]) + + def test_getstr(self): + win = curses.newwin(5, 12, 5, 2) + curses.echo() + self.addCleanup(curses.noecho) + + self.assertRaises(ValueError, win.getstr, -400) + self.assertRaises(ValueError, win.getstr, 2, 3, -400) + + # TODO: Test with real input by writing to master fd. + for c in 'Lorem\nipsum\ndolor\nsit\namet\n'[::-1]: + curses.ungetch(c) + self.assertEqual(win.getstr(3, 1, 2), b'Lo') + self.assertEqual(win.instr(3, 0), b' Lo ') + self.assertEqual(win.getstr(3, 5, 10), b'ipsum') + self.assertEqual(win.instr(3, 0), b' Lo ipsum ') + self.assertEqual(win.getstr(1, 5), b'dolor') + self.assertEqual(win.instr(1, 0), b' dolor ') + self.assertEqual(win.getstr(2), b'si') + self.assertEqual(win.instr(1, 0), b'si dolor ') + self.assertEqual(win.getstr(), b'amet') + self.assertEqual(win.instr(1, 0), b'amet dolor ') + + def test_clear(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + + win.move(0, 8) + win.clrtoeol() + self.assertEqual(win.instr(0, 0).rstrip(), b'Lorem ip') + self.assertEqual(win.instr(1, 0).rstrip(), b'dolor sit amet,') + + win.move(0, 3) + win.clrtobot() + self.assertEqual(win.instr(0, 0).rstrip(), b'Lor') + self.assertEqual(win.instr(1, 0).rstrip(), b'') + + for func in [win.erase, win.clear]: + lorem_ipsum(win) + func() + self.assertEqual(win.instr(0, 0).rstrip(), b'') + self.assertEqual(win.instr(1, 0).rstrip(), b'') + + def test_insert_delete(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + + win.move(0, 2) + win.delch() + self.assertEqual(win.instr(0, 0), b'Loem ipsum ') + win.delch(0, 7) + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + + win.move(1, 5) + win.deleteln() + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + self.assertEqual(win.instr(1, 0), b'consectetur ') + self.assertEqual(win.instr(2, 0), b'adipiscing elit') + self.assertEqual(win.instr(3, 0), b'sed do eiusmod ') + self.assertEqual(win.instr(4, 0), b' ') + + win.move(1, 5) + win.insertln() + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + self.assertEqual(win.instr(1, 0), b' ') + self.assertEqual(win.instr(2, 0), b'consectetur ') + + win.clear() + lorem_ipsum(win) + win.move(1, 5) + win.insdelln(2) + self.assertEqual(win.instr(0, 0), b'Lorem ipsum ') + self.assertEqual(win.instr(1, 0), b' ') + self.assertEqual(win.instr(2, 0), b' ') + self.assertEqual(win.instr(3, 0), b'dolor sit amet,') + + win.clear() + lorem_ipsum(win) + win.move(1, 5) + win.insdelln(-2) + self.assertEqual(win.instr(0, 0), b'Lorem ipsum ') + self.assertEqual(win.instr(1, 0), b'adipiscing elit') + self.assertEqual(win.instr(2, 0), b'sed do eiusmod ') + self.assertEqual(win.instr(3, 0), b' ') + + def test_scroll(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + win.scrollok(True) + win.scroll() + self.assertEqual(win.instr(0, 0), b'dolor sit amet,') + win.scroll(2) + self.assertEqual(win.instr(0, 0), b'adipiscing elit') + win.scroll(-3) + self.assertEqual(win.instr(0, 0), b' ') + self.assertEqual(win.instr(2, 0), b' ') + self.assertEqual(win.instr(3, 0), b'adipiscing elit') + win.scrollok(False) + + def test_attributes(self): + # TODO: attr_get(), attr_set(), ... + win = curses.newwin(5, 15, 5, 2) + win.attron(curses.A_BOLD) + win.attroff(curses.A_BOLD) + win.attrset(curses.A_BOLD) + + win.standout() + win.standend() + + @requires_curses_window_meth('chgat') + def test_chgat(self): + win = curses.newwin(5, 15, 5, 2) + win.addstr(2, 0, 'Lorem ipsum') + win.addstr(3, 0, 'dolor sit amet') + + win.move(2, 8) + win.chgat(curses.A_BLINK) + self.assertEqual(win.inch(2, 7), b'p'[0]) + self.assertEqual(win.inch(2, 8), b's'[0] | curses.A_BLINK) + self.assertEqual(win.inch(2, 14), b' '[0] | curses.A_BLINK) + + win.move(2, 1) + win.chgat(3, curses.A_BOLD) + self.assertEqual(win.inch(2, 0), b'L'[0]) + self.assertEqual(win.inch(2, 1), b'o'[0] | curses.A_BOLD) + self.assertEqual(win.inch(2, 3), b'e'[0] | curses.A_BOLD) + self.assertEqual(win.inch(2, 4), b'm'[0]) + + win.chgat(3, 2, curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 1), b'o'[0]) + self.assertEqual(win.inch(3, 2), b'l'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 14), b' '[0] | curses.A_UNDERLINE) + + win.chgat(3, 4, 7, curses.A_BLINK) + self.assertEqual(win.inch(3, 3), b'o'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 4), b'r'[0] | curses.A_BLINK) + self.assertEqual(win.inch(3, 10), b'a'[0] | curses.A_BLINK) + self.assertEqual(win.inch(3, 11), b'm'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 14), b' '[0] | curses.A_UNDERLINE) + + def test_background(self): + win = curses.newwin(5, 15, 5, 2) + win.addstr(0, 0, 'Lorem ipsum') + + self.assertEqual(win.getbkgd(), 0) + + # bkgdset() + win.bkgdset('_') + self.assertEqual(win.getbkgd(), b'_'[0]) + win.bkgdset(b'#') + self.assertEqual(win.getbkgd(), b'#'[0]) + win.bkgdset(65) + self.assertEqual(win.getbkgd(), 65) + win.bkgdset(0) + self.assertEqual(win.getbkgd(), 32) + + win.bkgdset('#', curses.A_REVERSE) + self.assertEqual(win.getbkgd(), b'#'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 0), b'L'[0]) + self.assertEqual(win.inch(0, 5), b' '[0]) + win.bkgdset(0) + + # bkgd() + win.bkgd('_') + self.assertEqual(win.getbkgd(), b'_'[0]) + self.assertEqual(win.inch(0, 0), b'L'[0]) + self.assertEqual(win.inch(0, 5), b'_'[0]) + + win.bkgd('#', curses.A_REVERSE) + self.assertEqual(win.getbkgd(), b'#'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 0), b'L'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 5), b'#'[0] | curses.A_REVERSE) + + def test_overlay(self): + srcwin = curses.newwin(5, 18, 3, 4) + lorem_ipsum(srcwin) + dstwin = curses.newwin(7, 17, 5, 7) + for i in range(6): + dstwin.addstr(i, 0, '_'*17) + + srcwin.overlay(dstwin) + self.assertEqual(dstwin.instr(0, 0), b'sectetur_________') + self.assertEqual(dstwin.instr(1, 0), b'piscing_elit,____') + self.assertEqual(dstwin.instr(2, 0), b'_do_eiusmod______') + self.assertEqual(dstwin.instr(3, 0), b'_________________') + + srcwin.overwrite(dstwin) + self.assertEqual(dstwin.instr(0, 0), b'sectetur __') + self.assertEqual(dstwin.instr(1, 0), b'piscing elit, __') + self.assertEqual(dstwin.instr(2, 0), b' do eiusmod __') + self.assertEqual(dstwin.instr(3, 0), b'_________________') + + srcwin.overlay(dstwin, 1, 4, 3, 2, 4, 11) + self.assertEqual(dstwin.instr(3, 0), b'__r_sit_amet_____') + self.assertEqual(dstwin.instr(4, 0), b'__ectetur________') + self.assertEqual(dstwin.instr(5, 0), b'_________________') + + srcwin.overwrite(dstwin, 1, 4, 3, 2, 4, 11) + self.assertEqual(dstwin.instr(3, 0), b'__r sit amet_____') + self.assertEqual(dstwin.instr(4, 0), b'__ectetur _____') + self.assertEqual(dstwin.instr(5, 0), b'_________________') + + def test_refresh(self): + win = curses.newwin(5, 15, 2, 5) + win.noutrefresh() + win.redrawln(1, 2) + win.redrawwin() + win.refresh() + curses.doupdate() + + @requires_curses_window_meth('resize') + def test_resize(self): + win = curses.newwin(5, 15, 2, 5) + win.resize(4, 20) + self.assertEqual(win.getmaxyx(), (4, 20)) + win.resize(5, 15) + self.assertEqual(win.getmaxyx(), (5, 15)) + + @requires_curses_window_meth('enclose') + def test_enclose(self): + win = curses.newwin(5, 15, 2, 5) + # TODO: Return bool instead of 1/0 + self.assertTrue(win.enclose(2, 5)) + self.assertFalse(win.enclose(1, 5)) + self.assertFalse(win.enclose(2, 4)) + self.assertTrue(win.enclose(6, 19)) + self.assertFalse(win.enclose(7, 19)) + self.assertFalse(win.enclose(6, 20)) + + def test_putwin(self): + win = curses.newwin(5, 12, 1, 2) + win.addstr(2, 1, 'Lorem ipsum') + with tempfile.TemporaryFile() as f: + win.putwin(f) + del win + f.seek(0) + win = curses.getwin(f) + self.assertEqual(win.getbegyx(), (1, 2)) + self.assertEqual(win.getmaxyx(), (5, 12)) + self.assertEqual(win.instr(2, 0), b' Lorem ipsum') + + def test_borders_and_lines(self): + win = curses.newwin(5, 10, 5, 2) win.border('|', '!', '-', '_', '+', '\\', '#', '/') - with self.assertRaises(TypeError, - msg="Expected win.border() to raise TypeError"): - win.border(65, 66, 67, 68, - 69, [], 71, 72) - - win.box(65, 67) - win.box('!', '_') + self.assertEqual(win.instr(0, 0), b'+--------\\') + self.assertEqual(win.instr(1, 0), b'| !') + self.assertEqual(win.instr(4, 0), b'#________/') + win.border(b'|', b'!', b'-', b'_', + b'+', b'\\', b'#', b'/') + win.border(65, 66, 67, 68, + 69, 70, 71, 72) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, [], 71, 72) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, 70, 71, 72, 73) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, 70, 71, 72, 73) + win.border(65, 66, 67, 68, 69, 70, 71) + win.border(65, 66, 67, 68, 69, 70) + win.border(65, 66, 67, 68, 69) + win.border(65, 66, 67, 68) + win.border(65, 66, 67) + win.border(65, 66) + win.border(65) + win.border() + + win.box(':', '~') + self.assertEqual(win.instr(0, 1, 8), b'~~~~~~~~') + self.assertEqual(win.instr(1, 0), b': :') + self.assertEqual(win.instr(4, 1, 8), b'~~~~~~~~') win.box(b':', b'~') + win.box(65, 67) self.assertRaises(TypeError, win.box, 65, 66, 67) self.assertRaises(TypeError, win.box, 65) win.box() - stdscr.clearok(1) + win.move(1, 2) + win.hline('-', 5) + self.assertEqual(win.instr(1, 1, 7), b' ----- ') + win.hline(b'-', 5) + win.hline(45, 5) + win.hline('-', 5, curses.A_BOLD) + win.hline(1, 1, '-', 5) + win.hline(1, 1, '-', 5, curses.A_BOLD) + + win.move(1, 2) + win.vline('a', 3) + win.vline(b'a', 3) + win.vline(97, 3) + win.vline('a', 3, curses.A_STANDOUT) + win.vline(1, 1, 'a', 3) + win.vline(1, 1, ';', 2, curses.A_STANDOUT) + self.assertEqual(win.inch(1, 1), b';'[0] | curses.A_STANDOUT) + self.assertEqual(win.inch(2, 1), b';'[0] | curses.A_STANDOUT) + self.assertEqual(win.inch(3, 1), b'a'[0]) + + def test_unctrl(self): + # TODO: wunctrl() + self.assertEqual(curses.unctrl(b'A'), b'A') + self.assertEqual(curses.unctrl('A'), b'A') + self.assertEqual(curses.unctrl(65), b'A') + self.assertEqual(curses.unctrl(b'\n'), b'^J') + self.assertEqual(curses.unctrl('\n'), b'^J') + self.assertEqual(curses.unctrl(10), b'^J') + self.assertRaises(TypeError, curses.unctrl, b'') + self.assertRaises(TypeError, curses.unctrl, b'AB') + self.assertRaises(TypeError, curses.unctrl, '') + self.assertRaises(TypeError, curses.unctrl, 'AB') + self.assertRaises(OverflowError, curses.unctrl, 2**64) + + def test_endwin(self): + if not self.isatty: + self.skipTest('requires terminal') + self.assertIs(curses.isendwin(), False) + curses.endwin() + self.assertIs(curses.isendwin(), True) + curses.doupdate() + self.assertIs(curses.isendwin(), False) + + def test_terminfo(self): + self.assertIsInstance(curses.tigetflag('hc'), int) + self.assertEqual(curses.tigetflag('cols'), -1) + self.assertEqual(curses.tigetflag('cr'), -1) + + self.assertIsInstance(curses.tigetnum('cols'), int) + self.assertEqual(curses.tigetnum('hc'), -2) + self.assertEqual(curses.tigetnum('cr'), -2) + + self.assertIsInstance(curses.tigetstr('cr'), (bytes, type(None))) + self.assertIsNone(curses.tigetstr('hc')) + self.assertIsNone(curses.tigetstr('cols')) + + cud = curses.tigetstr('cud') + if cud is not None: + # See issue10570. + self.assertIsInstance(cud, bytes) + curses.tparm(cud, 2) + cud_2 = curses.tparm(cud, 2) + self.assertIsInstance(cud_2, bytes) + curses.putp(cud_2) + + curses.putp(b'abc\n') + + def test_misc_module_funcs(self): + curses.delay_output(1) + curses.flushinp() - win4 = stdscr.derwin(2,2) - win4 = stdscr.derwin(1,1, 5,5) - win4.mvderwin(9,9) + curses.doupdate() + self.assertIs(curses.isendwin(), False) - stdscr.echochar('a') - stdscr.echochar('a', curses.A_BOLD) - stdscr.hline('-', 5) - stdscr.hline('-', 5, curses.A_BOLD) - stdscr.hline(1,1,'-', 5) - stdscr.hline(1,1,'-', 5, curses.A_BOLD) + curses.napms(100) + + curses.newpad(50, 50) + + def test_env_queries(self): + # TODO: term_attrs(), erasewchar(), killwchar() + self.assertIsInstance(curses.termname(), bytes) + self.assertIsInstance(curses.longname(), bytes) + self.assertIsInstance(curses.baudrate(), int) + self.assertIsInstance(curses.has_ic(), bool) + self.assertIsInstance(curses.has_il(), bool) + self.assertIsInstance(curses.termattrs(), int) + + c = curses.killchar() + self.assertIsInstance(c, bytes) + self.assertEqual(len(c), 1) + c = curses.erasechar() + self.assertIsInstance(c, bytes) + self.assertEqual(len(c), 1) + + def test_output_options(self): + stdscr = self.stdscr + + stdscr.clearok(True) + stdscr.clearok(False) + + stdscr.idcok(True) + stdscr.idcok(False) + + stdscr.idlok(False) + stdscr.idlok(True) - stdscr.idcok(1) - stdscr.idlok(1) if hasattr(stdscr, 'immedok'): - stdscr.immedok(1) - stdscr.immedok(0) - stdscr.insch('c') - stdscr.insdelln(1) - stdscr.insnstr('abc', 3) - stdscr.insnstr('abc', 3, curses.A_BOLD) - stdscr.insnstr(5, 5, 'abc', 3) - stdscr.insnstr(5, 5, 'abc', 3, curses.A_BOLD) - - stdscr.insstr('def') - stdscr.insstr('def', curses.A_BOLD) - stdscr.insstr(5, 5, 'def') - stdscr.insstr(5, 5, 'def', curses.A_BOLD) - stdscr.is_linetouched(0) - stdscr.keypad(1) - stdscr.leaveok(1) - stdscr.move(3,3) - win.mvwin(2,2) - stdscr.nodelay(1) - stdscr.notimeout(1) - win2.overlay(win) - win2.overwrite(win) - win2.overlay(win, 1, 2, 2, 1, 3, 3) - win2.overwrite(win, 1, 2, 2, 1, 3, 3) - stdscr.redrawln(1,2) - - stdscr.scrollok(1) - stdscr.scroll() - stdscr.scroll(2) - stdscr.scroll(-3) - - stdscr.move(12, 2) - stdscr.setscrreg(10,15) - win3 = stdscr.subwin(10,10) - win3 = stdscr.subwin(10,10, 5,5) - if hasattr(stdscr, 'syncok') and not sys.platform.startswith("sunos"): - stdscr.syncok(1) - stdscr.timeout(5) - stdscr.touchline(5,5) - stdscr.touchline(5,5,0) - stdscr.vline('a', 3) - stdscr.vline('a', 3, curses.A_STANDOUT) - if hasattr(stdscr, 'chgat'): - stdscr.chgat(5, 2, 3, curses.A_BLINK) - stdscr.chgat(3, curses.A_BOLD) - stdscr.chgat(5, 8, curses.A_UNDERLINE) - stdscr.chgat(curses.A_BLINK) - stdscr.refresh() + stdscr.immedok(True) + stdscr.immedok(False) - stdscr.vline(1,1, 'a', 3) - stdscr.vline(1,1, 'a', 3, curses.A_STANDOUT) + stdscr.leaveok(True) + stdscr.leaveok(False) - if hasattr(stdscr, 'resize'): - stdscr.resize(25, 80) - if hasattr(stdscr, 'enclose'): - stdscr.enclose(10, 10) + stdscr.scrollok(True) + stdscr.scrollok(False) - with tempfile.TemporaryFile() as f: - self.stdscr.putwin(f) - f.seek(0) - curses.getwin(f) + stdscr.setscrreg(5, 10) - self.assertRaises(ValueError, stdscr.getstr, -400) - self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400) - self.assertRaises(ValueError, stdscr.instr, -2) - self.assertRaises(ValueError, stdscr.instr, 2, 3, -2) + curses.nonl() + curses.nl(True) + curses.nl(False) + curses.nl() - def test_embedded_null_chars(self): - # reject embedded null bytes and characters + + def test_input_options(self): stdscr = self.stdscr - for arg in ['a', b'a']: - with self.subTest(arg=arg): - self.assertRaises(ValueError, stdscr.addstr, 'a\0') - self.assertRaises(ValueError, stdscr.addnstr, 'a\0', 1) - self.assertRaises(ValueError, stdscr.insstr, 'a\0') - self.assertRaises(ValueError, stdscr.insnstr, 'a\0', 1) - - def test_module_funcs(self): - "Test module-level functions" - for func in [curses.baudrate, curses.beep, curses.can_change_color, - curses.doupdate, curses.flash, curses.flushinp, - curses.has_colors, curses.has_ic, curses.has_il, - curses.isendwin, curses.killchar, curses.longname, - 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'): - curses.getsyx() - - # Functions that actually need arguments - if curses.tigetstr("cnorm"): - curses.curs_set(1) - curses.delay_output(1) - curses.echo() ; curses.echo(1) + curses.nocbreak() + curses.cbreak() + curses.cbreak(False) + curses.cbreak(True) + + curses.intrflush(True) + curses.intrflush(False) + + curses.raw() + curses.raw(False) + curses.raw(True) + curses.noraw() + curses.noecho() + curses.echo() + curses.echo(False) + curses.echo(True) + + curses.halfdelay(255) curses.halfdelay(1) - if self.isatty: - curses.intrflush(1) - curses.meta(1) - curses.napms(100) - curses.newpad(50,50) - win = curses.newwin(5,5) - win = curses.newwin(5,5, 1,1) - curses.nl() ; curses.nl(1) - curses.putp(b'abc') + + stdscr.keypad(True) + stdscr.keypad(False) + + curses.meta(True) + curses.meta(False) + + stdscr.nodelay(True) + stdscr.nodelay(False) + + curses.noqiflush() + curses.qiflush(True) + curses.qiflush(False) curses.qiflush() - if self.isatty: - curses.raw() ; curses.raw(1) + + stdscr.notimeout(True) + stdscr.notimeout(False) + + stdscr.timeout(-1) + stdscr.timeout(0) + stdscr.timeout(5) + + @requires_curses_func('typeahead') + def test_typeahead(self): + curses.typeahead(sys.__stdin__.fileno()) + curses.typeahead(-1) + + def test_prog_mode(self): + if not self.isatty: + self.skipTest('requires terminal') + curses.def_prog_mode() + curses.reset_prog_mode() + + def test_beep(self): + if (curses.tigetstr("bel") is not None + or curses.tigetstr("flash") is not None): + curses.beep() + else: + try: + curses.beep() + except curses.error: + self.skipTest('beep() failed') + + def test_flash(self): + if (curses.tigetstr("bel") is not None + or curses.tigetstr("flash") is not None): + curses.flash() + else: + try: + curses.flash() + except curses.error: + self.skipTest('flash() failed') + + def test_curs_set(self): + for vis, cap in [(0, 'civis'), (2, 'cvvis'), (1, 'cnorm')]: + if curses.tigetstr(cap) is not None: + curses.curs_set(vis) + else: + try: + curses.curs_set(vis) + except curses.error: + pass + + @requires_curses_func('get_escdelay') + def test_escdelay(self): + escdelay = curses.get_escdelay() + self.assertIsInstance(escdelay, int) curses.set_escdelay(25) self.assertEqual(curses.get_escdelay(), 25) + curses.set_escdelay(escdelay) + + @requires_curses_func('get_tabsize') + def test_tabsize(self): + tabsize = curses.get_tabsize() + self.assertIsInstance(tabsize, int) curses.set_tabsize(4) self.assertEqual(curses.get_tabsize(), 4) - if hasattr(curses, 'setsyx'): - curses.setsyx(5,5) - curses.tigetflag('hc') - curses.tigetnum('co') - curses.tigetstr('cr') - curses.tparm(b'cr') - if hasattr(curses, 'typeahead'): - curses.typeahead(sys.__stdin__.fileno()) - curses.unctrl('a') - curses.ungetch('a') - if hasattr(curses, 'use_env'): - curses.use_env(1) - - # Functions only available on a few platforms + curses.set_tabsize(tabsize) + + @requires_curses_func('getsyx') + def test_getsyx(self): + y, x = curses.getsyx() + self.assertIsInstance(y, int) + self.assertIsInstance(x, int) + curses.setsyx(4, 5) + self.assertEqual(curses.getsyx(), (4, 5)) def bad_colors(self): return (-1, curses.COLORS, -2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) @@ -328,6 +848,10 @@ def bad_colors2(self): def bad_pairs(self): return (-1, -2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + def test_has_colors(self): + self.assertIsInstance(curses.has_colors(), bool) + self.assertIsInstance(curses.can_change_color(), bool) + def test_start_color(self): if not curses.has_colors(): self.skipTest('requires colors support') @@ -348,7 +872,7 @@ def test_color_content(self): @requires_colors def test_init_color(self): - if not curses.can_change_color: + if not curses.can_change_color(): self.skipTest('cannot change color') old = curses.color_content(0) @@ -435,14 +959,22 @@ def test_color_attrs(self): @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() + old = curses.pair_content(0) + try: + curses.use_default_colors() + except curses.error: + self.skipTest('cannot change color (use_default_colors() failed)') self.assertEqual(curses.pair_content(0), (-1, -1)) + self.assertIn(old, [(curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1), (0, 0)]) - @requires_curses_func('keyname') def test_keyname(self): - curses.keyname(13) + # TODO: key_name() + self.assertEqual(curses.keyname(65), b'A') + self.assertEqual(curses.keyname(13), b'^M') + self.assertEqual(curses.keyname(127), b'^?') + self.assertEqual(curses.keyname(0), b'^@') + self.assertRaises(ValueError, curses.keyname, -1) + self.assertIsInstance(curses.keyname(256), bytes) @requires_curses_func('has_key') def test_has_key(self): @@ -498,22 +1030,46 @@ def test_new_curses_panel(self): @requires_curses_func('is_term_resized') def test_is_term_resized(self): - curses.is_term_resized(*self.stdscr.getmaxyx()) + lines, cols = curses.LINES, curses.COLS + self.assertIs(curses.is_term_resized(lines, cols), False) + self.assertIs(curses.is_term_resized(lines-1, cols-1), True) @requires_curses_func('resize_term') def test_resize_term(self): - curses.resize_term(*self.stdscr.getmaxyx()) + curses.update_lines_cols() + lines, cols = curses.LINES, curses.COLS + new_lines = lines - 1 + new_cols = cols + 1 + curses.resize_term(new_lines, new_cols) + self.assertEqual(curses.LINES, new_lines) + self.assertEqual(curses.COLS, new_cols) + + curses.resize_term(lines, cols) + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) @requires_curses_func('resizeterm') def test_resizeterm(self): + curses.update_lines_cols() lines, cols = curses.LINES, curses.COLS new_lines = lines - 1 new_cols = cols + 1 curses.resizeterm(new_lines, new_cols) - self.assertEqual(curses.LINES, new_lines) self.assertEqual(curses.COLS, new_cols) + curses.resizeterm(lines, cols) + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) + + def test_ungetch(self): + curses.ungetch(b'A') + self.assertEqual(self.stdscr.getkey(), 'A') + curses.ungetch('B') + self.assertEqual(self.stdscr.getkey(), 'B') + curses.ungetch(67) + self.assertEqual(self.stdscr.getkey(), 'C') + def test_issue6243(self): curses.ungetch(1025) self.stdscr.getkey() @@ -542,10 +1098,6 @@ def test_unget_wch(self): read = stdscr.get_wch() self.assertEqual(read, ch) - def test_issue10570(self): - b = curses.tparm(curses.tigetstr("cup"), 5, 3) - self.assertIs(type(b), bytes) - def test_encoding(self): stdscr = self.stdscr import codecs @@ -585,26 +1137,25 @@ def test_issue21088(self): human_readable_signature = stdscr.addch.__doc__.split("\n")[0] self.assertIn("[y, x,]", human_readable_signature) + @requires_curses_window_meth('resize') def test_issue13051(self): - stdscr = self.stdscr - if not hasattr(stdscr, 'resize'): - raise unittest.SkipTest('requires curses.window.resize') - box = curses.textpad.Textbox(stdscr, insert_mode=True) - lines, cols = stdscr.getmaxyx() - stdscr.resize(lines-2, cols-2) + win = curses.newwin(5, 15, 2, 5) + box = curses.textpad.Textbox(win, insert_mode=True) + lines, cols = win.getmaxyx() + win.resize(lines-2, cols-2) # this may cause infinite recursion, leading to a RuntimeError box._insert_printable_char('a') class MiscTests(unittest.TestCase): - @requires_curses_func('update_lines_cols') def test_update_lines_cols(self): - # this doesn't actually test that LINES and COLS are updated, - # because we can't automate changing them. See Issue #4254 for - # a manual test script. We can only test that the function - # can be called. curses.update_lines_cols() + lines, cols = curses.LINES, curses.COLS + curses.LINES = curses.COLS = 0 + curses.update_lines_cols() + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) @requires_curses_func('ncurses_version') def test_ncurses_version(self): @@ -626,6 +1177,11 @@ def test_ncurses_version(self): self.assertGreaterEqual(v.minor, 0) self.assertGreaterEqual(v.patch, 0) + def test_has_extended_color_support(self): + r = curses.has_extended_color_support() + self.assertIsInstance(r, bool) + + class TestAscii(unittest.TestCase): def test_controlnames(self): @@ -714,5 +1270,21 @@ def test_unctrl(self): self.assertEqual(unctrl(ord('\xc1')), '!A') +def lorem_ipsum(win): + text = [ + 'Lorem ipsum', + 'dolor sit amet,', + 'consectetur', + 'adipiscing elit,', + 'sed do eiusmod', + 'tempor incididunt', + 'ut labore et', + 'dolore magna', + 'aliqua.', + ] + maxy, maxx = win.getmaxyx() + for y, line in enumerate(text[:maxy]): + win.addstr(y, 0, line[:maxx - (y == maxy - 1)]) + if __name__ == '__main__': unittest.main() From webhook-mailer at python.org Sun Jan 31 10:42:50 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 15:42:50 -0000 Subject: [Python-checkins] bpo-43083: Fix error handling in _sqlite3 (GH-24395) Message-ID: https://github.com/python/cpython/commit/9073180db521dc83e6216ff0da1479d00167f643 commit: 9073180db521dc83e6216ff0da1479d00167f643 branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-31T17:42:38+02:00 summary: bpo-43083: Fix error handling in _sqlite3 (GH-24395) files: M Modules/_sqlite/connection.c M Modules/_sqlite/cursor.c diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index dbe5dd1ec13fa..370dc1a30e46a 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1772,7 +1772,11 @@ pysqlite_connection_create_collation_impl(pysqlite_Connection *self, (callable != Py_None) ? callable : NULL, (callable != Py_None) ? pysqlite_collation_callback : NULL); if (rc != SQLITE_OK) { - PyDict_DelItem(self->collations, uppercase_name); + if (callable != Py_None) { + if (PyDict_DelItem(self->collations, uppercase_name) < 0) { + PyErr_Clear(); + } + } _pysqlite_seterror(self->db, NULL); goto finally; } diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 0852aa940264a..f8fe11ed1ea75 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -567,11 +567,13 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation } if (!multiple) { - Py_DECREF(self->lastrowid); Py_BEGIN_ALLOW_THREADS lastrowid = sqlite3_last_insert_rowid(self->connection->db); Py_END_ALLOW_THREADS - self->lastrowid = PyLong_FromLongLong(lastrowid); + Py_SETREF(self->lastrowid, PyLong_FromLongLong(lastrowid)); + if (self->lastrowid == NULL) { + goto error; + } } if (rc == SQLITE_ROW) { @@ -842,8 +844,11 @@ pysqlite_cursor_fetchmany_impl(pysqlite_Cursor *self, int maxrows) } while ((row = pysqlite_cursor_iternext(self))) { - PyList_Append(list, row); - Py_XDECREF(row); + if (PyList_Append(list, row) < 0) { + Py_DECREF(row); + break; + } + Py_DECREF(row); if (++counter == maxrows) { break; @@ -877,8 +882,11 @@ pysqlite_cursor_fetchall_impl(pysqlite_Cursor *self) } while ((row = pysqlite_cursor_iternext(self))) { - PyList_Append(list, row); - Py_XDECREF(row); + if (PyList_Append(list, row) < 0) { + Py_DECREF(row); + break; + } + Py_DECREF(row); } if (PyErr_Occurred()) { From webhook-mailer at python.org Sun Jan 31 11:06:40 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 31 Jan 2021 16:06:40 -0000 Subject: [Python-checkins] bpo-43083: Fix error handling in _sqlite3 (GH-24395) Message-ID: https://github.com/python/cpython/commit/8a833a6f94d8c2baa6aa38abd9fc699881a5b0e1 commit: 8a833a6f94d8c2baa6aa38abd9fc699881a5b0e1 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-31T08:06:15-08:00 summary: bpo-43083: Fix error handling in _sqlite3 (GH-24395) (cherry picked from commit 9073180db521dc83e6216ff0da1479d00167f643) Co-authored-by: Serhiy Storchaka files: M Modules/_sqlite/connection.c M Modules/_sqlite/cursor.c diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index b80037347f13b..d20339ca3f7df 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1704,7 +1704,11 @@ pysqlite_connection_create_collation(pysqlite_Connection* self, PyObject* args) (callable != Py_None) ? callable : NULL, (callable != Py_None) ? pysqlite_collation_callback : NULL); if (rc != SQLITE_OK) { - PyDict_DelItem(self->collations, uppercase_name); + if (callable != Py_None) { + if (PyDict_DelItem(self->collations, uppercase_name) < 0) { + PyErr_Clear(); + } + } _pysqlite_seterror(self->db, NULL); goto finally; } diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 5cfb4b97d61df..dd0ce7e1ea6a3 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -569,11 +569,13 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* args) } if (!multiple) { - Py_DECREF(self->lastrowid); Py_BEGIN_ALLOW_THREADS lastrowid = sqlite3_last_insert_rowid(self->connection->db); Py_END_ALLOW_THREADS - self->lastrowid = PyLong_FromLongLong(lastrowid); + Py_SETREF(self->lastrowid, PyLong_FromLongLong(lastrowid)); + if (self->lastrowid == NULL) { + goto error; + } } if (rc == SQLITE_ROW) { @@ -802,8 +804,11 @@ PyObject* pysqlite_cursor_fetchmany(pysqlite_Cursor* self, PyObject* args, PyObj } while ((row = pysqlite_cursor_iternext(self))) { - PyList_Append(list, row); - Py_XDECREF(row); + if (PyList_Append(list, row) < 0) { + Py_DECREF(row); + break; + } + Py_DECREF(row); if (++counter == maxrows) { break; @@ -829,8 +834,11 @@ PyObject* pysqlite_cursor_fetchall(pysqlite_Cursor* self, PyObject* args) } while ((row = pysqlite_cursor_iternext(self))) { - PyList_Append(list, row); - Py_XDECREF(row); + if (PyList_Append(list, row) < 0) { + Py_DECREF(row); + break; + } + Py_DECREF(row); } if (PyErr_Occurred()) { From webhook-mailer at python.org Sun Jan 31 11:11:21 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 16:11:21 -0000 Subject: [Python-checkins] [3.9] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399) Message-ID: https://github.com/python/cpython/commit/e9d4960d15c5282904cf26e469ce7cee39f634f7 commit: e9d4960d15c5282904cf26e469ce7cee39f634f7 branch: 3.9 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-31T18:11:13+02:00 summary: [3.9] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399) (cherry picked from commit d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b) files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index de9f301737d8c..f5287e0143fcb 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -1,18 +1,9 @@ -# -# Test script for the curses module -# -# 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() -# Only called, not tested: getmouse(), ungetmouse() -# - +import functools +import inspect import os import string import sys import tempfile -import functools import unittest from test.support import requires, import_module, verbose, SaveSignals @@ -20,7 +11,6 @@ # Optionally test curses module. This currently requires that the # 'curses' resource be given on the regrtest command line using the -u # option. If not available, nothing after this line will be executed. -import inspect requires('curses') # If either of these don't exist, skip the tests. @@ -36,6 +26,17 @@ def requires_curses_func(name): return unittest.skipUnless(hasattr(curses, name), 'requires curses.%s' % name) +def requires_curses_window_meth(name): + def deco(test): + @functools.wraps(test) + def wrapped(self, *args, **kwargs): + if not hasattr(self.stdscr, name): + raise unittest.SkipTest('requires curses.window.%s' % name) + test(self, *args, **kwargs) + return wrapped + return deco + + def requires_colors(test): @functools.wraps(test) def wrapped(self, *args, **kwargs): @@ -110,212 +111,732 @@ def setUp(self): curses.savetty() self.addCleanup(curses.endwin) self.addCleanup(curses.resetty) + self.stdscr.erase() + + @requires_curses_func('filter') + def test_filter(self): + # TODO: Should be called before initscr() or newterm() are called. + # TODO: nofilter() + curses.filter() + + @requires_curses_func('use_env') + def test_use_env(self): + # TODO: Should be called before initscr() or newterm() are called. + # TODO: use_tioctl() + curses.use_env(False) + curses.use_env(True) + + def test_create_windows(self): + win = curses.newwin(5, 10) + self.assertEqual(win.getbegyx(), (0, 0)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (5, 10)) + + win = curses.newwin(10, 15, 2, 5) + self.assertEqual(win.getbegyx(), (2, 5)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (10, 15)) + + win2 = win.subwin(3, 7) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (9, 13)) + + win2 = win.subwin(5, 10, 3, 7) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + + win3 = win.derwin(2, 3) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (8, 12)) + + win3 = win.derwin(6, 11, 2, 3) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + win.mvwin(0, 1) + self.assertEqual(win.getbegyx(), (0, 1)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (10, 15)) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + win2.mvderwin(2, 1) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (2, 1)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + + win3.mvderwin(2, 1) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 1)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + def test_move_cursor(self): + stdscr = self.stdscr + win = stdscr.subwin(10, 15, 2, 5) + stdscr.move(1, 2) + win.move(2, 4) + self.assertEqual(stdscr.getyx(), (1, 2)) + self.assertEqual(win.getyx(), (2, 4)) + + win.cursyncup() + self.assertEqual(stdscr.getyx(), (4, 9)) - def test_window_funcs(self): - "Test the methods of windows" + def test_refresh_control(self): stdscr = self.stdscr - win = curses.newwin(10,10) - win = curses.newwin(5,5, 5,5) - win2 = curses.newwin(15,15, 5,5) - - for meth in [stdscr.addch, stdscr.addstr]: - for args in [('a',), ('a', curses.A_BOLD), - (4,4, 'a'), (5,5, 'a', curses.A_BOLD)]: - with self.subTest(meth=meth.__qualname__, args=args): - meth(*args) - - for meth in [stdscr.clear, stdscr.clrtobot, - stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, - stdscr.deleteln, stdscr.erase, stdscr.getbegyx, - stdscr.getbkgd, stdscr.getmaxyx, - stdscr.getparyx, stdscr.getyx, stdscr.inch, - stdscr.insertln, stdscr.instr, stdscr.is_wintouched, - win.noutrefresh, stdscr.redrawwin, stdscr.refresh, - stdscr.standout, stdscr.standend, stdscr.syncdown, - stdscr.syncup, stdscr.touchwin, stdscr.untouchwin]: - with self.subTest(meth=meth.__qualname__): - meth() - - stdscr.addnstr('1234', 3) - stdscr.addnstr('1234', 3, curses.A_BOLD) - stdscr.addnstr(4,4, '1234', 3) - stdscr.addnstr(5,5, '1234', 3, curses.A_BOLD) - - stdscr.attron(curses.A_BOLD) - stdscr.attroff(curses.A_BOLD) - stdscr.attrset(curses.A_BOLD) - stdscr.bkgd(' ') - stdscr.bkgd(' ', curses.A_REVERSE) - stdscr.bkgdset(' ') - stdscr.bkgdset(' ', curses.A_REVERSE) + # touchwin()/untouchwin()/is_wintouched() + stdscr.refresh() + self.assertIs(stdscr.is_wintouched(), False) + stdscr.touchwin() + self.assertIs(stdscr.is_wintouched(), True) + stdscr.refresh() + self.assertIs(stdscr.is_wintouched(), False) + stdscr.touchwin() + self.assertIs(stdscr.is_wintouched(), True) + stdscr.untouchwin() + self.assertIs(stdscr.is_wintouched(), False) + + # touchline()/untouchline()/is_linetouched() + stdscr.touchline(5, 2) + self.assertIs(stdscr.is_linetouched(5), True) + self.assertIs(stdscr.is_linetouched(6), True) + self.assertIs(stdscr.is_wintouched(), True) + stdscr.touchline(5, 1, False) + self.assertIs(stdscr.is_linetouched(5), False) + + # syncup() + win = stdscr.subwin(10, 15, 2, 5) + win2 = win.subwin(5, 10, 3, 7) + win2.touchwin() + stdscr.untouchwin() + win2.syncup() + self.assertIs(win.is_wintouched(), True) + self.assertIs(stdscr.is_wintouched(), True) + + # syncdown() + stdscr.touchwin() + win.untouchwin() + win2.untouchwin() + win2.syncdown() + self.assertIs(win2.is_wintouched(), True) + + # syncok() + if hasattr(stdscr, 'syncok') and not sys.platform.startswith("sunos"): + win.untouchwin() + stdscr.untouchwin() + for syncok in [False, True]: + win2.syncok(syncok) + win2.addch('a') + self.assertIs(win.is_wintouched(), syncok) + self.assertIs(stdscr.is_wintouched(), syncok) + + def test_output_character(self): + stdscr = self.stdscr + # addch() + stdscr.refresh() + stdscr.move(0, 0) + stdscr.addch('A') + stdscr.addch(b'A') + stdscr.addch(65) + stdscr.addch('\u20ac') + stdscr.addch('A', curses.A_BOLD) + stdscr.addch(1, 2, 'A') + stdscr.addch(2, 3, 'A', curses.A_BOLD) + self.assertIs(stdscr.is_wintouched(), True) + + # echochar() + stdscr.refresh() + stdscr.move(0, 0) + stdscr.echochar('A') + stdscr.echochar(b'A') + stdscr.echochar(65) + self.assertRaises(OverflowError, stdscr.echochar, '\u20ac') + stdscr.echochar('A', curses.A_BOLD) + self.assertIs(stdscr.is_wintouched(), False) + + def test_output_string(self): + stdscr = self.stdscr + # addstr()/insstr() + for func in [stdscr.addstr, stdscr.insstr]: + with self.subTest(func.__qualname__): + stdscr.move(0, 0) + func('abcd') + func(b'abcd') + func('????') + func('abcd', curses.A_BOLD) + func(1, 2, 'abcd') + func(2, 3, 'abcd', curses.A_BOLD) + + # addnstr()/insnstr() + for func in [stdscr.addnstr, stdscr.insnstr]: + with self.subTest(func.__qualname__): + stdscr.move(0, 0) + func('1234', 3) + func(b'1234', 3) + func('\u0661\u0662\u0663\u0664', 3) + func('1234', 5) + func('1234', 3, curses.A_BOLD) + func(1, 2, '1234', 3) + func(2, 3, '1234', 3, curses.A_BOLD) + + def test_output_string_embedded_null_chars(self): + # reject embedded null bytes and characters + stdscr = self.stdscr + for arg in ['a\0', b'a\0']: + with self.subTest(arg=arg): + self.assertRaises(ValueError, stdscr.addstr, arg) + self.assertRaises(ValueError, stdscr.addnstr, arg, 1) + self.assertRaises(ValueError, stdscr.insstr, arg) + self.assertRaises(ValueError, stdscr.insnstr, arg, 1) - win.border(65, 66, 67, 68, - 69, 70, 71, 72) + def test_read_from_window(self): + stdscr = self.stdscr + stdscr.addstr(0, 1, 'ABCD', curses.A_BOLD) + # inch() + stdscr.move(0, 1) + self.assertEqual(stdscr.inch(), 65 | curses.A_BOLD) + self.assertEqual(stdscr.inch(0, 3), 67 | curses.A_BOLD) + stdscr.move(0, 0) + # instr() + self.assertEqual(stdscr.instr()[:6], b' ABCD ') + self.assertEqual(stdscr.instr(3)[:6], b' AB') + self.assertEqual(stdscr.instr(0, 2)[:4], b'BCD ') + self.assertEqual(stdscr.instr(0, 2, 4), b'BCD ') + self.assertRaises(ValueError, stdscr.instr, -2) + self.assertRaises(ValueError, stdscr.instr, 0, 2, -2) + + def test_getch(self): + win = curses.newwin(5, 12, 5, 2) + + # TODO: Test with real input by writing to master fd. + for c in 'spam\n'[::-1]: + curses.ungetch(c) + self.assertEqual(win.getch(3, 1), b's'[0]) + self.assertEqual(win.getyx(), (3, 1)) + self.assertEqual(win.getch(3, 4), b'p'[0]) + self.assertEqual(win.getyx(), (3, 4)) + self.assertEqual(win.getch(), b'a'[0]) + self.assertEqual(win.getyx(), (3, 4)) + self.assertEqual(win.getch(), b'm'[0]) + self.assertEqual(win.getch(), b'\n'[0]) + + def test_getstr(self): + win = curses.newwin(5, 12, 5, 2) + curses.echo() + self.addCleanup(curses.noecho) + + self.assertRaises(ValueError, win.getstr, -400) + self.assertRaises(ValueError, win.getstr, 2, 3, -400) + + # TODO: Test with real input by writing to master fd. + for c in 'Lorem\nipsum\ndolor\nsit\namet\n'[::-1]: + curses.ungetch(c) + self.assertEqual(win.getstr(3, 1, 2), b'Lo') + self.assertEqual(win.instr(3, 0), b' Lo ') + self.assertEqual(win.getstr(3, 5, 10), b'ipsum') + self.assertEqual(win.instr(3, 0), b' Lo ipsum ') + self.assertEqual(win.getstr(1, 5), b'dolor') + self.assertEqual(win.instr(1, 0), b' dolor ') + self.assertEqual(win.getstr(2), b'si') + self.assertEqual(win.instr(1, 0), b'si dolor ') + self.assertEqual(win.getstr(), b'amet') + self.assertEqual(win.instr(1, 0), b'amet dolor ') + + def test_clear(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + + win.move(0, 8) + win.clrtoeol() + self.assertEqual(win.instr(0, 0).rstrip(), b'Lorem ip') + self.assertEqual(win.instr(1, 0).rstrip(), b'dolor sit amet,') + + win.move(0, 3) + win.clrtobot() + self.assertEqual(win.instr(0, 0).rstrip(), b'Lor') + self.assertEqual(win.instr(1, 0).rstrip(), b'') + + for func in [win.erase, win.clear]: + lorem_ipsum(win) + func() + self.assertEqual(win.instr(0, 0).rstrip(), b'') + self.assertEqual(win.instr(1, 0).rstrip(), b'') + + def test_insert_delete(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + + win.move(0, 2) + win.delch() + self.assertEqual(win.instr(0, 0), b'Loem ipsum ') + win.delch(0, 7) + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + + win.move(1, 5) + win.deleteln() + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + self.assertEqual(win.instr(1, 0), b'consectetur ') + self.assertEqual(win.instr(2, 0), b'adipiscing elit') + self.assertEqual(win.instr(3, 0), b'sed do eiusmod ') + self.assertEqual(win.instr(4, 0), b' ') + + win.move(1, 5) + win.insertln() + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + self.assertEqual(win.instr(1, 0), b' ') + self.assertEqual(win.instr(2, 0), b'consectetur ') + + win.clear() + lorem_ipsum(win) + win.move(1, 5) + win.insdelln(2) + self.assertEqual(win.instr(0, 0), b'Lorem ipsum ') + self.assertEqual(win.instr(1, 0), b' ') + self.assertEqual(win.instr(2, 0), b' ') + self.assertEqual(win.instr(3, 0), b'dolor sit amet,') + + win.clear() + lorem_ipsum(win) + win.move(1, 5) + win.insdelln(-2) + self.assertEqual(win.instr(0, 0), b'Lorem ipsum ') + self.assertEqual(win.instr(1, 0), b'adipiscing elit') + self.assertEqual(win.instr(2, 0), b'sed do eiusmod ') + self.assertEqual(win.instr(3, 0), b' ') + + def test_scroll(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + win.scrollok(True) + win.scroll() + self.assertEqual(win.instr(0, 0), b'dolor sit amet,') + win.scroll(2) + self.assertEqual(win.instr(0, 0), b'adipiscing elit') + win.scroll(-3) + self.assertEqual(win.instr(0, 0), b' ') + self.assertEqual(win.instr(2, 0), b' ') + self.assertEqual(win.instr(3, 0), b'adipiscing elit') + win.scrollok(False) + + def test_attributes(self): + # TODO: attr_get(), attr_set(), ... + win = curses.newwin(5, 15, 5, 2) + win.attron(curses.A_BOLD) + win.attroff(curses.A_BOLD) + win.attrset(curses.A_BOLD) + + win.standout() + win.standend() + + @requires_curses_window_meth('chgat') + def test_chgat(self): + win = curses.newwin(5, 15, 5, 2) + win.addstr(2, 0, 'Lorem ipsum') + win.addstr(3, 0, 'dolor sit amet') + + win.move(2, 8) + win.chgat(curses.A_BLINK) + self.assertEqual(win.inch(2, 7), b'p'[0]) + self.assertEqual(win.inch(2, 8), b's'[0] | curses.A_BLINK) + self.assertEqual(win.inch(2, 14), b' '[0] | curses.A_BLINK) + + win.move(2, 1) + win.chgat(3, curses.A_BOLD) + self.assertEqual(win.inch(2, 0), b'L'[0]) + self.assertEqual(win.inch(2, 1), b'o'[0] | curses.A_BOLD) + self.assertEqual(win.inch(2, 3), b'e'[0] | curses.A_BOLD) + self.assertEqual(win.inch(2, 4), b'm'[0]) + + win.chgat(3, 2, curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 1), b'o'[0]) + self.assertEqual(win.inch(3, 2), b'l'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 14), b' '[0] | curses.A_UNDERLINE) + + win.chgat(3, 4, 7, curses.A_BLINK) + self.assertEqual(win.inch(3, 3), b'o'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 4), b'r'[0] | curses.A_BLINK) + self.assertEqual(win.inch(3, 10), b'a'[0] | curses.A_BLINK) + self.assertEqual(win.inch(3, 11), b'm'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 14), b' '[0] | curses.A_UNDERLINE) + + def test_background(self): + win = curses.newwin(5, 15, 5, 2) + win.addstr(0, 0, 'Lorem ipsum') + + self.assertEqual(win.getbkgd(), 0) + + # bkgdset() + win.bkgdset('_') + self.assertEqual(win.getbkgd(), b'_'[0]) + win.bkgdset(b'#') + self.assertEqual(win.getbkgd(), b'#'[0]) + win.bkgdset(65) + self.assertEqual(win.getbkgd(), 65) + win.bkgdset(0) + self.assertEqual(win.getbkgd(), 32) + + win.bkgdset('#', curses.A_REVERSE) + self.assertEqual(win.getbkgd(), b'#'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 0), b'L'[0]) + self.assertEqual(win.inch(0, 5), b' '[0]) + win.bkgdset(0) + + # bkgd() + win.bkgd('_') + self.assertEqual(win.getbkgd(), b'_'[0]) + self.assertEqual(win.inch(0, 0), b'L'[0]) + self.assertEqual(win.inch(0, 5), b'_'[0]) + + win.bkgd('#', curses.A_REVERSE) + self.assertEqual(win.getbkgd(), b'#'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 0), b'L'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 5), b'#'[0] | curses.A_REVERSE) + + def test_overlay(self): + srcwin = curses.newwin(5, 18, 3, 4) + lorem_ipsum(srcwin) + dstwin = curses.newwin(7, 17, 5, 7) + for i in range(6): + dstwin.addstr(i, 0, '_'*17) + + srcwin.overlay(dstwin) + self.assertEqual(dstwin.instr(0, 0), b'sectetur_________') + self.assertEqual(dstwin.instr(1, 0), b'piscing_elit,____') + self.assertEqual(dstwin.instr(2, 0), b'_do_eiusmod______') + self.assertEqual(dstwin.instr(3, 0), b'_________________') + + srcwin.overwrite(dstwin) + self.assertEqual(dstwin.instr(0, 0), b'sectetur __') + self.assertEqual(dstwin.instr(1, 0), b'piscing elit, __') + self.assertEqual(dstwin.instr(2, 0), b' do eiusmod __') + self.assertEqual(dstwin.instr(3, 0), b'_________________') + + srcwin.overlay(dstwin, 1, 4, 3, 2, 4, 11) + self.assertEqual(dstwin.instr(3, 0), b'__r_sit_amet_____') + self.assertEqual(dstwin.instr(4, 0), b'__ectetur________') + self.assertEqual(dstwin.instr(5, 0), b'_________________') + + srcwin.overwrite(dstwin, 1, 4, 3, 2, 4, 11) + self.assertEqual(dstwin.instr(3, 0), b'__r sit amet_____') + self.assertEqual(dstwin.instr(4, 0), b'__ectetur _____') + self.assertEqual(dstwin.instr(5, 0), b'_________________') + + def test_refresh(self): + win = curses.newwin(5, 15, 2, 5) + win.noutrefresh() + win.redrawln(1, 2) + win.redrawwin() + win.refresh() + curses.doupdate() + + @requires_curses_window_meth('resize') + def test_resize(self): + win = curses.newwin(5, 15, 2, 5) + win.resize(4, 20) + self.assertEqual(win.getmaxyx(), (4, 20)) + win.resize(5, 15) + self.assertEqual(win.getmaxyx(), (5, 15)) + + @requires_curses_window_meth('enclose') + def test_enclose(self): + win = curses.newwin(5, 15, 2, 5) + # TODO: Return bool instead of 1/0 + self.assertTrue(win.enclose(2, 5)) + self.assertFalse(win.enclose(1, 5)) + self.assertFalse(win.enclose(2, 4)) + self.assertTrue(win.enclose(6, 19)) + self.assertFalse(win.enclose(7, 19)) + self.assertFalse(win.enclose(6, 20)) + + def test_putwin(self): + win = curses.newwin(5, 12, 1, 2) + win.addstr(2, 1, 'Lorem ipsum') + with tempfile.TemporaryFile() as f: + win.putwin(f) + del win + f.seek(0) + win = curses.getwin(f) + self.assertEqual(win.getbegyx(), (1, 2)) + self.assertEqual(win.getmaxyx(), (5, 12)) + self.assertEqual(win.instr(2, 0), b' Lorem ipsum') + + def test_borders_and_lines(self): + win = curses.newwin(5, 10, 5, 2) win.border('|', '!', '-', '_', '+', '\\', '#', '/') - with self.assertRaises(TypeError, - msg="Expected win.border() to raise TypeError"): - win.border(65, 66, 67, 68, - 69, [], 71, 72) - - win.box(65, 67) - win.box('!', '_') + self.assertEqual(win.instr(0, 0), b'+--------\\') + self.assertEqual(win.instr(1, 0), b'| !') + self.assertEqual(win.instr(4, 0), b'#________/') + win.border(b'|', b'!', b'-', b'_', + b'+', b'\\', b'#', b'/') + win.border(65, 66, 67, 68, + 69, 70, 71, 72) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, [], 71, 72) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, 70, 71, 72, 73) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, 70, 71, 72, 73) + win.border(65, 66, 67, 68, 69, 70, 71) + win.border(65, 66, 67, 68, 69, 70) + win.border(65, 66, 67, 68, 69) + win.border(65, 66, 67, 68) + win.border(65, 66, 67) + win.border(65, 66) + win.border(65) + win.border() + + win.box(':', '~') + self.assertEqual(win.instr(0, 1, 8), b'~~~~~~~~') + self.assertEqual(win.instr(1, 0), b': :') + self.assertEqual(win.instr(4, 1, 8), b'~~~~~~~~') win.box(b':', b'~') + win.box(65, 67) self.assertRaises(TypeError, win.box, 65, 66, 67) self.assertRaises(TypeError, win.box, 65) win.box() - stdscr.clearok(1) + win.move(1, 2) + win.hline('-', 5) + self.assertEqual(win.instr(1, 1, 7), b' ----- ') + win.hline(b'-', 5) + win.hline(45, 5) + win.hline('-', 5, curses.A_BOLD) + win.hline(1, 1, '-', 5) + win.hline(1, 1, '-', 5, curses.A_BOLD) + + win.move(1, 2) + win.vline('a', 3) + win.vline(b'a', 3) + win.vline(97, 3) + win.vline('a', 3, curses.A_STANDOUT) + win.vline(1, 1, 'a', 3) + win.vline(1, 1, ';', 2, curses.A_STANDOUT) + self.assertEqual(win.inch(1, 1), b';'[0] | curses.A_STANDOUT) + self.assertEqual(win.inch(2, 1), b';'[0] | curses.A_STANDOUT) + self.assertEqual(win.inch(3, 1), b'a'[0]) + + def test_unctrl(self): + # TODO: wunctrl() + self.assertEqual(curses.unctrl(b'A'), b'A') + self.assertEqual(curses.unctrl('A'), b'A') + self.assertEqual(curses.unctrl(65), b'A') + self.assertEqual(curses.unctrl(b'\n'), b'^J') + self.assertEqual(curses.unctrl('\n'), b'^J') + self.assertEqual(curses.unctrl(10), b'^J') + self.assertRaises(TypeError, curses.unctrl, b'') + self.assertRaises(TypeError, curses.unctrl, b'AB') + self.assertRaises(TypeError, curses.unctrl, '') + self.assertRaises(TypeError, curses.unctrl, 'AB') + self.assertRaises(OverflowError, curses.unctrl, 2**64) + + def test_endwin(self): + if not self.isatty: + self.skipTest('requires terminal') + self.assertIs(curses.isendwin(), False) + curses.endwin() + self.assertIs(curses.isendwin(), True) + curses.doupdate() + self.assertIs(curses.isendwin(), False) + + def test_terminfo(self): + self.assertIsInstance(curses.tigetflag('hc'), int) + self.assertEqual(curses.tigetflag('cols'), -1) + self.assertEqual(curses.tigetflag('cr'), -1) + + self.assertIsInstance(curses.tigetnum('cols'), int) + self.assertEqual(curses.tigetnum('hc'), -2) + self.assertEqual(curses.tigetnum('cr'), -2) + + self.assertIsInstance(curses.tigetstr('cr'), (bytes, type(None))) + self.assertIsNone(curses.tigetstr('hc')) + self.assertIsNone(curses.tigetstr('cols')) + + cud = curses.tigetstr('cud') + if cud is not None: + # See issue10570. + self.assertIsInstance(cud, bytes) + curses.tparm(cud, 2) + cud_2 = curses.tparm(cud, 2) + self.assertIsInstance(cud_2, bytes) + curses.putp(cud_2) + + curses.putp(b'abc\n') + + def test_misc_module_funcs(self): + curses.delay_output(1) + curses.flushinp() - win4 = stdscr.derwin(2,2) - win4 = stdscr.derwin(1,1, 5,5) - win4.mvderwin(9,9) + curses.doupdate() + self.assertIs(curses.isendwin(), False) - stdscr.echochar('a') - stdscr.echochar('a', curses.A_BOLD) - stdscr.hline('-', 5) - stdscr.hline('-', 5, curses.A_BOLD) - stdscr.hline(1,1,'-', 5) - stdscr.hline(1,1,'-', 5, curses.A_BOLD) + curses.napms(100) + + curses.newpad(50, 50) + + def test_env_queries(self): + # TODO: term_attrs(), erasewchar(), killwchar() + self.assertIsInstance(curses.termname(), bytes) + self.assertIsInstance(curses.longname(), bytes) + self.assertIsInstance(curses.baudrate(), int) + self.assertIsInstance(curses.has_ic(), bool) + self.assertIsInstance(curses.has_il(), bool) + self.assertIsInstance(curses.termattrs(), int) + + c = curses.killchar() + self.assertIsInstance(c, bytes) + self.assertEqual(len(c), 1) + c = curses.erasechar() + self.assertIsInstance(c, bytes) + self.assertEqual(len(c), 1) + + def test_output_options(self): + stdscr = self.stdscr + + stdscr.clearok(True) + stdscr.clearok(False) + + stdscr.idcok(True) + stdscr.idcok(False) + + stdscr.idlok(False) + stdscr.idlok(True) - stdscr.idcok(1) - stdscr.idlok(1) if hasattr(stdscr, 'immedok'): - stdscr.immedok(1) - stdscr.immedok(0) - stdscr.insch('c') - stdscr.insdelln(1) - stdscr.insnstr('abc', 3) - stdscr.insnstr('abc', 3, curses.A_BOLD) - stdscr.insnstr(5, 5, 'abc', 3) - stdscr.insnstr(5, 5, 'abc', 3, curses.A_BOLD) - - stdscr.insstr('def') - stdscr.insstr('def', curses.A_BOLD) - stdscr.insstr(5, 5, 'def') - stdscr.insstr(5, 5, 'def', curses.A_BOLD) - stdscr.is_linetouched(0) - stdscr.keypad(1) - stdscr.leaveok(1) - stdscr.move(3,3) - win.mvwin(2,2) - stdscr.nodelay(1) - stdscr.notimeout(1) - win2.overlay(win) - win2.overwrite(win) - win2.overlay(win, 1, 2, 2, 1, 3, 3) - win2.overwrite(win, 1, 2, 2, 1, 3, 3) - stdscr.redrawln(1,2) - - stdscr.scrollok(1) - stdscr.scroll() - stdscr.scroll(2) - stdscr.scroll(-3) - - stdscr.move(12, 2) - stdscr.setscrreg(10,15) - win3 = stdscr.subwin(10,10) - win3 = stdscr.subwin(10,10, 5,5) - if hasattr(stdscr, 'syncok') and not sys.platform.startswith("sunos"): - stdscr.syncok(1) - stdscr.timeout(5) - stdscr.touchline(5,5) - stdscr.touchline(5,5,0) - stdscr.vline('a', 3) - stdscr.vline('a', 3, curses.A_STANDOUT) - if hasattr(stdscr, 'chgat'): - stdscr.chgat(5, 2, 3, curses.A_BLINK) - stdscr.chgat(3, curses.A_BOLD) - stdscr.chgat(5, 8, curses.A_UNDERLINE) - stdscr.chgat(curses.A_BLINK) - stdscr.refresh() + stdscr.immedok(True) + stdscr.immedok(False) - stdscr.vline(1,1, 'a', 3) - stdscr.vline(1,1, 'a', 3, curses.A_STANDOUT) + stdscr.leaveok(True) + stdscr.leaveok(False) - if hasattr(stdscr, 'resize'): - stdscr.resize(25, 80) - if hasattr(stdscr, 'enclose'): - stdscr.enclose(10, 10) + stdscr.scrollok(True) + stdscr.scrollok(False) - with tempfile.TemporaryFile() as f: - self.stdscr.putwin(f) - f.seek(0) - curses.getwin(f) + stdscr.setscrreg(5, 10) - self.assertRaises(ValueError, stdscr.getstr, -400) - self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400) - self.assertRaises(ValueError, stdscr.instr, -2) - self.assertRaises(ValueError, stdscr.instr, 2, 3, -2) + curses.nonl() + curses.nl(True) + curses.nl(False) + curses.nl() - def test_embedded_null_chars(self): - # reject embedded null bytes and characters + + def test_input_options(self): stdscr = self.stdscr - for arg in ['a', b'a']: - with self.subTest(arg=arg): - self.assertRaises(ValueError, stdscr.addstr, 'a\0') - self.assertRaises(ValueError, stdscr.addnstr, 'a\0', 1) - self.assertRaises(ValueError, stdscr.insstr, 'a\0') - self.assertRaises(ValueError, stdscr.insnstr, 'a\0', 1) - - def test_module_funcs(self): - "Test module-level functions" - for func in [curses.baudrate, curses.beep, curses.can_change_color, - curses.doupdate, curses.flash, curses.flushinp, - curses.has_colors, curses.has_ic, curses.has_il, - curses.isendwin, curses.killchar, curses.longname, - 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'): - curses.getsyx() - - # Functions that actually need arguments - if curses.tigetstr("cnorm"): - curses.curs_set(1) - curses.delay_output(1) - curses.echo() ; curses.echo(1) + curses.nocbreak() + curses.cbreak() + curses.cbreak(False) + curses.cbreak(True) + + curses.intrflush(True) + curses.intrflush(False) + curses.raw() + curses.raw(False) + curses.raw(True) + curses.noraw() + + curses.noecho() + curses.echo() + curses.echo(False) + curses.echo(True) + + curses.halfdelay(255) curses.halfdelay(1) - if self.isatty: - curses.intrflush(1) - curses.meta(1) - curses.napms(100) - curses.newpad(50,50) - win = curses.newwin(5,5) - win = curses.newwin(5,5, 1,1) - curses.nl() ; curses.nl(1) - curses.putp(b'abc') + + stdscr.keypad(True) + stdscr.keypad(False) + + curses.meta(True) + curses.meta(False) + + stdscr.nodelay(True) + stdscr.nodelay(False) + + curses.noqiflush() + curses.qiflush(True) + curses.qiflush(False) curses.qiflush() - if self.isatty: - curses.raw() ; curses.raw(1) + + stdscr.notimeout(True) + stdscr.notimeout(False) + + stdscr.timeout(-1) + stdscr.timeout(0) + stdscr.timeout(5) + + @requires_curses_func('typeahead') + def test_typeahead(self): + curses.typeahead(sys.__stdin__.fileno()) + curses.typeahead(-1) + + def test_prog_mode(self): + if not self.isatty: + self.skipTest('requires terminal') + curses.def_prog_mode() + curses.reset_prog_mode() + + def test_beep(self): + if (curses.tigetstr("bel") is not None + or curses.tigetstr("flash") is not None): + curses.beep() + else: + try: + curses.beep() + except curses.error: + self.skipTest('beep() failed') + + def test_flash(self): + if (curses.tigetstr("bel") is not None + or curses.tigetstr("flash") is not None): + curses.flash() + else: + try: + curses.flash() + except curses.error: + self.skipTest('flash() failed') + + def test_curs_set(self): + for vis, cap in [(0, 'civis'), (2, 'cvvis'), (1, 'cnorm')]: + if curses.tigetstr(cap) is not None: + curses.curs_set(vis) + else: + try: + curses.curs_set(vis) + except curses.error: + pass + + @requires_curses_func('get_escdelay') + def test_escdelay(self): + escdelay = curses.get_escdelay() + self.assertIsInstance(escdelay, int) curses.set_escdelay(25) self.assertEqual(curses.get_escdelay(), 25) + curses.set_escdelay(escdelay) + + @requires_curses_func('get_tabsize') + def test_tabsize(self): + tabsize = curses.get_tabsize() + self.assertIsInstance(tabsize, int) curses.set_tabsize(4) self.assertEqual(curses.get_tabsize(), 4) - if hasattr(curses, 'setsyx'): - curses.setsyx(5,5) - curses.tigetflag('hc') - curses.tigetnum('co') - curses.tigetstr('cr') - curses.tparm(b'cr') - if hasattr(curses, 'typeahead'): - curses.typeahead(sys.__stdin__.fileno()) - curses.unctrl('a') - curses.ungetch('a') - if hasattr(curses, 'use_env'): - curses.use_env(1) - - # Functions only available on a few platforms + curses.set_tabsize(tabsize) + + @requires_curses_func('getsyx') + def test_getsyx(self): + y, x = curses.getsyx() + self.assertIsInstance(y, int) + self.assertIsInstance(x, int) + curses.setsyx(4, 5) + self.assertEqual(curses.getsyx(), (4, 5)) def bad_colors(self): return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) @@ -323,6 +844,10 @@ def bad_colors(self): def bad_pairs(self): return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + def test_has_colors(self): + self.assertIsInstance(curses.has_colors(), bool) + self.assertIsInstance(curses.can_change_color(), bool) + def test_start_color(self): if not curses.has_colors(): self.skipTest('requires colors support') @@ -346,7 +871,7 @@ def test_color_content(self): @requires_colors def test_init_color(self): - if not curses.can_change_color: + if not curses.can_change_color(): self.skipTest('cannot change color') old = curses.color_content(0) @@ -434,14 +959,22 @@ def test_color_attrs(self): @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() + old = curses.pair_content(0) + try: + curses.use_default_colors() + except curses.error: + self.skipTest('cannot change color (use_default_colors() failed)') self.assertEqual(curses.pair_content(0), (-1, -1)) + self.assertIn(old, [(curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1), (0, 0)]) - @requires_curses_func('keyname') def test_keyname(self): - curses.keyname(13) + # TODO: key_name() + self.assertEqual(curses.keyname(65), b'A') + self.assertEqual(curses.keyname(13), b'^M') + self.assertEqual(curses.keyname(127), b'^?') + self.assertEqual(curses.keyname(0), b'^@') + self.assertRaises(ValueError, curses.keyname, -1) + self.assertIsInstance(curses.keyname(256), bytes) @requires_curses_func('has_key') def test_has_key(self): @@ -497,22 +1030,46 @@ def test_new_curses_panel(self): @requires_curses_func('is_term_resized') def test_is_term_resized(self): - curses.is_term_resized(*self.stdscr.getmaxyx()) + lines, cols = curses.LINES, curses.COLS + self.assertIs(curses.is_term_resized(lines, cols), False) + self.assertIs(curses.is_term_resized(lines-1, cols-1), True) @requires_curses_func('resize_term') def test_resize_term(self): - curses.resize_term(*self.stdscr.getmaxyx()) + curses.update_lines_cols() + lines, cols = curses.LINES, curses.COLS + new_lines = lines - 1 + new_cols = cols + 1 + curses.resize_term(new_lines, new_cols) + self.assertEqual(curses.LINES, new_lines) + self.assertEqual(curses.COLS, new_cols) + + curses.resize_term(lines, cols) + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) @requires_curses_func('resizeterm') def test_resizeterm(self): + curses.update_lines_cols() lines, cols = curses.LINES, curses.COLS new_lines = lines - 1 new_cols = cols + 1 curses.resizeterm(new_lines, new_cols) - self.assertEqual(curses.LINES, new_lines) self.assertEqual(curses.COLS, new_cols) + curses.resizeterm(lines, cols) + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) + + def test_ungetch(self): + curses.ungetch(b'A') + self.assertEqual(self.stdscr.getkey(), 'A') + curses.ungetch('B') + self.assertEqual(self.stdscr.getkey(), 'B') + curses.ungetch(67) + self.assertEqual(self.stdscr.getkey(), 'C') + def test_issue6243(self): curses.ungetch(1025) self.stdscr.getkey() @@ -541,10 +1098,6 @@ def test_unget_wch(self): read = stdscr.get_wch() self.assertEqual(read, ch) - def test_issue10570(self): - b = curses.tparm(curses.tigetstr("cup"), 5, 3) - self.assertIs(type(b), bytes) - def test_encoding(self): stdscr = self.stdscr import codecs @@ -584,26 +1137,25 @@ def test_issue21088(self): human_readable_signature = stdscr.addch.__doc__.split("\n")[0] self.assertIn("[y, x,]", human_readable_signature) + @requires_curses_window_meth('resize') def test_issue13051(self): - stdscr = self.stdscr - if not hasattr(stdscr, 'resize'): - raise unittest.SkipTest('requires curses.window.resize') - box = curses.textpad.Textbox(stdscr, insert_mode=True) - lines, cols = stdscr.getmaxyx() - stdscr.resize(lines-2, cols-2) + win = curses.newwin(5, 15, 2, 5) + box = curses.textpad.Textbox(win, insert_mode=True) + lines, cols = win.getmaxyx() + win.resize(lines-2, cols-2) # this may cause infinite recursion, leading to a RuntimeError box._insert_printable_char('a') class MiscTests(unittest.TestCase): - @requires_curses_func('update_lines_cols') def test_update_lines_cols(self): - # this doesn't actually test that LINES and COLS are updated, - # because we can't automate changing them. See Issue #4254 for - # a manual test script. We can only test that the function - # can be called. curses.update_lines_cols() + lines, cols = curses.LINES, curses.COLS + curses.LINES = curses.COLS = 0 + curses.update_lines_cols() + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) @requires_curses_func('ncurses_version') def test_ncurses_version(self): @@ -625,6 +1177,7 @@ def test_ncurses_version(self): self.assertGreaterEqual(v.minor, 0) self.assertGreaterEqual(v.patch, 0) + class TestAscii(unittest.TestCase): def test_controlnames(self): @@ -713,5 +1266,21 @@ def test_unctrl(self): self.assertEqual(unctrl(ord('\xc1')), '!A') +def lorem_ipsum(win): + text = [ + 'Lorem ipsum', + 'dolor sit amet,', + 'consectetur', + 'adipiscing elit,', + 'sed do eiusmod', + 'tempor incididunt', + 'ut labore et', + 'dolore magna', + 'aliqua.', + ] + maxy, maxx = win.getmaxyx() + for y, line in enumerate(text[:maxy]): + win.addstr(y, 0, line[:maxx - (y == maxy - 1)]) + if __name__ == '__main__': unittest.main() From webhook-mailer at python.org Sun Jan 31 12:44:21 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 17:44:21 -0000 Subject: [Python-checkins] [3.8] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399) (GH-24401) Message-ID: https://github.com/python/cpython/commit/7ca947e93bff2b9d78312dc8ed8e0a2b7d25d3f3 commit: 7ca947e93bff2b9d78312dc8ed8e0a2b7d25d3f3 branch: 3.8 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-31T19:44:12+02:00 summary: [3.8] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399) (GH-24401) (cherry picked from commit d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b). (cherry picked from commit e9d4960d15c5282904cf26e469ce7cee39f634f7) files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 8991134e08063..f47c9876eed88 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -1,18 +1,9 @@ -# -# Test script for the curses module -# -# 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() -# Only called, not tested: getmouse(), ungetmouse() -# - +import functools +import inspect import os import string import sys import tempfile -import functools import unittest from test.support import requires, import_module, verbose, SaveSignals @@ -20,7 +11,6 @@ # Optionally test curses module. This currently requires that the # 'curses' resource be given on the regrtest command line using the -u # option. If not available, nothing after this line will be executed. -import inspect requires('curses') # If either of these don't exist, skip the tests. @@ -36,6 +26,17 @@ def requires_curses_func(name): return unittest.skipUnless(hasattr(curses, name), 'requires curses.%s' % name) +def requires_curses_window_meth(name): + def deco(test): + @functools.wraps(test) + def wrapped(self, *args, **kwargs): + if not hasattr(self.stdscr, name): + raise unittest.SkipTest('requires curses.window.%s' % name) + test(self, *args, **kwargs) + return wrapped + return deco + + def requires_colors(test): @functools.wraps(test) def wrapped(self, *args, **kwargs): @@ -110,208 +111,716 @@ def setUp(self): curses.savetty() self.addCleanup(curses.endwin) self.addCleanup(curses.resetty) + self.stdscr.erase() + + @requires_curses_func('filter') + def test_filter(self): + # TODO: Should be called before initscr() or newterm() are called. + # TODO: nofilter() + curses.filter() + + @requires_curses_func('use_env') + def test_use_env(self): + # TODO: Should be called before initscr() or newterm() are called. + # TODO: use_tioctl() + curses.use_env(False) + curses.use_env(True) + + def test_create_windows(self): + win = curses.newwin(5, 10) + self.assertEqual(win.getbegyx(), (0, 0)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (5, 10)) + + win = curses.newwin(10, 15, 2, 5) + self.assertEqual(win.getbegyx(), (2, 5)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (10, 15)) + + win2 = win.subwin(3, 7) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (9, 13)) + + win2 = win.subwin(5, 10, 3, 7) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + + win3 = win.derwin(2, 3) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (8, 12)) + + win3 = win.derwin(6, 11, 2, 3) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + win.mvwin(0, 1) + self.assertEqual(win.getbegyx(), (0, 1)) + self.assertEqual(win.getparyx(), (-1, -1)) + self.assertEqual(win.getmaxyx(), (10, 15)) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (1, 2)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 3)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + win2.mvderwin(2, 1) + self.assertEqual(win2.getbegyx(), (3, 7)) + self.assertEqual(win2.getparyx(), (2, 1)) + self.assertEqual(win2.getmaxyx(), (5, 10)) + + win3.mvderwin(2, 1) + self.assertEqual(win3.getbegyx(), (4, 8)) + self.assertEqual(win3.getparyx(), (2, 1)) + self.assertEqual(win3.getmaxyx(), (6, 11)) + + def test_move_cursor(self): + stdscr = self.stdscr + win = stdscr.subwin(10, 15, 2, 5) + stdscr.move(1, 2) + win.move(2, 4) + self.assertEqual(stdscr.getyx(), (1, 2)) + self.assertEqual(win.getyx(), (2, 4)) + + win.cursyncup() + self.assertEqual(stdscr.getyx(), (4, 9)) - def test_window_funcs(self): - "Test the methods of windows" + def test_refresh_control(self): stdscr = self.stdscr - win = curses.newwin(10,10) - win = curses.newwin(5,5, 5,5) - win2 = curses.newwin(15,15, 5,5) - - for meth in [stdscr.addch, stdscr.addstr]: - for args in [('a',), ('a', curses.A_BOLD), - (4,4, 'a'), (5,5, 'a', curses.A_BOLD)]: - with self.subTest(meth=meth.__qualname__, args=args): - meth(*args) - - for meth in [stdscr.clear, stdscr.clrtobot, - stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, - stdscr.deleteln, stdscr.erase, stdscr.getbegyx, - stdscr.getbkgd, stdscr.getmaxyx, - stdscr.getparyx, stdscr.getyx, stdscr.inch, - stdscr.insertln, stdscr.instr, stdscr.is_wintouched, - win.noutrefresh, stdscr.redrawwin, stdscr.refresh, - stdscr.standout, stdscr.standend, stdscr.syncdown, - stdscr.syncup, stdscr.touchwin, stdscr.untouchwin]: - with self.subTest(meth=meth.__qualname__): - meth() - - stdscr.addnstr('1234', 3) - stdscr.addnstr('1234', 3, curses.A_BOLD) - stdscr.addnstr(4,4, '1234', 3) - stdscr.addnstr(5,5, '1234', 3, curses.A_BOLD) - - stdscr.attron(curses.A_BOLD) - stdscr.attroff(curses.A_BOLD) - stdscr.attrset(curses.A_BOLD) - stdscr.bkgd(' ') - stdscr.bkgd(' ', curses.A_REVERSE) - stdscr.bkgdset(' ') - stdscr.bkgdset(' ', curses.A_REVERSE) + # touchwin()/untouchwin()/is_wintouched() + stdscr.refresh() + self.assertIs(stdscr.is_wintouched(), False) + stdscr.touchwin() + self.assertIs(stdscr.is_wintouched(), True) + stdscr.refresh() + self.assertIs(stdscr.is_wintouched(), False) + stdscr.touchwin() + self.assertIs(stdscr.is_wintouched(), True) + stdscr.untouchwin() + self.assertIs(stdscr.is_wintouched(), False) + + # touchline()/untouchline()/is_linetouched() + stdscr.touchline(5, 2) + self.assertIs(stdscr.is_linetouched(5), True) + self.assertIs(stdscr.is_linetouched(6), True) + self.assertIs(stdscr.is_wintouched(), True) + stdscr.touchline(5, 1, False) + self.assertIs(stdscr.is_linetouched(5), False) + + # syncup() + win = stdscr.subwin(10, 15, 2, 5) + win2 = win.subwin(5, 10, 3, 7) + win2.touchwin() + stdscr.untouchwin() + win2.syncup() + self.assertIs(win.is_wintouched(), True) + self.assertIs(stdscr.is_wintouched(), True) + + # syncdown() + stdscr.touchwin() + win.untouchwin() + win2.untouchwin() + win2.syncdown() + self.assertIs(win2.is_wintouched(), True) + + # syncok() + if hasattr(stdscr, 'syncok') and not sys.platform.startswith("sunos"): + win.untouchwin() + stdscr.untouchwin() + for syncok in [False, True]: + win2.syncok(syncok) + win2.addch('a') + self.assertIs(win.is_wintouched(), syncok) + self.assertIs(stdscr.is_wintouched(), syncok) + + def test_output_character(self): + stdscr = self.stdscr + # addch() + stdscr.refresh() + stdscr.move(0, 0) + stdscr.addch('A') + stdscr.addch(b'A') + stdscr.addch(65) + stdscr.addch('\u20ac') + stdscr.addch('A', curses.A_BOLD) + stdscr.addch(1, 2, 'A') + stdscr.addch(2, 3, 'A', curses.A_BOLD) + self.assertIs(stdscr.is_wintouched(), True) + + # echochar() + stdscr.refresh() + stdscr.move(0, 0) + stdscr.echochar('A') + stdscr.echochar(b'A') + stdscr.echochar(65) + self.assertRaises(OverflowError, stdscr.echochar, '\u20ac') + stdscr.echochar('A', curses.A_BOLD) + self.assertIs(stdscr.is_wintouched(), False) + + def test_output_string(self): + stdscr = self.stdscr + # addstr()/insstr() + for func in [stdscr.addstr, stdscr.insstr]: + with self.subTest(func.__qualname__): + stdscr.move(0, 0) + func('abcd') + func(b'abcd') + func('????') + func('abcd', curses.A_BOLD) + func(1, 2, 'abcd') + func(2, 3, 'abcd', curses.A_BOLD) + + # addnstr()/insnstr() + for func in [stdscr.addnstr, stdscr.insnstr]: + with self.subTest(func.__qualname__): + stdscr.move(0, 0) + func('1234', 3) + func(b'1234', 3) + func('\u0661\u0662\u0663\u0664', 3) + func('1234', 5) + func('1234', 3, curses.A_BOLD) + func(1, 2, '1234', 3) + func(2, 3, '1234', 3, curses.A_BOLD) + + def test_output_string_embedded_null_chars(self): + # reject embedded null bytes and characters + stdscr = self.stdscr + for arg in ['a\0', b'a\0']: + with self.subTest(arg=arg): + self.assertRaises(ValueError, stdscr.addstr, arg) + self.assertRaises(ValueError, stdscr.addnstr, arg, 1) + self.assertRaises(ValueError, stdscr.insstr, arg) + self.assertRaises(ValueError, stdscr.insnstr, arg, 1) - win.border(65, 66, 67, 68, - 69, 70, 71, 72) + def test_read_from_window(self): + stdscr = self.stdscr + stdscr.addstr(0, 1, 'ABCD', curses.A_BOLD) + # inch() + stdscr.move(0, 1) + self.assertEqual(stdscr.inch(), 65 | curses.A_BOLD) + self.assertEqual(stdscr.inch(0, 3), 67 | curses.A_BOLD) + stdscr.move(0, 0) + # instr() + self.assertEqual(stdscr.instr()[:6], b' ABCD ') + self.assertEqual(stdscr.instr(3)[:6], b' AB') + self.assertEqual(stdscr.instr(0, 2)[:4], b'BCD ') + self.assertEqual(stdscr.instr(0, 2, 4), b'BCD ') + self.assertRaises(ValueError, stdscr.instr, -2) + self.assertRaises(ValueError, stdscr.instr, 0, 2, -2) + + def test_getch(self): + win = curses.newwin(5, 12, 5, 2) + + # TODO: Test with real input by writing to master fd. + for c in 'spam\n'[::-1]: + curses.ungetch(c) + self.assertEqual(win.getch(3, 1), b's'[0]) + self.assertEqual(win.getyx(), (3, 1)) + self.assertEqual(win.getch(3, 4), b'p'[0]) + self.assertEqual(win.getyx(), (3, 4)) + self.assertEqual(win.getch(), b'a'[0]) + self.assertEqual(win.getyx(), (3, 4)) + self.assertEqual(win.getch(), b'm'[0]) + self.assertEqual(win.getch(), b'\n'[0]) + + def test_getstr(self): + win = curses.newwin(5, 12, 5, 2) + curses.echo() + self.addCleanup(curses.noecho) + + self.assertRaises(ValueError, win.getstr, -400) + self.assertRaises(ValueError, win.getstr, 2, 3, -400) + + # TODO: Test with real input by writing to master fd. + for c in 'Lorem\nipsum\ndolor\nsit\namet\n'[::-1]: + curses.ungetch(c) + self.assertEqual(win.getstr(3, 1, 2), b'Lo') + self.assertEqual(win.instr(3, 0), b' Lo ') + self.assertEqual(win.getstr(3, 5, 10), b'ipsum') + self.assertEqual(win.instr(3, 0), b' Lo ipsum ') + self.assertEqual(win.getstr(1, 5), b'dolor') + self.assertEqual(win.instr(1, 0), b' dolor ') + self.assertEqual(win.getstr(2), b'si') + self.assertEqual(win.instr(1, 0), b'si dolor ') + self.assertEqual(win.getstr(), b'amet') + self.assertEqual(win.instr(1, 0), b'amet dolor ') + + def test_clear(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + + win.move(0, 8) + win.clrtoeol() + self.assertEqual(win.instr(0, 0).rstrip(), b'Lorem ip') + self.assertEqual(win.instr(1, 0).rstrip(), b'dolor sit amet,') + + win.move(0, 3) + win.clrtobot() + self.assertEqual(win.instr(0, 0).rstrip(), b'Lor') + self.assertEqual(win.instr(1, 0).rstrip(), b'') + + for func in [win.erase, win.clear]: + lorem_ipsum(win) + func() + self.assertEqual(win.instr(0, 0).rstrip(), b'') + self.assertEqual(win.instr(1, 0).rstrip(), b'') + + def test_insert_delete(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + + win.move(0, 2) + win.delch() + self.assertEqual(win.instr(0, 0), b'Loem ipsum ') + win.delch(0, 7) + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + + win.move(1, 5) + win.deleteln() + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + self.assertEqual(win.instr(1, 0), b'consectetur ') + self.assertEqual(win.instr(2, 0), b'adipiscing elit') + self.assertEqual(win.instr(3, 0), b'sed do eiusmod ') + self.assertEqual(win.instr(4, 0), b' ') + + win.move(1, 5) + win.insertln() + self.assertEqual(win.instr(0, 0), b'Loem ipum ') + self.assertEqual(win.instr(1, 0), b' ') + self.assertEqual(win.instr(2, 0), b'consectetur ') + + win.clear() + lorem_ipsum(win) + win.move(1, 5) + win.insdelln(2) + self.assertEqual(win.instr(0, 0), b'Lorem ipsum ') + self.assertEqual(win.instr(1, 0), b' ') + self.assertEqual(win.instr(2, 0), b' ') + self.assertEqual(win.instr(3, 0), b'dolor sit amet,') + + win.clear() + lorem_ipsum(win) + win.move(1, 5) + win.insdelln(-2) + self.assertEqual(win.instr(0, 0), b'Lorem ipsum ') + self.assertEqual(win.instr(1, 0), b'adipiscing elit') + self.assertEqual(win.instr(2, 0), b'sed do eiusmod ') + self.assertEqual(win.instr(3, 0), b' ') + + def test_scroll(self): + win = curses.newwin(5, 15, 5, 2) + lorem_ipsum(win) + win.scrollok(True) + win.scroll() + self.assertEqual(win.instr(0, 0), b'dolor sit amet,') + win.scroll(2) + self.assertEqual(win.instr(0, 0), b'adipiscing elit') + win.scroll(-3) + self.assertEqual(win.instr(0, 0), b' ') + self.assertEqual(win.instr(2, 0), b' ') + self.assertEqual(win.instr(3, 0), b'adipiscing elit') + win.scrollok(False) + + def test_attributes(self): + # TODO: attr_get(), attr_set(), ... + win = curses.newwin(5, 15, 5, 2) + win.attron(curses.A_BOLD) + win.attroff(curses.A_BOLD) + win.attrset(curses.A_BOLD) + + win.standout() + win.standend() + + @requires_curses_window_meth('chgat') + def test_chgat(self): + win = curses.newwin(5, 15, 5, 2) + win.addstr(2, 0, 'Lorem ipsum') + win.addstr(3, 0, 'dolor sit amet') + + win.move(2, 8) + win.chgat(curses.A_BLINK) + self.assertEqual(win.inch(2, 7), b'p'[0]) + self.assertEqual(win.inch(2, 8), b's'[0] | curses.A_BLINK) + self.assertEqual(win.inch(2, 14), b' '[0] | curses.A_BLINK) + + win.move(2, 1) + win.chgat(3, curses.A_BOLD) + self.assertEqual(win.inch(2, 0), b'L'[0]) + self.assertEqual(win.inch(2, 1), b'o'[0] | curses.A_BOLD) + self.assertEqual(win.inch(2, 3), b'e'[0] | curses.A_BOLD) + self.assertEqual(win.inch(2, 4), b'm'[0]) + + win.chgat(3, 2, curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 1), b'o'[0]) + self.assertEqual(win.inch(3, 2), b'l'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 14), b' '[0] | curses.A_UNDERLINE) + + win.chgat(3, 4, 7, curses.A_BLINK) + self.assertEqual(win.inch(3, 3), b'o'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 4), b'r'[0] | curses.A_BLINK) + self.assertEqual(win.inch(3, 10), b'a'[0] | curses.A_BLINK) + self.assertEqual(win.inch(3, 11), b'm'[0] | curses.A_UNDERLINE) + self.assertEqual(win.inch(3, 14), b' '[0] | curses.A_UNDERLINE) + + def test_background(self): + win = curses.newwin(5, 15, 5, 2) + win.addstr(0, 0, 'Lorem ipsum') + + self.assertEqual(win.getbkgd(), 0) + + # bkgdset() + win.bkgdset('_') + self.assertEqual(win.getbkgd(), b'_'[0]) + win.bkgdset(b'#') + self.assertEqual(win.getbkgd(), b'#'[0]) + win.bkgdset(65) + self.assertEqual(win.getbkgd(), 65) + win.bkgdset(0) + self.assertEqual(win.getbkgd(), 32) + + win.bkgdset('#', curses.A_REVERSE) + self.assertEqual(win.getbkgd(), b'#'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 0), b'L'[0]) + self.assertEqual(win.inch(0, 5), b' '[0]) + win.bkgdset(0) + + # bkgd() + win.bkgd('_') + self.assertEqual(win.getbkgd(), b'_'[0]) + self.assertEqual(win.inch(0, 0), b'L'[0]) + self.assertEqual(win.inch(0, 5), b'_'[0]) + + win.bkgd('#', curses.A_REVERSE) + self.assertEqual(win.getbkgd(), b'#'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 0), b'L'[0] | curses.A_REVERSE) + self.assertEqual(win.inch(0, 5), b'#'[0] | curses.A_REVERSE) + + def test_overlay(self): + srcwin = curses.newwin(5, 18, 3, 4) + lorem_ipsum(srcwin) + dstwin = curses.newwin(7, 17, 5, 7) + for i in range(6): + dstwin.addstr(i, 0, '_'*17) + + srcwin.overlay(dstwin) + self.assertEqual(dstwin.instr(0, 0), b'sectetur_________') + self.assertEqual(dstwin.instr(1, 0), b'piscing_elit,____') + self.assertEqual(dstwin.instr(2, 0), b'_do_eiusmod______') + self.assertEqual(dstwin.instr(3, 0), b'_________________') + + srcwin.overwrite(dstwin) + self.assertEqual(dstwin.instr(0, 0), b'sectetur __') + self.assertEqual(dstwin.instr(1, 0), b'piscing elit, __') + self.assertEqual(dstwin.instr(2, 0), b' do eiusmod __') + self.assertEqual(dstwin.instr(3, 0), b'_________________') + + srcwin.overlay(dstwin, 1, 4, 3, 2, 4, 11) + self.assertEqual(dstwin.instr(3, 0), b'__r_sit_amet_____') + self.assertEqual(dstwin.instr(4, 0), b'__ectetur________') + self.assertEqual(dstwin.instr(5, 0), b'_________________') + + srcwin.overwrite(dstwin, 1, 4, 3, 2, 4, 11) + self.assertEqual(dstwin.instr(3, 0), b'__r sit amet_____') + self.assertEqual(dstwin.instr(4, 0), b'__ectetur _____') + self.assertEqual(dstwin.instr(5, 0), b'_________________') + + def test_refresh(self): + win = curses.newwin(5, 15, 2, 5) + win.noutrefresh() + win.redrawln(1, 2) + win.redrawwin() + win.refresh() + curses.doupdate() + + @requires_curses_window_meth('resize') + def test_resize(self): + win = curses.newwin(5, 15, 2, 5) + win.resize(4, 20) + self.assertEqual(win.getmaxyx(), (4, 20)) + win.resize(5, 15) + self.assertEqual(win.getmaxyx(), (5, 15)) + + @requires_curses_window_meth('enclose') + def test_enclose(self): + win = curses.newwin(5, 15, 2, 5) + # TODO: Return bool instead of 1/0 + self.assertTrue(win.enclose(2, 5)) + self.assertFalse(win.enclose(1, 5)) + self.assertFalse(win.enclose(2, 4)) + self.assertTrue(win.enclose(6, 19)) + self.assertFalse(win.enclose(7, 19)) + self.assertFalse(win.enclose(6, 20)) + + def test_putwin(self): + win = curses.newwin(5, 12, 1, 2) + win.addstr(2, 1, 'Lorem ipsum') + with tempfile.TemporaryFile() as f: + win.putwin(f) + del win + f.seek(0) + win = curses.getwin(f) + self.assertEqual(win.getbegyx(), (1, 2)) + self.assertEqual(win.getmaxyx(), (5, 12)) + self.assertEqual(win.instr(2, 0), b' Lorem ipsum') + + def test_borders_and_lines(self): + win = curses.newwin(5, 10, 5, 2) win.border('|', '!', '-', '_', '+', '\\', '#', '/') - with self.assertRaises(TypeError, - msg="Expected win.border() to raise TypeError"): - win.border(65, 66, 67, 68, - 69, [], 71, 72) - - win.box(65, 67) - win.box('!', '_') + self.assertEqual(win.instr(0, 0), b'+--------\\') + self.assertEqual(win.instr(1, 0), b'| !') + self.assertEqual(win.instr(4, 0), b'#________/') + win.border(b'|', b'!', b'-', b'_', + b'+', b'\\', b'#', b'/') + win.border(65, 66, 67, 68, + 69, 70, 71, 72) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, [], 71, 72) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, 70, 71, 72, 73) + self.assertRaises(TypeError, win.border, + 65, 66, 67, 68, 69, 70, 71, 72, 73) + win.border(65, 66, 67, 68, 69, 70, 71) + win.border(65, 66, 67, 68, 69, 70) + win.border(65, 66, 67, 68, 69) + win.border(65, 66, 67, 68) + win.border(65, 66, 67) + win.border(65, 66) + win.border(65) + win.border() + + win.box(':', '~') + self.assertEqual(win.instr(0, 1, 8), b'~~~~~~~~') + self.assertEqual(win.instr(1, 0), b': :') + self.assertEqual(win.instr(4, 1, 8), b'~~~~~~~~') win.box(b':', b'~') + win.box(65, 67) self.assertRaises(TypeError, win.box, 65, 66, 67) self.assertRaises(TypeError, win.box, 65) win.box() - stdscr.clearok(1) + win.move(1, 2) + win.hline('-', 5) + self.assertEqual(win.instr(1, 1, 7), b' ----- ') + win.hline(b'-', 5) + win.hline(45, 5) + win.hline('-', 5, curses.A_BOLD) + win.hline(1, 1, '-', 5) + win.hline(1, 1, '-', 5, curses.A_BOLD) + + win.move(1, 2) + win.vline('a', 3) + win.vline(b'a', 3) + win.vline(97, 3) + win.vline('a', 3, curses.A_STANDOUT) + win.vline(1, 1, 'a', 3) + win.vline(1, 1, ';', 2, curses.A_STANDOUT) + self.assertEqual(win.inch(1, 1), b';'[0] | curses.A_STANDOUT) + self.assertEqual(win.inch(2, 1), b';'[0] | curses.A_STANDOUT) + self.assertEqual(win.inch(3, 1), b'a'[0]) + + def test_unctrl(self): + # TODO: wunctrl() + self.assertEqual(curses.unctrl(b'A'), b'A') + self.assertEqual(curses.unctrl('A'), b'A') + self.assertEqual(curses.unctrl(65), b'A') + self.assertEqual(curses.unctrl(b'\n'), b'^J') + self.assertEqual(curses.unctrl('\n'), b'^J') + self.assertEqual(curses.unctrl(10), b'^J') + self.assertRaises(TypeError, curses.unctrl, b'') + self.assertRaises(TypeError, curses.unctrl, b'AB') + self.assertRaises(TypeError, curses.unctrl, '') + self.assertRaises(TypeError, curses.unctrl, 'AB') + self.assertRaises(OverflowError, curses.unctrl, 2**64) + + def test_endwin(self): + if not self.isatty: + self.skipTest('requires terminal') + self.assertIs(curses.isendwin(), False) + curses.endwin() + self.assertIs(curses.isendwin(), True) + curses.doupdate() + self.assertIs(curses.isendwin(), False) + + def test_terminfo(self): + self.assertIsInstance(curses.tigetflag('hc'), int) + self.assertEqual(curses.tigetflag('cols'), -1) + self.assertEqual(curses.tigetflag('cr'), -1) + + self.assertIsInstance(curses.tigetnum('cols'), int) + self.assertEqual(curses.tigetnum('hc'), -2) + self.assertEqual(curses.tigetnum('cr'), -2) + + self.assertIsInstance(curses.tigetstr('cr'), (bytes, type(None))) + self.assertIsNone(curses.tigetstr('hc')) + self.assertIsNone(curses.tigetstr('cols')) + + cud = curses.tigetstr('cud') + if cud is not None: + # See issue10570. + self.assertIsInstance(cud, bytes) + curses.tparm(cud, 2) + cud_2 = curses.tparm(cud, 2) + self.assertIsInstance(cud_2, bytes) + curses.putp(cud_2) + + curses.putp(b'abc\n') + + def test_misc_module_funcs(self): + curses.delay_output(1) + curses.flushinp() + + curses.doupdate() + self.assertIs(curses.isendwin(), False) + + curses.napms(100) + + curses.newpad(50, 50) + + def test_env_queries(self): + # TODO: term_attrs(), erasewchar(), killwchar() + self.assertIsInstance(curses.termname(), bytes) + self.assertIsInstance(curses.longname(), bytes) + self.assertIsInstance(curses.baudrate(), int) + self.assertIsInstance(curses.has_ic(), bool) + self.assertIsInstance(curses.has_il(), bool) + self.assertIsInstance(curses.termattrs(), int) + + c = curses.killchar() + self.assertIsInstance(c, bytes) + self.assertEqual(len(c), 1) + c = curses.erasechar() + self.assertIsInstance(c, bytes) + self.assertEqual(len(c), 1) + + def test_output_options(self): + stdscr = self.stdscr + + stdscr.clearok(True) + stdscr.clearok(False) - win4 = stdscr.derwin(2,2) - win4 = stdscr.derwin(1,1, 5,5) - win4.mvderwin(9,9) + stdscr.idcok(True) + stdscr.idcok(False) - stdscr.echochar('a') - stdscr.echochar('a', curses.A_BOLD) - stdscr.hline('-', 5) - stdscr.hline('-', 5, curses.A_BOLD) - stdscr.hline(1,1,'-', 5) - stdscr.hline(1,1,'-', 5, curses.A_BOLD) + stdscr.idlok(False) + stdscr.idlok(True) - stdscr.idcok(1) - stdscr.idlok(1) if hasattr(stdscr, 'immedok'): - stdscr.immedok(1) - stdscr.immedok(0) - stdscr.insch('c') - stdscr.insdelln(1) - stdscr.insnstr('abc', 3) - stdscr.insnstr('abc', 3, curses.A_BOLD) - stdscr.insnstr(5, 5, 'abc', 3) - stdscr.insnstr(5, 5, 'abc', 3, curses.A_BOLD) - - stdscr.insstr('def') - stdscr.insstr('def', curses.A_BOLD) - stdscr.insstr(5, 5, 'def') - stdscr.insstr(5, 5, 'def', curses.A_BOLD) - stdscr.is_linetouched(0) - stdscr.keypad(1) - stdscr.leaveok(1) - stdscr.move(3,3) - win.mvwin(2,2) - stdscr.nodelay(1) - stdscr.notimeout(1) - win2.overlay(win) - win2.overwrite(win) - win2.overlay(win, 1, 2, 2, 1, 3, 3) - win2.overwrite(win, 1, 2, 2, 1, 3, 3) - stdscr.redrawln(1,2) - - stdscr.scrollok(1) - stdscr.scroll() - stdscr.scroll(2) - stdscr.scroll(-3) - - stdscr.move(12, 2) - stdscr.setscrreg(10,15) - win3 = stdscr.subwin(10,10) - win3 = stdscr.subwin(10,10, 5,5) - if hasattr(stdscr, 'syncok') and not sys.platform.startswith("sunos"): - stdscr.syncok(1) - stdscr.timeout(5) - stdscr.touchline(5,5) - stdscr.touchline(5,5,0) - stdscr.vline('a', 3) - stdscr.vline('a', 3, curses.A_STANDOUT) - if hasattr(stdscr, 'chgat'): - stdscr.chgat(5, 2, 3, curses.A_BLINK) - stdscr.chgat(3, curses.A_BOLD) - stdscr.chgat(5, 8, curses.A_UNDERLINE) - stdscr.chgat(curses.A_BLINK) - stdscr.refresh() + stdscr.immedok(True) + stdscr.immedok(False) - stdscr.vline(1,1, 'a', 3) - stdscr.vline(1,1, 'a', 3, curses.A_STANDOUT) + stdscr.leaveok(True) + stdscr.leaveok(False) - if hasattr(stdscr, 'resize'): - stdscr.resize(25, 80) - if hasattr(stdscr, 'enclose'): - stdscr.enclose(10, 10) + stdscr.scrollok(True) + stdscr.scrollok(False) - with tempfile.TemporaryFile() as f: - self.stdscr.putwin(f) - f.seek(0) - curses.getwin(f) + stdscr.setscrreg(5, 10) - self.assertRaises(ValueError, stdscr.getstr, -400) - self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400) - self.assertRaises(ValueError, stdscr.instr, -2) - self.assertRaises(ValueError, stdscr.instr, 2, 3, -2) + curses.nonl() + curses.nl(True) + curses.nl(False) + curses.nl() - def test_embedded_null_chars(self): - # reject embedded null bytes and characters + + def test_input_options(self): stdscr = self.stdscr - for arg in ['a', b'a']: - with self.subTest(arg=arg): - self.assertRaises(ValueError, stdscr.addstr, 'a\0') - self.assertRaises(ValueError, stdscr.addnstr, 'a\0', 1) - self.assertRaises(ValueError, stdscr.insstr, 'a\0') - self.assertRaises(ValueError, stdscr.insnstr, 'a\0', 1) - - def test_module_funcs(self): - "Test module-level functions" - for func in [curses.baudrate, curses.beep, curses.can_change_color, - curses.doupdate, curses.flash, curses.flushinp, - curses.has_colors, curses.has_ic, curses.has_il, - curses.isendwin, curses.killchar, curses.longname, - 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'): - curses.getsyx() - - # Functions that actually need arguments - if curses.tigetstr("cnorm"): - curses.curs_set(1) - curses.delay_output(1) - curses.echo() ; curses.echo(1) + curses.nocbreak() + curses.cbreak() + curses.cbreak(False) + curses.cbreak(True) + curses.intrflush(True) + curses.intrflush(False) + + curses.raw() + curses.raw(False) + curses.raw(True) + curses.noraw() + + curses.noecho() + curses.echo() + curses.echo(False) + curses.echo(True) + + curses.halfdelay(255) curses.halfdelay(1) - if self.isatty: - curses.intrflush(1) - curses.meta(1) - curses.napms(100) - curses.newpad(50,50) - win = curses.newwin(5,5) - win = curses.newwin(5,5, 1,1) - curses.nl() ; curses.nl(1) - curses.putp(b'abc') + + stdscr.keypad(True) + stdscr.keypad(False) + + curses.meta(True) + curses.meta(False) + + stdscr.nodelay(True) + stdscr.nodelay(False) + + curses.noqiflush() + curses.qiflush(True) + curses.qiflush(False) curses.qiflush() - if self.isatty: - curses.raw() ; curses.raw(1) - if hasattr(curses, 'setsyx'): - curses.setsyx(5,5) - curses.tigetflag('hc') - curses.tigetnum('co') - curses.tigetstr('cr') - curses.tparm(b'cr') - if hasattr(curses, 'typeahead'): - curses.typeahead(sys.__stdin__.fileno()) - curses.unctrl('a') - curses.ungetch('a') - if hasattr(curses, 'use_env'): - curses.use_env(1) - - # Functions only available on a few platforms + + stdscr.notimeout(True) + stdscr.notimeout(False) + + stdscr.timeout(-1) + stdscr.timeout(0) + stdscr.timeout(5) + + @requires_curses_func('typeahead') + def test_typeahead(self): + curses.typeahead(sys.__stdin__.fileno()) + curses.typeahead(-1) + + def test_prog_mode(self): + if not self.isatty: + self.skipTest('requires terminal') + curses.def_prog_mode() + curses.reset_prog_mode() + + def test_beep(self): + if (curses.tigetstr("bel") is not None + or curses.tigetstr("flash") is not None): + curses.beep() + else: + try: + curses.beep() + except curses.error: + self.skipTest('beep() failed') + + def test_flash(self): + if (curses.tigetstr("bel") is not None + or curses.tigetstr("flash") is not None): + curses.flash() + else: + try: + curses.flash() + except curses.error: + self.skipTest('flash() failed') + + def test_curs_set(self): + for vis, cap in [(0, 'civis'), (2, 'cvvis'), (1, 'cnorm')]: + if curses.tigetstr(cap) is not None: + curses.curs_set(vis) + else: + try: + curses.curs_set(vis) + except curses.error: + pass + + @requires_curses_func('getsyx') + def test_getsyx(self): + y, x = curses.getsyx() + self.assertIsInstance(y, int) + self.assertIsInstance(x, int) + curses.setsyx(4, 5) + self.assertEqual(curses.getsyx(), (4, 5)) def bad_colors(self): return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) @@ -319,6 +828,10 @@ def bad_colors(self): def bad_pairs(self): return (-2**31 - 1, 2**31, -2**63 - 1, 2**63, 2**64) + def test_has_colors(self): + self.assertIsInstance(curses.has_colors(), bool) + self.assertIsInstance(curses.can_change_color(), bool) + def test_start_color(self): if not curses.has_colors(): self.skipTest('requires colors support') @@ -342,7 +855,7 @@ def test_color_content(self): @requires_colors def test_init_color(self): - if not curses.can_change_color: + if not curses.can_change_color(): self.skipTest('cannot change color') old = curses.color_content(0) @@ -430,14 +943,22 @@ def test_color_attrs(self): @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() + old = curses.pair_content(0) + try: + curses.use_default_colors() + except curses.error: + self.skipTest('cannot change color (use_default_colors() failed)') self.assertEqual(curses.pair_content(0), (-1, -1)) + self.assertIn(old, [(curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1), (0, 0)]) - @requires_curses_func('keyname') def test_keyname(self): - curses.keyname(13) + # TODO: key_name() + self.assertEqual(curses.keyname(65), b'A') + self.assertEqual(curses.keyname(13), b'^M') + self.assertEqual(curses.keyname(127), b'^?') + self.assertEqual(curses.keyname(0), b'^@') + self.assertRaises(ValueError, curses.keyname, -1) + self.assertIsInstance(curses.keyname(256), bytes) @requires_curses_func('has_key') def test_has_key(self): @@ -493,22 +1014,46 @@ def test_new_curses_panel(self): @requires_curses_func('is_term_resized') def test_is_term_resized(self): - curses.is_term_resized(*self.stdscr.getmaxyx()) + lines, cols = curses.LINES, curses.COLS + self.assertIs(curses.is_term_resized(lines, cols), False) + self.assertIs(curses.is_term_resized(lines-1, cols-1), True) @requires_curses_func('resize_term') def test_resize_term(self): - curses.resize_term(*self.stdscr.getmaxyx()) + curses.update_lines_cols() + lines, cols = curses.LINES, curses.COLS + new_lines = lines - 1 + new_cols = cols + 1 + curses.resize_term(new_lines, new_cols) + self.assertEqual(curses.LINES, new_lines) + self.assertEqual(curses.COLS, new_cols) + + curses.resize_term(lines, cols) + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) @requires_curses_func('resizeterm') def test_resizeterm(self): + curses.update_lines_cols() lines, cols = curses.LINES, curses.COLS new_lines = lines - 1 new_cols = cols + 1 curses.resizeterm(new_lines, new_cols) - self.assertEqual(curses.LINES, new_lines) self.assertEqual(curses.COLS, new_cols) + curses.resizeterm(lines, cols) + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) + + def test_ungetch(self): + curses.ungetch(b'A') + self.assertEqual(self.stdscr.getkey(), 'A') + curses.ungetch('B') + self.assertEqual(self.stdscr.getkey(), 'B') + curses.ungetch(67) + self.assertEqual(self.stdscr.getkey(), 'C') + def test_issue6243(self): curses.ungetch(1025) self.stdscr.getkey() @@ -537,10 +1082,6 @@ def test_unget_wch(self): read = stdscr.get_wch() self.assertEqual(read, ch) - def test_issue10570(self): - b = curses.tparm(curses.tigetstr("cup"), 5, 3) - self.assertIs(type(b), bytes) - def test_encoding(self): stdscr = self.stdscr import codecs @@ -580,26 +1121,25 @@ def test_issue21088(self): human_readable_signature = stdscr.addch.__doc__.split("\n")[0] self.assertIn("[y, x,]", human_readable_signature) + @requires_curses_window_meth('resize') def test_issue13051(self): - stdscr = self.stdscr - if not hasattr(stdscr, 'resize'): - raise unittest.SkipTest('requires curses.window.resize') - box = curses.textpad.Textbox(stdscr, insert_mode=True) - lines, cols = stdscr.getmaxyx() - stdscr.resize(lines-2, cols-2) + win = curses.newwin(5, 15, 2, 5) + box = curses.textpad.Textbox(win, insert_mode=True) + lines, cols = win.getmaxyx() + win.resize(lines-2, cols-2) # this may cause infinite recursion, leading to a RuntimeError box._insert_printable_char('a') class MiscTests(unittest.TestCase): - @requires_curses_func('update_lines_cols') def test_update_lines_cols(self): - # this doesn't actually test that LINES and COLS are updated, - # because we can't automate changing them. See Issue #4254 for - # a manual test script. We can only test that the function - # can be called. curses.update_lines_cols() + lines, cols = curses.LINES, curses.COLS + curses.LINES = curses.COLS = 0 + curses.update_lines_cols() + self.assertEqual(curses.LINES, lines) + self.assertEqual(curses.COLS, cols) @requires_curses_func('ncurses_version') def test_ncurses_version(self): @@ -621,6 +1161,7 @@ def test_ncurses_version(self): self.assertGreaterEqual(v.minor, 0) self.assertGreaterEqual(v.patch, 0) + class TestAscii(unittest.TestCase): def test_controlnames(self): @@ -709,5 +1250,21 @@ def test_unctrl(self): self.assertEqual(unctrl(ord('\xc1')), '!A') +def lorem_ipsum(win): + text = [ + 'Lorem ipsum', + 'dolor sit amet,', + 'consectetur', + 'adipiscing elit,', + 'sed do eiusmod', + 'tempor incididunt', + 'ut labore et', + 'dolore magna', + 'aliqua.', + ] + maxy, maxx = win.getmaxyx() + for y, line in enumerate(text[:maxy]): + win.addstr(y, 0, line[:maxx - (y == maxy - 1)]) + if __name__ == '__main__': unittest.main() From webhook-mailer at python.org Sun Jan 31 12:55:24 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 17:55:24 -0000 Subject: [Python-checkins] bpo-41604: Don't decrement the reference count of the previous user_ptr when set_panel_usertpr fails (GH-21933) Message-ID: https://github.com/python/cpython/commit/3243e8a4b4b4cf321f9b28335d565742a34b1976 commit: 3243e8a4b4b4cf321f9b28335d565742a34b1976 branch: master author: Anonymous Maarten committer: serhiy-storchaka date: 2021-01-31T19:55:15+02:00 summary: bpo-41604: Don't decrement the reference count of the previous user_ptr when set_panel_usertpr fails (GH-21933) files: A Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst M Modules/_curses_panel.c diff --git a/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst b/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst new file mode 100644 index 0000000000000..0f9794cbdb321 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst @@ -0,0 +1,2 @@ +Don't decrement the reference count of the previous user_ptr when +set_panel_userptr fails. diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c index d782ccd086798..94caf8c93bc8c 100644 --- a/Modules/_curses_panel.c +++ b/Modules/_curses_panel.c @@ -456,7 +456,9 @@ _curses_panel_panel_set_userptr_impl(PyCursesPanelObject *self, /* In case of an ncurses error, decref the new object again */ Py_DECREF(obj); } - Py_XDECREF(oldobj); + else { + Py_XDECREF(oldobj); + } _curses_panel_state *state = PyType_GetModuleState(cls); return PyCursesCheckERR(state, rc, "set_panel_userptr"); From webhook-mailer at python.org Sun Jan 31 14:44:35 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 19:44:35 -0000 Subject: [Python-checkins] [3.9] bpo-41604: Don't decrement the reference count of the previous user_ptr when set_panel_usertpr fails (GH-21933). (GH-24403) Message-ID: https://github.com/python/cpython/commit/3c8d6934436e20163be802f5239c5b4e4925eeec commit: 3c8d6934436e20163be802f5239c5b4e4925eeec branch: 3.9 author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-31T21:44:31+02:00 summary: [3.9] bpo-41604: Don't decrement the reference count of the previous user_ptr when set_panel_usertpr fails (GH-21933). (GH-24403) (cherry picked from commit 3243e8a4b4b4cf321f9b28335d565742a34b1976) Co-authored-by: Anonymous Maarten files: A Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst M Modules/_curses_panel.c diff --git a/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst b/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst new file mode 100644 index 0000000000000..0f9794cbdb321 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst @@ -0,0 +1,2 @@ +Don't decrement the reference count of the previous user_ptr when +set_panel_userptr fails. diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c index f124803493d88..4f026794e3417 100644 --- a/Modules/_curses_panel.c +++ b/Modules/_curses_panel.c @@ -440,7 +440,9 @@ _curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyObject *obj) /* In case of an ncurses error, decref the new object again */ Py_DECREF(obj); } - Py_XDECREF(oldobj); + else { + Py_XDECREF(oldobj); + } return PyCursesCheckERR(rc, "set_panel_userptr"); } From webhook-mailer at python.org Sun Jan 31 15:51:50 2021 From: webhook-mailer at python.org (miss-islington) Date: Sun, 31 Jan 2021 20:51:50 -0000 Subject: [Python-checkins] [3.9] bpo-41604: Don't decrement the reference count of the previous user_ptr when set_panel_usertpr fails (GH-21933). (GH-24403) Message-ID: https://github.com/python/cpython/commit/931263baab62b1c3fa7647e45ec6ee6ef4409e7c commit: 931263baab62b1c3fa7647e45ec6ee6ef4409e7c 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-31T12:51:23-08:00 summary: [3.9] bpo-41604: Don't decrement the reference count of the previous user_ptr when set_panel_usertpr fails (GH-21933). (GH-24403) (cherry picked from commit 3243e8a4b4b4cf321f9b28335d565742a34b1976) Co-authored-by: Anonymous Maarten (cherry picked from commit 3c8d6934436e20163be802f5239c5b4e4925eeec) Co-authored-by: Serhiy Storchaka files: A Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst M Modules/_curses_panel.c diff --git a/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst b/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst new file mode 100644 index 0000000000000..0f9794cbdb321 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-08-21-15-24-14.bpo-41604.rTXleO.rst @@ -0,0 +1,2 @@ +Don't decrement the reference count of the previous user_ptr when +set_panel_userptr fails. diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c index 53849e3a29cc0..d22e2adf89c83 100644 --- a/Modules/_curses_panel.c +++ b/Modules/_curses_panel.c @@ -433,7 +433,9 @@ _curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyObject *obj) /* In case of an ncurses error, decref the new object again */ Py_DECREF(obj); } - Py_XDECREF(oldobj); + else { + Py_XDECREF(oldobj); + } return PyCursesCheckERR(rc, "set_panel_userptr"); } From webhook-mailer at python.org Sun Jan 31 16:22:22 2021 From: webhook-mailer at python.org (serhiy-storchaka) Date: Sun, 31 Jan 2021 21:22:22 -0000 Subject: [Python-checkins] bpo-43016: Fix test_curses on platform without cursesw (GH-24405) Message-ID: https://github.com/python/cpython/commit/a1e9a1e120a11c563e166c15721169184c802f8b commit: a1e9a1e120a11c563e166c15721169184c802f8b branch: master author: Serhiy Storchaka committer: serhiy-storchaka date: 2021-01-31T23:21:55+02:00 summary: bpo-43016: Fix test_curses on platform without cursesw (GH-24405) files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 29286bce99e89..a9f7001d39f08 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -240,13 +240,21 @@ def test_refresh_control(self): def test_output_character(self): stdscr = self.stdscr + encoding = stdscr.encoding # addch() stdscr.refresh() stdscr.move(0, 0) stdscr.addch('A') stdscr.addch(b'A') stdscr.addch(65) - stdscr.addch('\u20ac') + c = '\u20ac' + try: + stdscr.addch(c) + except UnicodeEncodeError: + self.assertRaises(UnicodeEncodeError, c.encode, encoding) + except OverflowError: + encoded = c.encode(encoding) + self.assertNotEqual(len(encoded), 1, repr(encoded)) stdscr.addch('A', curses.A_BOLD) stdscr.addch(1, 2, 'A') stdscr.addch(2, 3, 'A', curses.A_BOLD) @@ -258,19 +266,25 @@ def test_output_character(self): stdscr.echochar('A') stdscr.echochar(b'A') stdscr.echochar(65) - self.assertRaises(OverflowError, stdscr.echochar, '\u20ac') + with self.assertRaises((UnicodeEncodeError, OverflowError)): + stdscr.echochar('\u20ac') stdscr.echochar('A', curses.A_BOLD) self.assertIs(stdscr.is_wintouched(), False) def test_output_string(self): stdscr = self.stdscr + encoding = stdscr.encoding # addstr()/insstr() for func in [stdscr.addstr, stdscr.insstr]: with self.subTest(func.__qualname__): stdscr.move(0, 0) func('abcd') func(b'abcd') - func('????') + s = '????' + try: + func(s) + except UnicodeEncodeError: + self.assertRaises(UnicodeEncodeError, s.encode, encoding) func('abcd', curses.A_BOLD) func(1, 2, 'abcd') func(2, 3, 'abcd', curses.A_BOLD) @@ -281,7 +295,11 @@ def test_output_string(self): stdscr.move(0, 0) func('1234', 3) func(b'1234', 3) - func('\u0661\u0662\u0663\u0664', 3) + s = '\u0661\u0662\u0663\u0664' + try: + func(s, 3) + except UnicodeEncodeError: + self.assertRaises(UnicodeEncodeError, s.encode, encoding) func('1234', 5) func('1234', 3, curses.A_BOLD) func(1, 2, '1234', 3) @@ -471,7 +489,7 @@ def test_background(self): win = curses.newwin(5, 15, 5, 2) win.addstr(0, 0, 'Lorem ipsum') - self.assertEqual(win.getbkgd(), 0) + self.assertIn(win.getbkgd(), (0, 32)) # bkgdset() win.bkgdset('_') From webhook-mailer at python.org Sun Jan 31 17:48:30 2021 From: webhook-mailer at python.org (pablogsal) Date: Sun, 31 Jan 2021 22:48:30 -0000 Subject: [Python-checkins] bpo-42986: Fix parser crash when reporting syntax errors in f-string with newlines (GH-24279) Message-ID: https://github.com/python/cpython/commit/40901518167c66abc1ebc5b71c5b86d733cfa154 commit: 40901518167c66abc1ebc5b71c5b86d733cfa154 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-31T22:48:23Z summary: bpo-42986: Fix parser crash when reporting syntax errors in f-string with newlines (GH-24279) files: A Misc/NEWS.d/next/Core and Builtins/2021-01-20-23-44-15.bpo-42986.sWoaGf.rst M Lib/test/test_fstring.py M Parser/pegen.c diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 7ca1512ebbf1b..d7143d154a1bc 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -664,6 +664,9 @@ def test_parens_in_expressions(self): self.assertAllRaise(SyntaxError, 'unterminated string literal', ["f'{\n}'", ]) + def test_newlines_before_syntax_error(self): + self.assertAllRaise(SyntaxError, "invalid syntax", + ["f'{.}'", "\nf'{.}'", "\n\nf'{.}'"]) def test_backslashes_in_string_part(self): self.assertEqual(f'\t', '\t') diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-20-23-44-15.bpo-42986.sWoaGf.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-20-23-44-15.bpo-42986.sWoaGf.rst new file mode 100644 index 0000000000000..6e4ed60bf224d --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-20-23-44-15.bpo-42986.sWoaGf.rst @@ -0,0 +1,2 @@ +Fix parser crash when reporting syntax errors in f-string with newlines. +Patch by Pablo Galindo. diff --git a/Parser/pegen.c b/Parser/pegen.c index 0e7f86bc99e45..2554273877f78 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -454,7 +454,7 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype, does not physically exist */ assert(p->tok->fp == NULL || p->tok->fp == stdin || p->tok->done == E_EOF); - if (p->tok->lineno == lineno) { + if (p->tok->lineno <= lineno) { Py_ssize_t size = p->tok->inp - p->tok->buf; error_line = PyUnicode_DecodeUTF8(p->tok->buf, size, "replace"); } From webhook-mailer at python.org Sun Jan 31 17:53:00 2021 From: webhook-mailer at python.org (pablogsal) Date: Sun, 31 Jan 2021 22:53:00 -0000 Subject: [Python-checkins] bpo-43017: Improve error message for unparenthesised tuples in comprehensions (GH24314) Message-ID: https://github.com/python/cpython/commit/835f14ff8eec10b3d96f821a1eb46a986e00c690 commit: 835f14ff8eec10b3d96f821a1eb46a986e00c690 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-31T22:52:56Z summary: bpo-43017: Improve error message for unparenthesised tuples in comprehensions (GH24314) files: A Misc/NEWS.d/next/Core and Builtins/2021-01-24-18-02-05.bpo-43017.emEcXX.rst M Grammar/python.gram M Lib/test/test_named_expressions.py M Lib/test/test_syntax.py M Parser/parser.c diff --git a/Grammar/python.gram b/Grammar/python.gram index 05ddce520fbae..e72158be22380 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -507,7 +507,7 @@ strings[expr_ty] (memo): a=STRING+ { _PyPegen_concatenate_strings(p, a) } list[expr_ty]: | '[' a=[star_named_expressions] ']' { _Py_List(a, Load, EXTRA) } listcomp[expr_ty]: - | '[' a=named_expression ~ b=for_if_clauses ']' { _Py_ListComp(a, b, EXTRA) } + | '[' a=named_expression b=for_if_clauses ']' { _Py_ListComp(a, b, EXTRA) } | invalid_comprehension tuple[expr_ty]: | '(' a=[y=star_named_expression ',' z=[star_named_expressions] { _PyPegen_seq_insert_in_front(p, y, z) } ] ')' { @@ -516,11 +516,11 @@ group[expr_ty]: | '(' a=(yield_expr | named_expression) ')' { a } | invalid_group genexp[expr_ty]: - | '(' a=named_expression ~ b=for_if_clauses ')' { _Py_GeneratorExp(a, b, EXTRA) } + | '(' a=named_expression b=for_if_clauses ')' { _Py_GeneratorExp(a, b, EXTRA) } | invalid_comprehension set[expr_ty]: '{' a=star_named_expressions '}' { _Py_Set(a, EXTRA) } setcomp[expr_ty]: - | '{' a=named_expression ~ b=for_if_clauses '}' { _Py_SetComp(a, b, EXTRA) } + | '{' a=named_expression b=for_if_clauses '}' { _Py_SetComp(a, b, EXTRA) } | invalid_comprehension dict[expr_ty]: | '{' a=[double_starred_kvpairs] '}' { @@ -692,6 +692,8 @@ invalid_primary: invalid_comprehension: | ('[' | '(' | '{') a=starred_expression for_if_clauses { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "iterable unpacking cannot be used in comprehension") } + | ('[' | '{') a=star_named_expression ',' [star_named_expressions] { + RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "did you forget parentheses around the comprehension target?") } invalid_dict_comprehension: | '{' a='**' bitwise_or for_if_clauses '}' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "dict unpacking cannot be used in dict comprehension") } diff --git a/Lib/test/test_named_expressions.py b/Lib/test/test_named_expressions.py index 5908f1210857a..20ac2e699f0c3 100644 --- a/Lib/test/test_named_expressions.py +++ b/Lib/test/test_named_expressions.py @@ -101,7 +101,8 @@ def test_named_expression_invalid_16(self): def test_named_expression_invalid_17(self): code = "[i := 0, j := 1 for i, j in [(1, 2), (3, 4)]]" - with self.assertRaisesRegex(SyntaxError, "invalid syntax"): + with self.assertRaisesRegex(SyntaxError, + "did you forget parentheses around the comprehension target?"): exec(code, {}, {}) def test_named_expression_invalid_in_class_body(self): diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index c8d191df4cc49..604474f1e8387 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -235,6 +235,21 @@ Traceback (most recent call last): SyntaxError: invalid syntax +Comprehensions creating tuples without parentheses +should produce a specialized error message: + +>>> [x,y for x,y in range(100)] +Traceback (most recent call last): +SyntaxError: did you forget parentheses around the comprehension target? + +>>> {x,y for x,y in range(100)} +Traceback (most recent call last): +SyntaxError: did you forget parentheses around the comprehension target? + +>>> {x,y: None for x,y in range(100)} +Traceback (most recent call last): +SyntaxError: did you forget parentheses around the comprehension target? + From compiler_complex_args(): >>> def f(None=1): diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-01-24-18-02-05.bpo-43017.emEcXX.rst b/Misc/NEWS.d/next/Core and Builtins/2021-01-24-18-02-05.bpo-43017.emEcXX.rst new file mode 100644 index 0000000000000..a809f5cbb1de1 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-01-24-18-02-05.bpo-43017.emEcXX.rst @@ -0,0 +1,2 @@ +Improve error message in the parser when using un-parenthesised tuples in +comprehensions. Patch by Pablo Galindo. diff --git a/Parser/parser.c b/Parser/parser.c index f7794e715b918..d333accf71cca 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -362,11 +362,11 @@ static KeywordToken *reserved_keywords[] = { #define _loop0_129_type 1293 #define _tmp_130_type 1294 #define _tmp_131_type 1295 -#define _loop0_132_type 1296 -#define _loop1_133_type 1297 -#define _loop0_134_type 1298 -#define _loop1_135_type 1299 -#define _tmp_136_type 1300 +#define _tmp_132_type 1296 +#define _loop0_133_type 1297 +#define _loop1_134_type 1298 +#define _loop0_135_type 1299 +#define _loop1_136_type 1300 #define _tmp_137_type 1301 #define _tmp_138_type 1302 #define _tmp_139_type 1303 @@ -385,6 +385,7 @@ static KeywordToken *reserved_keywords[] = { #define _tmp_152_type 1316 #define _tmp_153_type 1317 #define _tmp_154_type 1318 +#define _tmp_155_type 1319 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -682,11 +683,11 @@ static asdl_seq *_loop0_128_rule(Parser *p); static asdl_seq *_loop0_129_rule(Parser *p); static void *_tmp_130_rule(Parser *p); static void *_tmp_131_rule(Parser *p); -static asdl_seq *_loop0_132_rule(Parser *p); -static asdl_seq *_loop1_133_rule(Parser *p); -static asdl_seq *_loop0_134_rule(Parser *p); -static asdl_seq *_loop1_135_rule(Parser *p); -static void *_tmp_136_rule(Parser *p); +static void *_tmp_132_rule(Parser *p); +static asdl_seq *_loop0_133_rule(Parser *p); +static asdl_seq *_loop1_134_rule(Parser *p); +static asdl_seq *_loop0_135_rule(Parser *p); +static asdl_seq *_loop1_136_rule(Parser *p); static void *_tmp_137_rule(Parser *p); static void *_tmp_138_rule(Parser *p); static void *_tmp_139_rule(Parser *p); @@ -705,6 +706,7 @@ static void *_tmp_151_rule(Parser *p); static void *_tmp_152_rule(Parser *p); static void *_tmp_153_rule(Parser *p); static void *_tmp_154_rule(Parser *p); +static void *_tmp_155_rule(Parser *p); // file: statements? $ @@ -11089,7 +11091,7 @@ list_rule(Parser *p) return _res; } -// listcomp: '[' named_expression ~ for_if_clauses ']' | invalid_comprehension +// listcomp: '[' named_expression for_if_clauses ']' | invalid_comprehension static expr_ty listcomp_rule(Parser *p) { @@ -11109,13 +11111,12 @@ listcomp_rule(Parser *p) 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 - { // '[' named_expression ~ for_if_clauses ']' + { // '[' named_expression for_if_clauses ']' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> listcomp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'[' named_expression ~ for_if_clauses ']'")); - int _cut_var = 0; + D(fprintf(stderr, "%*c> listcomp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'[' named_expression for_if_clauses ']'")); Token * _literal; Token * _literal_1; expr_ty a; @@ -11125,14 +11126,12 @@ listcomp_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_cut_var = 1) - && (b = for_if_clauses_rule(p)) // for_if_clauses && (_literal_1 = _PyPegen_expect_token(p, 10)) // token=']' ) { - D(fprintf(stderr, "%*c+ listcomp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'[' named_expression ~ for_if_clauses ']'")); + D(fprintf(stderr, "%*c+ listcomp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'[' named_expression for_if_clauses ']'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -11152,11 +11151,7 @@ listcomp_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s listcomp[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'[' named_expression ~ for_if_clauses ']'")); - if (_cut_var) { - D(p->level--); - return NULL; - } + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'[' named_expression for_if_clauses ']'")); } if (p->call_invalid_rules) { // invalid_comprehension if (p->error_indicator) { @@ -11314,7 +11309,7 @@ group_rule(Parser *p) return _res; } -// genexp: '(' named_expression ~ for_if_clauses ')' | invalid_comprehension +// genexp: '(' named_expression for_if_clauses ')' | invalid_comprehension static expr_ty genexp_rule(Parser *p) { @@ -11334,13 +11329,12 @@ genexp_rule(Parser *p) 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 - { // '(' named_expression ~ for_if_clauses ')' + { // '(' named_expression for_if_clauses ')' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> genexp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' named_expression ~ for_if_clauses ')'")); - int _cut_var = 0; + D(fprintf(stderr, "%*c> genexp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' named_expression for_if_clauses ')'")); Token * _literal; Token * _literal_1; expr_ty a; @@ -11350,14 +11344,12 @@ genexp_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_cut_var = 1) - && (b = for_if_clauses_rule(p)) // for_if_clauses && (_literal_1 = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ genexp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' named_expression ~ for_if_clauses ')'")); + D(fprintf(stderr, "%*c+ genexp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' named_expression for_if_clauses ')'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -11377,11 +11369,7 @@ genexp_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s genexp[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' named_expression ~ for_if_clauses ')'")); - if (_cut_var) { - D(p->level--); - return NULL; - } + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' named_expression for_if_clauses ')'")); } if (p->call_invalid_rules) { // invalid_comprehension if (p->error_indicator) { @@ -11473,7 +11461,7 @@ set_rule(Parser *p) return _res; } -// setcomp: '{' named_expression ~ for_if_clauses '}' | invalid_comprehension +// setcomp: '{' named_expression for_if_clauses '}' | invalid_comprehension static expr_ty setcomp_rule(Parser *p) { @@ -11493,13 +11481,12 @@ setcomp_rule(Parser *p) 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 - { // '{' named_expression ~ for_if_clauses '}' + { // '{' named_expression for_if_clauses '}' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> setcomp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{' named_expression ~ for_if_clauses '}'")); - int _cut_var = 0; + D(fprintf(stderr, "%*c> setcomp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{' named_expression for_if_clauses '}'")); Token * _literal; Token * _literal_1; expr_ty a; @@ -11509,14 +11496,12 @@ setcomp_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_cut_var = 1) - && (b = for_if_clauses_rule(p)) // for_if_clauses && (_literal_1 = _PyPegen_expect_token(p, 26)) // token='}' ) { - D(fprintf(stderr, "%*c+ setcomp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{' named_expression ~ for_if_clauses '}'")); + D(fprintf(stderr, "%*c+ setcomp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{' named_expression for_if_clauses '}'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -11536,11 +11521,7 @@ setcomp_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s setcomp[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{' named_expression ~ for_if_clauses '}'")); - if (_cut_var) { - D(p->level--); - return NULL; - } + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{' named_expression for_if_clauses '}'")); } if (p->call_invalid_rules) { // invalid_comprehension if (p->error_indicator) { @@ -15194,7 +15175,9 @@ invalid_primary_rule(Parser *p) return _res; } -// invalid_comprehension: ('[' | '(' | '{') starred_expression for_if_clauses +// invalid_comprehension: +// | ('[' | '(' | '{') starred_expression for_if_clauses +// | ('[' | '{') star_named_expression ',' star_named_expressions? static void * invalid_comprehension_rule(Parser *p) { @@ -15235,6 +15218,40 @@ invalid_comprehension_rule(Parser *p) D(fprintf(stderr, "%*c%s invalid_comprehension[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "('[' | '(' | '{') starred_expression for_if_clauses")); } + { // ('[' | '{') star_named_expression ',' star_named_expressions? + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_comprehension[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('[' | '{') star_named_expression ',' star_named_expressions?")); + Token * _literal; + void *_opt_var; + UNUSED(_opt_var); // Silence compiler warnings + void *_tmp_132_var; + expr_ty a; + if ( + (_tmp_132_var = _tmp_132_rule(p)) // '[' | '{' + && + (a = star_named_expression_rule(p)) // star_named_expression + && + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + && + (_opt_var = star_named_expressions_rule(p), 1) // star_named_expressions? + ) + { + D(fprintf(stderr, "%*c+ invalid_comprehension[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "('[' | '{') star_named_expression ',' star_named_expressions?")); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "did you forget parentheses around the comprehension target?" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_comprehension[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "('[' | '{') star_named_expression ',' star_named_expressions?")); + } _res = NULL; done: D(p->level--); @@ -15311,11 +15328,11 @@ 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* invalid_parameters_helper param_no_default")); - asdl_seq * _loop0_132_var; + asdl_seq * _loop0_133_var; void *invalid_parameters_helper_var; arg_ty param_no_default_var; if ( - (_loop0_132_var = _loop0_132_rule(p)) // param_no_default* + (_loop0_133_var = _loop0_133_rule(p)) // param_no_default* && (invalid_parameters_helper_var = invalid_parameters_helper_rule(p)) // invalid_parameters_helper && @@ -15382,13 +15399,13 @@ invalid_parameters_helper_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - asdl_seq * _loop1_133_var; + asdl_seq * _loop1_134_var; if ( - (_loop1_133_var = _loop1_133_rule(p)) // param_with_default+ + (_loop1_134_var = _loop1_134_rule(p)) // param_with_default+ ) { D(fprintf(stderr, "%*c+ invalid_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - _res = _loop1_133_var; + _res = _loop1_134_var; goto done; } p->mark = _mark; @@ -15419,11 +15436,11 @@ 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* invalid_lambda_parameters_helper lambda_param_no_default")); - asdl_seq * _loop0_134_var; + asdl_seq * _loop0_135_var; void *invalid_lambda_parameters_helper_var; arg_ty lambda_param_no_default_var; if ( - (_loop0_134_var = _loop0_134_rule(p)) // lambda_param_no_default* + (_loop0_135_var = _loop0_135_rule(p)) // lambda_param_no_default* && (invalid_lambda_parameters_helper_var = invalid_lambda_parameters_helper_rule(p)) // invalid_lambda_parameters_helper && @@ -15492,13 +15509,13 @@ invalid_lambda_parameters_helper_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_lambda_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - asdl_seq * _loop1_135_var; + asdl_seq * _loop1_136_var; if ( - (_loop1_135_var = _loop1_135_rule(p)) // lambda_param_with_default+ + (_loop1_136_var = _loop1_136_rule(p)) // lambda_param_with_default+ ) { D(fprintf(stderr, "%*c+ invalid_lambda_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - _res = _loop1_135_var; + _res = _loop1_136_var; goto done; } p->mark = _mark; @@ -15529,11 +15546,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_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_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); @@ -15603,11 +15620,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_137_var; + void *_tmp_138_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_137_var = _tmp_137_rule(p)) // ':' | ',' (':' | '**') + (_tmp_138_var = _tmp_138_rule(p)) // ':' | ',' (':' | '**') ) { D(fprintf(stderr, "%*c+ invalid_lambda_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); @@ -17116,12 +17133,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_138_var; + void *_tmp_139_var; while ( - (_tmp_138_var = _tmp_138_rule(p)) // star_targets '=' + (_tmp_139_var = _tmp_139_rule(p)) // star_targets '=' ) { - _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 *)); @@ -17624,12 +17641,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_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 *)); @@ -17690,12 +17707,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_140_var; + void *_tmp_141_var; while ( - (_tmp_140_var = _tmp_140_rule(p)) // '.' | '...' + (_tmp_141_var = _tmp_141_rule(p)) // '.' | '...' ) { - _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 *)); @@ -19852,12 +19869,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_141_var; + void *_tmp_142_var; while ( - (_tmp_141_var = _tmp_141_rule(p)) // '@' named_expression NEWLINE + (_tmp_142_var = _tmp_142_rule(p)) // '@' named_expression NEWLINE ) { - _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 *)); @@ -19970,12 +19987,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_142_var; + void *_tmp_143_var; while ( - (_tmp_142_var = _tmp_142_rule(p)) // ',' star_expression + (_tmp_143_var = _tmp_143_rule(p)) // ',' star_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 *)); @@ -20155,12 +20172,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_143_var; + void *_tmp_144_var; while ( - (_tmp_143_var = _tmp_143_rule(p)) // ',' expression + (_tmp_144_var = _tmp_144_rule(p)) // ',' expression ) { - _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 *)); @@ -21185,12 +21202,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_144_var; + void *_tmp_145_var; while ( - (_tmp_144_var = _tmp_144_rule(p)) // 'or' conjunction + (_tmp_145_var = _tmp_145_rule(p)) // 'or' conjunction ) { - _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 *)); @@ -21256,12 +21273,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_145_var; + void *_tmp_146_var; while ( - (_tmp_145_var = _tmp_145_rule(p)) // 'and' inversion + (_tmp_146_var = _tmp_146_rule(p)) // 'and' inversion ) { - _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 *)); @@ -22177,12 +22194,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_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 *)); @@ -22243,12 +22260,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_147_var; + void *_tmp_148_var; while ( - (_tmp_147_var = _tmp_147_rule(p)) // 'if' disjunction + (_tmp_148_var = _tmp_148_rule(p)) // 'if' disjunction ) { - _res = _tmp_147_var; + _res = _tmp_148_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -22314,7 +22331,7 @@ _loop0_107_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_148_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_149_rule(p)) // starred_expression | named_expression !'=' ) { _res = elem; @@ -22377,7 +22394,7 @@ _gather_106_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_148_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_149_rule(p)) // starred_expression | named_expression !'=' && (seq = _loop0_107_rule(p)) // _loop0_107 ) @@ -22923,12 +22940,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_149_var; + void *_tmp_150_var; while ( - (_tmp_149_var = _tmp_149_rule(p)) // ',' star_target + (_tmp_150_var = _tmp_150_rule(p)) // ',' star_target ) { - _res = _tmp_149_var; + _res = _tmp_150_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23103,12 +23120,12 @@ _loop1_120_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_150_var; + void *_tmp_151_var; while ( - (_tmp_150_var = _tmp_150_rule(p)) // ',' star_target + (_tmp_151_var = _tmp_151_rule(p)) // ',' star_target ) { - _res = _tmp_150_var; + _res = _tmp_151_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23564,12 +23581,12 @@ _loop0_128_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_128[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_151_var; + void *_tmp_152_var; while ( - (_tmp_151_var = _tmp_151_rule(p)) // star_targets '=' + (_tmp_152_var = _tmp_152_rule(p)) // star_targets '=' ) { - _res = _tmp_151_var; + _res = _tmp_152_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23630,12 +23647,12 @@ _loop0_129_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_152_var; + void *_tmp_153_var; while ( - (_tmp_152_var = _tmp_152_rule(p)) // star_targets '=' + (_tmp_153_var = _tmp_153_rule(p)) // star_targets '=' ) { - _res = _tmp_152_var; + _res = _tmp_153_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23798,9 +23815,64 @@ _tmp_131_rule(Parser *p) return _res; } -// _loop0_132: param_no_default +// _tmp_132: '[' | '{' +static void * +_tmp_132_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // '[' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 9)) // token='[' + ) + { + D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['")); + } + { // '{' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 25)) // token='{' + ) + { + D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _loop0_133: param_no_default static asdl_seq * -_loop0_132_rule(Parser *p) +_loop0_133_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23824,7 +23896,7 @@ _loop0_132_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); + D(fprintf(stderr, "%*c> _loop0_133[%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 @@ -23846,7 +23918,7 @@ _loop0_132_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_132[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_133[%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); @@ -23859,14 +23931,14 @@ _loop0_132_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_132_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_133_type, _seq); D(p->level--); return _seq; } -// _loop1_133: param_with_default +// _loop1_134: param_with_default static asdl_seq * -_loop1_133_rule(Parser *p) +_loop1_134_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23890,7 +23962,7 @@ _loop1_133_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); + D(fprintf(stderr, "%*c> _loop1_134[%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 @@ -23912,7 +23984,7 @@ _loop1_133_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_133[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_134[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -23930,14 +24002,14 @@ _loop1_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, _loop1_133_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_134_type, _seq); D(p->level--); return _seq; } -// _loop0_134: lambda_param_no_default +// _loop0_135: lambda_param_no_default static asdl_seq * -_loop0_134_rule(Parser *p) +_loop0_135_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -23961,7 +24033,7 @@ _loop0_134_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); + D(fprintf(stderr, "%*c> _loop0_135[%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 @@ -23983,7 +24055,7 @@ _loop0_134_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_134[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_135[%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); @@ -23996,14 +24068,14 @@ _loop0_134_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_134_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_135_type, _seq); D(p->level--); return _seq; } -// _loop1_135: lambda_param_with_default +// _loop1_136: lambda_param_with_default static asdl_seq * -_loop1_135_rule(Parser *p) +_loop1_136_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24027,7 +24099,7 @@ _loop1_135_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); + D(fprintf(stderr, "%*c> _loop1_136[%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 @@ -24049,7 +24121,7 @@ _loop1_135_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_135[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_136[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -24067,14 +24139,14 @@ _loop1_135_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_135_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_136_type, _seq); D(p->level--); return _seq; } -// _tmp_136: ')' | ',' (')' | '**') +// _tmp_137: ')' | ',' (')' | '**') static void * -_tmp_136_rule(Parser *p) +_tmp_137_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24088,18 +24160,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, 8)) // 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, "')'")); } { // ',' (')' | '**') @@ -24107,21 +24179,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_153_var; + void *_tmp_154_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_153_var = _tmp_153_rule(p)) // ')' | '**' + (_tmp_154_var = _tmp_154_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_153_var); + D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_154_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; @@ -24130,9 +24202,9 @@ _tmp_136_rule(Parser *p) return _res; } -// _tmp_137: ':' | ',' (':' | '**') +// _tmp_138: ':' | ',' (':' | '**') static void * -_tmp_137_rule(Parser *p) +_tmp_138_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24146,18 +24218,18 @@ _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, "':'")); + D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; 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, "':'")); } { // ',' (':' | '**') @@ -24165,21 +24237,21 @@ _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, "',' (':' | '**')")); + D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); Token * _literal; - void *_tmp_154_var; + void *_tmp_155_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_154_var = _tmp_154_rule(p)) // ':' | '**' + (_tmp_155_var = _tmp_155_rule(p)) // ':' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_154_var); + D(fprintf(stderr, "%*c+ _tmp_138[%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_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, "',' (':' | '**')")); } _res = NULL; @@ -24188,9 +24260,9 @@ _tmp_137_rule(Parser *p) return _res; } -// _tmp_138: star_targets '=' +// _tmp_139: star_targets '=' static void * -_tmp_138_rule(Parser *p) +_tmp_139_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24204,7 +24276,7 @@ _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, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty z; if ( @@ -24213,7 +24285,7 @@ _tmp_138_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24223,7 +24295,7 @@ _tmp_138_rule(Parser *p) 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, "star_targets '='")); } _res = NULL; @@ -24232,9 +24304,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) { @@ -24248,18 +24320,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, "'.'")); } { // '...' @@ -24267,18 +24339,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; @@ -24287,9 +24359,9 @@ _tmp_139_rule(Parser *p) return _res; } -// _tmp_140: '.' | '...' +// _tmp_141: '.' | '...' static void * -_tmp_140_rule(Parser *p) +_tmp_141_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24303,18 +24375,18 @@ _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, "'.'")); + D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; 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, "'.'")); } { // '...' @@ -24322,18 +24394,18 @@ _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, "'...'")); + D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; 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, "'...'")); } _res = NULL; @@ -24342,9 +24414,9 @@ _tmp_140_rule(Parser *p) return _res; } -// _tmp_141: '@' named_expression NEWLINE +// _tmp_142: '@' named_expression NEWLINE static void * -_tmp_141_rule(Parser *p) +_tmp_142_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24358,7 +24430,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, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c> _tmp_142[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); Token * _literal; expr_ty f; Token * newline_var; @@ -24370,7 +24442,7 @@ _tmp_141_rule(Parser *p) (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); _res = f; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24380,7 +24452,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, "'@' named_expression NEWLINE")); } _res = NULL; @@ -24389,9 +24461,9 @@ _tmp_141_rule(Parser *p) return _res; } -// _tmp_142: ',' star_expression +// _tmp_143: ',' star_expression static void * -_tmp_142_rule(Parser *p) +_tmp_143_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24405,7 +24477,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, "',' star_expression")); + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); Token * _literal; expr_ty c; if ( @@ -24414,7 +24486,7 @@ _tmp_142_rule(Parser *p) (c = star_expression_rule(p)) // star_expression ) { - D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24424,7 +24496,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, "',' star_expression")); } _res = NULL; @@ -24433,9 +24505,9 @@ _tmp_142_rule(Parser *p) return _res; } -// _tmp_143: ',' expression +// _tmp_144: ',' expression static void * -_tmp_143_rule(Parser *p) +_tmp_144_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24449,7 +24521,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, "',' expression")); + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); Token * _literal; expr_ty c; if ( @@ -24458,7 +24530,7 @@ _tmp_143_rule(Parser *p) (c = expression_rule(p)) // expression ) { - D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24468,7 +24540,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, "',' expression")); } _res = NULL; @@ -24477,9 +24549,9 @@ _tmp_143_rule(Parser *p) return _res; } -// _tmp_144: 'or' conjunction +// _tmp_145: 'or' conjunction static void * -_tmp_144_rule(Parser *p) +_tmp_145_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24493,7 +24565,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, "'or' conjunction")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); Token * _keyword; expr_ty c; if ( @@ -24502,7 +24574,7 @@ _tmp_144_rule(Parser *p) (c = conjunction_rule(p)) // conjunction ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24512,7 +24584,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, "'or' conjunction")); } _res = NULL; @@ -24521,9 +24593,9 @@ _tmp_144_rule(Parser *p) return _res; } -// _tmp_145: 'and' inversion +// _tmp_146: 'and' inversion static void * -_tmp_145_rule(Parser *p) +_tmp_146_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24537,7 +24609,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, "'and' inversion")); + D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); Token * _keyword; expr_ty c; if ( @@ -24546,7 +24618,7 @@ _tmp_145_rule(Parser *p) (c = inversion_rule(p)) // inversion ) { - D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24556,7 +24628,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, "'and' inversion")); } _res = NULL; @@ -24565,9 +24637,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) { @@ -24581,7 +24653,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 ( @@ -24590,7 +24662,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; @@ -24600,7 +24672,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; @@ -24609,9 +24681,9 @@ _tmp_146_rule(Parser *p) return _res; } -// _tmp_147: 'if' disjunction +// _tmp_148: 'if' disjunction static void * -_tmp_147_rule(Parser *p) +_tmp_148_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24625,7 +24697,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, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -24634,7 +24706,7 @@ _tmp_147_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24644,7 +24716,7 @@ _tmp_147_rule(Parser *p) 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, "'if' disjunction")); } _res = NULL; @@ -24653,9 +24725,9 @@ _tmp_147_rule(Parser *p) return _res; } -// _tmp_148: starred_expression | named_expression !'=' +// _tmp_149: starred_expression | named_expression !'=' static void * -_tmp_148_rule(Parser *p) +_tmp_149_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24669,18 +24741,18 @@ _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, "starred_expression")); + D(fprintf(stderr, "%*c> _tmp_149[%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_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c+ _tmp_149[%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_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, "starred_expression")); } { // named_expression !'=' @@ -24688,7 +24760,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, "named_expression !'='")); + D(fprintf(stderr, "%*c> _tmp_149[%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 @@ -24696,12 +24768,12 @@ _tmp_148_rule(Parser *p) _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); + D(fprintf(stderr, "%*c+ _tmp_149[%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_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, "named_expression !'='")); } _res = NULL; @@ -24710,9 +24782,9 @@ _tmp_148_rule(Parser *p) return _res; } -// _tmp_149: ',' star_target +// _tmp_150: ',' star_target static void * -_tmp_149_rule(Parser *p) +_tmp_150_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24726,7 +24798,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_target")); + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -24735,7 +24807,7 @@ _tmp_149_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' 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; @@ -24745,7 +24817,7 @@ _tmp_149_rule(Parser *p) 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_150[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -24754,9 +24826,9 @@ _tmp_149_rule(Parser *p) return _res; } -// _tmp_150: ',' star_target +// _tmp_151: ',' star_target static void * -_tmp_150_rule(Parser *p) +_tmp_151_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24770,7 +24842,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_target")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -24779,7 +24851,7 @@ _tmp_150_rule(Parser *p) (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")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -24789,7 +24861,7 @@ _tmp_150_rule(Parser *p) 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_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -24798,9 +24870,9 @@ _tmp_150_rule(Parser *p) return _res; } -// _tmp_151: star_targets '=' +// _tmp_152: star_targets '=' static void * -_tmp_151_rule(Parser *p) +_tmp_152_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24814,7 +24886,7 @@ _tmp_151_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_151[%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 ( @@ -24823,12 +24895,12 @@ _tmp_151_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_151[%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_151[%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; @@ -24837,9 +24909,9 @@ _tmp_151_rule(Parser *p) return _res; } -// _tmp_152: star_targets '=' +// _tmp_153: star_targets '=' static void * -_tmp_152_rule(Parser *p) +_tmp_153_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24853,7 +24925,7 @@ _tmp_152_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -24862,12 +24934,12 @@ _tmp_152_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_152[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_153[%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_152[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -24876,9 +24948,9 @@ _tmp_152_rule(Parser *p) return _res; } -// _tmp_153: ')' | '**' +// _tmp_154: ')' | '**' static void * -_tmp_153_rule(Parser *p) +_tmp_154_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24892,18 +24964,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_154[%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_154[%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_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // '**' @@ -24911,18 +24983,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_154[%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_154[%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_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -24931,9 +25003,9 @@ _tmp_153_rule(Parser *p) return _res; } -// _tmp_154: ':' | '**' +// _tmp_155: ':' | '**' static void * -_tmp_154_rule(Parser *p) +_tmp_155_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -24947,18 +25019,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_155[%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_155[%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_155[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // '**' @@ -24966,18 +25038,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_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_154[%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_154[%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; From webhook-mailer at python.org Sun Jan 31 17:55:58 2021 From: webhook-mailer at python.org (pablogsal) Date: Sun, 31 Jan 2021 22:55:58 -0000 Subject: [Python-checkins] bpo-42927: Update the What's new entry for LOAD_ATTR optimizations (GH-24383) Message-ID: https://github.com/python/cpython/commit/a776da90b8f2a1342f4f9bfd23a62cea9a0497c6 commit: a776da90b8f2a1342f4f9bfd23a62cea9a0497c6 branch: master author: Pablo Galindo committer: pablogsal date: 2021-01-31T22:55:48Z summary: bpo-42927: Update the What's new entry for LOAD_ATTR optimizations (GH-24383) files: M Doc/whatsnew/3.10.rst diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index cf7d1e80758a0..3dccb7c50019b 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -556,10 +556,10 @@ Optimizations (Contributed by Victor Stinner in :issue:`41006`.) * 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.) + is about 36% faster now for regular attributes and 44% faster for slots. + (Contributed by Pablo Galindo and Yury Selivanov in :issue:`42093` and Guido + van Rossum in :issue:`42927`, 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 31 22:30:15 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 01 Feb 2021 03:30:15 -0000 Subject: [Python-checkins] bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) Message-ID: https://github.com/python/cpython/commit/49926cf2bcc8b44d9b8f148d81979ada191dd9d5 commit: 49926cf2bcc8b44d9b8f148d81979ada191dd9d5 branch: master author: Ronald Oussoren committer: ned-deily date: 2021-01-31T22:29:44-05:00 summary: bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) * bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string files: A Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst M Lib/distutils/spawn.py M Lib/distutils/tests/test_build_ext.py M Lib/sysconfig.py M Lib/test/test_posix.py M setup.py diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py index f50edd2da9710..0d1bd0391e6f1 100644 --- a/Lib/distutils/spawn.py +++ b/Lib/distutils/spawn.py @@ -54,8 +54,8 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): global _cfg_target, _cfg_target_split if _cfg_target is None: from distutils import sysconfig - _cfg_target = str(sysconfig.get_config_var( - 'MACOSX_DEPLOYMENT_TARGET') or '') + _cfg_target = sysconfig.get_config_var( + 'MACOSX_DEPLOYMENT_TARGET') or '' if _cfg_target: _cfg_target_split = [int(x) for x in _cfg_target.split('.')] if _cfg_target: diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index a3055c1984032..90f7bb066917b 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -456,7 +456,7 @@ def test_deployment_target_higher_ok(self): deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') if deptarget: # increment the minor version number (i.e. 10.6 -> 10.7) - deptarget = [int(x) for x in str(deptarget).split('.')] + deptarget = [int(x) for x in deptarget.split('.')] deptarget[-1] += 1 deptarget = '.'.join(str(i) for i in deptarget) self._try_compile_deployment_target('<', deptarget) @@ -489,7 +489,7 @@ def _try_compile_deployment_target(self, operator, target): # get the deployment target that the interpreter was built with target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') - target = tuple(map(int, str(target).split('.')[0:2])) + target = tuple(map(int, target.split('.')[0:2])) # format the target value as defined in the Apple # Availability Macros. We can't use the macro names since # at least one value we test with will not exist yet. diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index c1aaf79a677ba..507c51f764237 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -18,6 +18,11 @@ 'parse_config_h', ] +# Keys for get_config_var() that are never converted to Python integers. +_ALWAYS_STR = { + 'MACOSX_DEPLOYMENT_TARGET', +} + _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', @@ -252,6 +257,9 @@ def _parse_makefile(filename, vars=None): notdone[n] = v else: try: + if n in _ALWAYS_STR: + raise ValueError + v = int(v) except ValueError: # insert literal `$' @@ -310,6 +318,8 @@ def _parse_makefile(filename, vars=None): notdone[name] = value else: try: + if name in _ALWAYS_STR: + raise ValueError value = int(value) except ValueError: done[name] = value.strip() @@ -472,6 +482,8 @@ def parse_config_h(fp, vars=None): if m: n, v = m.group(1, 2) try: + if n in _ALWAYS_STR: + raise ValueError v = int(v) except ValueError: pass diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 588c86994b4bd..53a4c5f84d7be 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -1071,7 +1071,7 @@ def test_getgroups(self): if sys.platform == 'darwin': import sysconfig dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0' - if tuple(int(n) for n in str(dt).split('.')[0:2]) < (10, 6): + if tuple(int(n) for n in dt.split('.')[0:2]) < (10, 6): raise unittest.SkipTest("getgroups(2) is broken prior to 10.6") # 'id -G' and 'os.getgroups()' should return the same diff --git a/Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst b/Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst new file mode 100644 index 0000000000000..a47776effe905 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst @@ -0,0 +1,3 @@ +Ensure that the value of +sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') is always a string, +even in when the value is parsable as an integer. diff --git a/setup.py b/setup.py index 8445546c0116f..c6a4e9bf41506 100644 --- a/setup.py +++ b/setup.py @@ -1072,7 +1072,7 @@ def detect_readline_curses(self): os_release = int(os.uname()[2].split('.')[0]) dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') if (dep_target and - (tuple(int(n) for n in str(dep_target).split('.')[0:2]) + (tuple(int(n) for n in dep_target.split('.')[0:2]) < (10, 5) ) ): os_release = 8 if os_release < 9: From webhook-mailer at python.org Sun Jan 31 23:22:56 2021 From: webhook-mailer at python.org (ned-deily) Date: Mon, 01 Feb 2021 04:22:56 -0000 Subject: [Python-checkins] bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) (GH-24410) Message-ID: https://github.com/python/cpython/commit/d6675fee1aac1af87dc31c411d04a5bfc1f39079 commit: d6675fee1aac1af87dc31c411d04a5bfc1f39079 branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: ned-deily date: 2021-01-31T23:22:48-05:00 summary: bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341) (GH-24410) * bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (cherry picked from commit 49926cf2bcc8b44d9b8f148d81979ada191dd9d5) Co-authored-by: Ronald Oussoren files: A Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst M Lib/distutils/spawn.py M Lib/distutils/tests/test_build_ext.py M Lib/sysconfig.py M Lib/test/test_posix.py M setup.py diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py index f50edd2da9710..0d1bd0391e6f1 100644 --- a/Lib/distutils/spawn.py +++ b/Lib/distutils/spawn.py @@ -54,8 +54,8 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0): global _cfg_target, _cfg_target_split if _cfg_target is None: from distutils import sysconfig - _cfg_target = str(sysconfig.get_config_var( - 'MACOSX_DEPLOYMENT_TARGET') or '') + _cfg_target = sysconfig.get_config_var( + 'MACOSX_DEPLOYMENT_TARGET') or '' if _cfg_target: _cfg_target_split = [int(x) for x in _cfg_target.split('.')] if _cfg_target: diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 1b034c9302521..808c0dc2874cd 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -455,7 +455,7 @@ def test_deployment_target_higher_ok(self): deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') if deptarget: # increment the minor version number (i.e. 10.6 -> 10.7) - deptarget = [int(x) for x in str(deptarget).split('.')] + deptarget = [int(x) for x in deptarget.split('.')] deptarget[-1] += 1 deptarget = '.'.join(str(i) for i in deptarget) self._try_compile_deployment_target('<', deptarget) @@ -488,7 +488,7 @@ def _try_compile_deployment_target(self, operator, target): # get the deployment target that the interpreter was built with target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') - target = tuple(map(int, str(target).split('.')[0:2])) + target = tuple(map(int, target.split('.')[0:2])) # format the target value as defined in the Apple # Availability Macros. We can't use the macro names since # at least one value we test with will not exist yet. diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 59da8e529025d..e3f79bfde5294 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -18,6 +18,11 @@ 'parse_config_h', ] +# Keys for get_config_var() that are never converted to Python integers. +_ALWAYS_STR = { + 'MACOSX_DEPLOYMENT_TARGET', +} + _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', @@ -240,6 +245,9 @@ def _parse_makefile(filename, vars=None): notdone[n] = v else: try: + if n in _ALWAYS_STR: + raise ValueError + v = int(v) except ValueError: # insert literal `$' @@ -298,6 +306,8 @@ def _parse_makefile(filename, vars=None): notdone[name] = value else: try: + if name in _ALWAYS_STR: + raise ValueError value = int(value) except ValueError: done[name] = value.strip() @@ -459,6 +469,8 @@ def parse_config_h(fp, vars=None): if m: n, v = m.group(1, 2) try: + if n in _ALWAYS_STR: + raise ValueError v = int(v) except ValueError: pass diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index bfbcbab3b62f9..f4edb8bd9575f 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -1045,7 +1045,7 @@ def test_getgroups(self): if sys.platform == 'darwin': import sysconfig dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0' - if tuple(int(n) for n in str(dt).split('.')[0:2]) < (10, 6): + if tuple(int(n) for n in dt.split('.')[0:2]) < (10, 6): raise unittest.SkipTest("getgroups(2) is broken prior to 10.6") # 'id -G' and 'os.getgroups()' should return the same diff --git a/Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst b/Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst new file mode 100644 index 0000000000000..a47776effe905 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2021-01-26-14-36-11.bpo-42504.ZxWt71.rst @@ -0,0 +1,3 @@ +Ensure that the value of +sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') is always a string, +even in when the value is parsable as an integer. diff --git a/setup.py b/setup.py index bd5f73692441c..d42eb9d1174ec 100644 --- a/setup.py +++ b/setup.py @@ -1013,7 +1013,7 @@ def detect_readline_curses(self): os_release = int(os.uname()[2].split('.')[0]) dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') if (dep_target and - (tuple(int(n) for n in str(dep_target).split('.')[0:2]) + (tuple(int(n) for n in dep_target.split('.')[0:2]) < (10, 5) ) ): os_release = 8 if os_release < 9: