Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/utils/_os.py
Commit message (Collapse)AuthorAgeFilesLines
* Removed rmtree_errorhandler.Aymeric Augustin2015-02-221-27/+0
| | | | | | | | | | The stated reason for its introduction in d18d37ce no longer applies since Django's code repository was switched from Subversion to git. Furthermore it never had any effect because shutil.rmtree ignores its onerror argument when ignore_errors is True. The reason for its use in template management commands is unclear.
* Refs #24324 -- Fixed UnicodeDecodeError in ↵Tim Graham2015-02-181-0/+2
| | | | | | | template_backends tests The message for the SuspiciousFileOperation exception needs to be a unicode string.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-2/+2
|
* Raised SuspiciousFileOperation in safe_join.Aymeric Augustin2014-11-111-2/+4
| | | | | | | | | | | | | | | Added a test for the condition safe_join is designed to prevent. Previously, a generic ValueError was raised. It was impossible to tell an intentional exception raised to implement safe_join's contract from an unintentional exception caused by incorrect inputs or unexpected conditions. That resulted in bizarre exception catching patterns, which this patch removes. Since safe_join is a private API and since the change is unlikely to create security issues for users who use it anyway -- at worst, an uncaught SuspiciousFileOperation exception will bubble up -- it isn't documented.
* Cleaned temp dir in symlinks_supported()Claude Paroz2014-06-231-0/+2
| | | | Refs #21482.
* Fixed #21482 -- Uplifted restriction of collectstatic ↵Jannis Leidel2014-02-091-0/+22
| | | | | | using symlink option in Windows NT 6. Original patch by Vajrasky Kok. Reviewed by Florian Apolloner, Aymeric Augustin.
* Fixed E125 pep8 warningsChristopher Medrela2013-11-281-2/+2
|
* Correct flake8 E302 violationsRay Ashman Jr2013-11-031-0/+1
|
* More attacking E302 violatorsAlex Gaynor2013-11-021-0/+2
|
* Replaced "not PY3" by "PY2", new in six 1.4.0.Aymeric Augustin2013-09-021-3/+3
|
* Fixed loaddata for Django checkouts with non ASCII chars ↵Florian Apolloner2013-06-031-1/+1
| | | | in the name.
* Fixed #19357 -- Allow non-ASCII chars in filesystem pathsClaude Paroz2012-12-081-1/+22
| | | | Thanks kujiu for the report and Aymeric Augustin for the review.
* Fixed #12397 -- allow safe_join to work with the root ↵Alex Gaynor2012-09-071-7/+10
| | | | 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.
* [py3] abspathu doesn't exist under Python 3.Aymeric Augustin2012-08-081-7/+7
|
* [py3] Ported django.utils.encoding.Aymeric Augustin2012-08-071-3/+3
| | | | | | | | | | | * 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.
* Fix a typo in a comment.Alex Gaynor2012-04-301-1/+1
|
* Fixed a missing exception (`WindowsError`) when using ↵Jannis Leidel2011-12-221-3/+11
| | | | | | the rmtree error handler on non-Windows systems. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #8593 -- better handling of safe_join case ↵Chris Beaven2011-05-231-8/+7
| | | | | | sensitivity on windows. Thanks for the initial patch, ramiro. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15369 -- Added missing import in _os module. ↵Jannis Leidel2011-02-211-0/+1
| | | | | | Thanks, jonash. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added our own rmtree error handler to make sure we can ↵Jannis Leidel2010-12-311-0/+20
| | | | | | delete correctly delete .svn directories when running the tests on Windows which are read-only for some reason. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixes #14715 -- More informative ValueError for ↵Chris Beaven2010-11-261-2/+2
| | | | | | safe_join util. Thanks btubbs. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9579 -- Properly handle apps running with (and ↵Karen Tracey2008-11-131-3/+23
| | | | | | specifically, loading templates from) a current working directory path that contains non-ASCII characters. Thanks for the report to gonzalodelgado and for advice on how to fix it to Daniel Pope. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added some better error reporting and path handling when ↵Malcolm Tredinnick2008-10-061-0/+3
| | | | | | | | | | | | | creating template paths. We now raise UnicodeDecodeError for non-UTF-8 bytestrings (thanks to Daniel Pope for diagnosing this was being swallowed by ValueError) and allow UTF-8 bytestrings as template directories. Refs #8965. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5111 -- Set svn:eol-style to 'native' on files ↵Malcolm Tredinnick2007-08-121-23/+23
| | | | | | | | | that didn't have it already. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed safe_join() docstring from [5750] to use active ↵Adrian Holovaty2007-07-251-2/+2
| | | | | | verbs. See also [5756] git-svn-id: http://code.djangoproject.com/svn/django/trunk@5758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4952 -- Fixed the `get_template_sources` ↵Gary Wilson Jr2007-07-231-0/+23
functions of the `app_directories` and `filesystem` template loaders to not return paths outside of given template directories. Both functions now make use of a new `safe_join` utility function. Thanks to SmileyChris for help with the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5750 bcc190cf-cafb-0310-a4f2-bffc1f526a37