You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
During development we added the -B (DontWriteByteCode) and the environment variables for that to our execution.
PythonQt seems to ignore those flags in PythonQtImporter and writes/loads the pyc files directly.
I think the writing of pyc files NOT in pycache has historical py2 reasons, but could the flag be evaluated in PythonQtImporter?
There is a function to load with standard python loader in PythonQt.h, but i seems too different to the "reqular" parseFile Method
and is not referenced by the interface to evaluate it.
Could handling of this flag be integrated? Or a PythonQt specific Flag would be also ok? Second would be better to have "normal" python behaviour of writing cache files only for imported files/modules and not during call of evalFile
The text was updated successfully, but these errors were encountered:
Yes, feel free to provide a merge request for this.
In our own projects, we stopped using the PythonQtImporter mechanism,
because the Python 3 importers have changed so much and we did not want to
reimplement all features of the default python importer again and again.
We originally did the custom importer to support crypted Python files.
So I would actually recommend switching to parseFileWithPythonLoaders
and to not enable the custom PythonQtImporter anymore. This will give you
default Python 3 imports with all flags and caching.
We could also introduce a PythonQt init flag to enable usage of
parseFileWithPythonLoaders instead wherever files are loaded (or introduce
a flag in those methods, whatever is easier).
I will not have time for this in the near future, so a merge request for
this would also be welcome!
On Fri 12. Mar 2021 at 07:04, Jörg Kreuzberger ***@***.***> wrote:
Hi!
During development we added the -B (DontWriteByteCode) and the environment
variables for that to our execution.
PythonQt seems to ignore those flags in den PythonQtImporter and
writes/loads the pyc files directly.
I think the writing of pyc files NOT in *pycache* has historical reasons,
but could the flag be evaluated in PythonQtImporter?
There is a function to load with standard python loader in PythonQt.h, but
i seems too different to the "reqular" parseFile Method
and is not referenced by the interface to evaluate it.
Could handling of this flag be integrated?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#41>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKHPHGGUWT6AZGBO5NFN6DTDGVGVANCNFSM4ZBUV5UA>
.
Uh oh!
There was an error while loading. Please reload this page.
Hi!
During development we added the -B (DontWriteByteCode) and the environment variables for that to our execution.
PythonQt seems to ignore those flags in PythonQtImporter and writes/loads the pyc files directly.
I think the writing of pyc files NOT in pycache has historical py2 reasons, but could the flag be evaluated in PythonQtImporter?
There is a function to load with standard python loader in PythonQt.h, but i seems too different to the "reqular" parseFile Method
and is not referenced by the interface to evaluate it.
Could handling of this flag be integrated? Or a PythonQt specific Flag would be also ok? Second would be better to have "normal" python behaviour of writing cache files only for imported files/modules and not during call of evalFile
The text was updated successfully, but these errors were encountered: