14932
|
|
|
thijs |
15 years ago
|
|
|
14654
|
|
|
therve |
16 years ago
|
|
|
14560
|
|
|
exarkun |
16 years ago
|
|
|
14407
|
|
Convert Twisted's plugin system to use twisted.python.modules for code discovery
This fixes several bugs in the traversal and caching logic of the plugins system, and simplifies it by factoring the code such that the representation of the Python path and import system is now delegated entirely to an API designed to do it. The other major bug fixed here made plugin modules from a development and system installation of Twisted conflict, even if one path entry clearly "won" from the perspective of sys.path, PYTHONPATH, {{{__import__}}}, et. al.
In addition to the main fix here, several new features were introduced into the {{{twisted.python.filepath}}}, {{{twisted.python.zippath}}} and {{{twisted.python.modules}}} modules.
* twisted.python.filepath * New methods: {{{getStatusChangeTime}}}, {{{getModificationTime}}}, and {{{getAccessTime}}}, to access higher precision timestamps as floats. * New exception-handling behavior: {{{FilePath.children}}} will now raise {{{UnlistableError}}}, allowing users to catch non-fatal reasons why a directory might not be listable. More importantly this allows for ''portable'' error handling between UNIX and Windows. * {{{FilePath}}} instances are now usable as dictionary keys. * twisted.python.zippath * Acquired error-handling similar to {{{FilePath}}} * Acquired new methods for inspecting timestamps, both the old deprecated {{{get(m|c|a)time}}} form and the newer form. This should allow both older and newer code to work with {{{ZipPath}}} instances. The modification stamp is actually pulled from the zipfile metadata. * twisted.python.modules * Gratuitous Windows error-handling logic was removed and replaced with a simple {{{except UnlistableError}}} thanks to {{{FilePath}}}'s new features.
Finally, test coverage was improved, and a few gratuitous pyflakes warnings and bits of trailing whitespace were eliminated.
Fixes #1951
Author: glyph
Reviewers: jerub, exarkun
|
glyph |
17 years ago
|
|
|
14404
|
|
|
glyph |
17 years ago
|
|
|
14403
|
|
Convert Twisted's plugin system to use twisted.python.modules for code discovery
This fixes several bugs in the traversal and caching logic of the plugins system, and simplifies it by factoring the code such that the representation of the Python path and import system is now delegated entirely to an API designed to do it. The other major bug fixed here made plugin modules from a development and system installation of Twisted conflict, even if one path entry clearly "won" from the perspective of sys.path, PYTHONPATH, {{{__import__}}}, et. al.
In addition to the main fix here, several new features were introduced into the {{{twisted.python.filepath}}}, {{{twisted.python.zippath}}} and {{{twisted.python.modules}}} modules.
* twisted.python.filepath * New methods: {{{getStatusChangeTime}}}, {{{getModificationTime}}}, and {{{getAccessTime}}}, to access higher precision timestamps as floats. * New exception-handling behavior: {{{FilePath.children}}} will now raise {{{UnlistableError}}}, allowing users to catch non-fatal reasons why a directory might not be listable. More importantly this allows for ''portable'' error handling between UNIX and Windows. * {{{FilePath}}} instances are now usable as dictionary keys. * twisted.python.zippath * Acquired error-handling similar to {{{FilePath}}} * Acquired new methods for inspecting timestamps, both the old deprecated {{{get(m|c|a)time}}} form and the newer form. This should allow both older and newer code to work with {{{ZipPath}}} instances. The modification stamp is actually pulled from the zipfile metadata. * twisted.python.modules * Gratuitous Windows error-handling logic was removed and replaced with a simple {{{except UnlistableError}}} thanks to {{{FilePath}}}'s new features.
Finally, test coverage was improved, and a few gratuitous pyflakes warnings and bits of trailing whitespace were eliminated.
Fixes #1951
Author: glyph
Reviewers: jerub, exarkun
|
glyph |
17 years ago
|
|
|
14327
|
|
|
exarkun |
17 years ago
|
|
|
14326
|
|
|
exarkun |
17 years ago
|
|
|
14128
|
|
|
glyph |
17 years ago
|
|
|
13156
|
|
|
exarkun |
18 years ago
|
|
|
13154
|
|
|
exarkun |
18 years ago
|
|
|
12648
|
|
|
exarkun |
19 years ago
|
|
|
12562
|
|
|
exarkun |
19 years ago
|
|
|
12396
|
|
|
exarkun |
19 years ago
|
|
|
12366
|
|
|
exarkun |
19 years ago
|
|
|
12365
|
|
|
exarkun |
19 years ago
|
|
|
12361
|
|
|
exarkun |
19 years ago
|
|
|
12360
|
|
|
exarkun |
19 years ago
|
|
|
12359
|
|
|
exarkun |
19 years ago
|
|
|