Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.2k
Closed
Description
SinceStruct.__init__() first saves the format ins_format, then setss_code used to pack/unpack, after calling it with invalid format argument it leaves the Struct object in inconsistent state --format returns the new (invalid) format, while packing/unpacking use old format (if it was set). This happens only when call it explicitly, which will be deprecated (see#143715). If simply callStruct() with invalid argument, you will not get a broken object, you will get an error.
Linked PRs
- gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format #145744
- [3.14] gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format (GH-145744) #145763
- [3.13] gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format (GH-145744) #145764