mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Avoid total dependency on the new module. This addresses the problem
reported by Greg Ball on python-dev.
This commit is contained in:
parent
b446fc7f27
commit
8cb00e2387
1 changed files with 7 additions and 1 deletions
|
|
@ -55,7 +55,13 @@ all_feature_names = [
|
|||
|
||||
__all__ = ["all_feature_names"] + all_feature_names
|
||||
|
||||
import new as _new # for CO_xxx symbols
|
||||
try:
|
||||
import new as _new # for CO_xxx symbols
|
||||
except ImportError: # May happen during build
|
||||
class _new:
|
||||
CO_NESTED = 0x0010
|
||||
CO_GENERATOR_ALLOWED = 0x1000
|
||||
CO_FUTURE_DIVISION = 0x2000
|
||||
|
||||
class _Feature:
|
||||
def __init__(self, optionalRelease, mandatoryRelease, compiler_flag):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue