Commit Graph

839 Commits

Author SHA1 Message Date
Aymeric Augustin e00d1b6dc6 Removed obsolete compatibility functions for old Pythons. 2012-12-29 21:59:07 +01:00
Aymeric Augustin f27a4ee327 Removed django.contrib.localflavor.
Each localflavor lives on as a separate app.
2012-12-29 21:59:06 +01:00
Aymeric Augustin fb9f1b9bfb Removed backwards-compatibility shim for #16288.
Also unit-tested django.utils.log.RequireDebugTrue for consistency.
2012-12-29 21:58:12 +01:00
Florian Apolloner 4a71b84266 Fixed #19204 -- Replaced python2-style exception syntax.
Thanks to garrison for the report and patch.
2012-12-24 14:05:36 +01:00
Aymeric Augustin bbabfdccce Fixed #19485 -- Python 3 compatibility for c2a6b2a4.
Refs #9589.
2012-12-17 09:46:26 +01:00
Tim Graham 507c081484 Fixed #18718 - Documented django.utils.encoding.filepath_to_uri 2012-12-16 14:39:37 -05:00
Ramiro Morales 730c0d2e72 Fixed a couple of docstring typos. 2012-12-15 10:22:22 -03:00
Ramiro Morales c2a6b2a43f Fixed #9589 -- Made development web server more robust in the presence of a wider variety of code errors.
Thanks goes to contributor with Trac user 'berto' for the patch.
2012-12-15 10:17:25 -03:00
Florian Apolloner a2f2a39956 Fixed #18856 -- Ensured that redirects can't be poisoned by malicious users. 2012-12-10 22:11:39 +01:00
Claude Paroz c91667338a Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-12-08 11:13:52 +01:00
Tom Insam 74809fdcc7 cope with unsplittable urls in smarl_urlquote. 2012-12-03 12:13:24 +00:00
Claude Paroz 349c4c37f8 Fixed #19015 -- Add ISO input formats to all formats 2012-12-01 14:05:52 +01:00
Chris Khoo bf1871d874 Fixed #19237 -- Improved strip_tags utility
The previous pattern didn't properly addressed cases where '>'
was present inside quoted tag content.
2012-11-24 12:16:52 +01:00
Hannes Struss f9891f2087 Fixed #19325 - Made email backend of AdminEmailHandler configurable 2012-11-20 11:23:12 +01:00
Preston Holmes 44046e8a38 Fixed #18985 -- made DeprecationWarnings loud
Capture warnings in Python >= 2.7 and route through
console handler, which is subject to DEBUG==True

Thanks to dstufft for the idea, and claudep for initial patch
2012-11-16 17:07:38 -08:00
Claude Paroz 550ddc66b4 Fixed #19272 -- Fixed gettext_lazy returned type on Python 2
Thanks tyrion for the report.
2012-11-14 10:50:15 +01:00
Anssi Kääriäinen fa18b0ac89 Some changes to SortedDict to make it faster under py2
Refs #19276
2012-11-13 22:48:25 +02:00
Adrian Holovaty 09a39ca082 Negligible spacing fix in utils/log.py 2012-11-12 14:19:11 -06:00
Aymeric Augustin fc10418fba Fixed #18963 -- Used a subclass-friendly pattern
for Python 2 object model compatibility methods.
2012-11-03 22:07:35 +01:00
Andrew Godwin 7f75460fd6 Fixed #19070 -- urlize filter no longer raises exceptions on 2.7
Thanks to claudep for the patch.
2012-10-31 10:58:14 +00:00
Ian Clelland 3266c26eb2 Properly support pickling of LazyObjects in Python 3.3 2012-10-26 01:40:33 +01:00
Aymeric Augustin 45c8818503 Ensured get_version returns a native string.
Returning unicode triggers a bug in Python 2.7:
http://bugs.python.org/issue11638

This problem was introduced in 4a103086 (unicode_literals).
2012-10-25 21:49:18 +02:00
Alex Gaynor ce1eb320e5 Remove a case that is no longer reachable in encodings.py.
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.
2012-10-24 15:53:00 -07:00
Claude Paroz 22471a41ba Merge pull request #457 from JanBednarik/ticket_19142
Fixed #19142 -- Language codes can include numbers (RFC 3066)
2012-10-21 10:35:01 -07:00
Alex Gaynor 6b3d2bc981 Merge pull request #444 from mitar/patch-2
Allow reversed iteration over SortedDict.
2012-10-20 20:39:49 -07:00
Jan Bednařík e6b34193c5 Fixed #19142 -- Language codes can include numbers (RFC 3066). 2012-10-21 01:25:35 +02:00
Aymeric Augustin 4b27813198 Fixed #7581 -- Added streaming responses.
Thanks mrmachine and everyone else involved on this long-standing ticket.
2012-10-20 20:05:11 +02:00
Mitar c3fabb282d Allow reversed iteration over SortedDict.
Iterators cannot be reversed easily without this method.
2012-10-15 04:16:46 -07:00
Claude Paroz afbf913b90 Build context strings out of [u|n]gettext
The context strings in [n]pgettext functions should not be marked
themselves for translation.
2012-10-15 10:00:22 +02:00
Anssi Kääriäinen a8b1861fc4 Revert "Fixed #16211 -- Added comparison and negation ops to F() expressions"
This reverts commit 28abf5f0eb.

Conflicts:

	docs/releases/1.5.txt
2012-10-10 01:15:29 +03:00
Anssi Kääriäinen 28abf5f0eb Fixed #16211 -- Added comparison and negation ops to F() expressions
Work done by Walter Doekes and Trac alias knoeb. Reviewed by Simon
Charette.
2012-09-30 17:51:06 +03:00
Claude Paroz 10e505b1b3 Moved filter at handler level
Filters at logger level are only processed for messages directly
logged to the specific logger, not for loggers in the parent chain.
As the 'django' logger is almost always processed as an inherited
logger, it makes more sense to filter messages at the 'console'
handler level.
2012-09-29 23:50:34 +02:00
Claude Paroz f0f327bbfe Fixed #18993 -- 'django' logger logs to console when DEBUG=True
Thanks Preston Holmes for the review.
2012-09-29 22:56:18 +02:00
Claude Paroz a014ddfef2 Combined Django DEFAULT_LOGGING with user LOGGING config
Refs #18993.
2012-09-29 22:56:18 +02:00
Julien Phalip b8244c654c Fixed #18881 -- Made the context option in {% trans %} and {% blocktrans %} accept literals wrapped in single quotes. Thanks to lanyjie for the report. 2012-09-27 20:34:45 -07:00
Claude Paroz b3ee80a0cf Fixed parse_http_date docstring and moved related tests
Refs #18675.
2012-09-26 21:10:17 +02:00
Aymeric Augustin 822cfce3df Fixed #18951 -- Formatting of microseconds.
Thanks olofom at gmail com for the report.
2012-09-22 12:02:21 +02:00
Dave Hall 44767f2caf Use unicode.translate to speed up js escaping. 2012-09-18 21:15:15 +02:00
Florian Apolloner 319e135519 Fixed #18800 -- Support numbers bigger than max float in `numberformat`.
Thanks to jbvsmo for the patch and Brad Pitcher for the tests.
2012-09-18 19:43:50 +02:00
Carl Meyer fcec904e4f Fix an HTML-parser test that's failed in Python 2.6.8 since 5c79dd58.
The problem description in #18239 asserted that
http://bugs.python.org/issue670664 was fixed in Python 2.6.8, but based on
http://bugs.python.org/issue670664#msg146770 it appears that's not correct; the
fix was only applied in 2.7, 3.2, and Python trunk. Therefore we must use our
patched HTMLParser subclass in all Python 2.6 versions.
2012-09-09 12:13:42 -06:00
Alex Gaynor b865009d41 Fixed #12397 -- allow safe_join to work with the root file system path, which means you can have your root template or file upload path at this location. You almost certainly don't want to do this, except in *very* limited sandboxed situations. 2012-09-07 16:49:22 -04:00
Alex Gaynor 292322f977 [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
Claude Paroz cc9b767fc6 Fixed #18902 -- Made force_bytes properly handle exception input
Thanks Aymeric Augustin for the report and the initial patch.
2012-09-04 09:27:28 +02:00
Claude Paroz ae88e73fa6 Replaced some smart_xxx by force_xxx equivalent
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
Claude Paroz ebc773ada3 Replaced many smart_bytes by force_bytes
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.
2012-08-29 11:20:32 +02:00
Aymeric Augustin 20012b961e [py3] Updated bundled version of six 2012-08-28 23:20:55 +02:00
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 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 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 afc1bd7ab8 [py3] Made 212b9826bd Python 3-friendly 2012-08-18 17:51:16 +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 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
Aymeric Augustin 547b181046 [py3] Ported django.utils.safestring.
Backwards compatibility aliases were created under Python 2.
2012-08-18 16:04:06 +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 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
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
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
Alex Gaynor ea1e8b38b3 Ensured that the archive module consistantly explicitly closed all files. 2012-08-15 02:53:40 -07:00
Claude Paroz 928baee747 [py3] Fixed conditional_processing tests 2012-08-14 23:35:12 +02:00
Claude Paroz 7d48e077b5 [py3] Fixed staticfiles tests 2012-08-14 17:24:31 +02: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
Claude Paroz 45baaabafb [py3] Fixed encoding issues in cache key generation 2012-08-13 12:56:59 +02:00
Claude Paroz ac37c9e495 [py3] Encoded value before feeding it to hashlib.md5 2012-08-12 22:49:10 +02: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 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
Claude Paroz 900816464d [py3] Re-decoded string after idna encoding 2012-08-11 23:23:31 +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
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
Claude Paroz 817535d73e Replaced types.NoneType occurrences
In Python 3, types.NoneType is no more available.
2012-05-23 12:20:03 +02:00
Claude Paroz 35e6585568 Imported reduce from functools for forward compatibility.
In Python 3, reduce has to be imported from functools.
2012-05-20 00:25:46 +02:00
Claude Paroz 38408f8007 Marked bytestrings with b prefix. Refs #18269
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Claude Paroz d04f72fb31 Got rid of old __cmp__methods replaced by rich comparison.
The __cmp__ methods are unsupported in Python 3.
_doctest.py has been left untouched because it is likely it will
not be migrated to Python 3.
2012-05-18 14:52:24 +02:00
Adrian Holovaty 25128856f5 Fixed typo in utils/archive.py docstring 2012-05-11 13:51:19 -05:00
Claude Paroz 169b1a404c Replaced foo.next() by next(foo).
This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
2012-05-10 20:15:49 +02:00
Anssi Kääriäinen 9877e84caa Fixed total_ordering for Python < 2.7.2
The total_ordering in Python versions prior to 2.7.2 is buggy, and
this caused infinite recursion for Field comparisons on those
versions. Use the borrowed total_ordering for all Python versions
prior to 2.7.2.

The buggy total_ordering was introduced in commit
5cbfb48b92
2012-05-07 21:03:21 +03:00
Simon Charette 5cbfb48b92 Made model fields comparable to other objects
Fixed #17851 -- Added __lt__ and @total_ordering to models.Field,
made sure these work correctly on other objects than Field, too.
2012-05-07 20:08:20 +03:00
Claude Paroz d7dfab59ea Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Alex Gaynor 1583d40224 Fixed the syntax used for the Python repl examples in docs and docstrings. 2012-05-05 09:54:30 -05:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Aymeric Augustin e84f79f051 Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +02:00
Claude Paroz 596cb9c7e2 Replaced print statement by print function (forward compatibility syntax). 2012-04-30 20:45:03 +02:00
Anssi Kääriäinen 4b11762f7d Fixed SortedDict.__copy__()
Fixed #18175 -- Calling SortedDict.__copy__() resulted in changes to
the original dictionary. The reason was likely related to subclassing
dict.

Thanks to linovia for report and patch.
2012-04-30 17:19:55 +03:00
Alex Gaynor aa1aa1ad41 Fix a typo in a comment. 2012-04-30 10:15:36 -04:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Adrian Holovaty 5b644a5464 Moved version code out of __init__.py.
Moved everything except VERSION and a get_version() stub out of the top-level __init__.py, so that we're not importing all that stuff all the time. And because it's cleaner.
2012-04-29 13:44:32 -05:00
Aymeric Augustin cec6bd5a59 Fixed #18023 -- Removed bundled simplejson.
And started the deprecation path for django.utils.simplejson.

Thanks Alex Ogier, Clueless, and other contributors for their
work on the patch.
2012-04-29 19:58:00 +02:00
Aymeric Augustin a15cfb2e45 Simplified timezones tests with settings_changed.
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ
are changed in tests.
2012-04-29 16:03:46 +02:00
Aymeric Augustin 3e8b40f479 Fixed #17992 -- Added a public API for localtime.
Thanks Bradley Ayers for the report.
2012-04-29 15:37:23 +02:00
Aymeric Augustin 02a5b41db4 Fixed #18224 -- Changed the dev version number.
Following the move from SVN to git.
2012-04-29 13:40:10 +02:00
Not Carl 6b430b883f Whitespace formatting 2012-04-28 14:58:11 -04:00
Not Carl a7829f3334 forgot the allow_lazy(phone2numeric) 2012-04-28 03:33:37 -04:00
Not Carl cfe552ccb3 Modified phone2numeric to not use regular expression or lambdas 2012-04-28 03:29:42 -04:00
Claude Paroz e2548ec2a9 Fixed #18071 -- Ignored case sensitivity in urlize utility. Thanks luke@creaturecreative.com and adamzap for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-11 17:49:22 +00:00
Ramiro Morales cac5d9fd80 Fixed #18022 -- Fixed import of standalone Python 'json' module.
Thanks Clueless for the report and initial patch.

Refs #17071, r17018.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-01 21:11:46 +00:00
Ramiro Morales b41ebcf1b9 Fixed #18040 -- Removed so-called project-level locale trees from the list of paths the translation loading process takes in account.
Deprecated in Django 1.3. Removed completely for Django 1.5.

Thanks Claude for the review.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 22:24:24 +00:00