rez icon indicating copy to clipboard operation
rez copied to clipboard

Convert Windows registry queries to use `winreg` module

Open nrusch opened this issue 1 year ago • 5 comments

Python 3 adds a winreg module to the standard library to perform Windows registry queries using native APIs.

This change converts the rez registry queries to use the winreg API instead of executing cmd.exe and/or powershell and parsing their output.

nrusch avatar Jun 27 '24 19:06 nrusch

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: nrusch / name: Nathan Rusch (bf72ceb0ac36467caa59523dfbcea13a7dbdeb95)

This may also fix #1467

nrusch avatar Jun 27 '24 19:06 nrusch

Hi @nrusch , thanks for submitting this PR. We require all contributors to sign a CLA. You can look at the comment above from EasyCLA (https://github.com/AcademySoftwareFoundation/rez/pull/1780#issuecomment-2195487061) and follow the instructions. Let us know if you hit any problems.

Yes, I'm aware of the CLA requirement. We are working on getting our Netflix corporate CLA working, so I'm waiting for a follow-up from people higher up the chain.

nrusch avatar Jun 28 '24 00:06 nrusch

OK, the CLA should be resolved now.

nrusch avatar Jul 01 '24 21:07 nrusch

Hi @nrusch thanks for this PR, we're also really interested in having this merged ! I was having issues with how powershell plugin queries the registry to get the standard_system_paths. It is much slower than what is currently done in windows.get_syspaths_from_registry for an identical result (on my end).

Now using winreg seems an even better option so here's a little bump for the tsc members :)

samson-jerome avatar Sep 02 '24 12:09 samson-jerome

Thank you @samson-jerome for the great feedback and trying it out! We are planning on merging this before our next release, which should hopefully happen in the next 2-3 weeks.