logilab-common issueshttps://forge.extranet.logilab.fr/open-source/logilab-common/-/issues2020-05-13T16:22:09Zhttps://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/3tests randomly succeeds / fails2020-05-13T16:22:09ZSimon Chabottests randomly succeeds / failsWith the same environnement (logilab-common 1.6.3), the tox command succeeds and… fails.
```
➜ common tox -r
[…]
...................
===================== unittest_deprecation.py ======================
..........F
===================...With the same environnement (logilab-common 1.6.3), the tox command succeeds and… fails.
```
➜ common tox -r
[…]
...................
===================== unittest_deprecation.py ======================
..........F
======================================================================
FAIL: test_moved (unittest_deprecation.RawInputTC)
----------------------------------------------------------------------
Traceback (most recent call last)
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/testlib.py", line 498, in _proceed
testfunc(*args, **kwargs)
File "/home/schabot/src/public/logilab/common/test/unittest_deprecation.py", line 174, in test_moved
['[logilab.common] object moving_target has been moved to module data.deprecation'])
File "/usr/lib/python3.7/unittest/case.py", line 839, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/lib/python3.7/unittest/case.py", line 1045, in assertListEqual
self.assertSequenceEqual(list1, list2, msg, seq_type=list)
File "/usr/lib/python3.7/unittest/case.py", line 1027, in assertSequenceEqual
self.fail(msg)
File "/usr/lib/python3.7/unittest/case.py", line 680, in fail
raise self.failureException(msg)
AssertionError: Lists differ: ['[importlib] deprecated has been renamed an[129 chars]ion'] != ['[logilab.common] object moving_target has [34 chars]ion']
First differing element 0:
'[importlib] deprecated has been renamed an[45 chars]tead'
'[logilab.common] object moving_target has [33 chars]tion'
First list contains 1 additional elements.
First extra element 1:
'[logilab.common] object moving_target has been moved to module data.deprecation'
- ['[importlib] deprecated has been renamed and is deprecated, uses '
- 'callable_deprecated instead',
- '[logilab.common] object moving_target has been moved to module '
? ^
+ ['[logilab.common] object moving_target has been moved to module '
? ^
'data.deprecation']
no stdout
no stderr
[…]
_______________________________________________ summary ________________________________________________
ERROR: py3: commands failed
```
And here, the exact same command, on the exact same commit, without any modification
```
➜ common tox -r
[…]
Traceback (most recent call last):
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/pytest.py", line 664, in run
cmd(*args)
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/pytest.py", line 363, in testonedir
remove_local_modules_from_sys(testdir)
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/site-packages/logilab/common/pytest.py", line 283, in remove_local_modules_from_sys
if not osp.isabs(modfile) or modfile.startswith(testdir):
File "/home/schabot/src/public/logilab/common/.tox/py3/lib/python3.7/posixpath.py", line 66, in isabs
s = os.fspath(s)
TypeError: expected str, bytes or os.PathLike object, not NoneType
*******************************************************************************
Ran 433 test cases in 0.14s (0.14s CPU), 25 skipped
All 22 modules OK
_______________________________________________ summary ________________________________________________
py3: commands succeeded
congratulations :)
```
the tests succeeds (despite a TypeError…).https://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/5[deprecation] argument_removes / argument_rename2020-09-03T16:06:50ZSimon Chabot[deprecation] argument_removes / argument_renameIn the deprecation module, we have a « argument_removed », but the docstring talks about « renaming ». The docstring should be updated.
See [here](https://forge.extranet.logilab.fr/open-source/logilab-common/-/blob/branch/default/logila...In the deprecation module, we have a « argument_removed », but the docstring talks about « renaming ». The docstring should be updated.
See [here](https://forge.extranet.logilab.fr/open-source/logilab-common/-/blob/branch/default/logilab/common/deprecation.py#L188)https://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/6[deprecation] Handle global variables / constantes2021-02-02T13:52:00ZSimon Chabot[deprecation] Handle global variables / constantesThere is no way to handle the deletion, or the renaming of constant.
This should be added (see https://stackoverflow.com/a/924306 for instance).There is no way to handle the deletion, or the renaming of constant.
This should be added (see https://stackoverflow.com/a/924306 for instance).https://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/9[debian] erreur lors de la construction du paquet debian2021-01-05T09:45:50ZKatia Saurfelt[debian] erreur lors de la construction du paquet debianhttps://jenkins.intra.logilab.fr/view/Pkg/job/pkg-from-dsc/1460/console
```running build_scripts
creating build
creating build/scripts-3.7
copying and adjusting bin/logilab-pytest -> build/scripts-3.7
changing mode of build/scripts-3.7/...https://jenkins.intra.logilab.fr/view/Pkg/job/pkg-from-dsc/1460/console
```running build_scripts
creating build
creating build/scripts-3.7
copying and adjusting bin/logilab-pytest -> build/scripts-3.7
changing mode of build/scripts-3.7/logilab-pytest from 664 to 775
debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
tox -e py3
make[1]: tox: Command not found
make[1]: *** [debian/rules:27: override_dh_auto_test] Error 127
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:14: build] Error 2
```
voir ligne 27 du debian/controlhttps://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/11Remove dead code2023-12-13T17:19:04ZNoé GaumontRemove dead codeThere is some python 2 related code while this module is compatible with python3.6
For example:
```sh
logilab/common/compat.py
63:if sys.version_info < (3, 0):
```There is some python 2 related code while this module is compatible with python3.6
For example:
```sh
logilab/common/compat.py
63:if sys.version_info < (3, 0):
```https://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/12"you should avoid using modpath_from_file()"2022-01-14T12:51:47ZLaurent Peuch"you should avoid using modpath_from_file()"So this deprecation warning has been annoying me because of how vague and bad its message is, so I dig into it and here seems to be the reason for it:
![image](/uploads/7f4da626bce427bc8d318928e48a3d4f/image.png)
Which isn't in the war...So this deprecation warning has been annoying me because of how vague and bad its message is, so I dig into it and here seems to be the reason for it:
![image](/uploads/7f4da626bce427bc8d318928e48a3d4f/image.png)
Which isn't in the warning message.
So I'm wondering: what should be do? Fix it? Remove it and replace it by ... what? Is it really a problem when we are using it? But at least let's clear this warning.
Full code:
![image](/uploads/78efcaa81abd26a18c40243445c31807/image.png)https://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/13Non compatible les nouvelles version de pytest2022-03-11T15:53:05ZNoé GaumontNon compatible les nouvelles version de pytestAu moins à partir de la version 6.2.5 de pytest, les tests ne marchent plus car un attribut testsRun est manquantAu moins à partir de la version 6.2.5 de pytest, les tests ne marchent plus car un attribut testsRun est manquanthttps://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/14Remove unused functions from logilab.common.modutils2023-07-25T15:29:14ZFrank BessouRemove unused functions from logilab.common.modutils