randomgen icon indicating copy to clipboard operation
randomgen copied to clipboard

Numpy 2.0 compatibility

Open Shoeboxam opened this issue 1 year ago • 1 comments

I am getting the following error when using randomgen on Numpy 2.0 (which has just released today):

  File "randomgen/aes.pyx", line 1, in init randomgen.aes
  File "randomgen/common.pyx", line 1, in init randomgen.common
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

No issue on Numpy 1.26.4, the max prior version. I think it's likely that Numpy's ABI has changed in 2.0, causing an incompatibility.

Thanks for maintaining this package!

Shoeboxam avatar Jun 16 '24 23:06 Shoeboxam

Thanks for bringing this up. I haven't released wheels that are compatible with the new ABI. pickling changes in NumPy 2 so I need to come up with something (FWIW I changed it without fully thinking through the consequence for randomgen 🤦 )

bashtage avatar Jun 17 '24 15:06 bashtage

I'm getting exactly the same error, which prevents migration to NumPy 2.0. Appreciate any timeline/indication when compatibility with 2.0 will be provided. Thnks!

radohristov avatar Jul 11 '24 14:07 radohristov

I will try and get to it next week. Needs a decent refactor n

On Thu, Jul 11, 2024, 15:01 Radoslav Hristov @.***> wrote:

I'm getting exactly the same error, which prevents migration to NumPy 2.0. Appreciate any timeline/indication when compatibility with 2.0 will be provided. Thnks!

— Reply to this email directly, view it on GitHub https://github.com/bashtage/randomgen/issues/360#issuecomment-2223019418, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKTSRO5OCT233PQFUPQRNLZL2F2DAVCNFSM6AAAAABJM7ISEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRTGAYTSNBRHA . You are receiving this because you commented.Message ID: @.***>

bashtage avatar Jul 11 '24 18:07 bashtage

Hi Kevin,

sorry to bother you, is there any update on this issue?

Thnks & nice day, Radoslav

On Thu, Jul 11, 2024 at 8:22 PM Kevin Sheppard @.***> wrote:

I will try and get to it next week. Needs a decent refactor n

On Thu, Jul 11, 2024, 15:01 Radoslav Hristov @.***> wrote:

I'm getting exactly the same error, which prevents migration to NumPy 2.0. Appreciate any timeline/indication when compatibility with 2.0 will be provided. Thnks!

— Reply to this email directly, view it on GitHub < https://github.com/bashtage/randomgen/issues/360#issuecomment-2223019418>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABKTSRO5OCT233PQFUPQRNLZL2F2DAVCNFSM6AAAAABJM7ISEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRTGAYTSNBRHA>

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/bashtage/randomgen/issues/360#issuecomment-2223605822, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMECP2V2AFMVNBVR7EVX3LZL3EODAVCNFSM6AAAAABJM7ISEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRTGYYDKOBSGI . You are receiving this because you commented.Message ID: @.***>

radohristov avatar Jul 25 '24 08:07 radohristov

Very close now. Main works on NumPy 2 (1.22.3+). Hope to have release in the next few days.

bashtage avatar Sep 20 '24 10:09 bashtage

randomgen 2.0.0 has been released with NumPy compatibility.

bashtage avatar Sep 26 '24 10:09 bashtage