Claude Paroz
b8e49d70f2
[py3] Replaced raw_input by input
...
The six addition has been borrowed from:
https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08 19:53:11 +02:00
Alex Gaynor
4c97101b1f
remove a bunch of unnescesarry iterkeys() calls
2012-08-08 07:33:15 -07:00
Claude Paroz
576ec12f8e
[py3] Replaced __nonzero__ by __bool__
...
Of course, __nonzero__ alias has been kept for Python 2 compatibility.
2012-08-08 15:02:31 +02:00
Aymeric Augustin
a4abe7ed56
[py3] abspathu doesn't exist under Python 3.
2012-08-08 12:56:12 +02:00
Aymeric Augustin
64e2e35627
[py3] Ported django.utils.tzinfo.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
9e8df02d68
[py3] Ported django.utils.translation.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
17da0aa893
[py3] Ported django.utils.regex_helper.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
fe8484efda
[py3] Ported django.utils.functional.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
7e01e532c0
[py3] Ported django.utils.feedgenerator.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
127b461b11
[py3] Ported django.utils.crypto.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
13338a6314
[py3] Minor cleanup in django.utils.archive.
2012-08-07 12:00:23 +02:00
Aymeric Augustin
c5ef65bcf3
[py3] Ported django.utils.encoding.
...
* 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 12:00:22 +02:00
Aymeric Augustin
ee191715ea
[py3] Fixed access to dict keys/values/items.
2012-08-07 12:00:22 +02:00
Tim Graham
86c5c0154f
Fixed a mistake in function documentation 'django.utils.functional.partition'
...
Thanks Raman Barkholenka for the patch.
2012-08-04 18:56:43 -04:00
Aymeric Augustin
d01eaf7104
[py3] Removed uses of sys.maxint under Python 3.
...
Also fixed #18706 : improved exceptions raised by int_to_base36.
2012-08-03 18:51:28 +02:00
Alex Gaynor
129f1ac848
Remove a temporary variable deletion, it's not a big deal and it doesn't exist on python3.
2012-08-03 07:10:04 -07:00
Alex Gaynor
e567f439bd
Merge pull request #225 from dekkers/remove-double-isinstance-check
...
Remove double isinstance check in force_unicode
2012-07-29 17:07:55 -07:00
Aymeric Augustin
ab6cd1c839
[py3] Updated dict-like data structures for Python 3.
...
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-25 22:58:48 +02:00
Florian Apolloner
59d99772f0
Merge pull request #216 from ljosa/ticket_18644
...
Fixed #18644 -- Made urlize trim trailing period followed by parenthesis
2012-07-25 13:22:49 -07:00
Aymeric Augustin
f3c9a16a42
Fixed QueryDict.setlistdefault.
...
It was broken by a seemingly innocuous change in MultiValueDict.
Document the pitfall for now. This is fragile and should be
considered for refactoring.
2012-07-25 19:10:40 +02:00
Aymeric Augustin
942818e1b3
Rolled back a unnecessary change in 8f002867b2
.
...
This keeps the implementation of setdefault and setlistdefault
consistent. Also it's marginally faster than looking up the value
again.
2012-07-25 10:16:35 +02:00
Alex Gaynor
38ce709fe4
Added tests for deprecation warnings and fixed the argument order for the warnings.
2012-07-24 07:01:57 -07:00
Jeroen Dekkers
226a3e7e00
Remove double isinstance check in force_unicode
2012-07-24 00:45:40 +02:00
Claude Paroz
690cabe203
Used a Python 3-compatible syntax for building a translation table
2012-07-22 18:05:53 +02:00
Aymeric Augustin
a84d79f572
[py3] Added Python 3 compatibility for xrange.
2012-07-22 09:29:56 +02:00
Aymeric Augustin
ca07fda2ef
[py3] Switched to Python 3-compatible imports.
...
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
2012-07-22 09:29:56 +02:00
Aymeric Augustin
0d914d08a0
[py3] Updated urllib/urllib2/urlparse imports.
...
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
3cb2457f46
[py3] Replaced basestring by six.string_types.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
56dbe924a6
[py3] Removed longs.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
473d5f4ba1
[py3] Fixed django.utils.six.moves.
...
It didn't work because six was inside django.utils.
2012-07-22 09:29:51 +02:00
Aymeric Augustin
8b01909841
[py3] Bundled six for Python 3 compatibility.
...
Refs #18363 .
2012-07-22 09:29:44 +02:00
Aymeric Augustin
38c18f1747
Switched to octal notation (bis).
2012-07-20 13:42:44 +02:00
Aymeric Augustin
324d48d0a7
Switched to Python 3-compatible octal notation.
2012-07-20 13:28:36 +02:00
Vebjorn Ljosa
d5012d6371
Fixed #18644 -- Made urlize trim trailing period followed by parenthesis
2012-07-17 12:44:02 -04:00
Alex Gaynor
c57abd3c29
Remove DotExpandedDict, which was undocumented and unused.
2012-07-14 19:04:37 -07:00
Alex Gaynor
0f57935bcd
Fix an incredibly emberassing typo.
2012-07-14 17:08:52 -07:00
Alex Gaynor
8b3c2f2c51
Deprecate two methods (which I seriously doubt anyone ever used, but they were documented so...) because they cannot be implemented efficiently on top of collections.SortedDict in Python 2.7 and up.
2012-07-14 16:08:42 -07:00
Alex Gaynor
8f002867b2
Cleaned up the QueryDict implementation.
...
- Use super().
- Don't poke at internals.
- Don't override methods for no reason.
2012-07-14 14:07:11 -07:00
Aymeric Augustin
9a25d8618a
Update links to diveintomark.org.
...
These pages are gone.
2012-07-14 12:32:39 +02:00
Guilherme Gondim
91e4f7effb
Fix copyright holder
2012-07-06 15:24:07 -03:00
Luke Plant
bee498f3a2
Added 'format_html' utility for formatting HTML fragments safely
2012-07-03 22:20:12 +01:00
Luke Plant
f33e150369
Documented utils.html.escape and conditional_escape
2012-07-03 22:20:12 +01:00
Florian Apolloner
6bc1b22299
Fixed our HTMLParser patches for python 2.7.4
2012-06-22 15:09:26 +02:00
Claude Paroz
fe873e2765
Fixed #12140 -- Fixed http.urlencode result for empty lists
...
Thanks aneil for the report and the initial patch.
2012-06-14 11:32:40 +02:00
Anssi Kääriäinen
90985048fc
Used git log instead of git show for last commit's timestamp
...
The reason for this was that git show included the whole changeset in
the output, but only the UTC timestamp was needed. By using git log
it is possible to get just the timestamp. The whole changeset can be
large, and can cause unicode encoding errors.
2012-06-08 23:04:03 +03:00
Claude Paroz
5e6ded2e58
Fixed #18363 -- Added Python 3 compatibility layer.
...
Thanks Vinay Sajip for the support of his django3 branch
and Alex Gaynor, kezabelle, YorikSar for the review.
2012-06-07 18:36:53 +02:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz
eb286aa22f
Delayed encoding of password and salt in password checking.
...
Applied the rule that string encoding should happen as late as
possible. This is also a preparation for Python 3 compatibility.
2012-06-06 10:53:16 +02:00
Claude Paroz
28e424532f
Removed unneeded smart_str in cache utils.
2012-05-28 21:13:09 +02:00