| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@DimitrisJim I made a comment on bpo-30335. I think assertNotRegexpMatches has never been introduced. |
Sorry, something went wrong.
|
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 assertNotRegexpMatches was only renamed, it didn't get redefined as: assertNotRegexpMatches = _deprecate(assertNotRegex) 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 versionadded:: 3.1 directive. Judging from bpo10273 I thought it existed in 3.1 (this might need changing, though, I'm not sure how this should be handled) |
Sorry, something went wrong.
|
@DimitrisJim I'm not seeing any change about versionadded; am I overlooking something? |
Sorry, something went wrong.
|
The diff for rst's is really bad on GitHub's review. I changed the versionadded by adding assertNotRegexpMatches too: .. versionadded:: 3.1 - under the name ``assertRegexpMatches``. + under the names ``assertRegexpMatches`` and ``assertNotRegexpMatches``. |
Sorry, something went wrong.
|
So, as far I can see, it has been introduced (and deprecated at the same time), in Python 3.5 :/ |
Sorry, something went wrong.
|
It sounds like it came in under Python 3.5 (or was at least re-added). We should do the most accurate versionadded and state it for 3.5 (even if it was in 3.1, taken out later, and then put back into 3.5 for backwards-compatibility with 2.7). |
Sorry, something went wrong.
|
To make reviewing a bit easier, I reverted all changes except for the new table entry in deprecated aliases. Under assertRegex and assertNotRegex I added an additional versionadded: + .. versionadded:: 3.5 + The name ``assertNotRegexpMatches`` as a deprecated alias + for :meth:`.assertNotRegex`. While, under the table for the deprecated aliases, I also added a deprecated directive: + .. deprecated:: 3.5 + the ``assertNotRegexpMatches`` name in favor of :meth:`.assertNotRegex`. |
Sorry, something went wrong.
| :meth:`.assertAlmostEqual` failUnlessAlmostEqual assertAlmostEquals | ||
| :meth:`.assertNotAlmostEqual` failIfAlmostEqual assertNotAlmostEquals | ||
| :meth:`.assertRegex` assertRegexpMatches | ||
| :meth:`.assertNotRegex` assertNotRegexpMatches |
There was a problem hiding this comment.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
| .. versionadded:: 3.2 | ||
| :meth:`.assertNotRegex`. | ||
| .. versionadded:: 3.5 | ||
| The name ``assertNotRegexpMatches`` as a deprecated alias |
There was a problem hiding this comment.
"as a" -> "is a"
Sorry, something went wrong.
|
Everything looks good now. It simply needs to be merged and backported. |
Sorry, something went wrong.
…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)
| Back | FazBrowse Home | New Git URL |
Adds assertNotRegexpMatches to the table of deprecated aliases and fixes some of the directives that failed to mention it.