diff options
author | Paul McGuire <ptmcg@users.noreply.github.com> | 2020-08-19 23:09:15 -0500 |
---|---|---|
committer | Paul McGuire <ptmcg@users.noreply.github.com> | 2020-08-19 23:09:15 -0500 |
commit | 1add43913c92157add7823e58e961a20fcf5c31c (patch) | |
tree | ea88eab8473b0e729f1e32bec1607e391ef16dc1 | |
parent | 508750e836c67f95856824b97d3893c6009dda8f (diff) | |
download | pyparsing-git-1add43913c92157add7823e58e961a20fcf5c31c.tar.gz |
Fix enum auto() incompat with Py3.5
-rw-r--r-- | pyparsing/core.py | 18 | ||||
-rw-r--r-- | pyparsing/helpers.py | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index 8c7728a..01cebda 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -2,7 +2,7 @@ # core.py # from abc import ABC, abstractmethod -from enum import Enum, auto +from enum import Enum import string import copy import warnings @@ -123,14 +123,14 @@ class Diagnostics(Enum): All warnings can be enabled by calling :class:`enable_all_warnings`. """ - warn_multiple_tokens_in_named_alternation = auto() - warn_ungrouped_named_tokens_in_collection = auto() - warn_name_set_on_empty_Forward = auto() - warn_on_parse_using_empty_Forward = auto() - warn_on_assignment_to_Forward = auto() - warn_on_multiple_string_args_to_oneof = auto() - warn_on_match_first_with_lshift_operator = auto() - enable_debug_on_named_expressions = auto() + warn_multiple_tokens_in_named_alternation = 0 + warn_ungrouped_named_tokens_in_collection = 1 + warn_name_set_on_empty_Forward = 2 + warn_on_parse_using_empty_Forward = 3 + warn_on_assignment_to_Forward = 4 + warn_on_multiple_string_args_to_oneof = 5 + warn_on_match_first_with_lshift_operator = 6 + enable_debug_on_named_expressions = 7 def enable_diag(diag_enum): diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index d013975..00f311b 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -595,8 +595,8 @@ def replaceHTMLEntity(t): class opAssoc(Enum): - LEFT = auto() - RIGHT = auto() + LEFT = 1 + RIGHT = 2 def infixNotation(baseExpr, opList, lpar=Suppress("("), rpar=Suppress(")")): |