Commit Graph

7903 Commits

Author SHA1 Message Date
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