| Age | Commit message (Collapse) | Author |
|
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
|
|
comprehension
|
|
|
|
Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz
for the review.
|
|
basically everywhere)
|
|
|
|
|
|
Thanks jpic for the report and chmodas for working on a patch.
Reverts 2ea80b94. Refs #19362.
|
|
We have always been at war with trailing backslashes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This was a regression due to unicode_literals usage. Thanks Ivan
Virabyan for the report and the initial patch.
|
|
Refs #19933.
|
|
|
|
Also added stacklevel argument, fixed #18127.
|
|
|
|
This case was originally designed to handle Exception's which didn't gracefully support coercing themselves to unicode. However, because it lives in the `else` case of `if hasattr(s, '__unicode__'):` we can be sure it's no longer reachable in djanog anymore, because since Python 2.5 exception has subclassed object, which means Exception objects always have an __unicode__ method.
|
|
Thanks Aymeric Augustin for the report and the initial patch.
|
|
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.
|
|
This is consistent with the smart_* series of functions and it's going
to be used by the next commit.
|
|
Backwards compatibility aliases were created under Python 2.
|
|
|
|
This mix-in is superseded by the @python_2_unicode_compatible decorator.
|
|
|
|
* 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.
|
|
|
|
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
|
|
|
|
|
|
|
|
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
|
|
In Python 3, types.NoneType is no more available.
|
|
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
|
|
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
|
|
* It's the most micro of optimizations (forget I even said it)
* It makes significantly more sense semantically, given these are functions which return unicode.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16957 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
the URL of an uploaded file. Thanks to e.generalov for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
modules. Thanks, Teemu Kurppa and Anssi Kääriäinen for the report and initial patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
workarounds. Thanks to timo and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
handed exceptions with non-ASCII bytestring data and no working unicode method
under Python 2.6 and higher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
characters in `iri_to_uri` function.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12066 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
handling. Thanks, mitsuhiko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
subclasses can define their own value_to_string() method for serialization. Thanks to Alex Koshelev for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
object when the model instance was not retrieved from the database. Thanks Justin Driscoll and pigletto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
in the face of funky Exception instances. This is slightly symptomatic of
problems in the calling code, but we don't want to raise a secondary exception
whilst trying to display the first one. Based on a patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
codebase. Thanks, julien
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
pointed out by samidh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|