[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the bug report and proposed fix Charalampos Stratakis, thanks for the reproducer script Petr Viktorin. Shivank Gautam: > Hey Tal, I am extremely sorry for all delay. actually, due to internship and > my university exams, I am unable to dedicate

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset cecf313d1ef4adc0ee5338dd0ca9be0b98302c87 by Victor Stinner in branch '2.7': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11068) https://github.com/python/cpython/commit/cecf313d1ef4adc0ee5338dd0ca9be0b98302c87

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset c3cc75134d41c6d436c21d3d315dc069b4826432 by Victor Stinner in branch '3.7': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11066) https://github.com/python/cpython/commit/c3cc75134d41c6d436c21d3d315dc069b4826432

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3fd975583b8e43d8dc23c83d699cd10b1fee6f7f by Victor Stinner in branch '3.6': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11067) https://github.com/python/cpython/commit/3fd975583b8e43d8dc23c83d699cd10b1fee6f7f

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10302 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10301 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +10300 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8e0418688906206fe59bd26344320c0fc026849e by Victor Stinner in branch 'master': bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) https://github.com/python/cpython/commit/8e0418688906206fe59bd26344320c0fc026849e --

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
STINNER Victor added the comment: I wrote a fix: PR 11061. -- keywords: -easy ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +10295 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-12-10 Thread STINNER Victor
STINNER Victor added the comment: The bug was introduced in 2003 by: commit 787354c3b99c9a0c5fdbdd33d29f58ef26df379f Author: Martin v. Löwis Date: Sat Jan 25 15:28:29 2003 + Merge with PyXML 1.80: Basic minidom changes to support the new higher-performance builder, as

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-11-23 Thread Petr Viktorin
Petr Viktorin added the comment: Ah, XML is such an overengineered format! Iusually live with the standard HTML entities but it turns out you can define your own! Here's a reproducer which shows how to do that. -- nosy: +petr.viktorin Added file:

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-11-18 Thread Shivank Gautam
Shivank Gautam added the comment: Hey Tal, I am extremely sorry for all delay. actually, due to internship and my university exams, I am unable to dedicate my time to bug(#35052). please consider it and you can tell Charalampos Stratakis in the bug to push his prepared pull request. I hope

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-30 Thread Shivank Gautam
Shivank Gautam added the comment: I just want to update that i was not able to work more in last two days as i was busy in some personal work. now i am on it and will update something soon. Sorry for delay :) -- ___ Python tracker

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-26 Thread Tal Einat
Tal Einat added the comment: Shivank, indeed it seems you're now in the right direction. A bit of clarification: * The test shouldn't test _clone_node() directly, since that is an internal function. Rather, the test code should be as near as possible to what a user of the minidom module

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-26 Thread Shivank Gautam
Shivank Gautam added the comment: I See, I need to find out for what test case `_clone_node()` will show unexpected behaviour, which will verify that it is a bug and we also need a test code to in test_minidom.py just to verify the behaviour. am I going in right direction Tai? --

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-26 Thread Tal Einat
Tal Einat added the comment: Shivank, I recommend taking a look at some of the existing tests for this module, found in Lib/test/test_minidom.py. See how they are built and how various functionality is tested. This should give you a good idea of what a test for this bug would look like.

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-26 Thread Tal Einat
Tal Einat added the comment: Looking at the code in Lib/xml/dom/minidom.py, this exact typo is also found in DocumentType.cloneNode(). That should be tested and fixed too. -- ___ Python tracker

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-26 Thread Tal Einat
Tal Einat added the comment: Shivank, there is currently technically no "error to solve", since we have no test that causes this erroneous behavior and catches it. We've only found what appears to be a bug by looking at the code, but we need to *verify* that it is indeed a bug. Also, this

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Oh Sorry, it was like was more like a question. running test_minidom.py is giving an error for both (1 and 2), i am not sure even if "testRemoveAttributeNode (__main__.MinidomTest)" is related to _clone_node or not. should i first try solve for this error?

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Tal Einat
Tal Einat added the comment: Shivank, your last comment is unclear. Are you asking a question or just reporting some progress? -- ___ Python tracker ___

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: now when I am running test_minidom.py for both 1,2 1: e._call_user_data_handler(operation, n, entity) 2: n._call_user_data_handler(operation, n, notation) I am receiving the same following result. FAIL: testRemoveAttributeNode (__main__.MinidomTest)

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Tal Einat
Tal Einat added the comment: The test code should fail with the current, unfixed code, due to the bug described here. You will need to: 1. figure out which conditions will trigger the wrong behavior 2. set up a scenario where you can detect whether the behavior is correct 3. code this as a

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: >I want to help in *need help in -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Oh, I see, so I believe that's where my learning of CPython is going to start. can anyone help me in completing this? what I understood till now is in minidom.py we need to change line 1924. else it, we need to create a test. I want to help in what should a

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You need also to write a test. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: *1924--> n._call_user_data_handler(operation, n, notation) -- ___ Python tracker ___ ___

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Thanks, Charalampos :) I would be thankful if you or Serhiy can help me a little bit. so do I need to just do the following work? 1924--> n._call_user_data_handler(operation, n, entity) -- ___ Python tracker

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Hello Shivank. I had a PR ready locally which I was about to push, so you posted just at the right time :) Feel free to work on this issue. -- ___ Python tracker

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-25 Thread Shivank Gautam
Shivank Gautam added the comment: Hey, I am starting my journey with the contribution to CPython. and this is i think i can do these changes. if Charalampos is not there to work on it. i would like to try this. -- nosy: +shivank98 ___ Python

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree, this looks like a bug. Do you mind to create a PR Charalampos? -- components: +XML keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch type: -> behavior ___ Python tracker

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-23 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : Analyzing some coverity scan results I stumbled upon this issue: Python-3.6.5/Lib/xml/dom/minidom.py:1914: original: "n._call_user_data_handler(operation, n, notation)" looks like the original copy. Python-3.6.5/Lib/xml/dom/minidom.py:1924: