1. Jeffrey Arnold
  2. pygments-stan

Commits

Georg Brandl  committed 2c5749b

Python 3 lexer: add new exceptions from PEP 3151.

  • Participants
  • Parent commits 1df5916
  • Branches default

Comments (0)

Files changed (2)

File CHANGES

View file
  • Ignore whitespace
 pull request numbers to the requests at
 <http://bitbucket.org/birkenfeld/pygments-main/pull-requests/merged>.
 
+Version 1.7
+-----------
+(under development)
+
+- Python 3 lexer: add new exceptions from PEP 3151.
+
+
 Version 1.6
 -----------
 (released Feb 3, 2013)

File pygments/lexers/agile.py

View file
  • Ignore whitespace
          r'TypeError|UnboundLocalError|UnicodeDecodeError|'
          r'UnicodeEncodeError|UnicodeError|UnicodeTranslateError|'
          r'UnicodeWarning|UserWarning|ValueError|VMSError|Warning|'
-         r'WindowsError|ZeroDivisionError)\b', Name.Exception),
+         r'WindowsError|ZeroDivisionError|'
+         # new builtin exceptions from PEP 3151
+         r'BlockingIOError|ChildProcessError|ConnectionError|'
+         r'BrokenPipeError|ConnectionAbortedError|ConnectionRefusedError|'
+         r'ConnectionResetError|FileExistsError|FileNotFoundError|'
+         r'InterruptedError|IsADirectoryError|NotADirectoryError|'
+         r'PermissionError|ProcessLookupError|TimeoutError)\b',
+         Name.Exception),
     ]
     tokens['numbers'] = [
         (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),