Commit Graph

1023 Commits

Author SHA1 Message Date
Tim Graham 4492ea5475 Fixed #22586 -- Added LANGUAGE_SESSION_KEY to __all__.
Thanks david.fischer.ch at gmail.com for the report.
2014-05-06 19:47:22 -04:00
Claude Paroz 142c27218a Fixed #22565 -- Prevented pgettext_lazy crash with bytestring input
Thanks ygbo for the report.
2014-05-02 19:33:22 +02:00
Tim Graham 45c2d1f5d9 flake8 fixes. 2014-04-30 18:33:46 -04:00
Doug Beck a5f6cbce07 Refactored DjangoTranslation class
Also fixes #18192 and #21055.
2014-04-30 18:36:25 +02:00
Simon Charette a2340ac6d6 Use the new implementation of `six.with_metaclass`.
No more `NewBase` horrors.

Thanks to bendavis78 for his work on merging this into six.
2014-04-29 09:43:08 -04:00
Alex Gaynor 2bcb8bfc8d Fix many many typos in comments throughout the codebase 2014-04-26 10:18:45 -07:00
Alex Gaynor 58176dee88 Use the stdlib's compare_digest for constant time comparisons when available 2014-04-22 14:45:00 -07:00
Aymeric Augustin 428c0bbe1b Appeased flake8 2.1.0. 2014-04-21 12:27:34 +02:00
Alex Gaynor 21a1fddcc4 Typo fix 2014-04-17 11:04:57 -07:00
Alex Gaynor cb68eb3e6d Use the stdlib's PBKDF2 implementation when available.
This is a bit faster than ours, which is good, because it lets you increase
the iteration counts.

This will be used on Python 3.4+, and, pending the acceptance of PEP466, on
newer Python 2.7s.
2014-04-17 11:02:42 -07:00
Tomasz Wysocki c28beb4291 Refactored and commented strip_tags utility 2014-04-03 21:24:29 +02:00
Alex Gaynor 608e6eb295 Added an explanatory comment. Refs #22017 2014-04-02 09:47:18 -07:00
Alex Gaynor 666990a2a0 Revert "Merge pull request #2508 from tomwys/patch-1"
This reverts commit c45607e939, reversing
changes made to 9769337ca8.
2014-04-02 09:45:42 -07:00
Alex Gaynor 66cbd81456 Merge pull request #2509 from tomwys/patch-2
Refactor. Stop using memory for list copies.
2014-04-02 08:35:42 -07:00
Tomasz Wysocki cb9704fc4f Refactor. Stop using memory for list copies. 2014-04-02 17:32:51 +02:00
Tomasz Wysocki 6eb891f57a Don't copy list for iteration. 2014-04-02 17:28:09 +02:00
Alex Gaynor 778ce245dd Corrected many style guide violations that the newest version of flake8 catches 2014-03-30 12:11:05 -07:00
Aymeric Augustin f356b6ecc3 Increased memoization cache size for language codes.
There may be more than 100 (default maxsize) commonly seen xx-yy values
on some sites. The additional memory consumption isn't significant.

Also added a comment explaining why this cache must have a maxsize.
2014-03-29 19:47:15 +01:00
Tim Graham 12e9adcd71 Corrected deprecation warnings. 2014-03-27 17:48:12 -04:00
Tim Graham dadf2ee75f Fixed a deprecation warning with the HTMLParser safe argument.
refs 6ca6c36f82
2014-03-27 09:17:49 -04:00
Chris Beaven b077ba7ac1 Add a useful stacklevel to some RemovedInDjango19Warnings 2014-03-27 15:44:52 +13:00
Tim Graham 45ef4baf5c Fixed Python 3.4 test failure. 2014-03-26 09:57:00 -04:00
Tim Graham 2ec82c7387 Updated six to 1.6.1. 2014-03-24 07:33:55 -04:00
Aymeric Augustin 232181d1c5 Advanced deprecation warnings for 1.8. 2014-03-22 21:12:58 +01:00
Alex Gaynor 684e8a941b Removed an unused variable. 2014-03-22 10:11:39 -07:00
Claude Paroz 6ca6c36f82 Improved strip_tags and clarified documentation
The fact that strip_tags cannot guarantee to really strip all
non-safe HTML content was not clear enough. Also see:
https://www.djangoproject.com/weblog/2014/mar/22/strip-tags-advisory/
2014-03-22 10:59:18 +01:00
Tim Graham 4965a77407 Removed PIL compatability layer per deprecation timeline.
refs #19934.
2014-03-21 10:54:53 -04:00
Tim Graham 6d1ae5e27c Removed reading of old 'django_language' session variable per deprecation timeline.
refs #5789.
2014-03-21 09:53:16 -04:00
Tim Graham 8b81dee60c Removed fix_ampersands template filter per deprecation timeline.
Also removed related utility functions:
* django.utils.html.fix_ampersands
* django.utils.html.clean_html
2014-03-21 08:50:43 -04:00
Andrew Godwin 356f064c49 Merge pull request #2221 from bmispelon/LazyObject-refactor
Fixed #21840 -- Moved dunder methods from SimpleLazyObject to LazyObject...
2014-03-19 21:01:24 -07:00
Matthew Somerville 61296fb1ba Fixed #22283 -- Updated documentation referring to non-existent tuples. 2014-03-18 10:57:47 +01:00
Baptiste Mispelon 5c5b266b54 Simplified implementation of collectstatic command.
Since d2e242d16c6dde6f4736086fb38057424bed3edb made isinstance()
calls work correctly on LazyObject, we can simplify the
implementation of is_local_storage added in
7e27885c6e.
2014-03-13 10:03:01 +01:00
Baptiste Mispelon 61917aa08b Fixed #21840 -- Moved dunder methods from SimpleLazyObject to LazyObject.
This commit also added tests for LazyObject and refactored
the testsuite of SimpleLazyObject so that it can share
test cases with LazyObject.
2014-03-13 10:03:01 +01:00
Claude Paroz 0c6a339952 Avoided changing raw DeprecationWarning filter behavior
Refs #21188. Now pure Python DeprecationWarning visibility should
be back to Python defaults.
2014-03-08 11:13:48 +01:00
Claude Paroz 210d0489c5 Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Rodolfo Carvalho 0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Erik Romijn 775975f15d Fixed #22130 -- Deprecated fix_ampersands, removed utils.clean_html() 2014-03-01 14:07:57 +01:00
Bouke Haarsma 2bab9d6d9e Fixed #21389 -- Accept most valid language codes
By removing the 'supported' keyword from the detection methods and only relying
on a cached settings.LANGUAGES, the speed of said methods has been improved;
around 4x raw performance. This allows us to stop checking Python's incomplete
list of locales, and rely on a less restrictive regular expression for
accepting certain locales.

HTTP Accept-Language is defined as being case-insensitive, based on this fact
extra performance improvements have been made; it wouldn't make sense to
check for case differences.
2014-02-26 16:58:04 +01:00
Alex Gaynor 2798e63fa1 Extra new line to make flake8 happy 2014-02-22 11:50:19 -06:00
Erik Romijn 8cd32f0965 Fixed #22120 -- Documented persistent activation of languages and cleaned up language session key use 2014-02-22 18:29:06 +01:00
Baptiste Mispelon 926e18d7d1 Deprecated django.utils.text.javascript_quote.
Refs #21725.
2014-02-22 13:50:12 +01:00
MattBlack85 a8ba76c2d3 Fixed #19980: Signer broken for binary keys (with non-ASCII chars).
With this pull request, request #878 should considered closed.

Thanks to nvie for the patch.
2014-02-16 16:50:50 +01:00
MattBlack85 1c1dffca75 Fixed #21725 -- Fixed JavaScript quoting encoding.
Thanks to nedbatchelder for the report.
2014-02-15 19:39:21 +01:00
Jeremy f94f466cd3 Fixed #19496 -- Added truncatechars_html filter.
Thanks esevece for the suggestion and  Nick Sandford and Martin Warne
for the inital work on the patch.
2014-02-13 10:27:27 -05:00
Claude Paroz e0381cdf2e Fixed #22017 -- Prevented RuntimeError on Python 3
Refs #21049. Thanks quinox for the report.
2014-02-12 10:26:08 +01:00
Jannis Leidel 5cc0555603 Fixed #21482 -- Uplifted restriction of collectstatic using symlink option in Windows NT 6.
Original patch by Vajrasky Kok. Reviewed by Florian Apolloner, Aymeric Augustin.
2014-02-09 12:39:20 +00:00
Marc Tamlyn 80cd64ee17 Fixed #21247 -- Made method_decorator play nicely with descriptors
When a method decorator was used in conjunction with a decorator
implemented as a descriptor, method_decorator did not correctly respect
the method binding.

Thanks for Graham Dumpleton for the report and initial patch.
2014-02-09 11:23:09 +00:00
Marc Tamlyn 46a87214ca Merge pull request #1997 from dpwrussell/method_decorator_args_fix
Used available_attrs in method_decorator
2014-02-09 10:12:22 +00:00
Berker Peksag 5d263dee30 Fixed #21674 -- Deprecated the import_by_path() function in favor of import_string().
Thanks Aymeric Augustin for the suggestion and review.
2014-02-08 11:12:19 -05:00
Vajrasky Kok c43c469a2e Fixed #21731 -- Made javascript_quote escapes '</'. 2014-02-06 04:02:09 -05:00