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

fix issues with Python 3.5 #36

Closed
HBehrens opened this issue May 5, 2020 · 2 comments · Fixed by #91
Closed

fix issues with Python 3.5 #36

HBehrens opened this issue May 5, 2020 · 2 comments · Fixed by #91

Comments

@HBehrens
Copy link
Owner

HBehrens commented May 5, 2020

@tyhoff discovered issues with Python 3.5 while working on #35 , this issue describes the work of fixing those.

@tyhoff
Copy link

tyhoff commented May 28, 2020

Played a little with this:

$ python3.5 -m nose
.................F.....................................
======================================================================
FAIL: test_enhance_file_elements (tests.test_collector.TestCollector)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/tyler/dev/junk/puncover/tests/test_collector.py", line 415, in test_enhance_file_elements
    self.assertListEqual([aa, ab, b], crf)
AssertionError: Lists differ: [{'co[18 chars]s': [], 'name': 'a', 'collapsed_name': 'a/a', [6996 chars]'b'}] != [{'co[18 chars]s': [{'collapsed_sub_folders': [], 'name': 'a'[6996 chars]/b'}]

First differing element 0:
{'col[17 chars]s': [], 'name': 'a', 'collapsed_name': 'a/a', [2565 chars]a/a'}
{'col[17 chars]s': [{'collapsed_sub_folders': [], 'name': 'a'[1715 chars] 'b'}

Diff is 28182 characters long. Set self.maxDiff to None to see it.

----------------------------------------------------------------------
Ran 55 tests in 0.196s

This only happens for my with a 3.5.10 installation of Python, not a 3.5.5.

The two lists contain the same elements, just not in the same order. I assume in future versions, Python did something around sorting that enable these tests to pass.

One thing to consider would be to change assertListEqual to assertCountEqual if the order doesn't matter.

https://docs.python.org/3.2/library/unittest.html#unittest.TestCase.assertCountEqual

But, at the end of the day, most people are deprecating support for 3.5. 🤷

@noahp
Copy link
Collaborator

noahp commented Oct 18, 2023

3.6 is long gone:
https://endoflife.date/python

Gonna just remove <3.7 now.

noahp added a commit that referenced this issue Oct 18, 2023
It's been EOL for a while now:

https://endoflife.date/python

Also remove notes about python3.5, it's been EOL for 3 years.

Closes #36.
@noahp noahp closed this as completed in #91 Oct 18, 2023
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.

3 participants