summaryrefslogtreecommitdiff
path: root/django/utils
AgeCommit message (Collapse)Author
2012-08-30Replaced some smart_xxx by force_xxx equivalentClaude Paroz
smart_str/smart_text should only be used when a potential lazy string should be preserved in the result of the function call.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-28[py3] Updated bundled version of sixAymeric Augustin
2012-08-23Reordered importsAymeric Augustin
to avoid an error introduced in 5301a9d7b1.
2012-08-23[py3] Removed duplicate imports.Aymeric Augustin
Fixed #18837. Refs #18791.
2012-08-21Removed obsolete __members__ definitionsClaude Paroz
This was useful for pre-Python 2.6 support. See commit c6e8e5d9.
2012-08-21Reverted type check added in 62954ba04c.Aymeric Augustin
Refs #17040.
2012-08-20[py3] Fixed #17040 -- ported django.utils.crypto.constant_time_compare.Aymeric Augustin
This is a private API; adding a type check is acceptable.
2012-08-19Fixed #18728 -- Made colon optional in tzinfoAymeric Augustin
Made two-digit hours and minutes mandatory in tzinfo (the code used to crash if a one-digit representation was provided). Added standalone tests for django.utils.dateparse.
2012-08-19Removed an inaccurate statementAymeric Augustin
in docstrings of dateparse functions.
2012-08-18[py3] Made 212b9826bd Python 3-friendlyAymeric Augustin
2012-08-18Introduced force_bytes and force_str.Aymeric Augustin
This is consistent with the smart_* series of functions and it's going to be used by the next commit.
2012-08-18Fixed #14516 -- Extract methods from removetags and slugify template filtersMarc Tamlyn
Patch by @jphalip updated to apply, documentation and release notes added. I've documented strip_tags as well as remove_tags as the difference between the two wouldn't be immediately obvious.
2012-08-18[py3] Ported django.utils.safestring.Aymeric Augustin
Backwards compatibility aliases were created under Python 2.
2012-08-18[py3] Stopped attempting to translate bytes.Aymeric Augustin
That goes actively against the goal of cleaning string handling.
2012-08-18[py3] Added compatibility import of thread/_threadAymeric Augustin
This commit fixes the auto-reload of the development server. I should have done that change in ca07fda2.
2012-08-16Fixed #18239 -- Subclassed HTMLParser only for selected Python versionsClaude Paroz
Only Python versions affected by http://bugs.python.org/issue670664 should patch HTMLParser. Thanks Raphaël Hertzog for the initial patch (for 1.4).
2012-08-15Fix changes introduced in fd04e7 so they don't break on Python 3.Ramiro Morales
2012-08-15Added import of force_unicode to utils/text.pyAdrian Holovaty
For backwards compatibility with stupid people like me. Refs #18772.
2012-08-15Ensured that the archive module consistantly explicitly closed all files.Alex Gaynor
2012-08-14[py3] Fixed conditional_processing testsClaude Paroz
2012-08-14[py3] Fixed staticfiles testsClaude Paroz
2012-08-14[py3] Fixed admin_views testsClaude Paroz
Also changed several occurrences of 'request' to 'response'.
2012-08-14[py3] Replace filter/lambda by list comprehensionsAymeric Augustin
This is more idiomatic and avoids returning a list on Python 2 and an iterator on Python 3.
2012-08-13[py3] Fixed encoding issues in cache key generationClaude Paroz
2012-08-12[py3] Encoded value before feeding it to hashlib.md5Claude Paroz
2012-08-12[py3] Deprecated StrAndUnicode.Aymeric Augustin
This mix-in is superseded by the @python_2_unicode_compatible decorator.
2012-08-12[py3] Added fixer for python_2_unicode_compatible.Aymeric Augustin
This doesn't deal with classes that define both __unicode__ and __str__; the definition of __str__ should be removed first. It doesn't guarantee that __str__ will return a str (rather than bytes) under Python 3 either.
2012-08-12[py3] Added python_2_unicode_compatible decorator.Aymeric Augustin
2012-08-11[py3] Re-decoded string after idna encodingClaude Paroz
2012-08-08[py3] Replaced raw_input by inputClaude Paroz
The six addition has been borrowed from: https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08remove a bunch of unnescesarry iterkeys() callsAlex Gaynor
2012-08-08[py3] Replaced __nonzero__ by __bool__Claude Paroz
Of course, __nonzero__ alias has been kept for Python 2 compatibility.
2012-08-08[py3] abspathu doesn't exist under Python 3.Aymeric Augustin
2012-08-07[py3] Ported django.utils.tzinfo.Aymeric Augustin
2012-08-07[py3] Ported django.utils.translation.Aymeric Augustin
2012-08-07[py3] Ported django.utils.regex_helper.Aymeric Augustin
2012-08-07[py3] Ported django.utils.functional.Aymeric Augustin
2012-08-07[py3] Ported django.utils.feedgenerator.Aymeric Augustin
2012-08-07[py3] Ported django.utils.crypto.Aymeric Augustin
2012-08-07[py3] Minor cleanup in django.utils.archive.Aymeric Augustin
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-08-07[py3] Fixed access to dict keys/values/items.Aymeric Augustin
2012-08-04Fixed a mistake in function documentation 'django.utils.functional.partition'Tim Graham
Thanks Raman Barkholenka for the patch.
2012-08-03[py3] Removed uses of sys.maxint under Python 3.Aymeric Augustin
Also fixed #18706: improved exceptions raised by int_to_base36.
2012-08-03Remove a temporary variable deletion, it's not a big deal and it doesn't ↵Alex Gaynor
exist on python3.
2012-07-29Merge pull request #225 from dekkers/remove-double-isinstance-checkAlex Gaynor
Remove double isinstance check in force_unicode
2012-07-25[py3] Updated dict-like data structures for Python 3.Aymeric Augustin
The keys/items/values methods return iterators in Python 3, and the iterkeys/items/values methods don't exist in Python 3. The behavior under Python 2 is unchanged.
2012-07-25Merge pull request #216 from ljosa/ticket_18644Florian Apolloner
Fixed #18644 -- Made urlize trim trailing period followed by parenthesis
2012-07-25Fixed QueryDict.setlistdefault.Aymeric Augustin
It was broken by a seemingly innocuous change in MultiValueDict. Document the pitfall for now. This is fragile and should be considered for refactoring.