logilab-common issueshttps://forge.extranet.logilab.fr/open-source/logilab-common/-/issues2020-04-30T14:23:41Zhttps://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/1logilab-common cassé en Python 3.8+ à cause de `cgi.escape`2020-04-30T14:23:41ZNicola Spantilogilab-common cassé en Python 3.8+ à cause de `cgi.escape`https://docs.python.org/3/whatsnew/3.8.html#api-and-feature-removals
> `parse_qs`, `parse_qsl`, and escape are removed from the [`cgi`](https://docs.python.org/3/library/cgi.html#module-cgi) module. They are deprecated in Python 3.2 or ...https://docs.python.org/3/whatsnew/3.8.html#api-and-feature-removals
> `parse_qs`, `parse_qsl`, and escape are removed from the [`cgi`](https://docs.python.org/3/library/cgi.html#module-cgi) module. They are deprecated in Python 3.2 or older. They should be imported from the `urllib.parse` and `html` modules instead.https://forge.extranet.logilab.fr/open-source/logilab-common/-/issues/2Logilab-common n'est plus compatible avec les versions de Python inférieur à 3.62020-05-11T06:49:05ZAurélien LubertLogilab-common n'est plus compatible avec les versions de Python inférieur à 3.6Une utilisation des f-strings est faite au sein de logilab-common, comme le montre le commit 9b15c56f93ecdc0ea5ec1a902cc46e9f18d521c6.
Ce format n’est pas compatible avec les versions de Python inférieur à 3.6, tel que spécifié dans la ...Une utilisation des f-strings est faite au sein de logilab-common, comme le montre le commit 9b15c56f93ecdc0ea5ec1a902cc46e9f18d521c6.
Ce format n’est pas compatible avec les versions de Python inférieur à 3.6, tel que spécifié dans la documentation : https://docs.python.org/3/reference/lexical_analysis.html#f-strings
Le souci, c’est que la version minimale de cette bibliothèque pour Python est la 3.4 : https://forge.extranet.logilab.fr/open-source/logilab-common/blob/branch/default/setup.py
Il serait pertinent de changer cette valeur pour bien indiquer que la version minimale est la 3.6.https://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/4release a new 1.7 version2020-09-03T15:23:10ZLaurent Peuchrelease a new 1.7 versionHello,
@schabot (idk who else to ping, sorry :x) would it be possible to have a new release on the 1.7 branch plz? We've merged some bug fixes on it.
I've updated the Changelog, you just need to set the right date in it before releasin...Hello,
@schabot (idk who else to ping, sorry :x) would it be possible to have a new release on the 1.7 branch plz? We've merged some bug fixes on it.
I've updated the Changelog, you just need to set the right date in it before releasing.
Thanks in advance :)Simon ChabotSimon Chabothttps://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/7release a 1.8 version2020-11-26T15:00:29ZLaurent Peuchrelease a 1.8 versionHello @schabot,
If you, or someone else, has the time to release a new version of logilab-common it would be great: I need it for the structured deprecatedwarnings :)
Thx in advance,Hello @schabot,
If you, or someone else, has the time to release a new version of logilab-common it would be great: I need it for the structured deprecatedwarnings :)
Thx in advance,Simon ChabotSimon Chabothttps://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/8ImportError: cannot import name 'callable_moved' from 'logilab.common.depreca...2021-01-05T12:59:11ZArthur LutzImportError: cannot import name 'callable_moved' from 'logilab.common.deprecation'```
Upgrading the instance fresh
----------------------------
/usr/lib/python3/dist-packages/paste/request.py:33: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and i...```
Upgrading the instance fresh
----------------------------
/usr/lib/python3/dist-packages/paste/request.py:33: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping as DictMixin
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cubicweb/cwctl.py", line 180, in run
status = cmdmeth(appid) or 0
File "/usr/lib/python3/dist-packages/cubicweb/cwctl.py", line 572, in upgrade_instance
mih = config.migration_handler()
File "/usr/lib/python3/dist-packages/cubicweb/server/serverconfig.py", line 358, in migration_handler
verbosity=verbosity)
File "/usr/lib/python3/dist-packages/cubicweb/server/migractions.py", line 95, in __init__
self.repo = config.repository()
File "/usr/lib/python3/dist-packages/cubicweb/cwconfig.py", line 981, in repository
repo.bootstrap()
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 434, in bootstrap
self.set_schema(self.deserialize_schema())
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 519, in set_schema
self.vreg.set_schema(schema)
File "/usr/lib/python3/dist-packages/cubicweb/cwvreg.py", line 407, in set_schema
self.reload(self.config.appobjects_modnames(), force_reload=False)
File "/usr/lib/python3/dist-packages/cubicweb/cwvreg.py", line 472, in reload
self.register_modnames(modnames)
File "/usr/lib/python3/dist-packages/logilab/common/registry.py", line 757, in register_modnames
self.load_file(filepath, modname)
File "/usr/lib/python3/dist-packages/cubicweb/cwvreg.py", line 482, in load_file
return super(CWRegistryStore, self).load_file(filepath, modname)
File "/usr/lib/python3/dist-packages/logilab/common/registry.py", line 815, in load_file
module = __import__(modname, fromlist=modname.split('.')[:-1])
File "/usr/lib/python3/dist-packages/cubicweb/web/views/searchrestriction.py", line 24, in <module>
from logilab.common.deprecation import callable_moved
ImportError: cannot import name 'callable_moved' from 'logilab.common.deprecation' (/usr/lib/python3/dist-packages/logilab/common/deprecation.py)
instance fresh not upgraded: cannot import name 'callable_moved' from 'logilab.common.deprecation' (/usr/lib/python3/dist-packages/logilab/common/deprecation.py)
```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/10Incompatible with python 3.82021-06-22T10:03:16ZNoé GaumontIncompatible with python 3.8Python 3.8 is the python version of ubuntu LTS focal.
Logilab-common 1.8.1 is not compatible with python3.8Python 3.8 is the python version of ubuntu LTS focal.
Logilab-common 1.8.1 is not compatible with python3.8Noé GaumontNoé Gaumonthttps://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.modutilshttps://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):
```