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

Continous Integration on pypy-2.7_nightly: regexp does not match "FOO must be a BAR, not FOOBAR" #65

Closed
SylvainDe opened this issue May 16, 2024 · 3 comments

Comments

@SylvainDe
Copy link
Owner

First failure

Date: 16th May 2024
Build: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/9104724212 #1306
Jobs: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/9104724212/job/25071142350 pypy-2.7_nightly

Run # Information about Python version
  # Information about Python version
  python -VV
  python -c "import sys; print(sys.version_info)" || true
  python -c "import sys; print(sys._git)" || true
  # Information about pip version
  pip --version
  # Information about Python builtins/keywords
  python -c "import sys; import keyword; print({sys.version_info: {'kword': set(keyword.kwlist), 'builtins': set(dir(__builtins__))}})" || true
  python -c "import sysconfig; print(dir(sysconfig))" || true
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    Python_ROOT_DIR: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    Python2_ROOT_DIR: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    Python3_ROOT_DIR: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    PKG_CONFIG_PATH: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64/bin/lib/pkgconfig
Python 2.7.18 (ef5fded57192, May 15 2024, 22:00:21)
[PyPy 7.3.17-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
sys.version_info(major=2, minor=7, micro=18, releaselevel='final', serial=0)
Traceback (most recent call last):
  File "<module>", line 1, in <module>
AttributeError: 'module' object has no attribute '_git'
pip 20.3.4 from /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64/site-packages/pip (python 2.7)
Run python -m unittest discover --start-directory=didyoumean --pattern=*.py
  python -m unittest discover --start-directory=didyoumean --pattern=*.py
  python -m unittest2 discover --start-directory=didyoumean --pattern=*.py || true
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    Python_ROOT_DIR: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    Python2_ROOT_DIR: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    Python3_ROOT_DIR: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64
    PKG_CONFIG_PATH: /home/runner/work/_temp/6debc16f-68c4-48e0-977a-947a7a6b0af9/pypy-c-jit-169875-ef5fded57192-linux64/bin/lib/pkgconfig


-1
1
...............................................................................................................................................FFF..................................................................................................................................................................................................................................
======================================================================
FAIL: test_indices_cant_be_custom (didyoumean_sugg_tests.TypeErrorTests)
Use custom as index.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/DidYouMean-Python/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1839, in test_indices_cant_be_custom
    self.throws(bad, INDICESMUSTBEINT, suggs, before, 'pypy')
  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: Running following code :
---
(1, 2, 3)[CustomClass()]
---: '^[\\w\\.-]+ ind(?:ices|ex)? must be (?:an integer|integers)(?: or slices)?, not ([\\w\\.-]+)$' not found in 'tuple must be an integer, not instance'

======================================================================
FAIL: test_indices_cant_be_float (didyoumean_sugg_tests.TypeErrorTests)
Use float as index.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/DidYouMean-Python/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1825, in test_indices_cant_be_float
    self.throws(good2, INDICESMUSTBEINT, sugg, before)
  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: Running following code :
---
(1, 2, 3)[math.floor(2.0)]
---: '^[\\w\\.-]+ ind(?:ices|ex)? must be (?:an integer|integers)(?: or slices)?, not ([\\w\\.-]+)$' not found in 'tuple must be an integer, not float'

======================================================================
FAIL: test_indices_cant_be_str (didyoumean_sugg_tests.TypeErrorTests)
Use str as index.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/DidYouMean-Python/DidYouMean-Python/didyoumean/didyoumean_sugg_tests.py", line 1813, in test_indices_cant_be_str
    self.throws(bad, INDICESMUSTBEINT, suggs)
  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: Running following code :
---
(1, 2, 3)["2"]
---: '^[\\w\\.-]+ ind(?:ices|ex)? must be (?:an integer|integers)(?: or slices)?, not ([\\w\\.-]+)$' not found in 'tuple must be an integer, not str'

----------------------------------------------------------------------
Ran 372 tests in 1.852s

FAILED (failures=3)
Error: Process completed with exit code 1.

Last success

Date: 15th May 2024
Build: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/9096278217 #1305
Jobs: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/9096278217/job/25001362666 pypy-2.7_nightly

Run # Information about Python version
  # Information about Python version
  python -VV
  python -c "import sys; print(sys.version_info)" || true
  python -c "import sys; print(sys._git)" || true
  # Information about pip version
  pip --version
  # Information about Python builtins/keywords
  python -c "import sys; import keyword; print({sys.version_info: {'kword': set(keyword.kwlist), 'builtins': set(dir(__builtins__))}})" || true
  python -c "import sysconfig; print(dir(sysconfig))" || true
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /home/runner/work/_temp/d5e613fc-5524-489c-962b-53bf5e889d2e/pypy-c-jit-169873-653c96206b81-linux64
    Python_ROOT_DIR: /home/runner/work/_temp/d5e613fc-5524-489c-962b-53bf5e889d2e/pypy-c-jit-169873-653c96206b81-linux64
    Python2_ROOT_DIR: /home/runner/work/_temp/d5e613fc-5524-489c-962b-53bf5e889d2e/pypy-c-jit-169873-653c96206b81-linux64
    Python3_ROOT_DIR: /home/runner/work/_temp/d5e613fc-5524-489c-962b-53bf5e889d2e/pypy-c-jit-169873-653c96206b81-linux64
    PKG_CONFIG_PATH: /home/runner/work/_temp/d5e613fc-5524-489c-962b-53bf5e889d2e/pypy-c-jit-169873-653c96206b81-linux64/bin/lib/pkgconfig
Python 2.7.18 (653c96206b81, May 13 2024, 22:00:20)
[PyPy 7.3.17-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
sys.version_info(major=2, minor=7, micro=18, releaselevel='final', serial=0)
Traceback (most recent call last):
  File "<module>", line 1, in <module>
AttributeError: 'module' object has no attribute '_git'
pip 20.3.4 from /home/runner/work/_temp/d5e613fc-5524-489c-962b-53bf5e889d2e/pypy-c-jit-169873-653c96206b81-linux64/site-packages/pip (python 2.7)
@SylvainDe
Copy link
Owner Author

SylvainDe commented May 16, 2024

Between

  • Python 2.7.18 (653c96206b81, May 13 2024, 22:00:20) PyPy 7.3.17-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11) corresponding to pypy/pypy@653c962

  • Python 2.7.18 (ef5fded57192, May 15 2024, 22:00:21) PyPy 7.3.17-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11) corresponding to pypy/pypy@ef5fded

the error message went from:

TypeError('tuple index must be an integer, not str',)

to

TypeError('tuple must be an integer, not str',)

IMHO, the former is better than the later

@SylvainDe
Copy link
Owner Author

Corresponding changelog:

  1. pypy/pypy@ff77b43 which could be the culprit
  2. pypy/pypy@ef5fded which looks fairly irrelevant

@SylvainDe
Copy link
Owner Author

Issue is now fixed thanks to pypy/pypy#4954 .

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

No branches or pull requests

1 participant