[issue24236] TestNG results to Junit results conversion

2015-05-18 Thread Tushar

Changes by Tushar :


--
type:  -> enhancement

___
Python tracker 
<http://bugs.python.org/issue24236>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24236] TestNG results to Junit results conversion

2015-05-18 Thread Tushar

New submission from Tushar:

This tool/module will perform the TestNG  type results to Junit results. 
This will be applicable for any TestNG result.xml file.

--
components: Extension Modules
messages: 243557
nosy: tusharm
priority: normal
severity: normal
status: open
title: TestNG results to Junit results conversion
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue24236>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24236] TestNG results to Junit results conversion

2015-05-19 Thread Tushar

Tushar added the comment:

The intention was to facilitate the user who want to port TestNG reports format 
to Junit standard format. I sent a mail to PSF mailing list and I got the 
pointer that this can't be part of standard library but PyPI. So I will upload 
this as a package instead of a part of std library.

--
components: +Devguide -Extension Modules
nosy: +ezio.melotti, willingc

___
Python tracker 
<http://bugs.python.org/issue24236>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24236] TestNG results to Junit results conversion

2015-05-19 Thread Tushar

Changes by Tushar :


--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue24236>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Tushar Sadhwani


New submission from Tushar Sadhwani :

compile_command used to raise error for this until Python 3.9:

```
>>> import code
>>> code.compile_command("abc def '''")
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.9/codeop.py", line 132, in compile_command
return _maybe_compile(_compile, source, filename, symbol)
  File "/usr/lib/python3.9/codeop.py", line 106, in _maybe_compile
raise err1
  File "/usr/lib/python3.9/codeop.py", line 93, in _maybe_compile
code1 = compiler(source + "\n", filename, symbol)
  File "/usr/lib/python3.9/codeop.py", line 111, in _compile
return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT)
  File "", line 1
abc def '''
^
SyntaxError: invalid syntax
```

But in Python 3.10.0 it no longer is an error:

```
>>> import code
>>> code.compile_command("abc def '''")
>>>
```

--
components: Parser
messages: 411608
nosy: lys.nikolaou, pablogsal, tusharsadhwani
priority: normal
severity: normal
status: open
title: compile_command not raising syntax error when command ends with triple 
quotes
type: behavior
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue46521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

wontfix would really suck, because that would mean every REPL written with the 
`code` module will be broken, even IPython:

```
$ ipython
Python 3.10.0 (default, Oct 11 2021, 05:33:59) [GCC 11.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: abc def '''
   ...: 
   ...: 
```

--

___
Python tracker 
<https://bugs.python.org/issue46521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

You're right. There was another bug in my code that was causing the SyntaxError 
to not show up at all, sorry about that.

Can you help me figure out why this bug doesn't show up in the normal Python 
REPL?

```
>>> abc def '''
  File "", line 1
abc def '''
^^^
SyntaxError: invalid syntax
```

I could then use whatever logic the REPL itself uses instead of relying on 
`code.compile_command()`, because my requirement is to detect if a code can be 
incomplete Python code, without ever compiling it.

--

___
Python tracker 
<https://bugs.python.org/issue46521>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44973] @classmethod can be stacked on @property, but @staticmethod cannot

2021-08-21 Thread Tushar Sadhwani


New submission from Tushar Sadhwani :

Starting with Python3.9, `@classmethod` can be stacked on top of `@property`, 
but it seems that `@staticmethod` cannot.


>>> class C:
... @classmethod
... @property
... def cm(cls):
... return cls.__name__

... @staticmethod
... @property
... def magic_number():
... return 42
... 
>>> C.cm
'C'
>>> C.magic_number

>>> 


This feels like inconsistent behaviour, plus, having staticmethod properties 
can be useful for creating read-only class attributes, for eg:


class C:
@staticmethod
@property
def FINE_STRUCTURE_CONSTANT():
return 1 / 137


This would make it hard to accidentally modify the constant inside the class.

--
messages: 400051
nosy: tusharsadhwani
priority: normal
severity: normal
status: open
title: @classmethod can be stacked on @property, but @staticmethod cannot
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44973>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41758] turtledemo.colormixer crashes with a stack overflow

2020-09-11 Thread Tushar Sadhwani


New submission from Tushar Sadhwani :

turtledemo.colormixer crashes after (what i'm assuming) 1000 changes to the 
state of a color bar.


# Error:

PS C:\Users\tusha> python -m turtledemo.colormixer
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x0f74 (most recent call first):
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 2761 in coords
  File "", line 1 in coords
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 755 in _pointlist
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 3158 in _goto
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 1826 in sety
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py",
 line 29 in shift
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 655 in eventfun
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1883 in __call__
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1305 in update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 562 in _update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 2662 in _update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 3195 in _goto
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 1826 in sety
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py",
 line 29 in shift
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 655 in eventfun
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1883 in __call__
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1305 in update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 562 in _update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 583 in _bgcolor
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 1240 in bgcolor
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py",
 line 35 in setbgcolor
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py",
 line 32 in shift
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 655 in eventfun
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1883 in __call__
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1305 in update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 562 in _update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 2662 in _update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 3195 in _goto
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 1826 in sety
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py",
 line 29 in shift
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 655 in eventfun
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1883 in __call__
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1305 in update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 562 in _update
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 583 in _bgcolor
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 1240 in bgcolor
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py",
 line 35 in setbgcolor
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py",
 line 32 in shift
  File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", 
line 655 in eventfun
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1883 in __call__
  File 
"C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", 
line 1305 in update
  File "C:\Users\tusha\.pyenv\pyenv-win\vers

[issue41758] turtledemo.colormixer crashes with a stack overflow

2020-09-12 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

pyenv is a python version management tool. But this issue has nothing to do 
with it.
I ran the same thing on python 3.8.5 (both 32 and 64bit) and the same error 
occured

C:\Users\tusha\AppData\Local\Programs\Python\Python38-32>python.exe
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z


C:\Users\tusha\AppData\Local\Programs\Python\Python38-32>python.exe -m 
turtledemo.colormixer
EVENTLOOP
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x2534 (most recent call first):
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
251 in __new__
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
1826 in sety
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtledemo\colormixer.py",
 line 29 in shift
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
655 in eventfun
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py",
 line 1883 in __call__
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py",
 line 1305 in update
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
562 in _update
  # ...


PS C:\Users\tusha> py
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
PS C:\Users\tusha> py -m turtledemo.colormixer
EVENTLOOP
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x23f4 (most recent call first):
  File "C:\Python385-64\lib\turtle.py", line 251 in __new__
  File "C:\Python385-64\lib\turtle.py", line 1826 in sety
  File "C:\Python385-64\lib\turtledemo\colormixer.py", line 29 in shift
  File "C:\Python385-64\lib\turtle.py", line 655 in eventfun
  File "C:\Python385-64\lib\tkinter\__init__.py", line 1883 in __call__
  File "C:\Python385-64\lib\tkinter\__init__.py", line 1305 in update
  File "C:\Python385-64\lib\turtle.py", line 562 in _update
  # ...


I'm running Windows 10 2004 build 19041.508

--

___
Python tracker 
<https://bugs.python.org/issue41758>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41758] turtledemo.colormixer crashes with a stack overflow

2020-09-12 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

Also, forgot to add

The app crashes pretty quickly for me, to reproduce the error all I have to do 
is run the colormixer demo and move any of the bars up and down a couple of 
times.

--

___
Python tracker 
<https://bugs.python.org/issue41758>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41758] turtledemo.colormixer crashes with a stack overflow

2020-09-13 Thread Tushar Sadhwani

Tushar Sadhwani  added the comment:

Ran the following tests on Python 3.8.5 32bit

colormixer crashed with the same error,
python -m  turtle did not crash

Here's the output of the test suite:

PS C:\Users\tusha\AppData\Local\Programs\Python\Python38-32> .\python.exe -m 
test -ugui -j0
== CPython 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 
bit (Intel)]
== Windows-10-10.0.19041-SP0 little-endian
== cwd: C:\Users\tusha\AppData\Local\Temp\test_python_5700
== CPU count: 4
== encodings: locale=cp1252, FS=utf-8
0:00:00 Run tests in parallel using 6 child processes
0:00:00 [  1/423] test_types passed
0:00:01 [  2/423] test_opcodes passed
0:00:01 [  3/423] test_grammar passed
0:00:01 [  4/423] test_dict passed
0:00:01 [  5/423] test_builtin passed
0:00:02 [  6/423] test_exceptions passed
0:00:02 [  7/423] test___future__ passed
0:00:03 [  8/423/1] test__locale failed
test test__locale failed -- multiple errors occurred; run in verbose mode for 
details
0:00:03 [  9/423/1] test__opcode passed
0:00:03 [ 10/423/1] test___all__ passed
0:00:04 [ 11/423/1] test__osx_support passed
0:00:04 [ 12/423/1] test_abc passed
0:00:04 [ 13/423/1] test_abstract_numbers passed
0:00:04 [ 14/423/1] test_doctest2 passed
0:00:04 [ 15/423/1] test_doctest passed
0:00:05 [ 16/423/1] test_aifc passed
0:00:06 [ 17/423/1] test_array passed
0:00:06 [ 18/423/1] test_asdl_parser skipped
test_asdl_parser skipped -- test irrelevant for an installed Python
0:00:07 [ 19/423/1] test_argparse passed
0:00:07 [ 20/423/1] test_unittest passed
0:00:08 load avg: 27.20 [ 21/423/1] test_asyncgen passed
0:00:08 load avg: 27.11 [ 22/423/1] test_ast passed
0:00:09 load avg: 27.11 [ 23/423/1] test_atexit passed
0:00:09 load avg: 27.11 [ 24/423/1] test_audioop passed
0:00:09 load avg: 26.88 [ 25/423/1] test_asyncore passed
0:00:09 load avg: 26.88 [ 26/423/1] test_augassign passed
0:00:10 load avg: 26.88 [ 27/423/1] test_support passed
0:00:10 load avg: 26.88 [ 28/423/1] test__xxsubinterpreters passed
0:00:10 load avg: 26.88 [ 29/423/1] test_baseexception passed
0:00:10 load avg: 26.90 [ 30/423/1] test_bigaddrspace passed
0:00:10 load avg: 26.90 [ 31/423/1] test_base64 passed
0:00:10 load avg: 26.90 [ 32/423/1] test_bdb passed
0:00:11 load avg: 26.90 [ 33/423/1] test_bigmem passed
0:00:11 load avg: 26.90 [ 34/423/1] test_binhex passed
0:00:11 load avg: 26.90 [ 35/423/1] test_binascii passed
0:00:11 load avg: 26.90 [ 36/423/1] test_binop passed
0:00:11 load avg: 27.00 [ 37/423/1] test_bool passed
0:00:11 load avg: 27.00 [ 38/423/1] test_bisect passed
0:00:11 load avg: 27.00 [ 39/423/2] test_buffer failed
test test_buffer crashed -- Traceback (most recent call last):
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py",
 line 270, in _runtest_inner
refleak = _runtest_inner2(ns, test_name)
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py",
 line 221, in _runtest_inner2
the_module = importlib.import_module(abstest)
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py",
 line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1014, in _gcd_import
  File "", line 991, in _find_and_load
  File "", line 975, in _find_and_load_unlocked
  File "", line 671, in _load_unlocked
  File "", line 783, in exec_module
  File "", line 219, in _call_with_frames_removed
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_buffer.py",
 line 44, in 
from numpy import ndarray as numpy_array
  File 
"C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py",
 line 138, in 
from . import _distributor_init
  File 
"C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py",
 line 26, in 
WinDLL(os.path.abspath(filename))
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py",
 line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
0:00:13 load avg: 27.05 [ 40/423/2] test_audit passed
0:00:13 load avg: 27.05 [ 41/423/2] test_bytes passed
0:00:14 load avg: 27.21 [ 42/423/2] test_c_locale_coercion passed
0:00:14 load avg: 27.21 [ 43/423/2] test_call passed
0:00:19 load avg: 27.26 [ 44/423/2] test_calendar passed
0:00:19 load avg: 27.26 [ 45/423/2] test_bz2 passed
0:00:19 load avg: 27.26 [ 46/423/2] test_cgi passed
0:00:19 load avg: 26.88 [ 47/423/2] test_charmapcodec passed
0:00:19 load avg: 26.88 [ 48/423/2] test_cgitb passed
0:00:20 load avg: 26.88 [ 49/423/2] test_class passed
0:00:20 load avg: 26.88 [ 50/423/2] test_clinic skipped
test_clinic skipped -- 
'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\Tools\\clinic&#