[issue33380] Update module attribute on namedtuple methods for introspection.

2018-04-29 Thread pmpp

pmpp  added the comment:

I see that as a good fix, obviously Point definition belongs to __main__ in the 
sample, like would any other subclass defined there eg if "some" class is 
defined in awe.py module :

>>> import awe
>>> class my(awe.some):pass
... 
>>> my.__module__
'__main__'

--
nosy: +pmpp

___
Python tracker 

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



[issue33380] Update module attribute on namedtuple methods for introspection.

2018-04-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Am not sure I can see any value in pushing the __module__ attribute down into 
the methods and think it is reasonable for them to report their origin as being 
in the collections module.

--

___
Python tracker 

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



[issue33385] setdefault() with a single argument doesn't work for dbm.gdbm and dmb.ndbm objects

2018-04-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Option 2 seems perfectly reasonable here as a way of preventing bugs (working, 
correct code wouldn't be using the existing default of None).

Option 1 is problematic because of the variance from Mutable Mapping, because 
breaking symmetry with get(), and because the change in behavior is implicit.

--
nosy: +rhettinger

___
Python tracker 

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



[issue33351] Support compiling with clang-cl on Windows

2018-04-29 Thread Ethan Smith

Ethan Smith  added the comment:

> Feel free to start creating patches so we can get an idea of what the changes 
> would look like. Hopefully it's not that dramatic.


Okay, will do. I have a few smaller patches to start with. Clang-cl tries to be 
as compatible as possible with cl, so I don't expect drastic changes. I'm 
currently trying to figure out an include issue with timeval, but so far the 
patches have been few and small.


> Be very careful making performance claims without benchmarks to back it up, 
> and ideally against multiple sets of hardware (MSVC is designed and tested to 
> perform well across a range of processors, often by engineers who work for 
> the manufacturer - intuition would suggest that an open source compiler is 
> probably not 30% better all the time). Don't focus on the number right now, 
> but do try to collect the justification before you expect or encourage others 
> to do the work.


I did not mean to say it would make Python 30% faster in all cases, I meant "up 
to 30% faster". This number is based on benchmarks of CPython with and without 
computed goto, and my own experiments of benchmarks comparing CPython in the 
WSL, and native Windows CPython releases on x86_64. But your point is well 
taken, and I will of course benchmark Python compiled with clang-cl once I have 
a complete working version.


> Since the ABI is compatible, there should be no problem enabling extensions 
> to be built using this compiler (assuming someone is willing to become a 
> distutils maintainer, as there are currently none). You don't need to ask 
> here to create a third-party library that enables this.


When you say "someone to become a distutils maintainer" you mean for clang-cl 
specifically? If that is the case, I'm happy to add support and commit to 
continuing to work on clang-cl support in distutils, as I expect to use it a 
fair amount.


> I haven't heard any complaints about access to the compilers being an issue 
> recently, so the only reasons to switch the interpreter itself would be 
> source compatibility (essentially, the clang clib is better than our custom 
> Win32 code) or performance. But we need a positive reason to switch support, 
> not just the ability.


I agree there should be a good reason to move away from the MSVC compiler. The 
decision to move can be re-evaluated when there is a good argument to warrant 
it.

--

___
Python tracker 

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



[issue33390] matmul @ operator precedence

2018-04-29 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

Precedence issues when dealing with units is unavoidable, I think. The units 
program on Linux/Unix has similar issues, and they write their own parser and 
choose their own precedence.

https://www.gnu.org/software/units/manual/html_node/Operators.html

As Eric says, we can't change the precedence of the @ operator easily, if at 
all. It would likely require at least one full release (3.8) with a warning, or 
a future import, and frankly if the numpy community is against it you'll have 
zero chance of it happening. (On the other hand, if they're in favour of it, 
you'll have a good chance.)

If you still want to pursue this idea further, please take the idea to the 
numpy and/or Python-Ideas mailing lists for further discussion:

https://www.scipy.org/scipylib/mailing-lists.html

https://mail.python.org/mailman/listinfo/python-ideas

but for now I'm going to set the issue to pending.

--
nosy: +steven.daprano
resolution:  -> postponed
status: open -> pending

___
Python tracker 

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-04-29 Thread bbayles

Change by bbayles :


--
pull_requests: +6343

___
Python tracker 

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



[issue33390] matmul @ operator precedence

2018-04-29 Thread Eric V. Smith

Eric V. Smith  added the comment:

Operator precedence cannot change without breaking existing code.

--
nosy: +eric.smith
type: behavior -> enhancement
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue32533] SSLSocket read/write thread-unsafety

2018-04-29 Thread Steve Dower

Steve Dower  added the comment:

We don't have a roadmap, just volunteers. When someone is sufficiently 
motivated to work on it, it will happen. (You're welcome to try and motivate 
people with reason, pleading, money and/or abuse, though I don't recommend the 
last one :) Money doesn't work either on many of us who are really just 
time-poor.)

--

___
Python tracker 

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



[issue33351] Support compiling with clang-cl on Windows

2018-04-29 Thread Steve Dower

Steve Dower  added the comment:

Feel free to start creating patches so we can get an idea of what the changes 
would look like. Hopefully it's not that dramatic.

Be very careful making performance claims without benchmarks to back it up, and 
ideally against multiple sets of hardware (MSVC is designed and tested to 
perform well across a range of processors, often by engineers who work for the 
manufacturer - intuition would suggest that an open source compiler is probably 
not 30% better all the time). Don't focus on the number right now, but do try 
to collect the justification before you expect or encourage others to do the 
work.

Since the ABI is compatible, there should be no problem enabling extensions to 
be built using this compiler (assuming someone is willing to become a distutils 
maintainer, as there are currently none). You don't need to ask here to create 
a third-party library that enables this.

I haven't heard any complaints about access to the compilers being an issue 
recently, so the only reasons to switch the interpreter itself would be source 
compatibility (essentially, the clang clib is better than our custom Win32 
code) or performance. But we need a positive reason to switch support, not just 
the ability.

--

___
Python tracker 

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



[issue33378] Add Korean to the language switcher

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6342

___
Python tracker 

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



[issue33197] Confusing error message when constructing invalid inspect.Parameters

2018-04-29 Thread Antony Lee

Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue21474] Idle: updata fixwordbreaks() for unicode identifiers

2018-04-29 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +6341
stage: needs patch -> patch review

___
Python tracker 

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



[issue32533] SSLSocket read/write thread-unsafety

2018-04-29 Thread Alfred Krohmer

Alfred Krohmer  added the comment:

Is there anything on the roadmap to fix this? This is a pretty severe bug given 
that this breaks multi-threaded OpenSSL while the documentation says it's 
thread-safe.

--
nosy: +devkid

___
Python tracker 

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



[issue33390] matmul @ operator precedence

2018-04-29 Thread fabrice salvaire

New submission from fabrice salvaire :

I use the new matmul @ operator to implement units, for example 1@u_s for 1 
second ( see alpha state implementation at 
https://github.com/FabriceSalvaire/PySpice/tree/master/PySpice/Unit ).

It looks cool, but unfortunately 10@u_s / 2@u_s is actually interpreted as 
(10@u_s / 2)@u_s instead of (10@u_s) / (2@u_s) due to operator precedence + <<< 
- <<< * <<< @ <<< / <<< // <<< % 
https://docs.python.org/3/reference/expressions.html#operator-precedence

Since Python is widely used for scientific applications, would it be possible 
to investigate this topic ?

--
components: Interpreter Core
messages: 315918
nosy: FabriceSalvaire
priority: normal
severity: normal
status: open
title: matmul @ operator precedence
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue33389] argparse redundant help string

2018-04-29 Thread Stefan Seefeld

New submission from Stefan Seefeld :

I'm using Python's `argparse` module to define optional arguments.
I'm calling the `argparse.add_argument` method to add both short and long 
arguments, but I notice that the generated help message lists some information 
twice. For example:
```
argparse.add_argument('-s', '--service',...)
```
will generate

```
-s SERVICE, --service SERVICE
```
and when I add a `choices` argument, even the choices list is repeated. I think 
it would be more useful to suppress the repetition to produce output such as
```
-s|--service SERVICE ...
```
instead with both the meta var as well as choices etc. printed only once.

--
components: Library (Lib)
messages: 315917
nosy: stefan
priority: normal
severity: normal
status: open
title: argparse redundant help string
type: enhancement

___
Python tracker 

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



[issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux

2018-04-29 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 0b91f8a668201fc58fa732b8acc496caedfdbae0 by Benjamin Peterson 
(Florian Weimer) in branch '2.7':
Indicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374)
https://github.com/python/cpython/commit/0b91f8a668201fc58fa732b8acc496caedfdbae0


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue33330] Better error handling in PyImport_Cleanup()

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset c1a6832f50b36ffec299e6e6038535904e2b158d by Serhiy Storchaka in 
branch 'master':
bpo-0: Write exceptions occurred in PyImport_Cleanup() to stderr. (GH-6606)
https://github.com/python/cpython/commit/c1a6832f50b36ffec299e6e6038535904e2b158d


--

___
Python tracker 

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



[issue32608] Incompatibilities with the socketserver and multiprocessing packages

2018-04-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hi Michael, sorry, I haven't had a chance yet. I'll try to make some time soon, 
I hope you don't mind the delay :-S

--

___
Python tracker 

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-04-29 Thread miss-islington

miss-islington  added the comment:


New changeset 9a039d5679a5838c876ff607ce2f5d8dc0fb307a by Miss Islington (bot) 
in branch '3.6':
bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223)
https://github.com/python/cpython/commit/9a039d5679a5838c876ff607ce2f5d8dc0fb307a


--

___
Python tracker 

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



[issue33256] module is not displayed by cgitb.html

2018-04-29 Thread miss-islington

miss-islington  added the comment:


New changeset 736f17fb8d8b105567d56317f9c0b4c577ce4105 by Miss Islington (bot) 
in branch '3.7':
bpo-33256: Replace angle brackets around python object repr to display it in 
html (GH-6442)
https://github.com/python/cpython/commit/736f17fb8d8b105567d56317f9c0b4c577ce4105


--
nosy: +miss-islington

___
Python tracker 

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



[issue33256] module is not displayed by cgitb.html

2018-04-29 Thread miss-islington

miss-islington  added the comment:


New changeset ef91552cfb4b45f75b415dd43fb6a21795c8dbee by Miss Islington (bot) 
in branch '3.6':
bpo-33256: Replace angle brackets around python object repr to display it in 
html (GH-6442)
https://github.com/python/cpython/commit/ef91552cfb4b45f75b415dd43fb6a21795c8dbee


--

___
Python tracker 

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-04-29 Thread miss-islington

miss-islington  added the comment:


New changeset cebce2e8d15db101435194f79be31b5d80455bb0 by Miss Islington (bot) 
in branch '3.7':
bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223)
https://github.com/python/cpython/commit/cebce2e8d15db101435194f79be31b5d80455bb0


--
nosy: +miss-islington

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 55edd0c185ad2d895b5d73e47d67049bc156b654 by Serhiy Storchaka 
(Siddhesh Poyarekar) in branch 'master':
bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. 
(GH-6030)
https://github.com/python/cpython/commit/55edd0c185ad2d895b5d73e47d67049bc156b654


--

___
Python tracker 

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



[issue33388] Support PEP 566 metadata in dist.py

2018-04-29 Thread Robert Bricheno

Change by Robert Bricheno :


--
keywords: +patch
pull_requests: +6339
stage:  -> patch review

___
Python tracker 

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



[issue33386] IDLE: Double clicking only recognizes ascii chars as identifiers

2018-04-29 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

#21474 has the solution, which I plan to apply today.

--
keywords: +pep3121
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Idle: updata fixwordbreaks() for unicode identifiers
title: Double clicking to select an identifier in IDLE does not work with some 
unicode characters -> IDLE: Double clicking only recognizes ascii chars as 
identifiers
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue33388] Support PEP 566 metadata in dist.py

2018-04-29 Thread Robert Bricheno

New submission from Robert Bricheno :

PEP 566 added the metadata fields 'Description-Content-Type' and 
'Provides-Extra':

https://www.python.org/dev/peps/pep-0566/
http://setuptools.readthedocs.io/en/latest/setuptools.html#metadata

Currently dist.py in CPython distutils will warn if they are set, e.g.:

`dist.py:261: UserWarning: Unknown distribution option: 
'long_description_content_type'`

The warnings are emitted when using setuptools to build a wheel (say) if either 
of the fields are defined. They seem spurious (I can still build wheels even if 
I see this warning...). But they looked a bit scary to me as a new user.

There are a few possible ways to fix this. Long-term they should be fully 
supported by distutils I suppose. In the short term, there are a few different 
ways to make these warnings go away.

My preferred option would be to simply declare fields for these variables in 
dist.py (as per setuptools). By declaring these variables, the warnings are no 
longer displayed. long_description_content_type, at least, is being used in the 
wild since:

pypa/sampleproject@5be0970

--
components: Distutils
messages: 315907
nosy: dstufft, eric.araujo, rbricheno
priority: normal
severity: normal
status: open
title: Support PEP 566 metadata in dist.py
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue33318] Move folding tuples of constants into compiler.c from peephole.c

2018-04-29 Thread Mark Shannon

Change by Mark Shannon :


--
pull_requests:  -6338

___
Python tracker 

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



[issue33318] Move folding tuples of constants into compiler.c from peephole.c

2018-04-29 Thread Mark Shannon

Change by Mark Shannon :


--
pull_requests: +6338

___
Python tracker 

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



[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2018-04-29 Thread Mark Shannon

Change by Mark Shannon :


--
keywords: +patch
pull_requests: +6337
stage:  -> patch review

___
Python tracker 

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



[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2018-04-29 Thread Mark Shannon

Change by Mark Shannon :


--
Removed message: https://bugs.python.org/msg315906

___
Python tracker 

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



[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2018-04-29 Thread Mark Shannon

New submission from Mark Shannon :

The six complex bytecodes currently used for implementing 'with' and 'try' 
statements can be replaced with just two simpler bytecodes.
The six bytecodes are WITH_CLEANUP_START, WITH_CLEANUP_FINISH,
BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY.
They can be replaced with RERAISE and WITH_EXCEPT_FINISH.

See https://bugs.python.org/issue32949 for more details of the new bytecodes 
and how they are used in the 'with' statement.

The try-finally statement can be implemented broadly as 
   SETUP_FINALLY except
   try-body
   POP_BLOCK
   finally-body
   JUMP exit
except:
   finally-body
exit:

--
components: Interpreter Core
messages: 315905
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Simplify bytecodes for try-finally, try-except and with blocks.
versions: Python 3.8

___
Python tracker 

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



[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2018-04-29 Thread Mark Shannon

Mark Shannon  added the comment:

The six complex bytecodes currently used for implementing 'with' and 'try' 
statements can be replaced with just two simpler bytecodes.
The six bytecodes are WITH_CLEANUP_START, WITH_CLEANUP_FINISH,
BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY.
They can be replaced with RERAISE and WITH_EXCEPT_FINISH.

See https://bugs.python.org/issue32949 for more details of the new bytecodes 
and how they are used in the 'with' statement.

The try-finally statement can be implemented broadly as 
   SETUP_FINALLY except
   try-body
   POP_BLOCK
   finally-body
   JUMP exit
except:
   finally-body
exit:

--

___
Python tracker 

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6336

___
Python tracker 

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6335

___
Python tracker 

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 9f3535c9cde8813ce631d6ebe4d790682f594828 by Serhiy Storchaka (Bo 
Bayles) in branch 'master':
bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223)
https://github.com/python/cpython/commit/9f3535c9cde8813ce631d6ebe4d790682f594828


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33328] pdb error when stepping through generator

2018-04-29 Thread Rick Teachey

Rick Teachey  added the comment:

Closed as duplicate of issue 13044.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue33256] module is not displayed by cgitb.html

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6334

___
Python tracker 

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



[issue33256] module is not displayed by cgitb.html

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6333

___
Python tracker 

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



[issue33256] module is not displayed by cgitb.html

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 7d68bfa82654ba01d860b8a772ff63bf0bd183ee by Serhiy Storchaka 
(sblondon) in branch 'master':
bpo-33256: Replace angle brackets around python object repr to display it in 
html (GH-6442)
https://github.com/python/cpython/commit/7d68bfa82654ba01d860b8a772ff63bf0bd183ee


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33386] Double clicking to select an identifier in IDLE does not work with some unicode characters

2018-04-29 Thread Dan Snider

New submission from Dan Snider :

https://i.imgur.com/61sHBRR.png

At least with "μ", it behaves as if it's one of the ascii characters for which 
id.isidentifier() returns False, as in https://i.imgur.com/XbEW0ZC.png.

--
assignee: terry.reedy
components: IDLE
messages: 315901
nosy: bup, terry.reedy
priority: normal
severity: normal
status: open
title: Double clicking to select an identifier in IDLE does not work with some 
unicode characters
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue33197] Confusing error message when constructing invalid inspect.Parameters

2018-04-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +yselivanov
type:  -> behavior
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue33197] Confusing error message when constructing invalid inspect.Parameters

2018-04-29 Thread Dong-hee Na

Change by Dong-hee Na :


--
keywords: +patch
pull_requests: +6332
stage:  -> patch review

___
Python tracker 

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



[issue33197] Confusing error message when constructing invalid inspect.Parameters

2018-04-29 Thread Dong-hee Na

Dong-hee Na  added the comment:

@Nitish

I will take a look this issue.
I agree with to use "{!s}" in the format string

--
nosy: +corona10

___
Python tracker 

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



[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-04-29 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

> Look like the only way is to rearrange Tcl stack frames so that the right one 
> is on top.

Scratch that. Tkinter allows to execute entire scripts where the order of the 
frames is important.

--

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33385] setdefault() with a single argument doesn't work for dbm.gdbm and dmb.ndbm objects

2018-04-29 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

setdefault() is not implemented directly in dbm.gdbm and dmb.ndbm database 
classes. It is inherited from MutableMapping:

def setdefault(self, key, default=None):
try:
return self[key]
except KeyError:
self[key] = default
return default

But since assigning is supported only for bytes and str, setdefault(key) fails 
if the key was not set before. It works only if the key was set or with the 
second argument. d.setdefault(key) is equivalent to d[key] except that it 
raises a weird TypeError instead of KeyError.

There are two ways of solving this problem:

1. Reimplement setdefault() for dbm.gdbm and dmb.ndbm database classes with 
default=b'' by default.

2. Make the second argument mandatory.

In both cases this violates the MutableMapping interface.

--
components: Library (Lib)
messages: 315898
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: setdefault() with a single argument doesn't work for dbm.gdbm and 
dmb.ndbm objects
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread miss-islington

miss-islington  added the comment:


New changeset a26a297b4ba1b8fe6c97c25af71216935960b343 by Miss Islington (bot) 
in branch '3.6':
bpo-31026: Fix test_dbm if dbm.ndbm is build with Berkeley DB. (GH-6632)
https://github.com/python/cpython/commit/a26a297b4ba1b8fe6c97c25af71216935960b343


--

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread miss-islington

miss-islington  added the comment:


New changeset e57d3e3a13d1d4c6a057e47db8361695194bb5ab by Miss Islington (bot) 
in branch '3.7':
bpo-31026: Fix test_dbm if dbm.ndbm is build with Berkeley DB. (GH-6632)
https://github.com/python/cpython/commit/e57d3e3a13d1d4c6a057e47db8361695194bb5ab


--
nosy: +miss-islington

___
Python tracker 

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



[issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8'

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

You could decode only non-ascii strings.

But I'm not sure that it is worth to change something in 2.7. This could be 
treated aa a new feature. Left this on to Benjamin, the release manager of 2.7.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue13044] pdb throws AttributeError at end of debugging session

2018-04-29 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

I can reproduce this bug with python 3.6.5 using akl's debug.py. The exception 
is now on 3.6.5:

(Pdb) next
--Call--
Exception ignored in: 
Traceback (most recent call last):
  File "/usr/lib/python3.6/types.py", line 27, in _ag
  File "/usr/lib/python3.6/bdb.py", line 53, in trace_dispatch
  File "/usr/lib/python3.6/bdb.py", line 85, in dispatch_call
  File "/usr/lib/python3.6/pdb.py", line 251, in user_call
  File "/usr/lib/python3.6/pdb.py", line 351, in interaction
  File "/usr/lib/python3.6/pdb.py", line 1453, in print_stack_entry
  File "/usr/lib/python3.6/bdb.py", line 394, in format_stack_entry
TypeError: 'NoneType' object is not callable

Issue 33328 is a duplicate of this issue.

--

___
Python tracker 

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



[issue33328] pdb error when stepping through generator

2018-04-29 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

This is a duplicate of issue 13044.

> Why the code of the never used asynchronous generator is executed at all?

The destructor of the asynchronous generator is called during python 
finalization while the trace is still active. Here is the backtrace where 
python is stopped just upon entering the debugger and before the exception is 
raised by bdb:

#0  call_trace_protected (func=0x556c0a5b , 
obj=, tstate=tstate@entry=0x55af5eb0, 
frame=frame@entry=Frame 0x76e63218, for file 
/home/xavier/src/python/master/Lib/types.py, line 27, in _ag (), 
what=what@entry=0, arg=None) at Python/ceval.c:4228
#1  0x556757f9 in _PyEval_EvalFrameDefault (
f=Frame 0x76e63218, for file 
/home/xavier/src/python/master/Lib/types.py, line 27, in _ag (), throwflag=1) 
at Python/ceval.c:843
#2  0x5567445d in PyEval_EvalFrameEx (
f=f@entry=Frame 0x76e63218, for file 
/home/xavier/src/python/master/Lib/types.py, line 27, in _ag (), 
throwflag=throwflag@entry=1) at Python/ceval.c:536
#3  0x5575c0d2 in gen_send_ex (gen=gen@entry=0x76e27d48, 
arg=, 
exc=exc@entry=1, closing=closing@entry=1) at Objects/genobject.c:221
#4  0x5575c66b in gen_close (gen=gen@entry=0x76e27d48, 
args=args@entry=0x0)
at Objects/genobject.c:371
#5  0x5575c7f1 in _PyGen_Finalize (self=)
at Objects/genobject.c:84
#6  0x555f7c7d in PyObject_CallFinalizer (
self=self@entry=) at 
Objects/object.c:286
#7  0x555f89c0 in PyObject_CallFinalizerFromDealloc (
self=self@entry=) at 
Objects/object.c:303
#8  0x5575ba27 in gen_dealloc (gen=gen@entry=0x76e27d48) at 
Objects/genobject.c:127
#9  0x555f8a7e in _Py_Dealloc (op=)
at Objects/object.c:1933
#10 0x555ea25b in insertdict (mp=mp@entry=0x76e53d00, 
key=key@entry='_ag', 
hash=-1842969574970988536, value=value@entry=None) at 
Objects/dictobject.c:1067
#11 0x555eb8a0 in PyDict_SetItem (
op=op@entry=Python Exception  Attempt to extract a 
component of a value that is not a struct/class/union.: 
, key='_ag', value=None) at Objects/dictobject.c:1454
#12 0x555f764f in _PyModule_ClearDict (
d=Python Exception  Attempt to extract a component of a 
value that is not a struct/class/union.: 
) at Objects/moduleobject.c:606
#13 0x555f793f in _PyModule_Clear (m=m@entry=)
at Objects/moduleobject.c:577
#14 0x5569debe in PyImport_Cleanup () at Python/import.c:544
#15 0x556ac463 in Py_FinalizeEx () at Python/pylifecycle.c:1094
#16 0x555b2136 in pymain_main (pymain=pymain@entry=0x7fffe420) at 
Modules/main.c:2664
#17 0x555b22c3 in _Py_UnixMain (argc=, argv=)
at Modules/main.c:2697
#18 0x555ad403 in main (argc=, argv=)
at ./Programs/python.c:15

--
nosy: +xdegaye

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6331

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6330

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 70af06cdc4e8fbee0b9d7d46bdc193097d4bc71f by Serhiy Storchaka in 
branch 'master':
bpo-31026: Fix test_dbm if dbm.ndbm is build with Berkeley DB. (GH-6632)
https://github.com/python/cpython/commit/70af06cdc4e8fbee0b9d7d46bdc193097d4bc71f


--

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 1b27ec6e0b40f81bf276eefa6b5bdb773b2a8890 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-33383: Fix crash in get() of the dbm.ndbm database object. (GH-6630). 
(GH-6633)
https://github.com/python/cpython/commit/1b27ec6e0b40f81bf276eefa6b5bdb773b2a8890


--

___
Python tracker 

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



[issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8'

2018-04-29 Thread Nicolás Hatcher

Nicolás Hatcher  added the comment:

Hi Sehriy,

I am ok with that change. I think it makes much more sense, but I also think it 
will break people's codes. At least with the simplest fix in which:

>>> json.dumps({"g"}, ensure_ascii=False)
u'"g"'

Which is again compatible with simplejson.
Although the documentation is not clear in this point there might be code out 
there relaying on this behaviour.
Is that acceptable?

--

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6329

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset ee95feb69d937149bef3d245e87df1aef412b7fc by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
[3.7] bpo-33383: Fix crash in get() of the dbm.ndbm database object. (GH-6630) 
(GH-6631)
https://github.com/python/cpython/commit/ee95feb69d937149bef3d245e87df1aef412b7fc


--

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +6328
stage:  -> patch review

___
Python tracker 

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



[issue31026] test_dbm fails when run directly

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The same error is now occurred in Ubuntu 18.04 by default. 

The proposed patch moves the test for the empty value to separate methods and 
skips them if dbm.ndbm uses Berkeley DB.

--
versions: +Python 3.8

___
Python tracker 

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



[issue33384] Build does not work with closed stdin

2018-04-29 Thread Thomas Klausner

Change by Thomas Klausner :


--
nosy: +wiz

___
Python tracker 

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



[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-04-29 Thread Michael Romero

Michael Romero  added the comment:

So is this now considered resolved for High Sierra users via 2.7.15rc1?

--
nosy: +Michael Romero

___
Python tracker 

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



[issue33384] Build does not work with closed stdin

2018-04-29 Thread Martin Husemann

New submission from Martin Husemann :

When building python extensions in the background w/o stdin (and stderr and 
stdout redirected to a log file), the invocation of setup.py fails.

Normal build in a shell:

Example from pyexpat:
> /usr/pkg/bin/python3.6  setup.py  build
running build
running build_ext
building 'pyexpat' extension
creating build
creating build/temp.netbsd-8.99.14-amd64-3.6
creating build/temp.netbsd-8.99.14-amd64-3.6/Modules
gcc -DNDEBUG -O2 -pipe -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/pkg/include 
-O2 -pipe -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/pkg/include/python3.6 
-I/usr/include -I/usr/pkg/include/python3.6 -fPIC -DHAVE_EXPAT_H 
-I/work/pkgobj/textproc/py-expat/work/.buildlink/include 
-I/usr/pkg/include/python3.6 -c Modules/pyexpat.c -o 
build/temp.netbsd-8.99.14-amd64-3.6/Modules/pyexpat.o
creating build/lib.netbsd-8.99.14-amd64-3.6
gcc -pthread -shared -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib 
-Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib 
-Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib 
-Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -O2 -pipe 
-D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/pkg/include/python3.6 -I/usr/include 
-I/usr/pkg/include/python3.6 
build/temp.netbsd-8.99.14-amd64-3.6/Modules/pyexpat.o 
-L/work/pkgobj/textproc/py-expat/work/.buildlink/lib -L/usr/pkg/lib 
-Wl,-R/work/pkgobj/textproc/py-expat/work/.buildlink/lib -lexpat -lpython3.6 -o 
build/lib.netbsd-8.99.14-amd64-3.6/pyexpat.so


But if invoked as 

> ( sleep 15; /usr/pkg/bin/python3.6  setup.py  build ) >/tmp/log 2>&1 &
> ^D

and then watching /tmp/log from another session:

Fatal Python error: Py_Initialize: can't initialize sys standard streams
OSError: [Errno 9] Bad file descriptor

Current thread 0x75b4e4cee800 (most recent call first):
[1]   Abort trap (core dumped) /usr/pkg/bin/pyt...

--
components: Build
messages: 315886
nosy: MartinHusemann
priority: normal
severity: normal
status: open
title: Build does not work with closed stdin
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 2e38cc39330bd7f3003652869b644110a97a78d8 by Serhiy Storchaka in 
branch 'master':
bpo-33383: Fix crash in get() of the dbm.ndbm database object. (#6630)
https://github.com/python/cpython/commit/2e38cc39330bd7f3003652869b644110a97a78d8


--

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6327

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +6326
stage:  -> patch review

___
Python tracker 

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



[issue33174] error building the _sha3 module with Intel 2018 compilers

2018-04-29 Thread Kenneth Hoste

Kenneth Hoste  added the comment:

Willian: on which OS and (Intel?) processor generation are you seeing this?

We're not seeing this on CentOS 7.4.1708 with Python 3.6.4 and icc 18.0.1.163 
on Intel Haswell or Intel Skylake.
We have seen this with other software on Intel Skylake though...

Have you tried with icc 18.0.2 (which was released March 21st 2018)?

--
nosy: +boegel

___
Python tracker 

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



[issue33383] Crash in the get() method a single argument in dbm.ndbm

2018-04-29 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Calling the get() method of the dbm.ndbm database object with only single 
argument causes a crash because the default value is set to NULL.

The regression was introduce in 3.5.

The proposed patch fixes the crash and add tests for the get() method for all 
dbm implementations.

--
components: Extension Modules
messages: 315883
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Crash in the get() method a single argument in dbm.ndbm
type: crash
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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