Skip to content

FEAT: Support Python 3.10#64

Merged
madpah merged 3 commits intomainfrom
feat/60-python-3.10-support
Nov 10, 2021
Merged

FEAT: Support Python 3.10#64
madpah merged 3 commits intomainfrom
feat/60-python-3.10-support

Conversation

@madpah
Copy link
Collaborator

@madpah madpah commented Nov 10, 2021

As per #60.

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <phorton@sonatype.com>
@madpah madpah requested a review from a team as a code owner November 10, 2021 09:06
@madpah madpah requested a review from jkowalleck November 10, 2021 09:07
@madpah madpah added the enhancement New feature or request label Nov 10, 2021
@madpah madpah linked an issue Nov 10, 2021 that may be closed by this pull request
@jkowalleck
Copy link
Member

jkowalleck commented Nov 10, 2021

@madpah could you change the from None in the exception raises?
reason: currrent code seams to be invalid py syntax - see https://github.com/CycloneDX/cyclonedx-python-lib/runs/4163052097?check_suite_focus=true#step:9:43

if you want to forward the original exception (which is usually the case p there is no real reason to not do it) then just add it.
example change

< except StopIteration as err:
<             raise JSONDecodeError("Expecting value", s, err.value) from None
> except StopIteration as err:
>             raise JSONDecodeError("Expecting value", s, err.value) from err

if you want to omitt the original error, then this example would work

< except StopIteration as err:
<             raise JSONDecodeError("Expecting value", s, err.value) from None
> except StopIteration as err:
>             raise JSONDecodeError("Expecting value", s, err.value)

Copy link
Member

@jkowalleck jkowalleck left a comment

Choose a reason for hiding this comment

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

fix invalid py syintax as described here: #64 (comment)

@madpah
Copy link
Collaborator Author

madpah commented Nov 10, 2021

https://github.com/CycloneDX/cyclonedx-python-lib/runs/4163052097?check_suite_focus=true#step:9:43

These errors are not from this libraries code I don't think @jkowalleck - I think they are from the JSON library itself??

@jkowalleck jkowalleck self-requested a review November 10, 2021 11:57
@madpah
Copy link
Collaborator Author

madpah commented Nov 10, 2021

We are suffering from python-poetry/poetry#4210 it seems - issues with Poetry and Python 3.10.

Will attempt the stated workaround.

…thon 3.10 (see: python-poetry/poetry#4210)

Signed-off-by: Paul Horton <phorton@sonatype.com>
@madpah madpah dismissed jkowalleck’s stale review November 10, 2021 13:06

Resolved by updating Poetry

@madpah madpah merged commit 385b835 into main Nov 10, 2021
@madpah madpah deleted the feat/60-python-3.10-support branch December 22, 2021 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.10 Support

2 participants