cubicweb issueshttps://forge.extranet.logilab.fr/groups/cubicweb/-/issues2024-01-25T10:58:40Zhttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/994Fetch `fetch_attrs` when using cnx.find and other method to fetch entities2024-01-25T10:58:40ZFrançois FerryFetch `fetch_attrs` when using cnx.find and other method to fetch entitiesHi there (✿◠‿◠)
I was considering using `cnx.find(<etype>)` in order to fetch entities, but it only fetches eid and not attributes, so it's not optimized. What if it also fetches attributes in `fetch_attrs` ?
`cnx.find(<etype>)` could ...Hi there (✿◠‿◠)
I was considering using `cnx.find(<etype>)` in order to fetch entities, but it only fetches eid and not attributes, so it's not optimized. What if it also fetches attributes in `fetch_attrs` ?
`cnx.find(<etype>)` could load `fetch_attr`
`cnx.find(<etype>, fetch_attr=["foo", "bar"])` could load `foo` and `bar` attributes
`cnx.find(<etype>, fetch_attr=[])` could load none of the attributes.
Imo it could improve performance on many website.François FerryFrançois Ferryhttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/955better error when token is invalid2024-01-09T13:08:03ZNicolas Chauvatnicolas.chauvat@logilab.frbetter error when token is invalidI tried using cwclientlib with a token after its expiration date and here is what I got:
```
{'message': "The server could not comply with the request since it is either malformed or otherwise incorrect.\n\n\ncouldn't handle this reques...I tried using cwclientlib with a token after its expiration date and here is what I got:
```
{'message': "The server could not comply with the request since it is either malformed or otherwise incorrect.\n\n\ncouldn't handle this request as it is either badly formed or is lacking the correct authorizations\n\n", 'code': '400 Bad Request', 'title': 'Bad Request'}
```
on the server, I found in the logs
```
2023-12-12 21:02:27 - (cubicweb_web.bwcompat) WARNING: failed to select a controller for this request /rqlio/1.0 POST. Here were the candidates controllers (but none matched):
* <class 'cubicweb_rqlcontroller.views.JsonRqlIOController'>
* <class 'cubicweb_rqlcontroller.views.MultipartRqlIOController'>
* <class 'cubicweb_rqlcontroller.views.AnonMultipartRqlIOController'>
* <class 'cubicweb_rqlcontroller.views.AuthenticatedMultipartRqlIOController'>
```
at first I thought that the problem was in the code, but I saw that other users did not have the problem and looked at my virtualenv, then at my configuration.
Could we do something to improve the error message sent when the token is invalid and clearly direct the user to her configuration ?https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/995update cube doctor to take into accound semantic versionning2024-01-25T14:32:49ZFrançois Ferryupdate cube doctor to take into accound semantic versionninghttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/992Investigate readthedoc deprecation of mercurial2024-03-19T10:04:00ZArnaud VergnetInvestigate readthedoc deprecation of mercurialEmail from read the docs:
> Hello,
>
> You are receving this email because your Read the Docs project is impacted by an upcoming deprecation.
>
> We are discussing dropping of support for Bazaar, Mercurial and Subversion version syste...Email from read the docs:
> Hello,
>
> You are receving this email because your Read the Docs project is impacted by an upcoming deprecation.
>
> We are discussing dropping of support for Bazaar, Mercurial and Subversion version system controls. This means we will only support Git to do the initial clone and build your project's documentation. We would like your feedback on this change, to better understand if you can use Git for your project.
>
> We've made this decision because 99% of our users use Git and we can't cover the maintainance cost we were spending on Bazaar, Mercurial and SVN. Over time, these VCS tools have not gotten new features, and add confusion to users because not all our features work for them.
>
> Unfortunately, there is no workaround on the Read the Docs side that you can follow to keep building your documentation using these VCSs, but you could probably import your Subversion or Mercurial repository into GitHub or similar services to keep building on Read the Docs.
>
> The projects that are impacted by this change are:
>
> - `cubicweb`
> - `logilab-common`
> - `logilab-database`
> - `rql`
> - `yams`
>
> Please contact us or reply to this email if you have any questions, or think there is a strong reason we should continue to offer basic support for other VCS tools.
>
> Thanks, Read the Docs
>
> Keep documenting,
> Read the Docs
> https://readthedocs.orghttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/449cubicweb.pyramid.core.connection session._cached_lang is not synchronised wi...2021-11-10T08:42:56ZNoé Gaumontcubicweb.pyramid.core.connection session._cached_lang is not synchronised with requestBug description: translation made in pview might have the wrong language
Steps to reproduce:
1. have a language set in the user preference, e.g. english
2. visit a webpage displaying information in a pview with translated text.
3. the ...Bug description: translation made in pview might have the wrong language
Steps to reproduce:
1. have a language set in the user preference, e.g. english
2. visit a webpage displaying information in a pview with translated text.
3. the text is correctly translated
4. go to `/view?vid=propertiesform` and change in the `ui` section `language of the user interface` to another language, e.g. french.
5. hard refresh the page from step 2.
6. The text from the preview is still in english the rest is correctly translated
This occurs if the pview use `request.cw_cnx` (which returns a [Connection](https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/blob/branch/default/cubicweb/pyramid/core.py#L46)) instead of `request.cw_request` (which returns a [CubicWebPyramidRequest](https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/blob/branch/default/cubicweb/pyramid/core.py#L154))
**Possible solution**: removing `self.lang = session._cached_lang` from Connection constructor solved the problem.
This lines has been introduced in: https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/commit/d7ecf6dab0852d0475b301966a121ad571f87cechttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/418[RQL] be able to pass list argument to RQL query2023-07-24T08:48:51ZFrançois Ferry[RQL] be able to pass list argument to RQL queryI think it'll be a good idea if we can be able to do this kind of query:
rql("Any X Where X is CWUser, X login IN (%(x)s)", {'x': ['poulet','gros poulet']})I think it'll be a good idea if we can be able to do this kind of query:
rql("Any X Where X is CWUser, X login IN (%(x)s)", {'x': ['poulet','gros poulet']})https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/385Display better error message when database is not initialized2021-09-02T15:41:56ZArthur LutzDisplay better error message when database is not initializedWhen trying to start cubicweb on an empty database I get the following tracebacks :
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/logilab/common/decorators.py", line 104, in __call__
return ...When trying to start cubicweb on an empty database I get the following tracebacks :
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/logilab/common/decorators.py", line 104, in __call__
return _cache[args]
KeyError: (False,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/cubicweb-ctl", line 8, in <module>
sys.exit(run())
File "/usr/local/lib/python3.7/dist-packages/cubicweb/cwctl.py", line 965, in run
CWCTL.run(args)
File "/usr/local/lib/python3.7/dist-packages/logilab/common/clcommands.py", line 149, in run
sys.exit(command.main_run(args, rcfile))
File "/usr/local/lib/python3.7/dist-packages/logilab/common/clcommands.py", line 290, in main_run
self.run(args)
File "/usr/local/lib/python3.7/dist-packages/cubicweb/web/webctl.py", line 153, in run
self.generate_static_dir(config, dest)
File "/usr/local/lib/python3.7/dist-packages/cubicweb/web/webctl.py", line 92, in generate_static_dir
for datadir in self._datadirs(config, repo=repo):
File "/usr/local/lib/python3.7/dist-packages/cubicweb/web/webctl.py", line 116, in _datadirs
repo = config.repository()
File "/usr/local/lib/python3.7/dist-packages/cubicweb/cwconfig.py", line 1149, in repository
repo.bootstrap()
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/repository.py", line 430, in bootstrap
config.init_cubes(self.get_cubes())
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/repository.py", line 743, in get_cubes
or self.config.mode == "test"
File "/usr/local/lib/python3.7/dist-packages/logilab/common/decorators.py", line 76, in wrapped
return self.__call__(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/logilab/common/decorators.py", line 106, in __call__
_cache[args] = __me.callable(self, *args)
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/repository.py", line 772, in get_versions
build_descr=False,
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/session.py", line 157, in check_open
return func(cnx, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/session.py", line 673, in execute
rset = self._execute(self, rql, kwargs, build_descr)
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/querier.py", line 601, in execute
results = plan.execute()
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/querier.py", line 217, in execute
result = step.execute()
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/ssplanner.py", line 380, in execute
rql_query_tracing_token=self.rql_query_tracing_token,
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/sources/native.py", line 591, in syntax_tree_search
sql, args, rql_query_tracing_token=rql_query_tracing_token
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/session.py", line 157, in check_open
return func(cnx, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/session.py", line 812, in system_sql
rql_query_tracing_token=rql_query_tracing_token,
File "/usr/local/lib/python3.7/dist-packages/cubicweb/server/sources/native.py", line 812, in doexec
cursor.execute(str(query), args)
psycopg2.errors.UndefinedTable: when doing the query 'SELECT _P.cw_pkey, _P.cw_value
FROM cw_CWProperty AS _P
WHERE _P.cw_pkey ILIKE %(140673472244712)s' with the args '{'140673472244712': 'system.version.%'}' got the error 'relation "cw_cwproperty" does not exist
LINE 2: FROM cw_CWProperty AS _P
```
Maybe we could catch this and suggest to the user that the database is empty, or broken or missing this information or another.https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/346are "test_one_each_config" kind of autotest/generated test useful?2021-08-03T13:24:51ZLaurent Peuchare "test_one_each_config" kind of autotest/generated test useful?Right now we have those automatically generated tests often called "test_one_each_config" which in theory seems like a great idea. But, we've encountered several issues with them:
- they are super slow (more than 5min on py3-web)
- we d...Right now we have those automatically generated tests often called "test_one_each_config" which in theory seems like a great idea. But, we've encountered several issues with them:
- they are super slow (more than 5min on py3-web)
- we don't understand them
- when they bug it's generally a nightmare to understand why and how and debugging is very hard
- I don't think anyone has been writing them anymore (everyone seems lost and scared when I mention them)
How could we improve this situation? Should we remove them instead or are they useful?
Related #339Nicolas Chauvatnicolas.chauvat@logilab.frNicolas Chauvatnicolas.chauvat@logilab.frhttps://forge.extranet.logilab.fr/cubicweb/cube-doctor/-/issues/43integrate pyupgrade2021-08-04T15:59:15ZNicolas Chauvatnicolas.chauvat@logilab.frintegrate pyupgradesee https://github.com/asottile/pyupgradesee https://github.com/asottile/pyupgradehttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/309ValueError: list.remove(x): x not in list when partial db-create2021-05-11T12:45:38ZArthur LutzValueError: list.remove(x): x not in list when partial db-createOn an incomplete database (created by a `db-create` that is killed at some point), we get the following traceback when trying to start or shell :
```
Traceback (most recent call last):
File "/usr/bin/cubicweb-ctl", line 11, in <modul...On an incomplete database (created by a `db-create` that is killed at some point), we get the following traceback when trying to start or shell :
```
Traceback (most recent call last):
File "/usr/bin/cubicweb-ctl", line 11, in <module>
load_entry_point('cubicweb==3.28.3', 'console_scripts', 'cubicweb-ctl')()
File "/usr/lib/python3/dist-packages/cubicweb/cwctl.py", line 830, in run
CWCTL.run(args)
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 149, in run
sys.exit(command.main_run(args, rcfile))
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 290, in main_run
self.run(args)
File "/home/cubicweb/.local/lib/python3.7/site-packages/cubicweb_francearchives/ccplugin.py", line 554, in run
with admincnx(appid) as cnx:
File "/home/cubicweb/.local/lib/python3.7/site-packages/cubicweb_francearchives/__init__.py", line 356, in admincnx
repo.bootstrap()
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 406, in bootstrap
config.init_cubes(self.get_cubes())
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 674, in get_cubes
cubes.remove('cubicweb')
ValueError: list.remove(x): x not in list
```
Having a more explicit error would help to debug these sort of situations !https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/272CW is not compatible with pyramid 2.0: let’s make it compatible with it !2023-05-03T10:19:20ZSimon ChabotCW is not compatible with pyramid 2.0: let’s make it compatible with it !pyramid 2.0 was release on 28 feb 2021, and it drops the module `pyramid.compat`.pyramid 2.0 was release on 28 feb 2021, and it drops the module `pyramid.compat`.Simon ChabotSimon Chabothttps://forge.extranet.logilab.fr/cubicweb/RQL/-/issues/7Study why RQLVisitorHandler exists ?2021-02-23T16:10:01ZFabien Amargerfabien.amarger@logilab.frStudy why RQLVisitorHandler exists ?It seems it is only used for the test, which only test if the class is defined.It seems it is only used for the test, which only test if the class is defined.https://forge.extranet.logilab.fr/cubicweb/RQL/-/issues/4Remove all "monkeypatch" and backport modification to logilab-database (and o...2021-02-23T15:13:36ZFabien Amargerfabien.amarger@logilab.frRemove all "monkeypatch" and backport modification to logilab-database (and other if needed)https://forge.extranet.logilab.fr/cubicweb/cube-doctor/-/issues/20ajout mypy dans tox.ini et gitlab-ci.yml2021-02-02T14:44:54ZNicolas Chauvatnicolas.chauvat@logilab.frajout mypy dans tox.ini et gitlab-ci.ymlvoir titrevoir titrehttps://forge.extranet.logilab.fr/cubicweb/cube-doctor/-/issues/19génération MR avec résultat pyannotate (ou équivalent)2021-02-02T14:44:54ZNicolas Chauvatnicolas.chauvat@logilab.frgénération MR avec résultat pyannotate (ou équivalent)voir titrevoir titrehttps://forge.extranet.logilab.fr/cubicweb/cube-doctor/-/issues/18améliorer/refaire/porter à python new-version2021-01-29T16:39:32ZLaurent Peuchaméliorer/refaire/porter à python new-versionC'est déjà super ce qu'on a mais pour l'instant on en est pas encore totalement satisfait et il faudrait peut être le porter sur un petit utilitaire python qui reprend ce qu'on a déjà fait pour pouvoir facilement l'installer dans toxC'est déjà super ce qu'on a mais pour l'instant on en est pas encore totalement satisfait et il faudrait peut être le porter sur un petit utilitaire python qui reprend ce qu'on a déjà fait pour pouvoir facilement l'installer dans toxhttps://forge.extranet.logilab.fr/cubicweb/dashboards/-/issues/2Introduire un mécanisme de niveaux de qualité pour les cubes2021-02-02T15:18:24ZLaurent PeuchIntroduire un mécanisme de niveaux de qualité pour les cubeshttps://hackmd.logilab.fr/pWeg-58DSeaQRaol_smTGQ#
Comme pour [YunoHost](https://yunohost.org/#/packaging_apps_levels) qui a des niveaux de qualité pour les applications, l'idée est d'introduir et définir des niveaux de qualité pour les ...https://hackmd.logilab.fr/pWeg-58DSeaQRaol_smTGQ#
Comme pour [YunoHost](https://yunohost.org/#/packaging_apps_levels) qui a des niveaux de qualité pour les applications, l'idée est d'introduir et définir des niveaux de qualité pour les applications à la place du dashboard qa.html.
Les avantages potentiels sont multiples:
* c'est une information direct pour les gens qui veulent se servir de ces cubes
* cela donne une roadmap explicite de quelle est la chose la + importante à faire pour améliorer la qualité d'un cube
* et donc c'est une information activable et ça permet de fixer des objectifs ("tous les cubes niveau 7 !")
* c'est motivant d'augmenter la qualité en gagnant des niveaux
* le code du dashboard qa.html / logigraphe fait déjà le gros du travail, il faut "juste" définir les niveaux
En faire des badges sur les projets et à terme remplacer qa.html par ça.
Résultat du hackaton:
Niveaux
-------
- 0: y’a rien.
- 1: on sait de quoi ça parle
- a un readme
- y a un tox
- 2: utilisable aujourd'hui
- py3
- new format
- use pytest
- 3: y’a une CI
- gitlab-ci
- 4: garantie d'une installation correcte
- check-manifest
- 5: commandes pour releaser
- deb-publish
- pypi-publish
- 6: Code de qualité
- flake8
- black
- 7: c'est documenté
- doc
- 8: la documentation est accessible
- read-the-docs (projet public uniquement)
- 9: Cube doctor est passé par là
- capture deprecated warnings
- fromforge
- 10: mypy
- mypy
- 11: dépot propre
- number of MRs / number of topicshttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/205rename black_list to block_list2021-10-20T12:52:50ZNicolas Chauvatnicolas.chauvat@logilab.frrename black_list to block_listhttps://forge.extranet.logilab.fr/cubicweb/cubes/slickgrid/-/issues/1Add information which version of slickgrid is used and on how to upgrade it2021-01-07T14:48:11ZNoé GaumontAdd information which version of slickgrid is used and on how to upgrade itThe readme states that https://github.com/mleibman/SlickGrid is used but not its version.
This information is important namely because this repo is not updated since 2016.
It might be a good idea to migrate to https://github.com/6pac/...The readme states that https://github.com/mleibman/SlickGrid is used but not its version.
This information is important namely because this repo is not updated since 2016.
It might be a good idea to migrate to https://github.com/6pac/SlickGrid as stated in the original repo.https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/142[RQL] Integrate the RQL optimisation2021-10-12T11:10:39ZFabien Amargerfabien.amarger@logilab.fr[RQL] Integrate the RQL optimisation