summaryrefslogtreecommitdiff
path: root/django/utils/_os.py
AgeCommit message (Collapse)Author
2019-08-13Refs #30461 -- Added django.utils._os.to_path().Claude Paroz
2019-02-05Refs #27753 -- Removed django.utils._os.abspathu(), upath(), and npath().Tim Graham
2018-09-25Refs #27795 -- Removed force_bytes() usage in utils/_os.py.Jon Dufresne
2017-02-11Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.Anton Samarchyan
2017-01-26Refs #23919 -- Replaced tempfile.mkdtemp() with TemporaryDirectory() context ↵Chillar Anand
manager.
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2015-02-22Removed rmtree_errorhandler.Aymeric Augustin
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.
2015-02-17Refs #24324 -- Fixed UnicodeDecodeError in template_backends testsTim Graham
The message for the SuspiciousFileOperation exception needs to be a unicode string.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-11-11Raised SuspiciousFileOperation in safe_join.Aymeric Augustin
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.
2014-06-23Cleaned temp dir in symlinks_supported()Claude Paroz
Refs #21482.
2014-02-09Fixed #21482 -- Uplifted restriction of collectstatic using symlink option ↵Jannis Leidel
in Windows NT 6. Original patch by Vajrasky Kok. Reviewed by Florian Apolloner, Aymeric Augustin.
2013-11-28Fixed E125 pep8 warningsChristopher Medrela
2013-11-02Correct flake8 E302 violationsRay Ashman Jr
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-09-02Replaced "not PY3" by "PY2", new in six 1.4.0.Aymeric Augustin
2013-06-03Fixed loaddata for Django checkouts with non ASCII chars in the name.Florian Apolloner
2012-12-08Fixed #19357 -- Allow non-ASCII chars in filesystem pathsClaude Paroz
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-09-07Fixed #12397 -- allow safe_join to work with the root file system path, ↵Alex Gaynor
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-08-08[py3] abspathu doesn't exist under Python 3.Aymeric Augustin
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* 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-04-30Fix a typo in a comment.Alex Gaynor
2011-12-22Fixed a missing exception (`WindowsError`) when using the rmtree error ↵Jannis Leidel
handler on non-Windows systems. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-22Fixes #8593 -- better handling of safe_join case sensitivity on windows. ↵Chris Beaven
Thanks for the initial patch, ramiro. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21Fixed #15369 -- Added missing import in _os module. Thanks, jonash.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-31Added our own rmtree error handler to make sure we can delete correctly ↵Jannis Leidel
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
2010-11-26Fixes #14715 -- More informative ValueError for safe_join util. Thanks btubbs.Chris Beaven
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-13Fixed #9579 -- Properly handle apps running with (and specifically, loading ↵Karen Tracey
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
2008-10-06Added some better error reporting and path handling when creating template ↵Malcolm Tredinnick
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
2007-08-12Fixed #5111 -- Set svn:eol-style to 'native' on files that didn't have itMalcolm Tredinnick
already. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-25Changed safe_join() docstring from [5750] to use active verbs. See also [5756]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23Fixed #4952 -- Fixed the `get_template_sources` functions of the ↵Gary Wilson Jr
`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