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

Replace naturalsort dependency with natsort or remove altogether #1317

Closed
dvzrv opened this issue Jan 21, 2022 · 1 comment · Fixed by #1318
Closed

Replace naturalsort dependency with natsort or remove altogether #1317

dvzrv opened this issue Jan 21, 2022 · 1 comment · Fixed by #1318

Comments

@dvzrv
Copy link
Contributor

dvzrv commented Jan 21, 2022

Hi! I'm about to package this project for Arch Linux (due to other dependencies).

Unfortunately the naturalsort upstream seems very dead, does conflict with natsort (which is actively maintained and already packaged on Arch Linux), has less features and thus seems less fit for being included in any upstream project.
It would be very cool if you could switch to using natsort, or remove the necessity of naturalsort altogether, which seems to be only required for this command:

regs = natsort(self.context.selected_core.core_registers.iter_matching(
lambda r: r.group == group_name), key=lambda r: r.name)

dvzrv added a commit to dvzrv/pyOCD that referenced this issue Jan 21, 2022
pyocd/commands/commands.py:
Use natsort's `natsorted()` instead of naturalsort's `natsort()`.

setup.cfg:
Replace naturalsort with natsort.

Fixes pyocd#1317
@flit
Copy link
Member

flit commented Jan 21, 2022

I'm pretty sure I used naturalsort because it supports Python 2, which was needed for pyocd at the time. But now that pyocd is Python 3-only it's nice to be able to update. 😄

dvzrv added a commit to dvzrv/pyOCD that referenced this issue Jan 21, 2022
pyocd/commands/commands.py:
Use natsort's `natsorted()` instead of naturalsort's `natsort()`.

setup.cfg:
Replace naturalsort with natsort.

Fixes pyocd#1317
flit pushed a commit that referenced this issue Jan 22, 2022
pyocd/commands/commands.py:
Use natsort's `natsorted()` instead of naturalsort's `natsort()`.

setup.cfg:
Replace naturalsort with natsort.

Fixes #1317
flit pushed a commit to flit/pyOCD that referenced this issue Jan 22, 2022
pyocd/commands/commands.py:
Use natsort's `natsorted()` instead of naturalsort's `natsort()`.

setup.cfg:
Replace naturalsort with natsort.

Fixes pyocd#1317
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 a pull request may close this issue.

2 participants