summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up import for annotationsTakeshi KOMIYA2019-03-061-1/+1
|
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Replace EnvironmentError and IOError by OSErrorTakeshi KOMIYA2018-12-191-4/+4
| | | | | | | | | | Since python 3.3, EnvironmentError and IOError were merged into OSError.
* | Merge pull request #5804 from jdufresne/file-avoid-strTakeshi KOMIYA2018-12-171-21/+7
|\ \ | | | | | | Remove unnecessary bytes/str type check in FileAvoidWrite.write()
| * | Remove unnecessary bytes/str type check in FileAvoidWrite.write()Jon Dufresne2018-12-161-21/+7
| | | | | | | | | | | | | | | All calls to FileAvoidWrite.write() always pass a text string. Additionally, the type signature only allows type str.
* | | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | Replace ENOENT errno checks with Python 3 FileNotFoundErrorJon Dufresne2018-12-151-2/+2
| | | | | | | | | | | | | | | | The error is more specific and self documenting. This removes the last use of sphinx.util.osutil.ENOENT, so it is now deprecated for removal. sphinx.util.osutil.EEXIST was already unused so that is deprecated as well.
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-22/+21
| |
* | Remove print_function featureTakeshi KOMIYA2018-12-151-1/+0
| |
* | Move to py3 mode for mypy (and remove many "type: ignore" comments)Takeshi KOMIYA2018-12-151-4/+4
| |
* | Merge pull request #5607 from tk0miya/smart_texinfo_conf_pyTakeshi KOMIYA2018-12-021-0/+6
|\ \ | | | | | | quickstart: Simplify generated conf.py (for texinfo)
| * | quickstart: Simplify generated conf.py (for texinfo)Takeshi KOMIYA2018-11-111-0/+6
| | |
* | | Add sphinx.util.typing:unicode to help mypy-3 migrationTakeshi KOMIYA2018-11-241-0/+1
| | |
* | | Simplify ensuredir() with Python3 stdlib featuresJon Dufresne2018-11-201-7/+1
|/ / | | | | | | | | | | | | | | | | - Simplify ensuredir() to equivalent os.makedir(name, exist_ok=True) - Do not check if a directory exists before calling ensuredir() (ensuredir() already handles it) - Add exist_ok argument to path.makedirs() to follow same pattern - Drop unnecessary .exists() check immediately before .isdir() - Add tests for ensuredir
* | Merge branch '1.8'Takeshi KOMIYA2018-11-011-4/+5
|\ \ | |/
| * Fix flake8 violationTakeshi KOMIYA2018-10-281-1/+1
| |
| * Merge pull request #5548 from jdemeyer/ensuredir_check_dirTakeshi KOMIYA2018-10-281-2/+3
| |\ | | | | | | Fix ensuredir() in case of pre-existing file
| | * Fix ensuredir() in case of pre-existing fileJeroen Demeyer2018-10-171-2/+3
| | |
| * | Fix #5471: Show appropriate warning for deprecated APIsTakeshi KOMIYA2018-10-171-1/+1
| |/
* | Deprecate Python2 compat shim sphinx.util.osutil.walk()Jon Dufresne2018-10-051-31/+4
| | | | | | | | | | Code should use os.walk() instead, which works with either str or bytes. All internal calls use str.
* | Merge branch 'master' into HEADTakeshi KOMIYA2018-09-221-19/+9
|\ \
| * | refactoring: Drop PY2 and PY3 flagsTakeshi KOMIYA2018-09-221-18/+8
| | |
| * | Merge branch '1.8'Takeshi KOMIYA2018-09-201-1/+1
| |\ \ | | |/
| | * Fix mypy violationsTakeshi KOMIYA2018-09-181-1/+1
| | |
* | | Remove unnecessary object from class definitionsJon Dufresne2018-09-111-1/+1
|/ / | | | | | | | | In Python 3, all classes are new-style classes. The object in the definition is redundant and unnecessary.
* | Remove use of Python 2 os.getcwdu()Jon Dufresne2018-09-091-4/+5
|/ | | | | | | | | | | | | | os.getcwdu() is Python 2 only. It was removed from Python 3. As Sphinx is now Python 3 only, can remove the workaround. $ python2 -c 'import os; print(os.getcwdu)' <built-in function getcwdu> $ python3 -c 'import os; print(os.getcwdu)' Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: module 'os' has no attribute 'getcwdu' sphinx.util.osutil.getcwd() is now deprecated for removal.
* Merge branch '1.7'Takeshi KOMIYA2018-04-091-1/+8
|\
| * Fix #4783: Sphinx crashed when drives of srcdir and outdir are differentTakeshi KOMIYA2018-04-021-1/+8
| |
* | Merge branch '1.7'Takeshi KOMIYA2018-03-181-3/+2
|\ \ | |/
| * Revert "Use typing.TYPE_CHECKING for typehints"Takeshi KOMIYA2018-03-131-3/+2
| | | | | | | | This reverts commit a073e17537c2aacaac305feadea58d4473ec97f4.
* | Merge branch '1.7'Takeshi KOMIYA2018-02-181-2/+3
|\ \ | |/
| * Use typing.TYPE_CHECKING for typehintsTakeshi KOMIYA2018-02-141-2/+3
| |
* | util: Mark deprecated functions with warningStephen Finucane2018-02-071-2/+7
| | | | | | | | | | | | This ensures the functions can actually be removed as expected. Signed-off-by: Stephen Finucane <stephen@that.guru>
* | Merge branch '1.7-release'Takeshi KOMIYA2018-01-311-6/+7
|\ \ | |/
| * Use flake8-import-orderTakeshi KOMIYA2018-01-281-6/+7
| |
* | Merge pull request #4469 from kurtmckee/use-https-urlsTakeshi KOMIYA2018-01-211-1/+1
|\ \ | | | | | | Use HTTPS URL's
| * | Convert in-code HTTP URL's to HTTPS, including examplesKurt McKee2018-01-201-1/+1
| |/
* | app: Centralize directory validationStephen Finucane2018-01-201-1/+6
|/ | | | | | | | | | This allows us to avoid duplication of code and ensure validation happens regardless of who's initializing the class. We introduce a new exception - ApplicationError - to indicate these kinds of issues. This subclasses SphinxError, meaning we don't need to modify our exception handling code. Signed-off-by: Stephen Finucane <stephen@that.guru>
* A happy new year!Takeshi KOMIYA2018-01-011-1/+1
|
* Merge branch 'stable'Takeshi KOMIYA2017-03-261-1/+1
|\
| * Year++Takeshi KOMIYA2017-03-261-1/+1
| |
* | Upgrade to mypy-0.5Takeshi KOMIYA2017-03-031-1/+1
| |
* | Fix mypy violationsTakeshi KOMIYA2017-02-081-3/+9
| |
* | Merge branch 'stable'Takeshi KOMIYA2017-01-121-2/+2
|\ \ | |/
| * Fix flake8 violationsTakeshi KOMIYA2017-01-121-1/+1
| |
| * Fix flake8 violationsTakeshi KOMIYA2017-01-121-1/+1
| |
* | Add type-check annotations to sphinx.utilTakeshi KOMIYA2016-11-161-4/+26
|/
* Fix #2919: Drop py26 supportTakeshi KOMIYA2016-09-151-2/+2
|
* Refactor FileAvoidWriteTakeshi KOMIYA2016-08-221-9/+3
|