[08:46:02]
<Salamandar> There was no import re at al
[09:35:00]
<Yunohost Git/Infra notifications> [issues] sitegui [commented](https://github.com/YunoHost/issues/issues/2550#issuecomment-7036003082) on [issue #2550](https://github.com/YunoHost/issues/issues/2550) Import users.csv - OSError: [Errno 36] File name too long: During Tuesdays meeting, weve discussed about this issue. We prefer to update the UI behavior (in the repo yunohost-a...
[10:58:01]
<Yunohost Git/Infra notifications> [yunohost-admin] sitegui opened [pull request #698](https://github.com/YunoHost/yunohost-admin/pull/698) : Refactor form handling to fix CSV upload
[11:53:49]
<Yunohost Git/Infra notifications> [yunohost] Thovi98 opened [pull request #2407](https://github.com/YunoHost/yunohost/pull/2407) : fix ruby resources upgrade
[12:05:16]
<Yunohost Git/Infra notifications> [yunohost] Thovi98 edited [pull request #2407](https://github.com/YunoHost/yunohost/pull/2407) : fix ruby resources upgrade
[12:07:39]
<Yunohost Git/Infra notifications> [yunohost-admin] Thovi98 [commented](https://github.com/YunoHost/yunohost-admin/pull/698#issuecomment-7039137421) on [issue #698](https://github.com/YunoHost/yunohost-admin/pull/698) Refactor form handling to fix CSV upload: Thank you > I need some help on how to test it on a Yunohost instance. Do you know how can I do it? Did you already h...
[13:03:54]
<m606> err yes a mistake, but mimicking what is done in this file I would have put it as such (as before this last commit) or within `natural_sort` def, not sure:
```py
if not isinstance(d, OrderedDict):
import re
keys = natural_sort(keys)
```
[13:04:28]
<m606> so still interested by the question above
[15:32:11]
<ljf> in general, it's better to put the import on the top of the file
[15:32:11]
<ljf> but sometimes we don't for performance reasons (or due to circular import issue)
[15:32:12]
<ljf> the goal is to avoid to have a yunohost-api memory too big or too long to load
[15:32:12]
<Yunohost Git/Infra notifications> [yunohost] oleole39 opened [pull request #2408](https://github.com/YunoHost/yunohost/pull/2408) : [fix] Re-enable http2 now nginx has been patched
[15:34:49]
<Yunohost Git/Infra notifications> [yunohost] oleole39 opened [pull request #2409](https://github.com/YunoHost/yunohost/pull/2409) : [fix] Re-enable http2 now nginx has been patched
[15:43:54]
*Salamandar thinks about the api-based command line
[15:53:45]
<m606> That's what I figured out when seeing that there were `import` done at the location where they were actually used, this when they are used in a scenario that might not always happen.
Somehow here this is the case: if the conditional block returns false, then no use for the `re` module in this file...
I guess the cost is rather low and I believe it is more readable to have it at the top of the file, but if we are into this kind of optimizations...
Also as Python [seems to do some caching](https://stackoverflow.com/questions/57346840/does-python-cache-imported-files) from the point of view of performances it doesn't matter whether the import is declared at the top, or say in `natural_sort()` def block, even if the function is called several times - the import will still be performed only once (that's still one more instruction to interpret, but for this the cost is very very very low I suppose).
[15:54:01]
<m606> That's what I figured out when seeing that there were `import` declared at the location where they were actually used, this when they are used in a scenario that might not always happen.
Somehow here this is the case: if the conditional block returns false, then no use for the `re` module in this file...
I guess the cost is rather low and I believe it is more readable to have it at the top of the file, but if we are into this kind of optimizations...
Also as Python [seems to do some caching](https://stackoverflow.com/questions/57346840/does-python-cache-imported-files) from the point of view of performances it doesn't matter whether the import is declared at the top, or say in `natural_sort()` def block, even if the function is called several times - the import will still be performed only once (that's still one more instruction to interpret, but for this the cost is very very very low I suppose).
[15:55:01]
<m606> That's what I figured out when seeing that there were `import` declared at the location where they were actually used, this when they are used in a scenario that might not always happen.
Somehow here this is the case: if the conditional block returns false, then no use for the `re` module in this file as only `natural_sort()` makes use of it at the moment...
I guess the cost is rather low and I find it more readable to have it at the top of the file, but if we are into this kind of optimizations...
Also as Python [seems to do some caching](https://stackoverflow.com/questions/57346840/does-python-cache-imported-files) from the point of view of performances it doesn't matter whether the import is declared at the top, or say in `natural_sort()` def block, even if the function is called several times - the import will still be performed only once (that's still one more instruction to interpret, but for this the cost is very very very low I suppose).
[18:56:23]
<Yunohost Git/Infra notifications> [yunohost] yunohost-bot opened [pull request #2410](https://github.com/YunoHost/yunohost/pull/2410) : Translations update from Weblate
[19:50:09]
<ljf> i think on the top of the file, here it's a good idea
[19:50:18]
<ljf> if we see some slowness, we will profile specific actions that are too slow
[19:50:31]
<Yunohost Git/Infra notifications> [issues] ewilly [commented](https://github.com/YunoHost/issues/issues/2618#issuecomment-7049108338) on [issue #2618](https://github.com/YunoHost/issues/issues/2618) Failiure to set Webadmin IP allowlist: Issue that only occurs with CLI as we dont currently load the full context.
Issues with same root cause and for which a...
[19:50:46]
<Yunohost Git/Infra notifications> [issues] ewilly [commented](https://github.com/YunoHost/issues/issues/2618#issuecomment-7049108338) on [issue #2618](https://github.com/YunoHost/issues/issues/2618) Failiure to set Webadmin IP allowlist: Issue that only occurs with CLI as we dont currently load the full context.
Issues with same root cause and for which a...