Skip to content

Commit 87a1af5

Browse files
committed
unshadow stdlib token from roundup's token.
This bites me every now and again when running pytest and pdb. Some submodules want to load the stdlib python and end up getting roundup's python and thing break with N_TOKENS not defined etc. So rename token.py to token_r.py (token_r(oundup)... hey naming things is hard) an change code as needed.
1 parent 5753f33 commit 87a1af5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

roundup/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import shutil
3333
import sys
3434

35-
from roundup import date, hyperdb, init, password, token
35+
from roundup import date, hyperdb, init, password, token_r
3636
from roundup import __version__ as roundup_version
3737
import roundup.instance
3838
from roundup.configuration import (CoreConfig, NoConfigError, OptionUnsetError,
@@ -1831,7 +1831,7 @@ def interactive(self):
18311831
break
18321832
if not command: continue # noqa: E701
18331833
try:
1834-
args = token.token_split(command)
1834+
args = token_r.token_split(command)
18351835
except ValueError:
18361836
continue # Ignore invalid quoted token
18371837
if not args: continue # noqa: E701

roundup/cgi/actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66
from datetime import timedelta
77

8-
from roundup import hyperdb, token, date, password
8+
from roundup import hyperdb, token_r, date, password
99
from roundup.actions import Action as BaseAction
1010
from roundup.anypy import urllib_
1111
from roundup.anypy.html import html_escape
@@ -427,7 +427,7 @@ def fakeFilterVars(self):
427427
if isinstance(prop, hyperdb.String):
428428
v = self.form[key].value
429429
# If this ever has unbalanced quotes, hilarity will ensue
430-
tokens = token.token_split(v)
430+
tokens = token_r.token_split(v)
431431
if len(tokens) != 1 or tokens[0] != v:
432432
self.form.value.remove(self.form[key])
433433
# replace the single value with the split list
File renamed without changes.

0 commit comments

Comments
 (0)