Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7c7dd45
Properly handle SyntaxErrors in Python source files.
brandtbucher Feb 7, 2019
8f98ca6
Fix name collision bug.
brandtbucher Feb 7, 2019
c00c4b6
Replace mutable default values.
brandtbucher Feb 7, 2019
94e38d4
Replace deprecated imp usage.
brandtbucher Feb 7, 2019
9bda94b
Fixed whitespace.
brandtbucher Feb 8, 2019
c366485
Handle differing drives on Windows.
brandtbucher Feb 8, 2019
dc9180d
Again, fixed whitespace.
brandtbucher Feb 8, 2019
faf2902
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 8, 2019
a1db2ec
Fix relative imports.
brandtbucher Feb 8, 2019
bd73fa5
Fix import side-effects.
brandtbucher Feb 9, 2019
210edad
Wait for sys.path to update.
brandtbucher Feb 9, 2019
3a9dd35
Bump sleep time.
brandtbucher Feb 9, 2019
2763440
WIP: Replace sleep with busy wait.
brandtbucher Feb 9, 2019
f9939bf
Remove busy wait.
brandtbucher Feb 9, 2019
ddb8752
Remove NEWS entry.
brandtbucher Feb 9, 2019
8d7f272
Mutate sys.path in-place.
brandtbucher Feb 9, 2019
1a594f0
Enter RLock during import search.
brandtbucher Feb 9, 2019
6dabded
Try multiprocessing.RLock instead of threading.
brandtbucher Feb 9, 2019
7095d14
Try a couple of possible fixes for failing lookups.
brandtbucher Feb 9, 2019
1aea4af
Remove sys._clear_type_cache calls.
brandtbucher Feb 9, 2019
603481a
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 10, 2019
f022f83
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 10, 2019
2568d5a
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 10, 2019
bbae72e
Break out new code into standalone function.
brandtbucher Feb 10, 2019
6833792
Don't modify import state in-place.
brandtbucher Feb 10, 2019
0af9f08
Reorder new import.
brandtbucher Feb 10, 2019
4bb452e
Minor style stuff.
brandtbucher Feb 11, 2019
a9fd3c6
Replace importlib.util.find_spec with importlib.machinery.PathFinder.…
brandtbucher Feb 13, 2019
826eef5
Invalidate caches before find_spec call.
brandtbucher Feb 13, 2019
de22d67
Fix whitespace.
brandtbucher Feb 13, 2019
4de4b3d
Remove duplicate-bpo NEWS entries.
brandtbucher Feb 13, 2019
3085a62
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 13, 2019
7b76e58
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 13, 2019
744de0c
Empty commit.
brandtbucher Feb 13, 2019
7371742
Remove NEWS entry.
brandtbucher Feb 16, 2019
540e819
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 16, 2019
d6f19a6
Remove loader subclass checks.
brandtbucher Feb 17, 2019
04fc93a
Use spec.loader for package checking.
brandtbucher Feb 17, 2019
a506dc4
Remove sys.path from path.
brandtbucher Feb 17, 2019
d1fa6af
Use loader type to classify imports.
brandtbucher Feb 17, 2019
8840bc0
Remove absolute/relative path formatting.
brandtbucher Feb 17, 2019
654461b
Reorder branching.
brandtbucher Feb 17, 2019
9a732c1
Add comments on cache invalidation.
brandtbucher Feb 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace mutable default values.
Bound empty lists have been replaced with the "if param is None" idiom.
  • Loading branch information
brandtbucher committed Feb 8, 2019
commit c00c4b6cd72c062300df9f2a4583b44b76399676
6 changes: 3 additions & 3 deletions Lib/modulefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ def __repr__(self):

class ModuleFinder:

def __init__(self, path=None, debug=0, excludes=[], replace_paths=[]):
def __init__(self, path=None, debug=0, excludes=None, replace_paths=None):
Comment thread
brandtbucher marked this conversation as resolved.
if path is None:
path = sys.path
self.path = path
self.modules = {}
self.badmodules = {}
self.debug = debug
self.indent = 0
self.excludes = excludes
self.replace_paths = replace_paths
self.excludes = excludes if excludes is not None else []
self.replace_paths = replace_paths if replace_paths is not None else []
self.processed_paths = [] # Used in debugging only

def msg(self, level, str, *args):
Expand Down