GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-43984: Update winreg.SetValueEx to make sure the value set is not -1 by shreyanavigyan · Pull Request #25775 · python/cpython Conversation
|
|
Skip news |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Can anyone please add a skip news label to this PR? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Isn't this a change of behaviour? If so, I'd say it calls for a NEWS item. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
News entry added |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Perhaps you could use the bug report to write a test case? (Lib/test/test_winreg.py) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Erlend Egeberg Aasland <[email protected]>
Co-authored-by: Erlend Egeberg Aasland <[email protected]>
| def test_setvalueex_negative_one_check(self): | ||
| # Test for Issue #43984, check -1 was not set by SetValueEx. | ||
| # Py2Reg, which gets called by SetValueEx, wasn't checking return | ||
| # value by PyLong_AsUnsignedLong, thus setting -1 as value in the registry. | ||
| # The implementation now checks PyLong_AsUnsignedLong return value to assure | ||
| # the value set was not -1. | ||
| try: | ||
| with CreateKey(HKEY_CURRENT_USER, test_key_name) as ck: | ||
| with self.assertRaises(OverflowError): | ||
| SetValueEx(ck, "test_name", None, REG_DWORD, -1) | ||
| with self.assertRaises(FileNotFoundError): | ||
| with QueryValueEx(ck, "test_name") as subkey: | ||
| pass | ||
| finally: | ||
| DeleteKey(HKEY_CURRENT_USER, test_key_name) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There's something wrong with this test I added. My antivirus is identifying this piece of code as virus. Any thoughts?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If any maintainers figure out the problem please add the required commit. Who cannot add commits please suggest the patch, I'll commit it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Friendly Ping. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry for the lack of review. Unfortunately, it looks like someone added a new required check, so I'll close/reopen to re-run it, but the change looks okay to me. If someone else gets back to this before I do, they can merge. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
✅ Deploy Preview for python-cpython-preview canceled.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The test failure on Azure Pipelines is patchcheck reporting extra whitespace in the new test. I can't see it in the diff, but I find it's usually trailing whitespace in a comment. We shouldn't merge with that failure, or it'll show up randomly in the future. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @shreyanavigyan for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-100134 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-100135 is a backport of this pull request to the 3.10 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks! FWIW, I suspect the antimalware detection was probably because it's an unsigned binary messing with the registry. Once we do our signed release, I'm sure it'll be fine. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…n error (pythonGH-25775) (cherry picked from commit a29a7b9) Co-authored-by: Shreyan Avigyan <[email protected]>
…n error (pythonGH-25775) (cherry picked from commit a29a7b9) Co-authored-by: Shreyan Avigyan <[email protected]>
…n error (GH-25775) (cherry picked from commit a29a7b9) Co-authored-by: Shreyan Avigyan <[email protected]>
…n error (GH-25775) (cherry picked from commit a29a7b9) Co-authored-by: Shreyan Avigyan <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.