| Age | Commit message (Collapse) | Author |
|
Thanks anthony at adsorbtion.org for the report, and johannesl for
bringing the patch up-to-date.
Backport of 2a67374b5 from master.
|
|
for Python 2 object model compatibility methods.
Backport of fc10418 from master.
|
|
Thanks Claude Paroz.
Backport of 095eca8 from master.
|
|
Thanks mrmachine for the review.
|
|
response.content can be accessed many times as desired, and always
returns the same result.
iter(response) works only once and consumes the iterator.
|
|
in HttpResponses instantiated with iterators.
|
|
This commit caused every test that does two or more assertContains to
fail, because of #6527. It also made HttpResponse non-pickleable.
Refs #13222.
|
|
Thanks teepark for the report and grahamd for his insights.
|
|
request.py, response.py and utils.py
|
|
Thanks mrmachine and everyone else involved on this long-standing ticket.
|
|
Thanks paulegan for the report and Preston Holmes for the review.
|
|
Full disclosure and new release are forthcoming
|
|
Thanks Malcolm Tredinnick for the review.
|
|
real issues, or b) were impossible to hit.
|
|
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
|
|
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.
|
|
Thanks hp1337@gmail.com for the report.
|
|
The HTTP 1.1 spec tells that the 304 response MUST NOT contain a
message body.
Thanks aparajita for the report.
|
|
|
|
|
|
Refs #18764.
Reverted 536b030363 and switched to a more explicit way of avoiding
calling bytes(<int>).
This definitely deserves a refactoring. Specifically, _get_content
should just return b''.join(self). Unfortunately that's impossible
with the current tests.
|
|
Fixed #18764.
|
|
|
|
|
|
|
|
Perfomed some style cleanup while I was in the area.
|
|
|
|
|
|
|
|
* Using str() when Python 2 expects bytes and Python 3 Unicode
* Fixed reraise-ing syntax
* Fixed slicing of byte strings
|
|
See PEP 3114. `next` is retained as an alias for Python 2.
|
|
In Python 3, the str type has an __iter__ attribute. Therefore, the
presence of an __iter__ attribute is not sufficient to distinguish
'standard' iterables (list, tuple) from strings.
|
|
This is necessary for the 'utils' tests to pass.
|
|
* 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.
|
|
This is a useful trick when Python 2 awaits byte strings and
Python 3 Unicode (regular) strings.
|
|
forthcoming.
|
|
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
|
|
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
|
|
|
|
|
|
|
|
- Use super().
- Don't poke at internals.
- Don't override methods for no reason.
|
|
This keyword was already deprecated in the code (supported for
backwards compatibility only), but never formally deprecated.
Thanks Paul McMillan for the report and yasar11732 for the initial
patch.
|
|
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
|
|
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
|
|
This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
|
|
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
|
|
Thanks Ramiro for the patch.
|
|
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
|
|
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|