-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-30335: Add deprecation alias entry for assertNotRegexpMatches #1536
Conversation
@DimitrisJim I made a comment on bpo-30335. I think |
Thanks, Marco! Yes, it looks like it was never introduced, you're not seeing it in 3.1 or 3.2 because it seems like it was forgotten; see how
Then, It was added again at some point in 3.5. When the name was added again in 3.5, the deprecation alias table wasn't updated, this the main reason for this PR. My only concern is with the change I made in the |
@DimitrisJim I'm not seeing any change about |
The diff for
|
So, as far I can see, it has been introduced (and deprecated at the same time), in Python 3.5 :/ |
It sounds like it came in under Python 3.5 (or was at least re-added). We should do the most accurate |
To make reviewing a bit easier, I reverted all changes except for the new table entry in deprecated aliases. Under
While, under the table for the deprecated aliases, I also added a
|
@@ -1446,17 +1449,19 @@ along with their deprecated aliases: | |||
:meth:`.assertAlmostEqual` failUnlessAlmostEqual assertAlmostEquals | |||
:meth:`.assertNotAlmostEqual` failIfAlmostEqual assertNotAlmostEquals | |||
:meth:`.assertRegex` assertRegexpMatches | |||
:meth:`.assertNotRegex` assertNotRegexpMatches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assertNotRegexpMatches
is not available for Python < 3.5, and we are saying that it has been deprecated in Python 3.2, when it was not available. IMHO we should not include this reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I changed that, after Brett's suggestion, to state it was introduced and deprecated at 3.5. It has to have an entry in this table so people who are porting testing code from 2 to 3 can see the new name for it.
Doc/library/unittest.rst
Outdated
@@ -1170,6 +1170,9 @@ Test cases | |||
:meth:`.assertRegex`. | |||
.. versionadded:: 3.2 | |||
:meth:`.assertNotRegex`. | |||
.. versionadded:: 3.5 | |||
The name ``assertNotRegexpMatches`` as a deprecated alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"as a" -> "is a"
Everything looks good now. It simply needs to be merged and backported. |
Thanks for the PR @DimitrisJim 🎉 |
…es (pythonGH-1536) Document that assertNotRegexpMatches is a deprecated alias for assertNotRegex. (cherry picked from commit 74921ed)
…es (pythonGH-1536) Document that assertNotRegexpMatches is a deprecated alias for assertNotRegex. (cherry picked from commit 74921ed)
Adds
assertNotRegexpMatches
to the table of deprecated aliases and fixes some of the directives that failed to mention it.