flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

fix: remove a single type hint to retain python 2.7.x compatibility

Open Homeblest opened this issue 10 months ago • 2 comments

I was experimenting with Flatbuffers in python 2.7.18 and encountered an error which drove me insane thinking that I was running Python 3.x.

Turns out there's a type hint in the code that prevents Flatbuffers being used in Python 2.7.x

Homeblest avatar Feb 13 '25 17:02 Homeblest

As someone who argued for removing python 2 support for recent flatbuffers version, im very interested what your use case is where you have a up to date flatbuffers version but a horribly outdated python version?

fliiiix avatar Mar 04 '25 15:03 fliiiix

As someone who argued for removing python 2 support for recent flatbuffers version, im very interested what your use case is where you have a up to date flatbuffers version but a horribly outdated python version?

My employer is toying with the idea of using flatbuffers in an environment that is using Stackless Python 2.7.x. since forever ago.

We are of course open to pinning the flatbuffers version as well, but since the only change required for compatibility is this, I decided to propose it.

Homeblest avatar Mar 11 '25 14:03 Homeblest

It would be excellent to get this merged as someone who's employer is also stuck on an old fork of stackless

JordanWWood avatar Aug 22 '25 13:08 JordanWWood

@aardappel i guess this would be good since some people still use python 2.7

fliiiix avatar Sep 25 '25 10:09 fliiiix

I thought we had decided to stop supporting Python 2.x, but this is such a small change I think we can merge it if that helps.

There's a small conflict though, if you could fix that first.

aardappel avatar Sep 25 '25 16:09 aardappel

#8799 implements this fix. Closing this PR.

jtdavis777 avatar Nov 24 '25 00:11 jtdavis777