| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Actually the old compatibility code actually prevented this bug so back it up.
|
| |
|
| |
|
| |
|
|
|
|
| |
argument_removed and DeprecationWrapper
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'input_function'
When no parameter was given to the class, None was used as the `input`.
It used to work because when `input` (the argument) was None `raw_input` of six
was used instead. (-> self._input = input or raw_input).
Now that six has been dropped, we cannot have `input=None` in the arguments list
anymore and use the builtin `input` at the same time.
This patch suggests to deprecate this argument in favor of a new one called
`input_function`. If no `input_function`, let's use the `input` builtin.
For backward compatibility, if `input` should be given, it's caught in the
`kwargs` and used as `input_function`, and a deprecation warning is shown.
|
|
|
|
|
|
|
|
|
|
|
| |
logilab-pytest has a side effect of printing DeprecationWarnings by default,
when running modutils tests without logilab-pytest binary this fail.
In debian package we run python3 -m "logilab.common.pytest" and thus
DeprecationWarning are not displayed and tests fail.
Fix this by ensuring DeprecationWarning are displayed before running tests of
unittest_modutils.py
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The original KeyError comes from 57e242dffe89 which no justification. I
believe it was meant to be a ValueError as in other errors in this
function. Also, _ensure_correctly_typed() in cubicweb/web/formfields.py
will catch ValueError.
Adding a test for this.
|
|
|
|
|
|
|
|
| |
The "options" iteration variable hid the original function
parameters, therefore only the options of the last group
were registered.
Rename the iteration variable and everything's fine.
|
| |
|
|
|
|
|
|
| |
Use io.open() which has a consistent interface between Python 2 and Python 3.
In particular, `newline` parameter is meant to control "universal new lines"
and it is None by default so we don't need to specify it.
|
| |
|
|
|
|
|
|
|
|
|
| |
To detect in whih module the instance was created we previously detect the
filename in python stack and then use modpath_from_file(). Since the later is
now deprecated, we should force passing the module at instantiation with
__module__=__name__.
Deprecate old usage
|
|
|
|
|
| |
This method is to be replaced by register_modnames() to avoid using deprecated
modpath_from_file()
|
|
|
|
|
|
| |
The method will likely fail if there somes symlinks in your python environment
and will certainly fail on a file that isn't in sys.path (like custom importers
using sys.meta_path).
|
|
|
|
|
|
| |
Alternative to register_objects() to inspect modules names instead of
directories.
Avoiding using bogus logilab.common.modutils.modpath_from_file()
|
|
|
|
|
|
| |
Because "modutils" module may also be found in source directory,
this test may fail under some circumstances (like Debian package build,
for instance).
|
|
|
|
| |
Closes #3691182
|
|
|
|
|
|
| |
And adjust all tests accordingly.
Drop docstring example from fileutils.abspath_listdir since I could not have
it skipped.
|
|
|
|
| |
Closes #8396846.
|
|
|
|
| |
to have a clean CI report
|
| |
|
|
|
|
| |
also use io.StingIO in unittest_changelog
|
|
|
|
| |
we should not get a traceback in this case. Closes #6060938
|
| |
|
|
|
|
|
|
|
| |
This allows client libraries to avoid importing pytest module which has
spurious monkeypatches of unittest.
Drop deprecated API about coverage control.
|
|
|
|
| |
float is the default type used in apply_units.
|
|
|
|
|
| |
Add tests for UMessage.get_payload() (taken from CubicWeb).
Closes #1716128.
|
|
|
|
|
|
|
|
| |
We sometimes get unicode objects out of that function, on which
.decode() obviously fails. Upstream has apparently not to fix the
existing function, so let's handle it ourselves.
Tests are taken from CubicWeb. Related to #1716128.
|
| |
|
| |
|
|
|
|
| |
Closes #1716420.
|
|
|
|
|
|
| |
acquire_lock is racy on Unix (TOCTOU) and broken on Windows (lock file
is removed instantly since ProcInfo always raises NoSuchProcess on this
OS).
|
|
|
|
|
| |
Including those that are already defined in unittest2 >= 0.5.1.
Closes #1716063.
|
|
|
|
|
|
| |
Useful when generating a default configuration file, like pylint's.
Fix provided by Craig Hobbs <craigahobbs@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#294756)
Virtualenv symlinks a bunch of stdlib modules which confuse
modutils.is_standard_module. The better way would obviously be to fix
modutils to properly detect virtualenvs, but life is too short.
As for why virtualenv actually needs to symlink a good chunk of the
stdlib, anyone's guess is as good as mine. Here's the upstream commit
that added hashlib.py to the list of needed symlinks:
https://github.com/pypa/virtualenv/commit/10ba3f3cc0d7a254dd72e2bb9557006da2f85e00#diff-7e83770aa980bd4327db90f4eafeffdfR126
And for the record, 'venv' (the virtualenv-lookalike shipped since
python 3.3) does not do _any_ symlink to stdlib modules.
|