Skip to content

Continous Integration on 3.14.0a1: Regexp does not match UNSUPPORTEDOPERANDSUGG (but matches UNSUPPORTEDOPERAND) #67

Description

@SylvainDe

Build: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/11652701227
Jobs: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/11652701227/job/32444230093

Python 3.14.0a1 (main, Oct 16 2024, 03:58:15) [GCC 9.4.0]
sys.version_info(major=3, minor=14, micro=0, releaselevel='alpha', serial=1)
('CPython', '', '')
pip 24.3.1 from /opt/hostedtoolcache/Python/3.14.0-alpha.1/x64/lib/python3.14/site-packages/pip (python 3.14)
======================================================================
FAIL: test_old_print_chevron_syntax (didyoumean_sugg_tests.TypeErrorTests.test_old_print_chevron_syntax)
Trying old print chevron syntax (before Python 3).
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/DidYouMean-Python/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1918, in test_old_print_chevron_syntax
    self.throws(code, UNSUPPORTEDOPERANDSUGG, [], after)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/DidYouMean-Python/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 464, in throws
    self.assertRegexp(msg, error_msg, details)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/DidYouMean-Python/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 485, in assertRegexp
    return getattr(self, name)(text, regex, msg)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: Regex didn't match: '^unsupported operand type\\(s\\) for (?P<op>.*): \'(?P<t1>[\\w\\.-]+)\' and \'(?P<t2>[\\w\\.-]+)\'\\. Did you mean \\"(?P<sugg>.*)\\"\\?$' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'" : Running following code :
---
with open('/dev/null', 'w') as f:
	print >> f, 5
---

----------------------------------------------------------------------
Ran 372 tests in 1.120s

FAILED (failures=1)

It looks like the suggestion is not provided on 3.14.0a1 but is provided on the previous version:

Python 3.14.0a0 (main, Aug 29 2024, 14:17:47) [GCC 9.4.0]
sys.version_info(major=3, minor=14, micro=0, releaselevel='alpha', serial=0)
('CPython', '', '')
pip 24.3.1 from /opt/hostedtoolcache/Python/3.14.0-alpha.0/x64/lib/python3.14/site-packages/pip (python 3.14)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions