Aymeric Augustin
03671ad7e3
Reordered imports
...
to avoid an error introduced in 5301a9d7b1
.
2012-08-23 10:24:50 +02:00
Aymeric Augustin
5301a9d7b1
[py3] Removed duplicate imports.
...
Fixed #18837 . Refs #18791 .
2012-08-23 10:16:16 +02:00
Claude Paroz
7cfe8e8fce
Fixed #11340 -- Prevented HttpResponseNotModified to have content/content-type
...
The HTTP 1.1 spec tells that the 304 response MUST NOT contain a
message body.
Thanks aparajita for the report.
2012-08-22 20:55:24 +02:00
Claude Paroz
e2b4eddc11
Used the decorator syntax for properties in django.http
2012-08-22 20:55:24 +02:00
Simon Meers
dfe63a52ef
Revert "Fixed #18063 -- Avoid unicode in Model.__repr__ in python 2"
...
This reverts commit 3fce0d2a91
.
2012-08-22 11:48:47 +10:00
Claude Paroz
4353a6163c
Fixed #18196 -- Improved loaddata error messages.
2012-08-21 21:52:25 +02:00
Anssi Kääriäinen
a193372753
Fixed #17886 -- Fixed join promotion in ORed nullable queries
...
The ORM generated a query with INNER JOIN instead of LEFT OUTER JOIN
in a somewhat complicated case. The main issue was that there was a
chain of nullable FK -> non-nullble FK, and the join promotion logic
didn't see the need to promote the non-nullable FK even if the
previous nullable FK was already promoted to LOUTER JOIN. This resulted
in a query like a LOUTER b INNER c, which incorrectly prunes results.
2012-08-21 21:23:57 +03:00
Claude Paroz
fd58d6c258
Merge walk and find_files in makemessages command
2012-08-21 14:43:37 +02:00
Claude Paroz
ab2f65bb7f
Removed obsolete __members__ definitions
...
This was useful for pre-Python 2.6 support. See commit c6e8e5d9
.
2012-08-21 11:20:22 +02:00
Aymeric Augustin
e89bc39935
Reverted type check added in 62954ba04c
.
...
Refs #17040 .
2012-08-21 09:00:55 +02:00
Aymeric Augustin
62954ba04c
[py3] Fixed #17040 -- ported django.utils.crypto.constant_time_compare.
...
This is a private API; adding a type check is acceptable.
2012-08-20 22:50:49 +02:00
Aymeric Augustin
54899d810d
[py3] Fixed #18805 -- ported createsuperuser.
...
Thanks sunsesh at gmail.com for the report.
2012-08-20 22:25:41 +02:00
Claude Paroz
bfc380baea
[py3] Prepared MySQL backend for Python 3 compatibility
2012-08-20 10:46:21 +02:00
Simon Meers
3fce0d2a91
Fixed #18063 -- Avoid unicode in Model.__repr__ in python 2
...
Thanks guettli and mrmachine.
2012-08-20 16:47:30 +10:00
Anssi Kääriäinen
4db38cbfe1
[py3] Fixed Oracle specific failures
2012-08-19 23:45:26 +03:00
Aymeric Augustin
2f59e94a41
Fixed #18728 -- Made colon optional in tzinfo
...
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-19 21:47:41 +02:00
Aymeric Augustin
a43ecc0444
Removed an inaccurate statement
...
in docstrings of dateparse functions.
2012-08-19 21:25:41 +02:00
Aymeric Augustin
5f2d9cdbb1
[py3] Fixed another regression from 2892cb0ec4
.
2012-08-19 18:24:50 +02:00
Aymeric Augustin
2892cb0ec4
[py3] Fixed regression introduced in 536b030363
.
...
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.
2012-08-19 17:56:46 +02:00
Aymeric Augustin
536b030363
[py3] Supported integers in HttpResponse
...
Fixed #18764 .
2012-08-19 16:38:21 +02:00
Julien Phalip
675431dfaa
Fixed #17278 -- Enabled the spatialite GIS tests to run without having to specify a database name in the settings. Thanks to Aymeric for the report and to Ramiro for the initial patch.
2012-08-19 02:17:45 -07:00
Karen Tracey
e99293250e
[py3] Fixed slow path through file_move_safe
...
This path is taken on Windows.
2012-08-18 15:44:09 -04:00
Andrew Godwin
1758bf76e4
Merge pull request #287 from uruz/ticket18791
...
Fixed #18791 : [py3] Double import of six in django.forms.widgets
2012-08-18 09:45:16 -07:00
Andrew Godwin
bf12c663d9
Merge pull request #289 from mjtamlyn/slugify-real-function
...
Fixed bug in 212b982
-- Removed duplicate code in removetags
2012-08-18 09:41:06 -07:00
Andrew Godwin
5b09fc8ad2
Merge pull request #288 from mjtamlyn/date-list-period
...
Fixed #3542 -- Add support for changing granularity on ArchiveView.
2012-08-18 09:10:52 -07:00
Marc Tamlyn
e4984812cd
Fixed bug in 212b982
-- Removed duplicate code in removetags
2012-08-18 17:09:37 +01:00
Marc Tamlyn
8d5c11caad
Fixed #3542 -- Add support for changing granularity on ArchiveView.
...
Resolving the concept from a very old ticket in a more class-based-view
manner.
2012-08-18 17:03:57 +01:00
Aymeric Augustin
afc1bd7ab8
[py3] Made 212b9826bd
Python 3-friendly
2012-08-18 17:51:16 +02:00
Alexey Boriskin
abc4038b0b
Fixed #18791 : [py3] Double import of six in django.forms.widgets
2012-08-18 19:17:42 +04:00
Aymeric Augustin
de3ad8bb2d
[py3] Avoided passing a lazy string to urlparse.
...
This causes an exception under Python 3.
Fixed #18776 .
2012-08-18 16:38:49 +02:00
Aymeric Augustin
a120fac65a
Introduced force_bytes and force_str.
...
This is consistent with the smart_* series of functions and it's going
to be used by the next commit.
2012-08-18 16:38:49 +02:00
Marc Tamlyn
f04bb6d798
Fixed #17228 -- params context variable is inconsistent
...
Remove the params variable from the context and just put the variables
in directly.
This had not been committed previously as the original pattern was used
in the functional generic views and we wanted consistency between them,
but django.views.generic.simple.direct_to_template is now gone so we can
do it 'right'.
2012-08-18 15:07:21 +01:00
Marc Tamlyn
212b9826bd
Fixed #14516 -- Extract methods from removetags and slugify template filters
...
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 15:07:21 +01:00
Marc Tamlyn
58683e9c82
Fixed #16744 -- Class based view should have the view object in the context
...
Updated the most recent patch from @claudep to apply again and updated
the documentation location.
2012-08-18 15:07:21 +01:00
Aymeric Augustin
547b181046
[py3] Ported django.utils.safestring.
...
Backwards compatibility aliases were created under Python 2.
2012-08-18 16:04:06 +02:00
Marc Tamlyn
bfa9fc69bf
Fixed #18779 -- URLValidator can't validate url with ipv6.
...
Validation is reasonably 'soft', as for the ipv4. False positives don't
matter too much here.
2012-08-18 12:08:44 +01:00
Aymeric Augustin
16ab519f62
[py3] Removed gratuitous use of map/lambda
...
that causes a test failure on Python 3 because map returns an iterator.
2012-08-18 11:55:36 +02:00
Aymeric Augustin
85e7a5e140
[py3] Stopped attempting to translate bytes.
...
That goes actively against the goal of cleaning string handling.
2012-08-18 11:36:09 +02:00
Aymeric Augustin
2284419a2c
[py3] Fixed cache tests.
2012-08-18 11:15:05 +02:00
Aymeric Augustin
f34de7dd6e
[py3] Fixed backends tests.
2012-08-18 11:02:38 +02:00
Aymeric Augustin
4c1286cf78
[py3] Added compatibility import of thread/_thread
...
This commit fixes the auto-reload of the development server.
I should have done that change in ca07fda2
.
2012-08-18 10:56:56 +02:00
Aymeric Augustin
527f967ec1
[py3] Fixed formtools tests.
...
Python 3 adds a new pickle protocol. The tests were updated in a way
that makes it easy to add another pickle protocol, should Python gain
one.
Thanks Thomas Pelletier for providing an initial version of this patch.
2012-08-18 10:39:33 +02:00
Aymeric Augustin
1ad05172cb
[py3] Fixed file_storage tests.
2012-08-18 10:24:23 +02:00
Ramiro Morales
4c934f3921
Made createsuperuser more robust when getting current OS username.
...
Under some versions of OS X, failure in getting the default system
locale during the syncdb operation of the auth app were causing hard to
diagnose problems afterwards.
No solution based on getpreferredencoding() was chosen because it has
its own problems with certain combinations of Python and OS X versions
(e.g. http://bugs.python.org/issue6202 ).
Thanks prestonsimmons for the report and prestonsimmons and willhardy
for the initial patch.
Fixes #16017 .
2012-08-17 23:15:20 -03:00
Claude Paroz
6e4c984098
[py3] Workarounded a Python bug in mail header encoding
2012-08-17 20:19:14 +02:00
Aymeric Augustin
d739d531a1
[py3] Fixed a regression introduced in fcc8de0598
.
...
Thanks George Marshall for the report.
2012-08-16 22:04:50 +02:00
Claude Paroz
5c79dd5865
Fixed #18239 -- Subclassed HTMLParser only for selected Python versions
...
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-16 21:03:11 +02:00
Claude Paroz
d69bd23b55
Fixed Python version check in testcases.py
2012-08-16 15:31:01 +02:00
Aymeric Augustin
fcc8de0598
[py3] Ported django.core.servers.
2012-08-16 13:01:16 +02:00
Aymeric Augustin
688678e7c0
[py3] Avoided relying on 2.x-only internals
...
in LiveServerTestCase.
2012-08-16 09:56:42 +02:00
Dmitry Shevchenko
4412de5d8d
[py3] Fixed installed_models filtering.
2012-08-16 01:08:45 -05:00
Ramiro Morales
62c3f6362a
Fix changes introduced in fd04e7 so they don't break on Python 3.
2012-08-15 23:08:16 -03:00
Adrian Holovaty
fd04e711d2
Added import of force_unicode to utils/text.py
...
For backwards compatibility with stupid people like me. Refs #18772 .
2012-08-15 16:59:31 -05:00
Aymeric Augustin
27d16a3ca4
[py3] Fixed middleware_exceptions tests.
2012-08-15 22:53:52 +02:00
Claude Paroz
24de85c419
[py3] Fixed more encoding issues in cache tests
2012-08-15 22:48:09 +02:00
Claude Paroz
2b157b0adc
[py3] Fixed slug regex
...
In Python 3, \w matches any Unicode character.
2012-08-15 21:07:48 +02:00
Claude Paroz
60f5e10230
[py3] Fixed dispatch tests
2012-08-15 18:19:21 +02:00
Florian Apolloner
518af78e21
Removed unneeded smart_bytes import which was introduced in f2fff84bc
.
2012-08-15 17:33:21 +02:00
Claude Paroz
4e17f4589a
Fixed #18770 -- memcached cache backend expects byte strings as keys
...
Thanks thecore for the report.
2012-08-15 16:57:17 +02:00
Florian Apolloner
f2fff84bc3
[py3] fixed session file backend.
2012-08-15 14:20:44 +02:00
Claude Paroz
4d393e1bd9
[py3] Fixed HTTP header serialization
2012-08-15 13:39:39 +02:00
Claude Paroz
de2cb5fede
[py3] Fixed F-expression right-hand division
...
Complementary to commit 62a9ed0ac
.
2012-08-15 13:28:47 +02:00
Alex Gaynor
64a3c7f9ae
Ensured that about half of the files opened in the formtools tests were explicitly closed.
2012-08-15 03:46:32 -07:00
Claude Paroz
187ec5a166
[py3] Pass bytes to md5 in truncate_name
2012-08-15 12:37:08 +02:00
Claude Paroz
2d2dca2d8e
[py3] Fixed slugify filter
2012-08-15 12:29:10 +02:00
Anssi Kääriäinen
5d01f3caea
[py3] Removed map() calls used for side-effects only
2012-08-15 13:23:41 +03:00
Claude Paroz
f8ea12f36b
[py3] Removed excessive usage of smart_bytes
2012-08-15 12:13:54 +02:00
Alex Gaynor
ea1e8b38b3
Ensured that the archive module consistantly explicitly closed all files.
2012-08-15 02:53:40 -07:00
Florian Apolloner
ebc1325721
[py3] Always pass bytes to hashlib.md5.
2012-08-15 11:34:41 +02:00
Alex Gaynor
52c351a151
Fixed the erorr handling code for missing management commands.
2012-08-15 02:18:11 -07:00
Alex Gaynor
d1d393f975
Allow tests using a LiveServer to get closer to working.
2012-08-15 02:11:55 -07:00
Claude Paroz
e0d67f3440
[py3] Fixed test_client_regress tests
2012-08-15 10:58:26 +02:00
Claude Paroz
64531df5df
Sent got_request_exception signal before handle_uncaught_exception
...
In some cases (notably Python 3), when handle_uncaught_exception was
itself raising an exception, the got_request_exception was storing
the latter exception instead of the original exception.
2012-08-15 10:58:26 +02:00
Alex Gaynor
31ae103a15
Fixed syndication under python3.
2012-08-15 01:54:18 -07:00
Alex Gaynor
d674bd603e
Final explicit closing for staticfiles, they now pass on python3 with -Wall and there are no warnings about unclosed files
2012-08-15 01:29:05 -07:00
Alex Gaynor
20a7a244d7
Make sure to explicitly close opened files.
2012-08-15 01:21:40 -07:00
Aymeric Augustin
e091c18f50
[py3] Removed a remaining use of __metaclass__.
2012-08-14 23:45:12 +02:00
Aymeric Augustin
212a512984
[py3] Avoided the deprecated base64 interface.
...
This fixes a deprecation warning under Python 3.
2012-08-14 23:45:12 +02:00
Claude Paroz
928baee747
[py3] Fixed conditional_processing tests
2012-08-14 23:35:12 +02:00
Claude Paroz
0120985095
[py3] Fixed file_uploads tests
2012-08-14 23:35:12 +02:00
Claude Paroz
34ac145796
[py3] Fixed contrib.auth tests
2012-08-14 23:35:12 +02:00
Florian Apolloner
367bfaa522
Don't swallow AttributeError in core.urlresolvers.get_callable.
2012-08-14 21:23:25 +02:00
Aymeric Augustin
37c9318748
[py3] Fixed sitemaps tests.
2012-08-14 20:14:31 +02:00
Claude Paroz
f2fe7a3e36
[py3] Fixed serializers tests
2012-08-14 19:54:53 +02:00
Claude Paroz
7d48e077b5
[py3] Fixed staticfiles tests
2012-08-14 17:24:31 +02:00
Claude Paroz
9cb80356fc
[py3] Fed strftime with unicode on Python 3
2012-08-14 16:19:58 +02:00
Claude Paroz
c35501a128
[py3] Fixed HttpResponse when initialized with bytes
2012-08-14 16:15:50 +02:00
Alex Gaynor
a351e383b6
There's no need to do `list(dict.keys())` list(dict)` is enough.
2012-08-14 06:57:16 -07:00
Anssi Kääriäinen
4e7f04cdad
[py3] Fixed file.read().decode(), used codecs.open() instead
2012-08-14 16:09:01 +03:00
Anssi Kääriäinen
62a9ed0ac7
[py3] Fixed F-expression division operators
...
In Python 3 dividing by int will call obj.__truediv__(). This operator
was missing from F-expressions.
2012-08-14 16:07:32 +03:00
Claude Paroz
c2d59e5564
[py3] Fixed admin_views tests
...
Also changed several occurrences of 'request' to 'response'.
2012-08-14 14:45:28 +02:00
Aymeric Augustin
0c198b85a3
[py3] Replace filter/lambda by list comprehensions
...
This is more idiomatic and avoids returning a list on Python 2 and
an iterator on Python 3.
2012-08-14 14:31:06 +02:00
Aymeric Augustin
9299dc42ed
[py3] Removed unnecessary calls to .keys()
...
when computing the length of a dictionary. This fails on Python 3.
2012-08-14 14:09:23 +02:00
Aymeric Augustin
2ae58b20ec
[py3] Fixed egg template loader.
2012-08-14 12:29:53 +02:00
Aymeric Augustin
faf570df18
[py3] Compared response.content with bytes.
2012-08-14 12:29:53 +02:00
Claude Paroz
d1452f6097
[py3] Favoured unicode strings in assert(Not)Contains
...
In Python 3, HTMLParser does not support bytestrings.
2012-08-14 12:19:17 +02:00
Aymeric Augustin
e04230e2e4
[py3] Ported django.http according to PEP 3333.
...
Perfomed some style cleanup while I was in the area.
2012-08-14 10:32:16 +02:00
Claude Paroz
0df0cf70d4
Reverted pickle-json replacement form_hmac calculation
...
This reverts commit b109ff8062
and
complement test cases. The change was too hasty, as some form
values cannot be json-serialized as is.
2012-08-14 09:51:39 +02:00
Claude Paroz
363dbd920e
[py3] Fixed contrib.formtools tests
2012-08-13 21:26:12 +02:00
Claude Paroz
a025b75f6c
[py3] Fixed iterlists usage in QueryDict
2012-08-13 21:25:27 +02:00
Claude Paroz
b109ff8062
Replaced pickle by json in form_hmac calculation
...
Refs #18340
2012-08-13 21:02:18 +02:00
Claude Paroz
0dac73ebd7
Removed binary flag to open files for writing text content
2012-08-13 18:23:26 +02:00
Claude Paroz
45baaabafb
[py3] Fixed encoding issues in cache key generation
2012-08-13 12:56:59 +02:00
Claude Paroz
d774ad752d
[py3] Made csrf context processor return Unicode
2012-08-13 11:54:21 +02:00
Claude Paroz
5e958b958b
[py3] Avoided comparison with None value in formsets
2012-08-13 11:54:13 +02:00
Claude Paroz
a06503d09b
[py3] Fixed content encoding in test client
...
Thanks Andrews Medina for the initial patch.
2012-08-13 09:56:14 +02:00
Anssi Kääriäinen
1930b899bd
Refix #13844 -- Made FloatField aggregates work on Python 2.6 + Postgres
...
Fixed a regression introduced in 59a655988e
.
2012-08-13 09:15:20 +03:00
Claude Paroz
8a1f439d3a
[py3] Fix encoding issues in contrib.sessions
2012-08-12 22:49:10 +02:00
Claude Paroz
ac37c9e495
[py3] Encoded value before feeding it to hashlib.md5
2012-08-12 22:49:10 +02:00
Andrei Antoukh
99321e30ce
Fixed #18306 -- Made deferred models issue update_fields on save
...
Deferred models now automatically update only the fields which are
loaded from the db (with .only() or .defer()). In addition, any field
set manually after the load is updated on save.
2012-08-12 22:39:27 +03:00
Anssi Kääriäinen
59a655988e
Fixed #13844 -- Avoid converting unknown db values to float
...
This patch removes an unconditional float(value) conversion from db
backend default convert_values() method. This can cause problems when
aggregating over character fields for example. In addition, Oracle
and SQLite already return the bare value from their convert_values().
In the long term the converting should be done by fields, and the
fields should then call database backend specific converters when
needed. The current setup is inflexible for 3rd party fields.
Thanks to Merlijn van Deen for the original patch.
2012-08-12 21:52:52 +03:00
Claude Paroz
5513480fe1
[py3] Always convert values from sqlite3 to unicode strings
...
Thanks Aymeric Augustin for the review.
2012-08-12 20:47:18 +02:00
Claude Paroz
dce34dc969
[py3] Made __repr__ return str with Python 3
2012-08-12 20:45:39 +02:00
Anssi Kääriäinen
c1684e3dcb
Fixed #18731 -- Cleaned up split_exclude's use of can_reuse
...
The outer query's set of reusable joins (can_reuse) was passed to the
inner query's add_filter call. This was incorrect.
2012-08-12 21:40:22 +03:00
Aymeric Augustin
4e68e86153
[py3] Deprecated StrAndUnicode.
...
This mix-in is superseded by the @python_2_unicode_compatible decorator.
2012-08-12 14:44:41 +02:00
Aymeric Augustin
d4a0b27838
[py3] Refactored __unicode__ to __str__.
...
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
test it under Python 2
2012-08-12 14:44:40 +02:00
Aymeric Augustin
79d62a7175
[py3] Added fixer for python_2_unicode_compatible.
...
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 14:44:40 +02:00
Aymeric Augustin
a0a0203a39
[py3] Added python_2_unicode_compatible decorator.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
e7e08fd48b
[py3] Replaced some __str__ methods by __unicode__
...
These methods actually return unicode.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
2bb2eecb63
[py3] Removed redundant __str__ methods.
...
These classes already have an identical __unicode__ method, which
will be used after an upcoming refactoring.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
dbb63e56ea
[py3] Avoided returning bytes in Model.__str__
...
on Python 3.
2012-08-12 14:44:40 +02:00
Karen Tracey
759ae3c2da
Fixed #18739 -- witdthratio behavior on None args
...
Made behavior given None consistent with how non-numerics were handled.
Thanks to ja.geb@me.com for the report.
2012-08-11 19:24:18 -04:00
Claude Paroz
15fffcc751
[py3] Fixed reraising of exceptions
...
reraise with second argument to None is not supported.
2012-08-11 23:46:23 +02:00
Claude Paroz
900816464d
[py3] Re-decoded string after idna encoding
2012-08-11 23:23:31 +02:00
Claude Paroz
7d0f883192
[py3] Fixed JSON deserialization
2012-08-11 23:23:31 +02:00
Karen Tracey
b82eb10b26
Fixed #18754 -- cache keys created by post_process
...
Corrected to always generate the cache keys from file names with
forward slashes, not backslashes.
2012-08-11 17:05:26 -04:00
Claude Paroz
09c589810d
[py3] Used smart_str to prevent regressions in http handling
2012-08-11 15:29:29 +02:00
Claude Paroz
f10a1b0641
[py3] Fixed Python 3 compatibility of http handling
...
* Using str() when Python 2 expects bytes and Python 3 Unicode
* Fixed reraise-ing syntax
* Fixed slicing of byte strings
2012-08-11 14:47:44 +02:00
Claude Paroz
22527a821b
[py3] Fixed str_prefix test utility
2012-08-11 14:22:28 +02:00
Andrews Medina
87e0a75c03
[py3] Decoded base64-encoded hash in contrib.auth.hashers
2012-08-11 00:20:59 +02:00
Claude Paroz
92b2dec918
[py3] Made signing infrastructure pass tests with Python 3
2012-08-10 18:07:46 +02:00
Claude Paroz
751774c29f
[py3] Fixed mail tests with Python 3
2012-08-09 20:13:29 +02:00
Alex Gaynor
5f8da527ab
[py3k] use the base64 module, instead of bytes.encode('base64')
2012-08-09 07:26:11 -07:00
Aymeric Augustin
5c09c59bc7
[py3] Renamed `next` to `__next__` in iterators.
...
See PEP 3114. `next` is retained as an alias for Python 2.
2012-08-09 14:36:05 +02:00
Claude Paroz
96a6912ec5
[py3] Fixed compilemessages tests
2012-08-08 23:40:20 +02:00
Claude Paroz
180b672a65
[py3] Fixed Python 3 compatibility in localflavor forms
2012-08-08 23:22:27 +02:00
Claude Paroz
e0988ecd1e
[py3] Made Element instances hashable
2012-08-08 23:13:33 +02:00
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
Claude Paroz
db729266d6
[py3] Fixed 'iterable but non string' detection
...
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.
2012-08-08 18:02:25 +02:00
Alex Gaynor
7515f6576b
Fix TestCase.assertQuerysetEqual on python 3, this is needed for a large number of tests
2012-08-08 07:37:10 -07: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
12cda89ffe
[py3] Fixed a loop that changed dictionary size.
2012-08-08 15:00:24 +02:00
Claude Paroz
2da3af23aa
[py3] Made gis.measure Python 3-compatible
2012-08-08 14:43:16 +02:00
Aymeric Augustin
fa4cb34817
[py3] Fixed filesystem encoding handling
...
in the app directories template loader.
2012-08-08 13:07:49 +02:00
Aymeric Augustin
a4abe7ed56
[py3] abspathu doesn't exist under Python 3.
2012-08-08 12:56:12 +02:00
Aymeric Augustin
bf4da7a442
[py3] Made a small fix in django.http.
...
This is necessary for the 'utils' tests to pass.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
9e0a10ba77
[py3] Minor fix in django.contrib.gis.
2012-08-07 12:00:24 +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
67646dc28d
[py3] Ported django.test.doctest.
...
Based on Vinay Sajip's branch.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
a8b3ddec5f
[py3] Applied minor fixes so the test suite starts
2012-08-07 12:00:22 +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
Alex Gaynor
ede49c7ee0
Fixed #15754 -- avoid recursively computing the tree of media widgets more times than is necessary for a wiget
2012-08-06 07:59:59 -07:00
Brendan MacDonell
ad237fb72f
Fixed #18724 -- Fixed IntegerField validation with value 0
2012-08-06 10:42:21 +02:00
Justin Bronn
1c3464e809
Fixed testing on SpatiaLite 2.4, which has support for `InitSpatialMetaData`.
2012-08-04 18:10:34 -07: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
Claude Paroz
09a719a4e6
Fixed #7833 -- Improved UserCreationForm password validation
...
Make UserCreationForm password validation similar to
SetPasswordForm and AdminPasswordChangeForm, so as the match
check is only done when both passwords are supplied.
Thanks Mitar for the suggestion.
2012-08-04 14:55:13 +02:00
Claude Paroz
121fd109de
Fixed #5524 -- Do not remove cleaned_data when a form fails validation
...
cleaned_data is no longer deleted when form validation fails but only
contains the data that did validate.
Thanks to the various contributors to this patch (see ticket).
2012-08-04 14:22:23 +02:00
Simon Meers
10f979fd92
Fixed #18700 -- Added URL reversal for i18n set_language view.
2012-08-04 20:57:12 +10: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
Claude Paroz
9908201d7f
Replaced some byte strings by str() calls
...
This is a useful trick when Python 2 awaits byte strings and
Python 3 Unicode (regular) strings.
2012-08-03 15:18:13 +02:00
Claude Paroz
2407c45c18
Removed some pre-1.3.0 postgis compatibility code
2012-08-03 11:27:31 +02:00
Claude Paroz
c5d6f6d682
Reorganized geoapp gis tests
...
Removed the numbering of tests and moved lookup/geoqueryset tests
in their own test class.
2012-08-03 10:53:30 +02:00
Claude Paroz
a55cde8ab1
Fixed #18363 -- Improved Galician date and time format strings
...
Thanks Guttorm Flatabø for the report and the initial patch, and
Fran Dieguez for the review.
2012-08-03 09:35:39 +02:00
Claude Paroz
8fbfd21719
Fixed #18684 -- Added Finnish DATETIME_FORMAT
...
Thanks Guttorm Flatabø for the report and the initial patch.
2012-08-03 09:26:11 +02:00
Florian Apolloner
4129201c3e
Fixed a security issue in http redirects. Disclosure and new release forthcoming.
2012-07-30 22:01:50 +02:00
Florian Apolloner
b1d4634686
Fixed second security issue in image uploading. Disclosure and release forthcoming.
2012-07-30 21:57:22 +02:00
Florian Apolloner
dd16b17099
Fixed a security issue in image uploading. Disclosure and release forthcoming.
2012-07-30 21:54:29 +02: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
4b5cb116e3
Fixed error message in detail generic view.
...
Thanks go to mitar for the report and the patch.
2012-07-25 22:46:57 +02:00
Marc Tamlyn
a875f612e0
Fixed #18634 -- Don't escape variables in the context for startproject/startapp.
...
The & symbols which can come up in the secret key were
being escaped to &.
2012-07-25 22:24:41 +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
Alex Gaynor
5ee8c3ef0c
Merge pull request #230 from pjdelport/cleanup
...
Cleanup
2012-07-25 13:07:10 -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
ace9ccfe9f
Fixed #18666 -- when upgrading a user's password to a new algorithm only save the password field to the databaes.
2012-07-24 19:03:26 -07:00
Piet Delport
487b92a13c
it's -> its
2012-07-25 01:21:15 +02:00
Ramiro Morales
f758bdab5e
Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables.
...
Previously, the flush was done before the test case execution and now
it is performed after it.
Other changes to the testing infrastructure include:
* TransactionTestCase now doesn't reset autoincrement sequences either
(previous behavior can achieved by using `reset_sequences`.)
With this, no implicit such reset is performed by any of the provided
TestCase classes.
* New ordering of test cases: All unittest tes cases are run first and
doctests are run at the end.
THse changes could be backward-incompatible with test cases that relied
on some kind of state being preserved between tests. Please read the
relevant sections of the release notes and testing documentation for
further details.
Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi
Kääriäinen for the feedback and Anssi for reviewing.
This also fixes #12408 .
2012-07-24 17:24:16 -03: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
Aymeric Augustin
ae4125ffce
Removed a Python 3-compatibility hack.
...
Thanks Preston Holmes for the patch.
2012-07-23 13:48:04 +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
cacd845996
[py3] Fixed remaining Python 3 syntax errors.
...
django.utils.unittest.* weren't touched -- they're only imported on Python 2.6.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
56dbe924a6
[py3] Removed longs.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
f1d5dc81ac
[py3] Switched to Python 3-compatible introspection.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
d11d45aad9
[py3] Used six.with_metaclass wherever necessary.
2012-07-22 09:29:52 +02:00