ConfigParser issue with duplicate option entries
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
I have an issue with the way Shiv runs ConfigParser for a specific module I need.
configparser.DuplicateOptionError: While reading from PosixPath('/tmp/tmpjl8xhapm/pyroute2-0.7.2.dist-info/entry_points.txt') [line 56]: option 'conntrack' in section 'pyroute2' already exists
pyroute2 has multiple entries of conntrack with different capitalisation. Conntrack/conntrack.
Excerpt from pyroute2 setup.cfg
```
conntrack = pyroute2.conntrack
--
45 | iproute = pyroute2.iproute
… |
61 | NetlinkDumpInterrupted = pyroute2.netlink.exceptions:NetlinkDumpInterrupted
62 | Conntrack = pyroute2.conntrack:Conntrack
```
Since this is a linux module it shouldn't be an issue to handle this, but from what I can understand ConfigParser changes everything to lowercase because of Windows.
https://stackoverflow.com/a/19359720/837767
This answer explains it, and shows a fix for the issue.
Any way to implement this into shiv ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating where shiv's ConfigParser reads the generated entry_points.txt from the pyroute2 setup.cfg example. Reproduce the DuplicateOptionError with the case-variant conntrack entries, then verify that entry points differing only by capitalization are handled without the reported parsing failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100