summaryrefslogtreecommitdiff
path: root/passlib/utils/compat
Commit message (Collapse)AuthorAgeFilesLines
* cleanup old python compat -- removed int_types aliasEli Collins2020-10-061-2/+0
|
* cleanup old python compat -- removed join_byte_elems() and ↵Eli Collins2020-10-061-9/+0
| | | | join_byte_values() wrappers
* cleanup old python compat -- removed iter_byte_values() wrapperEli Collins2020-10-061-6/+0
|
* cleanup old python compat -- removed byte_elem_value() wrapperEli Collins2020-10-061-5/+0
|
* cleanup old python compat -- removed str_to_usascii() wrapperEli Collins2020-10-061-6/+1
|
* cleanup old python compat -- removed uascii_to_str() wrapperEli Collins2020-10-061-5/+1
|
* cleanup old python compat -- removed u() wrapper from some regexesEli Collins2020-10-061-10/+0
|
* cleanup old python compat -- replaced "unicode" alias in favor of "str"Eli Collins2020-10-061-3/+1
|
* cleanup old python compat -- unified "unicode_or_bytes" aliasesEli Collins2020-10-061-11/+3
|
* cleanup old python compat -- removed "unicode_or_str" and ↵Eli Collins2020-10-061-10/+1
| | | | "native_string_types" aliases
* cleanup old python compat -- removed IO aliases (BytesIO etc)Eli Collins2020-10-061-14/+1
|
* cleanup old python compat -- removed suppress_cause() and error_from() wrappersEli Collins2020-10-061-14/+0
|
* cleanup old python compat -- removed get_unbound_method_function() wrapperEli Collins2020-10-061-6/+1
|
* cleanup old python compat -- removed OrderedDict backportEli Collins2020-10-062-252/+0
|
* cleanup old python compat -- removed izip() wrapperEli Collins2020-10-061-7/+0
|
* cleanup old python compat -- removed nextgetter() wrapperEli Collins2020-10-061-8/+0
|
* cleanup old python compat -- removed itervalues() wrapperEli Collins2020-10-061-4/+0
|
* cleanup old python compat -- removed iteritems() wrapperEli Collins2020-10-061-3/+1
|
* cleanup old python compat -- removed imap() / lmap() aliasesEli Collins2020-10-061-10/+0
|
* cleanup old python compat -- removed irange() aliasEli Collins2020-10-061-5/+0
|
* cleanup old python compat -- removed PY2 & PY3 conditionalsEli Collins2020-10-061-95/+19
|
* cleanup old python compat -- removed PY26 conditional, and unittest2 imports.Eli Collins2020-10-061-7/+4
| | | | removing unittest2 also allowed removing "passlib.tests.backports"
* docs & setup: updates text & setup requirements to indicate we need minimumEli Collins2020-10-061-2/+2
| | | | of Python 3.5.
* Merge from stableEli Collins2020-10-061-2/+32
|\
| * passlib.utils: add thread lock to fix some UT failures.Eli Collins2020-10-051-0/+25
| |
| * reworked lookup_hash() and create_hex_digest() internals to work betterEli Collins2020-05-021-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on FIPS systems (issue 116). * lookup_hash(): - moved all hash consturctor error checks / handling into HashInfo object, which simplifies lookup_hash() internals - [minor] added "required" kwd, inverse of the now-deprecated "return_unknown" kwd - [minor] now caches unknown/unsupported HashInfo records. * HashInfo: - now catches ValueErrors thrown by hash constructor, and special-cased detection of "disabled for fips" errors. - stub instances now have constructor that throws UnknownHashError, instead of being None. calling code should detect stub instances via the new "not info.supported" instead of testing for "info.const is None". * create_hex_digest() now defaults to creating handlers w/ mock hash func when it's not present (e.g. due to FIPS). this should let them be imported; and defer the errors until they're actually used. * added _set_mock_fips_mode() and some helps to make lookup_hash() fake a FIPS mode system (per traceback provided in issue comments). used this to make some preliminary UTs for the digest & hasher changes above.
* | Merge from stableEli Collins2019-11-221-0/+1
|\ \ | |/
| * general: Python 2.6 & 3.3 support deprecated -- added notes in docsEli Collins2019-11-221-0/+1
| |
* | compat cleanup: removed print_() compat helper now that py25 support dropped.Eli Collins2017-02-171-45/+0
| |
* | compat cleanup: replaced all u("") instances with u""Eli Collins2017-02-171-5/+6
| | | | | | | | | | | | | | realized can do this now that we're requiring python3 >= 3.3. had to keep u() helper around for u(r"") instances, since py3 doesn't have ur"". but switched it to use ascii decoding for py2, to make sure things are clean.
* | general: went ahead and removed a bunch of deprecated features that were ↵Eli Collins2016-11-281-0/+1
|/ | | | | | | | | scheduled for removal in v1.8. this removes CryptPolicy, unix_fallback, some old HtpasswdFile methods, and more. tests were updated as well. see history/1.8 for a complete list.
* passlib.registry: consolidated some internal helpers from various placesEli Collins2016-11-191-0/+4
| | | | | * moved has_active_backend() from UTs to .registry * moved os_crypt backend support helper from .hosts to .registry
* ran full tests to verify we work under pyston 0.5.1Eli Collins2016-07-151-0/+3
| | | | (a few minor tweaks to UTs so everything passes)
* hash.scrypt: refactoring & improvementsEli Collins2016-06-171-0/+9
| | | | | * factored out parallel count code into ParallelismMixin (to share w/ argon2) * added basic .using() & .needs_update() support for block_size, parallelism
* passlib.handlers.scrypt: created scrypt hash handler, complete with UTs and docsEli Collins2016-06-101-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * scrypt kdf code - relocated scrypt kdf code to passlib.crypto.scrypt - py3 compat fixes - split UTs out into separate file - removed "non-power of 2" support, not needed. - added wrapper which can toggle between builtin backend, and extenrnal scrypt package. - factored out n/r/p validation code so it can be used independantly of calling kdf itself. * passlib.handlers.scrypt: added scrypt handler which wraps the kdf. - added some custom test strings, as well as adapted some reference values from the scrypt whitepaper. - added documentation page - integrated scrypt kdf wrapper w/ hash's HasManyBackends api
* relocated many of the crypto routes inside passlib.utils,Eli Collins2016-02-101-2/+2
| | | | | | | | | | | | | | | | | | | and moved them to a separate passlib.crypto subpackage. along with this move, made a few api cleanups: * unified all code that's looking up hashes to use new passlib.crypto.lookup_hash() wrapper, which takes care of hash name normalization, loading fallback implementations, and alg metadata inspection, all hidden behind a memoized function. * deprecated pbkdf2() in favor of pbkdf2_hmac() -- only real use, and new signature matches stdlib function. additionally, this version is a bit faster, due to some assumptions that can be made due to the PRF always being HMAC based. * added compile_hmac() helper which does an even more efficient job of pre-compiling a keyed HMAC function; this helped speed up pbkdf2 a bit more.
* comments & doc updatesEli Collins2015-07-231-0/+6
|
* passlib.tests -- clean ups of os_crypt & general backend handlingEli Collins2015-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * moved utils.patchAttr() function to TestCase.patchAttr(), redid a bunch of manual monkeypatches to use .patchAttr() method. * temporary_backend() hack replaced by subcls.using(), so temporary backend use will be threadsafe (needed for concurrent tests). * HandlerCase.create_backend_cases() replaced with HandlerCase.create_backend_case(), all calls split out to make individual calls for each backend. Easier to read in diffs going forward when backends added/removed. * moved os_crypt specific code w/in create_backend_case() to OsCryptMixin, which just subclasses the method it needs to modify. allowed removing find_crypt_replacement() method entirely; decision to skip backend now directly uses OsCryptMixin's own logic. * fuzz_verifier_crypt() cleanups - moved to OsCryptMixin; removing .using_patched_crypt ref from HandlerCase - has_crypt_support() helper rolled into method, was only caller. - os_supports_ident() refactored into crypt_supports_variant(). fuzz_verified_crypt() is (now) the only caller. * bcrypt's crypt_supports_variant() now uses actual test of crypt() rather than hardcoded list of supported values. * fuzz verifier now handlers hashes throwing SkipTest. * utils.has_crypt_support() rolled into
* Merge from stableEli Collins2015-01-271-0/+2
|
* made passlib.utils.compat a package, moved _ordered_dict backport inside it.Eli Collins2015-01-272-0/+652