Skip to content

Conversation

@quadrismegistus
Copy link

@quadrismegistus quadrismegistus commented Aug 4, 2024

PR to address #55.

This mainly adds the encoding='utf-8' where appropriate so files open safely on Windows.

I also ran into a recursion error on test_featuretable.py. The issue appears to be a recursion problem in the SegmentSorter class. The segments property is calling sort_segments(), which in turn is accessing segments, creating an infinite loop. There, the changes made in featuretable.py are:

  • Renamed sort_segments() to _sort_segments() to indicate it's a private method.
  • In the segments property, we now call self._sort_segments() instead of self.sort_segments().
  • In _sort_segments(), we set self._sorted = True after sorting.

All tests pass locally for me, on Mac and Windows.

@joanise
Copy link

joanise commented Jun 4, 2025

@dmort27 I see you're actively working on panphon right now. I see this PR has conflicts now, but are you willing to apply what's still applicable, to make panphon work on Windows too?

joanise pushed a commit to joanise/panphon that referenced this pull request Sep 23, 2025
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