Skip to content
Branch: master
Find file History
pablogsal bpo-36256: Fix bug in parsermodule when parsing if statements (GH-12477)
bpo-36256: Fix bug in parsermodule when parsing if statements

In the parser module, when validating nodes before starting the parsing with to create a ST in "parser_newstobject" there is a problem that appears when two arcs in the same DFA state has transitions with labels with the same type. For example, the DFA for if_stmt has a state with
two labels with the same type: "elif" and "else" (type NAME). The algorithm tries one by one the arcs until the label that starts the arc transition has a label with the same type of the current child label we are trying to accept. In this case, the arc for "elif" comes before the arc for "else"and passes this test (because the current child label is "else" and has the same type as "elif"). This lead to expecting a namedexpr_test (305) instead of a colon (11). The solution is to compare also the string representation (in case there is one) of the labels to see if the transition that we have is the correct one.
Latest commit 9a0000d Mar 21, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
asyncio
collections bpo-36321: Fix misspelled attribute in namedtuple() (GH-12375) Mar 18, 2019
concurrent bpo-35715: Liberate return value of _process_worker (GH-11514) Mar 16, 2019
ctypes bpo-36048: Use __index__() instead of __int__() for implicit conversi… Feb 25, 2019
curses
dbm
distutils bpo-36235: Enhance distutils test_customize_compiler() (GH-12403) Mar 18, 2019
email
encodings
ensurepip
html
http bpo-35647: Fix path check in cookiejar (#11436) Mar 10, 2019
idlelib
importlib bpo-35843: Implement __getitem__ for _NamespacePath (GH-11690) Mar 8, 2019
json bpo-31553: add --json-lines option to json.tool (#10051) Nov 7, 2018
lib2to3 bpo-35312: Make lib2to3.pgen2.parse.ParseError round-trip pickle-able. ( Nov 27, 2018
logging bpo-36272: Logging now propagates RecursionError (GH-12312) Mar 15, 2019
msilib bpo-34251: Restore msilib.Win64 to preserve compatibility (GH-8510) Jul 28, 2018
multiprocessing bpo-35493: Use Process.sentinel instead of sleeping for polling worke… Mar 16, 2019
pydoc_data v3.8.0a2 Feb 25, 2019
site-packages
sqlite3 bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. ( Dec 17, 2018
test bpo-36256: Fix bug in parsermodule when parsing if statements (GH-12477) Mar 21, 2019
tkinter bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa … Feb 24, 2019
turtledemo
unittest Autospec functions should propagate mock calls to parent GH-11273 Feb 25, 2019
urllib bpo-36216: Add check for characters in netloc that normalize to separ… Mar 7, 2019
venv
wsgiref
xml
xmlrpc
__future__.py
__phello__.foo.py
_bootlocale.py bpo-29240: PEP 540: Add a new UTF-8 Mode (#855) Dec 13, 2017
_collections_abc.py
_compat_pickle.py
_compression.py Issue #23529: Limit the size of decompressed data when reading from Apr 10, 2015
_dummy_thread.py
_markupbase.py #13576: add tests about the handling of (possibly broken) condcoms. Dec 19, 2011
_osx_support.py bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) Dec 19, 2018
_py_abc.py
_pydecimal.py
_pyio.py
_sitebuiltins.py #9364: Improve the text printed by help(pydoc) and help(help). Apr 19, 2014
_strptime.py
_threading_local.py
_weakrefset.py
abc.py bpo-35609: Remove examples for deprecated decorators in the abc modul… Dec 31, 2018
aifc.py
antigravity.py Change the xkcd link in comment over https. (GH-5452) Sep 14, 2018
argparse.py
ast.py bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) Mar 7, 2019
asynchat.py
asyncore.py bpo-29639: change test.support.HOST to "localhost" Sep 9, 2017
base64.py
bdb.py Fix stepping into a frame without a __name__ (GH-12064) Mar 13, 2019
binhex.py
bisect.py Issue #28792: Remove aliases from _bisect Nov 24, 2016
bz2.py
cProfile.py
calendar.py
cgi.py
cgitb.py
chunk.py
cmd.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) Jul 4, 2013
code.py
codecs.py
codeop.py
colorsys.py Issue #14323: Expanded the number of digits in the coefficients for the Aug 6, 2013
compileall.py
configparser.py fix typo in configparser doc (GH-12154) Mar 4, 2019
contextlib.py
contextvars.py
copy.py
copyreg.py
crypt.py
csv.py
dataclasses.py
datetime.py
decimal.py
difflib.py
dis.py
doctest.py
dummy_threading.py
enum.py
filecmp.py shallow defaults to 'True' not '1' (closes #21355) Apr 26, 2014
fileinput.py
fnmatch.py
formatter.py
fractions.py
ftplib.py bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268) Nov 1, 2018
functools.py Consistently move the misses update to just before the user function … Jan 31, 2019
genericpath.py
getopt.py
getpass.py getpass: update docstrings (#49) Feb 12, 2017
gettext.py
glob.py
gzip.py bpo-34898: Add mtime parameter to gzip.compress(). (GH-9704) Nov 7, 2018
hashlib.py
heapq.py
hmac.py bpo-33604: Remove deprecated HMAC default value marked for removal in… Sep 10, 2018
imaplib.py bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268) Nov 1, 2018
imghdr.py Issue #28228: imghdr now supports pathlib Oct 1, 2016
imp.py
inspect.py
io.py
ipaddress.py bpo-27683: Fix a regression for host() of ipaddress network objects (G… Mar 21, 2018
keyword.py bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) Mar 7, 2019
linecache.py
locale.py Remove mojibake in the locale aliases mapping. (GH-6716) May 6, 2018
lzma.py Issue #28229: lzma module now supports pathlib Oct 4, 2016
mailbox.py
mailcap.py #14977: Make mailcap respect the order of the lines in the mailcap file. Sep 10, 2016
mimetypes.py
modulefinder.py
netrc.py bpo-28334: netrc() now uses expanduser() to find .netrc file (GH-4537) Nov 25, 2017
nntplib.py
ntpath.py
nturl2path.py bpo-29836: Remove nturl2path from test_sundry and amend the module do… Mar 17, 2017
numbers.py Fix miscellaneous typos (#4275) Nov 5, 2017
opcode.py
operator.py Issue #24379: Revert the operator.subscript patch (dccc4e63aef5) pend… Nov 2, 2015
optparse.py bpo-34605: Avoid master/slave terms (GH-9101) Sep 7, 2018
os.py
pathlib.py bpo-22062: Updated docstring and documentation for pathlib (GH-8519) Feb 11, 2019
pdb.py bpo-35931: Gracefully handle any exception in pdb debug command (GH-1… Mar 12, 2019
pickle.py bpo-11572: Make minor improvements to copy module (GH-8208) Jul 9, 2018
pickletools.py
pipes.py
pkgutil.py closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575) Dec 9, 2017
platform.py
plistlib.py bpo-33908: Remove two superfluous assignments (GH-7116) Jun 20, 2018
poplib.py bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268) Nov 1, 2018
posixpath.py
pprint.py bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180) Dec 17, 2018
profile.py bpo-32512: Add -m option to profile for profiling modules (#5132) Nov 5, 2018
pstats.py Revert unneccessary changes made in bpo-30296 and apply other improve… Feb 26, 2018
pty.py
py_compile.py
pyclbr.py
pydoc.py bpo-35619: Improve support of custom data descriptors in help() and p… Jan 15, 2019
queue.py
quopri.py Issue #23681: Fixed Python 2 to 3 poring bugs. Mar 20, 2015
random.py
re.py
reprlib.py bpo-31370: Remove support for threads-less builds (#3385) Sep 7, 2017
rlcompleter.py Merge 3.5 Feb 4, 2016
runpy.py
sched.py bpo-31370: Remove support for threads-less builds (#3385) Sep 7, 2017
secrets.py Issue #29061: secrets.randbelow() would hang with a negative input Dec 30, 2016
selectors.py
shelve.py
shlex.py
shutil.py bpo-36103: change default buffer size of shutil.copyfileobj() (GH-12115) Mar 2, 2019
signal.py
site.py bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745) Feb 4, 2019
smtpd.py
smtplib.py bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268) Nov 1, 2018
sndhdr.py bpo-31985: Deprecate openfp in aifc, sunau, and wave (#4344) Nov 10, 2017
socket.py
socketserver.py Fix typo in socketserver docstring (GH-11252) Dec 21, 2018
sre_compile.py
sre_constants.py
sre_parse.py bpo-34681: Rename class Pattern in sre_parse to State. (GH-9310) Sep 18, 2018
ssl.py bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934) Dec 6, 2018
stat.py closes bpo-34353: Add sockets to stat.filemode fallback python implem… Aug 10, 2018
statistics.py bpo-36324: Improved code formatting for the NormalDist.inv_cdf ration… Mar 19, 2019
string.py
stringprep.py Merged revisions 55007-55179 via svnmerge from May 7, 2007
struct.py
subprocess.py
sunau.py bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951) Mar 18, 2018
symbol.py
symtable.py bpo-34983: Expose symtable.Symbol.is_nonlocal() in the symtable module ( Oct 20, 2018
sysconfig.py
tabnanny.py
tarfile.py
telnetlib.py bpo-30397: Add re.Pattern and re.Match. (#1646) Oct 4, 2017
tempfile.py
textwrap.py
this.py Fix most trivially-findable print statements. Feb 9, 2007
threading.py Fix typos and improve grammar in threading.Barrier docstrings (GH-12210) Mar 9, 2019
timeit.py bpo-28240: timeit: Update repeat() doc (GH-7419) Jun 6, 2018
token.py bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) Mar 7, 2019
tokenize.py
trace.py bpo-35202: Remove unused imports in Lib directory. (GH-10445) Nov 10, 2018
traceback.py
tracemalloc.py
tty.py final round of __all__ lists (I hope) - skipped urllib2 because Moshe… Mar 1, 2001
turtle.py bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-1… Nov 16, 2018
types.py bpo-36091: Remove reference to async generator in Lib/types.py. (GH-1… Mar 3, 2019
typing.py
uu.py
uuid.py bpo-35701: Added __weakref__ slot to uuid.UUID (GH-11570) Jan 17, 2019
warnings.py
wave.py
weakref.py bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-… Feb 7, 2019
webbrowser.py bpo-35308: Fix regression where BROWSER env var is not respected. (GH… Nov 26, 2018
xdrlib.py Issue #11694: Raise ConversionError in xdrlib as documented Oct 10, 2014
zipapp.py
zipfile.py
zipimport.py
You can’t perform that action at this time.