Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Python 3.9 #140

Merged
merged 32 commits into from
Nov 1, 2020
Merged

Fixes for Python 3.9 #140

merged 32 commits into from
Nov 1, 2020

Conversation

Gobot1234
Copy link
Collaborator

type(field_type) can now be <class 'list'> breaking the old method of checking.

src/betterproto/__init__.py Outdated Show resolved Hide resolved
@nat-n
Copy link
Collaborator

nat-n commented Aug 16, 2020

Looks like the new CI config doesn't work?

@Gobot1234
Copy link
Collaborator Author

Yeah I'm not too sure what's up with it

@Gobot1234 Gobot1234 mentioned this pull request Aug 17, 2020
@Gobot1234
Copy link
Collaborator Author

Gobot1234 commented Aug 29, 2020

Looks like it's been fixed, I take it back

@Gobot1234
Copy link
Collaborator Author

Not a clue what to do about this

@Gobot1234
Copy link
Collaborator Author

Can we cherry pick the actual fix to merged and leave the tests as a separate PR to be merged once 3.9 plays better?

@Gobot1234
Copy link
Collaborator Author

Building wheels for dependencies seems like an impossible task in actions.

Copy link
Collaborator

@nat-n nat-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the lockfile changed here?

src/betterproto/__init__.py Outdated Show resolved Hide resolved
@Gobot1234
Copy link
Collaborator Author

It was due to me experimenting with checking system platform specific dependencies.

@Gobot1234
Copy link
Collaborator Author

>>> import typing
>>> def func(t: typing.List[str]):
...     pass
... 
>>> typing.get_type_hints(func)["t"]
typing.List[str]
>>> type(typing.get_type_hints(func)["t"])
<class 'typing._GenericAlias'>
>>> type(typing.List)
<class 'typing._SpecialGenericAlias'>
>>> type(typing.List) is type(typing.get_type_hints(func)["t"])
False

I think this is the actual bug.

Copy link
Collaborator

@nat-n nat-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the lockfile changed here?

It was due to me experimenting with checking system platform specific dependencies.

Better not to update the lockfile in this change if there's no good reason to do so.

src/betterproto/__init__.py Outdated Show resolved Hide resolved
@Gobot1234
Copy link
Collaborator Author

Should be ready to go now :)

@nat-n nat-n merged commit a5e0ef9 into danielgtaylor:master Nov 1, 2020
@abn abn mentioned this pull request Nov 24, 2020
Gobot1234 added a commit to Gobot1234/python-betterproto that referenced this pull request Dec 18, 2020
Fix issue in logic for evaluating field types affecting python 3.9
@Gobot1234 Gobot1234 deleted the fixes branch January 10, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants