| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Up to Python 3.8, __file__ returns a relative path for the main script
specified on the command line. Use `Path.resolve()` to make it absolute before
calling `Path.parents`.
https://docs.python.org/3/whatsnew/3.9.html#other-language-changes
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9277 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
Running standard unittest on the test suite resulted in 89 ImportErrors
because ``import DocutilsTestSupport was used to set up sys.path()
but the module could not be found on the original sys.path().
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9274 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After test refactoring, test scripts failed with ImportError
unless started from the "test root" ``docutils/test/``.
Prepend the "docutils root" to the Python library path
so we import the local `docutils` and `test` packages,
ignoring an eventually installed Docutils package.
Set executable bit where this was missing.
Also:
Use "pathlib" instead of "os.path" for self-documenting path manipulations.
Remove duplicate ``import unittest`` statements.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9263 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
- Use subtests
- Use standard ``unittest`` assert methods
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9183 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New interface function: frontend.get_default_settings()
easy access to default settings for programmatic use.
Add deprecation warnings.
Catch them when accessing the deprecated functions from Docutils.
Make docstrings conform to the Documentation Policies
(first line: summary, next line empty).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9047 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
flake rule F841: local variable 'foo' is assigned to but never used
In test_odt.py, a no-op class definition is removed completely.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9038 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
| |
flake8 rule F401
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9037 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
flake8 rules
E401: multiple imports on one line
E402: module level import not at top of file
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9027 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
flake8 rules
E302: expected 2 blank lines, found 1
E305: expected 2 blank lines after class or function definition
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9026 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
| |
flake rules
E262: inline comment should start with '# '
E265: block comment should start with '# '
E266: too many leading '#' for block comment
Exception for latex2e (legacy convention to mark disabled code with ##).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9022 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
flake 8 rule E261
Exceptions for modules sheduled for removal or with
3rd-party origin and for data collections.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9021 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
E221 multiple spaces before operator
E222 multiple spaces after operator
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9016 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
| |
Patch by Adam Turner.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8976 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove duplicate definitions in language modules.
Import locale_encoding from `docutils.io`
Use decorator for staticmethod
Use True/False over 1/0.
`collections.OrderedDict` no longer required,
all dictionaries are ordered from Python 3.7
Remove obsolete `__cmp__` method
cf. https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons
Use str instead of type('').
Zero-argument ``super()``
Simplify test support module as
"u" prefix isn't used by repr in Python 3.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8973 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
| |
Triggered by [feature-request:#81].
Use PEP 3102 syntax instead of reading/deleting "**kwargs" items
for "required keyword arguments".
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8945 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
Use "python3" in the shebang line
(cf. PEP 394 -- The "python" Command on Unix-Like Systems).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8927 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 3, 'dict.keys()', 'zip' and 'map' no longer return a list but
rather types 'dict_keys', 'zip' and 'map', respectively. You can't
append to these types nor can you delete from them while in a loop. The
simple solution to both issues is to wrap things in 'list'.
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8372 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8367 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8360 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
This works with iterators also (like 'dict.keys()' in Python 3)
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8357 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
| |
Add aliases for symbols that have been removed in Python 3.x, namely
basestring, unicode, unichr and StandardError.
Signed-off-by: Stephen Finucane <stephen@that.guru>
small fixes by Günter Milde.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8348 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
This is the only form supported in Python 3.x.
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8347 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8310 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
| |
parsers for Python 2.7 up.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7503 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
| |
warn and fall back to English.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6433 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Best Current Praxis: Tags for Identifying Languages).
Normalize language tags: downcase, - to _, optional subtags.
E.g. Given "de-AT-1901", look for language modules
"de_at_1901", "de_at", "de_1901", and "de"
TODO: warn (instead of fail), if no module found.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6423 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5738 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
| |
Backwards compatible changes for easier transition to py3.0.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5618 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5608 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5607 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5033 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
| |
get latin1 strings
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5032 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
|
|
|
|
| |
collapsed Author and Contact fields;
use canonical email addresses for David and Felix;
(I have reviewed the diff)
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4564 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@4132 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3085 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1949 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1945 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@1517 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@994 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@949 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@945 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
|
|
| |
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@942 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|
|
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@940 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
|