Skip to content
This repository was archived by the owner on Dec 21, 2025. It is now read-only.

Conversation

@hugovk
Copy link
Contributor

@hugovk hugovk commented Dec 30, 2021

assert_ has been deprecated since Python 3.5 and is removed in Python 3.11. Use assertTrue instead.

https://docs.python.org/3.11/whatsnew/3.11.html#removed
https://bugs.python.org/issue45162

Before

$ python3.11 testlex.py
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
======================================================================
ERROR: test_lex_closure (__main__.LexBuildOptionTests)
----------------------------------------------------------------------
AttributeError: 'LexBuildOptionTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_many_tokens (__main__.LexBuildOptionTests)
----------------------------------------------------------------------
AttributeError: 'LexBuildOptionTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_module (__main__.LexBuildOptionTests)
----------------------------------------------------------------------
AttributeError: 'LexBuildOptionTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_object (__main__.LexBuildOptionTests)
----------------------------------------------------------------------
AttributeError: 'LexBuildOptionTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_doc1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_dup1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_dup2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_dup3 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_empty (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_error1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_error2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_error3 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_error4 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_ignore (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_ignore2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_literal1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_literal2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_re1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_re2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_re3 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_rule1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_rule2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_rule3 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state3 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state4 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state5 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state_noerror (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state_norule (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_token1 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_token2 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_token3 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_token4 (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_token_dup (__main__.LexErrorWarningTests)
----------------------------------------------------------------------
AttributeError: 'LexErrorWarningTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_hedit (__main__.LexRunTests)
----------------------------------------------------------------------
AttributeError: 'LexRunTests' object has no attribute 'assert_'

======================================================================
ERROR: test_lex_state_try (__main__.LexRunTests)
----------------------------------------------------------------------
AttributeError: 'LexRunTests' object has no attribute 'assert_'

----------------------------------------------------------------------
Ran 37 tests in 0.213s

FAILED (errors=37)

After

$ python3.11 testlex.py
.....................................
----------------------------------------------------------------------
Ran 37 tests in 0.152s

OK

@dabeaz dabeaz merged commit 1413aa2 into dabeaz:master Dec 30, 2021
@hugovk hugovk deleted the assert_-to-assertTrue branch December 30, 2021 12:23
@kloczek
Copy link

kloczek commented Jan 1, 2022

Is it possible to make new release?

@dabeaz
Copy link
Owner

dabeaz commented Jan 1, 2022

If by "release", you mean something that's distributed to PyPi and installable via pip or some similar tool, then that is never going to happen. I am no longer distributing PLY as an installable package. This is described in the setup.md file.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants