Opened 13 days ago

Closed 12 days ago

#30847 closed defect (fixed)

Failed unit tests with Python 3.8

Reported by: miceliux Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords: testing easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

There are some errors when running unit tests on Python 3.8:

+ /usr/bin/python3 run_tests.py --unit
======================================================================

INITIALISING

======================================================================

stem version... 1.7.1
python version... 3.8.0a4
operating system version... failed

module 'platform' has no attribute 'linux_distribution'
BUILDSTDERR: /builddir/build/BUILD/stem-1.7.1/test/output.py:150: SyntaxWarning: invalid escape sequence \(
BUILDSTDERR: m = re.match('.*( \(test\..*?\)).*', line_content)
BUILDSTDERR: /builddir/build/BUILD/stem-1.7.1/test/output.py:163: SyntaxWarning: invalid escape sequence \.
BUILDSTDERR: m = re.search('(test\.[)]*)', line_content)
BUILDSTDERR: /builddir/build/BUILD/stem-1.7.1/test/output.py:264: SyntaxWarning: invalid escape sequence \(
BUILDSTDERR: module_match = re.match('.*\((test\.\S+)\.\S+\).*', line_content)
BUILDSTDERR: /builddir/build/BUILD/stem-1.7.1/test/task.py:140: SyntaxWarning: invalid escape sequence \S
BUILDSTDERR: test_match = re.search('
class (\S*)\(unittest.TestCase\):$', file_contents, re.MULTILINE)
BUILDSTDERR: /usr/lib/python3.8/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
BUILDSTDERR: EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')

Full log here:

https://copr-be.cloud.fedoraproject.org/results/@python/python3.8/fedora-rawhide-x86_64/00917176-python-stem/build.log.gz

Child Tickets

Change History (3)

comment:1 Changed 13 days ago by teor

I think some errors like this were fixed in a recent commit to stem master?

comment:2 Changed 13 days ago by atagar

Keywords: testing easy added

Hi miceliux. Gu1nness offered to write a patch for this earlier but hasn't looped back to make the adjustment I requested...

https://github.com/torproject/stem/pull/15

This is s simple one to fix. I'll whip up a patch in a bit if nobody else gets to it first.

comment:3 Changed 12 days ago by atagar

Resolution: fixed
Status: newclosed

Fix pushed, feel free to reopen if this doesn't do the trick...

https://gitweb.torproject.org/stem.git/commit/?id=af52d8b

Note: See TracTickets for help on using tickets.