diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-07-11 10:19:42 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-07-11 10:19:42 -0400 |
| commit | 0e56599c0ece0c134c1a94fed181eb8748ddc546 (patch) | |
| tree | ae021a97607b2f505a1bc98fede15c94a293c347 /passlib/utils | |
| parent | 3ef80daaa8926b9df2caa98d33963629333653a0 (diff) | |
| download | passlib-0e56599c0ece0c134c1a94fed181eb8748ddc546.tar.gz | |
ConfigParser deprecation tweaks
* Py3.2 renamed SafeConfigParser -> ConfigParser, we now import that to silence deprecation warnings
* Py3.2 deprecated parser.readfp() in favor of read_file()
* added py3k_lang, py32_lang constants to simplify future checks
Diffstat (limited to 'passlib/utils')
| -rw-r--r-- | passlib/utils/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/passlib/utils/__init__.py b/passlib/utils/__init__.py index 3b085a7..ac82055 100644 --- a/passlib/utils/__init__.py +++ b/passlib/utils/__init__.py @@ -50,6 +50,8 @@ __all__ = [ 'getrandstr', #constants + 'pypy_vm', 'jython_vm', + 'py32_lang', 'py3k_lang', 'sys_bits', 'unix_crypt_schemes', ] @@ -61,6 +63,8 @@ __all__ = [ #: detect what we're running on pypy_vm = hasattr(sys, "pypy_version_info") jython_vm = sys.platform.startswith('java') +py3k_lang = sys.version_info >= (3,0) +py32_lang = sys.version_info >= (3,2) #: number of bits in system architecture sys_bits = int(logb(sys.maxint,2)+1.5) |
