URL |
Status |
Linked |
Edit |
PR 10639 |
merged |
CuriousLearner,
2018-11-21 20:02
|
|
PR 10639 |
merged |
CuriousLearner,
2018-11-21 20:02
|
|
PR 11476 |
merged |
miss-islington,
2019-01-09 13:39
|
|
PR 11476 |
merged |
miss-islington,
2019-01-09 13:39
|
|
PR 11476 |
merged |
miss-islington,
2019-01-09 13:39
|
|
PR 11477 |
merged |
miss-islington,
2019-01-09 13:39
|
|
PR 11477 |
merged |
miss-islington,
2019-01-09 13:39
|
|
PR 11477 |
merged |
miss-islington,
2019-01-09 13:39
|
|
PR 11482 |
merged |
CuriousLearner,
2019-01-09 18:43
|
|
PR 11482 |
merged |
CuriousLearner,
2019-01-09 18:43
|
|
PR 11496 |
closed |
vstinner,
2019-01-10 07:51
|
|
PR 11496 |
closed |
vstinner,
2019-01-10 07:51
|
|
PR 11496 |
closed |
vstinner,
2019-01-10 07:51
|
|
PR 11498 |
closed |
vstinner,
2019-01-10 07:54
|
|
PR 11498 |
closed |
vstinner,
2019-01-10 07:54
|
|
PR 11498 |
closed |
vstinner,
2019-01-10 07:54
|
|
PR 11499 |
closed |
vstinner,
2019-01-10 07:55
|
|
PR 11499 |
closed |
vstinner,
2019-01-10 07:55
|
|
PR 11499 |
closed |
vstinner,
2019-01-10 07:55
|
|
PR 11501 |
merged |
pablogsal,
2019-01-10 11:21
|
|
PR 11501 |
merged |
pablogsal,
2019-01-10 11:21
|
|
PR 11501 |
merged |
pablogsal,
2019-01-10 11:21
|
|
PR 11505 |
merged |
miss-islington,
2019-01-10 15:37
|
|
PR 11505 |
merged |
miss-islington,
2019-01-10 15:37
|
|
PR 11505 |
merged |
miss-islington,
2019-01-10 15:37
|
|
PR 11509 |
merged |
orsenthil,
2019-01-10 17:35
|
|
PR 11509 |
merged |
orsenthil,
2019-01-10 17:35
|
|
PR 11509 |
merged |
orsenthil,
2019-01-10 17:35
|
|
PR 11512 |
merged |
orsenthil,
2019-01-10 18:05
|
|
PR 11512 |
merged |
orsenthil,
2019-01-10 18:05
|
|
PR 11512 |
merged |
orsenthil,
2019-01-10 18:05
|
|
PR 11512 |
merged |
orsenthil,
2019-01-10 18:05
|
|
msg247552 - (view) |
Author: R. David Murray (r.david.murray) * |
Date: 2015-07-29 01:26 |
I got a doctest failure that when I wrote the output to a file showed two exactly identical lines reported as being different. Turning off the fancy diff, I could see trailing whitespace on one of the lines. It turns out that when a fancy diff is requested, doctest explicitly goes through and strips trailing whitespace from the diff lines returned by difflib. This seems to me to be obviously incorrect. There is no clue in the changelog why this was done...this goes back to a massive refactoring of doctest that was done for python 2.4, and the fancy diff was introduced at that point, complete with this strange behavior.
I tried to write a test for this but couldn't get it working in the time I was willing to devote to this (I've switched to NDIFF format, which shows the whitespace error even when the actual whitespace is stripped). Perhaps testing this via doctest isn't the best idea anyway, since it will be far to easy for the trailing whitespace in the test to get accidentally stripped. I've attached my work as a diff for reference if someone wants to work on this.
|
msg248695 - (view) |
Author: Jairo Trad (jairotrad) * |
Date: 2015-08-17 00:00 |
I have patched this as explained by David. Also the tests are working. Another test broke because a missing trailing space. I fixed that too.
This is my first patch :D
|
msg248701 - (view) |
Author: R. David Murray (r.david.murray) * |
Date: 2015-08-17 01:12 |
Unfortunately I was reminded a few days ago that there is a commit hook that prevents patches containing trailing whitespace from being committed to the repository. So using doctest to test this isn't going to work.
The alternatives are to write a unit test, or to figure out how to write the doctest such there is no trailing whitespace...which would mean capturing the output of doctest.DoctTestRunner instead of letting it go the console, and then comparing it to an explicitly embedded string.
|
msg248726 - (view) |
Author: Jairo Trad (jairotrad) * |
Date: 2015-08-17 14:01 |
I can write a unittest for this, where should I write it? a new test file?
|
msg248727 - (view) |
Author: R. David Murray (r.david.murray) * |
Date: 2015-08-17 14:04 |
I believe you can put it in the test_doctest file, and call it using the appropriate runner from test.support from the test_main function. I haven't tried it though.
|
msg330214 - (view) |
Author: Sanyam Khurana (CuriousLearner) * |
Date: 2018-11-21 20:05 |
> Unfortunately I was reminded a few days ago that there is a commit hook that prevents patches containing trailing whitespace from being committed to the repository.
Is this still the case?
I tried to figure out writing the test case, but I can't wrap my head around showing the trailing whitespace without putting it anywhere in the code.
Also, can you have a look at the PR, please?
|
msg330220 - (view) |
Author: Tim Peters (tim.peters) * |
Date: 2018-11-21 22:16 |
To include trailing whitespace on a line in a doctest, _don't_ use raw strings. Use a regular string, and include add a (one or more) trailing \x20 instead of a space (for example). For example:
r"""
>>> print("a ")
a
"""
where there's a space at the end of the output line is no good. It's visually impossible to tell what's intended, and the commit hook should reject it. But this works fine (a regular string and an escape code):
"""
>>> print("a ")
a\x20
"""
|
msg330240 - (view) |
Author: Sanyam Khurana (CuriousLearner) * |
Date: 2018-11-22 10:04 |
Thanks for your suggestion, Tim.
I've fixed the patch and it is ready for review at https://github.com/python/cpython/pull/10639
|
msg333319 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2019-01-09 13:38 |
New changeset cbb16459934eaf29c7c7d362939cd05550b2f21f by Senthil Kumaran (Sanyam Khurana) in branch 'master':
bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#10639)
https://github.com/python/cpython/commit/cbb16459934eaf29c7c7d362939cd05550b2f21f
|
msg333320 - (view) |
Author: miss-islington (miss-islington) |
Date: 2019-01-09 13:56 |
New changeset 53cf5f084b01cb16630361be5377047c068d2b44 by Miss Islington (bot) in branch '3.7':
bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639)
https://github.com/python/cpython/commit/53cf5f084b01cb16630361be5377047c068d2b44
|
msg333322 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2019-01-09 14:46 |
New changeset 5d9ae8b9df8371dd65514e0d60b561fd37056986 by Senthil Kumaran (Miss Islington (bot)) in branch '3.6':
bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639) (#11477)
https://github.com/python/cpython/commit/5d9ae8b9df8371dd65514e0d60b561fd37056986
|
msg333341 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2019-01-09 19:03 |
New changeset 02e33d9567aa4bd612f9f08053acbfd5e68480d0 by Senthil Kumaran (Sanyam Khurana) in branch '2.7':
[2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#11482)
https://github.com/python/cpython/commit/02e33d9567aa4bd612f9f08053acbfd5e68480d0
|
msg333360 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2019-01-10 01:29 |
test_doctest starts to fail on AMD64 Windows8.1 Refleaks 2.7:
https://buildbot.python.org/all/#/builders/33/builds/471
It may be related to:
New changeset 02e33d9567aa4bd612f9f08053acbfd5e68480d0 by Senthil Kumaran (Sanyam Khurana) in branch '2.7':
[2.7] bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#11482)
https://github.com/python/cpython/commit/02e33d9567aa4bd612f9f08053acbfd5e68480d0
|
msg333361 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2019-01-10 01:31 |
Yeah, I confirm that it's a regression caused by commit 02e33d9567aa4bd612f9f08053acbfd5e68480d0:
"./python -m test test_doctest test_doctest" fails after this commit, but pass before this commit.
|
msg333362 - (view) |
Author: Sanyam Khurana (CuriousLearner) * |
Date: 2019-01-10 06:15 |
Hi Victor,
Senthil reverted the backport commit on 2.7 branch.
Is there a way I can test reference leaks in CPython? Is it using valgrind or some other tool? Can you please point me to that?
I can then see if I can fix this on 2.7
Thanks!
|
msg333363 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2019-01-10 06:33 |
In short, this buildbot runs "./python -m test -R 3:3 test_doctest". But
here the bug is just that running the test twice in a row fails.
|
msg333367 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2019-01-10 07:49 |
Oh. The 3.6, 3.7 and master changes broke the Refleaks buildbots... By the way, why was such bugfix merged into the 3.6 branch which is now in security-only mode?
Please fix this bug ASAP, or I will revert the change.
|
msg333372 - (view) |
Author: Pablo Galindo Salgado (pablogsal) * |
Date: 2019-01-10 11:22 |
I made https://github.com/python/cpython/pull/11501 to fix this problem. After my patch:
❯ ./python.exe -m test test_doctest test_doctest
Run tests sequentially
0:00:00 load avg: 1.82 [1/2] test_doctest
0:00:02 load avg: 1.82 [2/2] test_doctest
== Tests result: SUCCESS ==
All 2 tests OK.
Total duration: 5 sec 286 ms
Tests result: SUCCESS
|
msg333382 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2019-01-10 14:29 |
New changeset c5dc60ea858b8ccf78e8d26db81c307a8f9b2314 by Senthil Kumaran (Pablo Galindo) in branch 'master':
bpo-24746: Fix doctest failures when running the testsuite with -R (#11501)
https://github.com/python/cpython/commit/c5dc60ea858b8ccf78e8d26db81c307a8f9b2314
|
msg333388 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2019-01-10 15:45 |
Hi All,
It was my mistake to merge this in into 3.6, I didn't realize 3.6 was in bugfix mode now. Also I went by the versions (previously) set in this bpo issue.
For the regression caused in refleaks, I think, Pablo's patch will fix it, and I am verifying it here - https://buildbot.python.org/all/#/builders/1/builds/468
This will be backported to 3.7 ( I notice viktor triggered already: https://github.com/python/cpython/pull/11505) and I will cherrpick this to 2.7.
Finally, since the the port to 3.6 was a mistake, I will revert that.
This will make sure that bug is fixed all the supported versions, target branches tests are successful and 3.6 remains unaffected.
|
msg333390 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2019-01-10 15:57 |
> Finally, since the the port to 3.6 was a mistake, I will revert that.
I wrote PR 11499 but I closed it because PR #11501 has been merged, but yeah, maybe a revert is the best option for 3.6.
No problem, the status change of the 3.6 branch is very new, and not everybody got the memo ;-)
https://devguide.python.org/#status-of-python-branches
See this discussion:
https://discuss.python.org/t/remove-needs-backport-to-3-6-label/563
|
msg333392 - (view) |
Author: miss-islington (miss-islington) |
Date: 2019-01-10 16:02 |
New changeset 1cbd17c6987afc48c16caa7ccc7d19b01fbd39f2 by Miss Islington (bot) in branch '3.7':
bpo-24746: Fix doctest failures when running the testsuite with -R (GH-11501)
https://github.com/python/cpython/commit/1cbd17c6987afc48c16caa7ccc7d19b01fbd39f2
|
msg333415 - (view) |
Author: Ned Deily (ned.deily) * |
Date: 2019-01-10 18:56 |
New changeset d09e8cecf214b1de457feae01860f5592f912a8e by Ned Deily (Senthil Kumaran) in branch '3.6':
Revert "bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639) (GH-11477)" (GH-11509)
https://github.com/python/cpython/commit/d09e8cecf214b1de457feae01860f5592f912a8e
|
msg333417 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2019-01-10 20:55 |
New changeset 0167c08163f44f4a033497102244bbb6150f606b by Senthil Kumaran in branch '2.7':
bpo-24746: Fix doctest failures when running the testsuite with -R (#11501) (#11512)
https://github.com/python/cpython/commit/0167c08163f44f4a033497102244bbb6150f606b
|
msg333431 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2019-01-11 01:18 |
All changes related to this issue are done.
Thanks for your contribution and engagement everyone!
|
msg333468 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2019-01-11 13:58 |
All Refleaks buildots are back to green, thanks ;-)
|
|
Date |
User |
Action |
Args |
2022-04-11 14:58:19 | admin | set | github: 68934 |
2019-01-11 13:58:34 | vstinner | set | messages:
+ msg333468 |
2019-01-11 01:18:33 | orsenthil | set | status: open -> closed resolution: fixed messages:
+ msg333431
stage: patch review -> resolved |
2019-01-10 20:55:16 | orsenthil | set | messages:
+ msg333417 |
2019-01-10 18:56:13 | ned.deily | set | nosy:
+ ned.deily messages:
+ msg333415
|
2019-01-10 18:13:16 | orsenthil | set | versions:
+ Python 2.7 |
2019-01-10 18:05:35 | orsenthil | set | pull_requests:
+ pull_request11069 |
2019-01-10 18:05:26 | orsenthil | set | pull_requests:
+ pull_request11070 |
2019-01-10 18:05:16 | orsenthil | set | pull_requests:
+ pull_request11068 |
2019-01-10 18:05:05 | orsenthil | set | pull_requests:
+ pull_request11067 |
2019-01-10 17:36:09 | orsenthil | set | pull_requests:
+ pull_request11060 |
2019-01-10 17:35:55 | orsenthil | set | pull_requests:
+ pull_request11059 |
2019-01-10 17:35:39 | orsenthil | set | pull_requests:
+ pull_request11058 |
2019-01-10 16:02:31 | miss-islington | set | messages:
+ msg333392 |
2019-01-10 15:57:31 | vstinner | set | messages:
+ msg333390 |
2019-01-10 15:45:01 | orsenthil | set | assignee: CuriousLearner -> orsenthil messages:
+ msg333388 |
2019-01-10 15:38:04 | miss-islington | set | pull_requests:
+ pull_request11046 |
2019-01-10 15:37:54 | miss-islington | set | pull_requests:
+ pull_request11045 |
2019-01-10 15:37:40 | miss-islington | set | pull_requests:
+ pull_request11044 |
2019-01-10 14:29:43 | orsenthil | set | messages:
+ msg333382 |
2019-01-10 11:22:14 | pablogsal | set | nosy:
+ pablogsal messages:
+ msg333372
|
2019-01-10 11:22:02 | pablogsal | set | pull_requests:
+ pull_request11032 |
2019-01-10 11:21:50 | pablogsal | set | pull_requests:
+ pull_request11031 |
2019-01-10 11:21:36 | pablogsal | set | pull_requests:
+ pull_request11030 |
2019-01-10 07:56:09 | vstinner | set | versions:
- Python 3.4, Python 3.5, Python 3.6 |
2019-01-10 07:55:36 | vstinner | set | pull_requests:
+ pull_request11028 |
2019-01-10 07:55:23 | vstinner | set | pull_requests:
+ pull_request11027 |
2019-01-10 07:55:11 | vstinner | set | pull_requests:
+ pull_request11026 |
2019-01-10 07:54:52 | vstinner | set | pull_requests:
+ pull_request11025 |
2019-01-10 07:54:38 | vstinner | set | pull_requests:
+ pull_request11024 |
2019-01-10 07:54:23 | vstinner | set | pull_requests:
+ pull_request11023 |
2019-01-10 07:52:18 | vstinner | set | pull_requests:
+ pull_request11022 |
2019-01-10 07:52:03 | vstinner | set | pull_requests:
+ pull_request11021 |
2019-01-10 07:51:49 | vstinner | set | pull_requests:
+ pull_request11020 |
2019-01-10 07:49:21 | vstinner | set | messages:
+ msg333367 |
2019-01-10 06:33:36 | vstinner | set | messages:
+ msg333363 |
2019-01-10 06:15:16 | CuriousLearner | set | messages:
+ msg333362 |
2019-01-10 01:31:37 | vstinner | set | messages:
+ msg333361 |
2019-01-10 01:29:45 | vstinner | set | nosy:
+ vstinner messages:
+ msg333360
|
2019-01-09 19:03:11 | orsenthil | set | messages:
+ msg333341 |
2019-01-09 18:43:56 | CuriousLearner | set | pull_requests:
+ pull_request11000 |
2019-01-09 18:43:47 | CuriousLearner | set | pull_requests:
+ pull_request10999 |
2019-01-09 14:46:32 | orsenthil | set | messages:
+ msg333322 |
2019-01-09 13:56:51 | miss-islington | set | nosy:
+ miss-islington messages:
+ msg333320
|
2019-01-09 13:39:54 | miss-islington | set | pull_requests:
+ pull_request10986 |
2019-01-09 13:39:47 | miss-islington | set | stage: test needed -> patch review pull_requests:
+ pull_request10984 |
2019-01-09 13:39:40 | miss-islington | set | stage: test needed -> test needed pull_requests:
+ pull_request10983 |
2019-01-09 13:39:32 | miss-islington | set | pull_requests:
+ pull_request10985 |
2019-01-09 13:39:20 | miss-islington | set | stage: test needed -> test needed pull_requests:
+ pull_request10982 |
2019-01-09 13:39:11 | miss-islington | set | stage: test needed -> test needed pull_requests:
+ pull_request10981 |
2019-01-09 13:38:46 | orsenthil | set | nosy:
+ orsenthil messages:
+ msg333319
|
2018-11-22 12:47:36 | CuriousLearner | set | assignee: CuriousLearner |
2018-11-22 10:04:06 | CuriousLearner | set | messages:
+ msg330240 |
2018-11-21 22:16:38 | tim.peters | set | nosy:
+ tim.peters messages:
+ msg330220
|
2018-11-21 20:05:30 | CuriousLearner | set | versions:
+ Python 3.7, Python 3.8 nosy:
+ CuriousLearner
messages:
+ msg330214
stage: patch review -> test needed |
2018-11-21 20:02:29 | CuriousLearner | set | stage: test needed -> patch review pull_requests:
+ pull_request9887 |
2018-11-21 20:02:26 | CuriousLearner | set | stage: test needed -> test needed pull_requests:
+ pull_request9886 |
2015-08-17 14:04:46 | r.david.murray | set | messages:
+ msg248727 |
2015-08-17 14:01:23 | jairotrad | set | messages:
+ msg248726 |
2015-08-17 01:12:36 | r.david.murray | set | messages:
+ msg248701 |
2015-08-17 00:00:23 | jairotrad | set | files:
+ issue24746.patch nosy:
+ jairotrad messages:
+ msg248695
|
2015-07-29 01:26:52 | r.david.murray | create | |