SPDX Failing to parse license for no obvious reason

Open
#87 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start by running the reported Python example through get_spdx_licensing().parse(), comparing the failing “Sleepycat License” input with the two working inputs. Trace the SPDX parser behavior for these strings; done means the failing expression parses correctly without regressing the working cases.

Written by the indexing model from the issue text.

Description

Hi license-expression. I must begin that this is a great piece of software, and I'm grateful for your contributions.

I noticed a strange edge case when using the spdx license parser. The parser raises an exception when I try to parse Sleepycat License but is fine with Sleepydog License or even Sleepyca License.

Reproducible example:

SPDX_LICENSING = license_expression.get_spdx_licensing()

# ExpressionParseError: Invalid symbols sequence such as (A B) for token: "License" at position: 10
_ = SPDX_LICENSING.parse('Sleepycat License')

# Works
_ = SPDX_LICENSING.parse('Sleepydog License')
_ = SPDX_LICENSING.parse('Sleepyca License')

Relevant versions installed via conda.

python                    3.11.4          h47c9636_0_cpython    conda-forge
license-expression        30.1.1             pyhd8ed1ab_0    conda-forge

Thanks in advance!

Dominant language
Python
Stars
74
Forks
38
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aboutcode-org/license-expression

All issues in aboutcode-org/license-expression

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.