]> granicus.if.org Git - python/commitdiff
Issue #26881: The modulefinder module now supports extended opcode arguments.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 8 May 2016 20:44:54 +0000 (23:44 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 8 May 2016 20:44:54 +0000 (23:44 +0300)
1  2 
Lib/dis.py
Lib/modulefinder.py
Misc/NEWS

diff --cc Lib/dis.py
Simple merge
index d8d645c77bac08e27872e4942bdea716cf8fb538,b8cce1f766b711d651cdb9a04313afcb31162b8b..e220315253b0d8d37ac3d3ae75de4bfa720429c6
@@@ -10,16 -10,15 +10,15 @@@ import type
  import struct
  import warnings
  with warnings.catch_warnings():
 -    warnings.simplefilter('ignore', PendingDeprecationWarning)
 +    warnings.simplefilter('ignore', DeprecationWarning)
      import imp
  
- # XXX Clean up once str8's cstor matches bytes.
- LOAD_CONST = bytes([dis.opmap['LOAD_CONST']])
- IMPORT_NAME = bytes([dis.opmap['IMPORT_NAME']])
- STORE_NAME = bytes([dis.opmap['STORE_NAME']])
- STORE_GLOBAL = bytes([dis.opmap['STORE_GLOBAL']])
+ LOAD_CONST = dis.opmap['LOAD_CONST']
+ IMPORT_NAME = dis.opmap['IMPORT_NAME']
+ STORE_NAME = dis.opmap['STORE_NAME']
+ STORE_GLOBAL = dis.opmap['STORE_GLOBAL']
  STORE_OPS = STORE_NAME, STORE_GLOBAL
- HAVE_ARGUMENT = bytes([dis.HAVE_ARGUMENT])
+ EXTENDED_ARG = dis.EXTENDED_ARG
  
  # Modulefinder does a good job at simulating Python's, but it can not
  # handle __path__ modifications packages make at runtime.  Therefore there
diff --cc Misc/NEWS
index 63cdce283498a3c6ffd64047b00bfd46fc2609c6,f9bb8efbe0831b3cb767e795bb0a267dc89b0db5..c58bac76f4f3893af2b58fc5a22e56a6c4a816ad
+++ b/Misc/NEWS
@@@ -277,11 -127,8 +279,13 @@@ Librar
  - Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
    instead of silently return incorrect result.
  
+ - Issue #26881: modulefinder now works with bytecode with extended args.
 +- Issue #26915:  The __contains__ methods in the collections ABCs now check
 +  for identity before checking equality.  This better matches the behavior
 +  of the concrete classes, allows sensible handling of NaNs, and makes it
 +  easier to reason about container invariants.
 +
  - Issue #26711: Fixed the comparison of plistlib.Data with other types.
  
  - Issue #24114: Fix an uninitialized variable in `ctypes.util`.