Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Sort modules by name during scan for repeatability. #21

Closed
wants to merge 2 commits into from

2 participants

@lrowe

This should ensure directives are executed in a consistent order across runs.

@mcdonc
Owner

Note to self: make sure this doesn't materially impact people who don't care about import ordering (although by definition caring about it is the beginning of the end).

@lrowe

Closing as not sufficiently important.

@lrowe lrowe closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 19, 2013
  1. @lrowe

    Sign contributor agreement

    lrowe authored
  2. @lrowe
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +1 −0  CONTRIBUTORS.txt
  2. +3 −1 venusian/__init__.py
View
1  CONTRIBUTORS.txt
@@ -104,3 +104,4 @@ Contributors
- Chris McDonough, 2011/02/16
- Chris Withers, 2011/03/14
- Joel Bohman, 2011/07/28
+- Laurence Rowe, 2013/03/19
View
4 venusian/__init__.py
@@ -331,7 +331,9 @@ def seen(p, m={}):
m[p] = True
# iter_modules is nonrecursive
- for importer, name, ispkg in iter_modules(path, prefix):
+ # sorted by module name for repeatability
+ for importer, name, ispkg in sorted(iter_modules(path, prefix),
+ key=lambda item: item[1]):
if ignore is not None and ignore(name):
# if name is a package, ignoring here will cause
Something went wrong with that request. Please try again.