[issue33397] IDLE help viewer: let users control font size

2018-04-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

PR6665 should get listed here as I changed the title to point here instead of 
#25198

--

___
Python tracker 

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



[issue25198] Idle: improve idle.html help viewer.

2018-04-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The files uploaded 2015-09-24 and 27 were merged later the same day.  The merge 
in between on 2015-09-25 was shorter and not uploaded separately.  I opened 
#33396 as an index issue for the other items and any new ones.  I open #33397 
for font sizing and changed the title of PR6665.

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
superseder:  -> IDLE: Improve and document help doc viewer
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue33397] IDLE help viewer: let users control font size

2018-04-30 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +6364

___
Python tracker 

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



[issue33397] IDLE help viewer: let users control font size

2018-04-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +csabella

___
Python tracker 

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



[issue33396] IDLE: Improve and document help doc viewer

2018-04-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
dependencies: +IDLE help viewer: let users control font size

___
Python tracker 

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



[issue33397] IDLE help viewer: let users control font size

2018-04-30 Thread Terry J. Reedy

New submission from Terry J. Reedy :

Dependency of #33396. 

1. Base the initial font sizes on the on the configured editor font size.  Note 
that editor font size defaults to 10 while the current base size is 12.  I did 
not find any explicit discussion of this in the original issue, #16893, or the 
first followup, #25198.  Perhaps Mark Roseman just liked the result, or perhaps 
it made the relative sizing easier.

2. Change font size with Control-Mousewheel.  Manually tested code for doing 
this on Windows, Linux, and MacOS is in turtledemo.__main__.  The three systems 
are wildly different.  What we do here should allow easily doing same for other 
text windows.

--
assignee: terry.reedy
components: IDLE
messages: 315985
nosy: terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: IDLE help viewer: let users control font size
type: enhancement
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



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

miss-islington  added the comment:


New changeset a607f8b9982ac95bb59f8f61e0a50fc5ae29dc14 by Miss Islington (bot) 
in branch '3.6':
bpo-31908: Fix output of cover files for trace module command-line tool. 
(GH-4205)
https://github.com/python/cpython/commit/a607f8b9982ac95bb59f8f61e0a50fc5ae29dc14


--

___
Python tracker 

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



[issue28167] remove platform.linux_distribution()

2018-04-30 Thread Matthias Bussonnier

Change by Matthias Bussonnier :


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

___
Python tracker 

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



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6362

___
Python tracker 

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



[issue28167] remove platform.linux_distribution()

2018-04-30 Thread Matthias Bussonnier

Matthias Bussonnier  added the comment:

In the docs it is marked as "going to be removed in 3.7", and emitting 
PendingDeprecationWarning. I supposed it should either be updated to change to 
3.8 and switch PendingDeprecationWarning to DeprecationWarning, or be actually 
removed.

--
nosy: +mbussonn

___
Python tracker 

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



[issue33396] IDLE: Improve and document help doc viewer

2018-04-30 Thread Terry J. Reedy

New submission from Terry J. Reedy :

The IDLE help doc viewer displays help.html in a tk Text subclass. This index 
issue follows #25198, which fixed three immediate issues, and left the 
following for later.  When tackled, the items below should be separate issues 
and PRs listed as dependencies.  

1. msg251181 Base font size on user config and control-mousewheel.
2. "   " Make within-document html links in work in the viewer.
3. "   " Make Find (^F) work within the viewer.
4. msg251571 Navigate with keys as in editor.
5. msg251556 Open TOC with Key (Esc?, F1?); enhance navigation.

New items:

6. Add Help Doc Viewer doc to Help section.
   I prefer not adding a menu and see an entry as an alternative.

7. 1, 3, and 4 should try to avoid duplicating editor code.  Perhaps we should 
enhance the plain text viewer and use it as a superclass for both base editor 
and html viewer.

--
assignee: terry.reedy
components: IDLE
messages: 315982
nosy: csabella, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Improve and document help doc viewer
type: enhancement
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



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

miss-islington  added the comment:


New changeset e4eeb6eff12947a55df5eabee36e537cadefbbac by Miss Islington (bot) 
in branch '3.7':
bpo-31908: Fix output of cover files for trace module command-line tool. 
(GH-4205)
https://github.com/python/cpython/commit/e4eeb6eff12947a55df5eabee36e537cadefbbac


--
nosy: +miss-islington

___
Python tracker 

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



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6361

___
Python tracker 

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



[issue31908] trace module cli does not write cover files

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6360

___
Python tracker 

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



[issue31908] trace module cli does not write cover files

2018-04-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 47ab15470d72367694d7758004067313ae022f0e by Serhiy Storchaka 
(Michael Selik) in branch 'master':
bpo-31908: Fix output of cover files for trace module command-line tool. 
(GH-4205)
https://github.com/python/cpython/commit/47ab15470d72367694d7758004067313ae022f0e


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33395] TypeError: unhashable type: 'instancemethod'

2018-04-30 Thread Siming Yuan

Siming Yuan  added the comment:

having a tough time trying to reproduce this issue in pure python.

any clue as to how to create a __repr__ that's unhashable?

class UnhashableRepr(dict):
__repr__ = _testcapi.instancemethod(dict.__repr__)

doesn't work because that turns into a  which becomes hashable.

i'd love to provide a patch, seems trivial to fix, but wouldn't want to do so 
without some tests.

--

___
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-30 Thread Allan Feldman

Allan Feldman  added the comment:

That explanation makes sense to me. Thanks for taking the time to look into 
this!

--
resolution:  -> works for me
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



[issue33391] leak in set_symmetric_difference?

2018-04-30 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
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-30 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

ISTM collections is the correct module reference because that is where the code 
is actually defined.  A debugging tool should look there instead of in the 
calling code.  This is the way other tools work in Python as well:

>>> from collections.abc import Set
>>> class S(Set):
def __init__(self): pass
def __iter__(self): yield 0
def __len__(self): return 0
def __contains__(self, key): return False

>>> S.__or__.__module__
'collections.abc'

>>> from dataclasses import make_dataclass
>>> P = make_dataclass('P', ['x', 'y'])
>>> P.__repr__.__module__
'dataclasses'

Likewise, the various tools that use closures used to report the module where 
the closure was defined rather than the module of the caller's code (see 
functools.cmp_to_key or functools.lru_cache).  I say "used to" because the pure 
Python code is now supplanted by C equivalents where the __module__ attribute__ 
is appropriately set to None:

# Running from PyPy
 from functools import cmp_to_key
 c = cmp_to_key(lambda x, y: 0)
 c.__init__.__module__
'_functools'

The Data Model section of the Language Reference defines __module__ as follows, 
"__module__: The name of the module the function was defined in, or None if 
unavailable."  In the prior version of namedtuple(), the function was defined 
in a virtual module (an execed string).  Now, that the methods are defined in a 
real module, the __module__ attribute should name that real module.

--

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-04-30 Thread Brett Cannon

Change by Brett Cannon :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue25198] Idle: improve idle.html help viewer.

2018-04-30 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I've created PR6665 for the first bullet item.

* Font size should initially reflect user's size choice.  Possibly change with 
control-mousewheel.

--
nosy: +csabella
stage: patch review -> needs patch

___
Python tracker 

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



[issue25198] Idle: improve idle.html help viewer.

2018-04-30 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +6359
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



[issue33395] TypeError: unhashable type: 'instancemethod'

2018-04-30 Thread R. David Murray

R. David Murray  added the comment:

The non-hashable case should be handled by a default function, I would think.  
It should be fairly straightforward to come up with a reproducer that does not 
involve cython, which I think would be the first step.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue33006] docstring of filter function is incorrect

2018-04-30 Thread Pierre Thibault

Pierre Thibault  added the comment:

I guess it does since it gives false information.

2018-04-30 18:05 GMT-04:00 Anthony Flury :

>
> Anthony Flury  added the comment:
>
> Strictly speaking the official Python2 reference document isn't a great
> example - for instance:
>
> ' If function is None, the identity function is assumed, that is, all
> elements of iterable that are false are removed.'
>
> Implies that items are removed from the iterable are removed, but they
> aren't; they are simply not included in the sequence that is returned.
>
> Does the documentation need to be fixed too ?
>
> --
> nosy: +anthony-flury
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-04-30 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

@serhiy.storchaka @rhettinger @vstinner Should we better make the 
pre-allocation if the length of the iterable is known (so we call 
PyObject_Length and not PyObject_LengthHint)? This will keep the logic simpler 
(so not shrinking if PyObject_LengthHint gives more than the real length) and 
it will not be as expensive as calling PyObject_LengthHint.

--

___
Python tracker 

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



[issue33006] docstring of filter function is incorrect

2018-04-30 Thread Anthony Flury

Anthony Flury  added the comment:

Strictly speaking the official Python2 reference document isn't a great example 
- for instance:

' If function is None, the identity function is assumed, that is, all elements 
of iterable that are false are removed.' 

Implies that items are removed from the iterable are removed, but they aren't; 
they are simply not included in the sequence that is returned.

Does the documentation need to be fixed too ?

--
nosy: +anthony-flury

___
Python tracker 

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



[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2018-04-30 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset fb7e7992beec7f76cc2db77ab6ce1e86446bfccf by Łukasz Langa (Victor 
Stinner) in branch 'master':
bpo-30465: Fix C downcast warning on Windows in ast.c (#6593)
https://github.com/python/cpython/commit/fb7e7992beec7f76cc2db77ab6ce1e86446bfccf


--

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-04-30 Thread Paul Goins

Paul Goins  added the comment:

Ahh, thanks for the explanation.  I didn't think about that.  Let's *not* do 
that then. :)

I'll see if I can squeeze in some time to play with the alternatives.

--

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-04-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I'm guessing this is because of the perceived performance impact?

The problem is polling is pretty detrimental to power saving on modern CPUs.  
There might also be a performance impact that makes things worse :-)

More generally, we really would like locks to be interruptible under Windows, 
as it would be useful in many more situations than joining threads. 
Unfortunately, as you have discovered we have several lock implementations for 
Windows right now.  The SRWLock one is probably difficult to make 
interruptible, but it's never enabled by default.  The Semaphore one looks 
legacy, so could perhaps be removed.  Remains the condition variable-based 
implementation.

--

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-04-30 Thread Paul Goins

Paul Goins  added the comment:

> I think adding polling to such a widely-used primitive is out of question.

I'm guessing this is because of the perceived performance impact?  (That's the 
main thought I have against polling in this case.)  Or is it something else?

I can certainly look at tweaking the 3 mutex implementations I mentioned 
previously, but I do expect that will be a bit more code; I at least wanted to 
put the "simpler" idea out there.  Fully knowing that "simpler" isn't 
necessarily better.

--

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-04-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> One way to possibly make this work (although perhaps not as clean as may be 
> desired) would be to add polling logic into the thread_nt.h version of 
> PyThread_acquire_lock_timed.

I think adding polling to such a widely-used primitive is out of question.

--

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2018-04-30 Thread Paul Goins

Paul Goins  added the comment:

Focusing on the Windows case specifically...  One way to possibly make this 
work (although perhaps not as clean as may be desired) would be to add polling 
logic into the thread_nt.h version of PyThread_acquire_lock_timed.

That would have the benefit of avoiding the complexity of the various "non 
recursive mutex" implementations (i.e. semaphores vs "emulated" condition 
variables vs native condition variables) and may be less code than setting up 
"alertable" WaitForObjectSignleObjectEx calls (plus whatever else needs to be 
done for the SRW-lock-based code path).

Thoughts or feedback?  (I've not done any mainline Python commits yet so I'm 
totally ready to be completely wrong or misguided here.)

--

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-04-30 Thread Paul Moore

Paul Moore  added the comment:

>> IMO, debating whether a None return means there's absolutely no chance of
>> there being source is silly - the best the loader can say is that it can't
>> provide source.
> 
> I don't think it is silly: if "None" means that the loader cannot provide the
> source, then it makes sense to continue looking for the source. If "None"
> means that there is certainly no source, then it does not make sense to
> continue looking.

It's silly to think that the loader can *ever* say that there's "certainly" no
source, so debating whether None means that is silly. The only thing None could
*possibly* mean is that the loader can't give you the source. No more, no less.

>> On the other hand, what is Cython source code even doing on sys.path?
> 
> It's specifically installed for tracebacks (and other debugging). In a way,
> it's no different from installing both .py and .pyc files. Nobody questions
> that, even though the .pyc files are sufficient.

The key difference is that Python source only needs Python to compile it. We
have Python source on sys.path and Python automatically compiles it to bytecode
as needed. You can't put Cython source on sys.path and have the Python
interpreter compile it for you. Basically, sys.path is for code that the Python
interpreter can (compile and) run, and it's at least arguable that non-Python
source doesn't belong on there.

I'm not trying to *make* that argument, though. All *I* am trying to say is
that it's not exactly surprising if stdlib code doesn't expect to find
non-Python source on sys.path.

>> I sort of understand the benefit, but it does seem to be a practice peculiar
>> to one scenario
> 
> Sure, it's particular but it's a real existing scenario.

... that hasn't worked since Python 3.3, but no-one has noticed or complained
until now.

>> and I'm not sure the standard library should deal with it.
> 
> Depends what you mean with "deal with it". Basically, all that I'm asking for
> is at least one officially supported way to enable finding sources for
> extension modules. There are many possible ways to fix this, that's why I
> made this post to python-ideas.

But the standard library has no need to ever find source for extension modules
(unless I'm unaware of some detail of the Cython/IPython specific situation).
So there's no need for the stdlib to be involved - Cython could define a
protocol for finding source code independently, and IPython (and anything else
that wants to display the source of a Cython extension) could use it.

>> I'm struggling to see how a Python programmer would benefit from access to
>> the source code of a compiled extension anyway.
> 
> Cython code looks very much like Python. Very likely, a Python programmer
> would understand the Cython code. Anyway, this is besides the point: even if
> it just benefits the author of the Cython code, it's already useful.

Point taken.

>> it's not exactly an urgent issue.
> 
> I never proposed to make it a release blocker :-) It's not urgent but it
> should still be fixed.

Note that I haven't said it shouldn't be fixed, merely that I'm not as
convinced, having read this discussion, that having linecache do a path search
if the loader returns None is *necessarily* the best solution here. I do still
feel that if we don't make that change, then the linecache docs should be
clarified, but I wouldn't say the linecache docs on the whole module_globals
argument are very clear in the first place - I certainly wouldn't know how to
use that argument based on the current docs.

I'm going to leave the call on whether your proposed change to linecache is OK
to someone who understands (or has the time to review and confirm) the impact
on the 4 places in the stdlib where it's called with a module_global parameter
- asyncio.base_tasks, bdb (twice) and pdb. What I will say is that the code in
the PR looks fine to me as an implementation of the proposed change.

I'm strongly against introducing any extra complexity into the loader
get_source function signature. I think it's fine as it is, and trying to add
nuances to the meaning behind None will only make life harder for people
implementing loaders.

Ideally, of course, there would be a CythonExtensionLoader that handled this in
get_source. But it's hard to see how such a thing would work as "Cython
extensions" don't look any different from extensions built with C, or Rust, or
anything else.

>> Cython still needs to work around the issue for users of older Pythons.
> 
> No. Older versions already work because there is no ExtensionFileLoader. The
> changes in Python 3.x(?) actually broke this. Certainly in Python 2.7, those
> tracebacks work fine.

By "older Pythons" I meant 3.3+. ExtensionFileLoader was introduced in 3.3, so
presumably this issue exists in all versions of Python from 3.3 onwards. I
don't consider 2.7 relevant here, as the import machinery was completely
different then.

Of course, it's up to Cython 

[issue33395] TypeError: unhashable type: 'instancemethod'

2018-04-30 Thread Siming Yuan

New submission from Siming Yuan :

in Python 3.5 it the pprint.PrettyPrinter mechanism got an overhaul, relying on 
PrettyPrinter._dispatch dict-lookup based on obj.__repr__ type.

This breaks any Cythonized 3rd party libraries that used to be pretty-printable 
in Python3.4.

type(object).__repr__


since instancemethod_hash function has been commented out:
https://github.com/python/cpython/blob/c30098c8c6014f3340a369a31df9c74bdbacc269/Objects/classobject.c#L569


oddly the behavior is different between Linux and Mac.

The same object in Linux returns cyfunction, and is hashable,
where as under the same CPython version in Mac, it returns instancemethod, 
rendering it unhashable.
(based on Cython 0.27.3)

note that this isn't exactly something related directly to the implementation 
of Cython.

the old logic in Python <3.4 pprint was not pretty (pun not intended), but 
relied solely on type checking,
where as the new implementation depends on hashing, which introduces this bug.

--
messages: 315964
nosy: siming85
priority: normal
severity: normal
status: open
title: TypeError: unhashable type: 'instancemethod'
type: crash
versions: Python 3.5, 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



[issue33352] [EASY] Windows: test_regrtest fails on installed Python

2018-04-30 Thread STINNER Victor

Change by STINNER Victor :


--
resolution:  -> fixed

___
Python tracker 

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



[issue33352] [EASY] Windows: test_regrtest fails on installed Python

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:

I'm not sure that Python 3.6. In case of doubt, I prefer to skip it.

The bug has been fixed in Python 3.7 and master. Thanks Andrés Delfino for your 
nice contribution!

--
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



[issue33352] [EASY] Windows: test_regrtest fails on installed Python

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 8075868f19967f291f123f17962a453b38dec8d2 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-33352: Skip test_regrtest test if rt.bat does not exist (GH-6654) (#6656)
https://github.com/python/cpython/commit/8075868f19967f291f123f17962a453b38dec8d2


--

___
Python tracker 

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



[issue33254] Have importlib.resources.contents() return an interable instead of an iterator

2018-04-30 Thread Brett Cannon

Change by Brett Cannon :


--
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



[issue33254] Have importlib.resources.contents() return an interable instead of an iterator

2018-04-30 Thread miss-islington

miss-islington  added the comment:


New changeset 2e5fa38c5aaf7630c55ce6dfb8f79df6b3b86076 by Miss Islington (bot) 
in branch '3.7':
bpo-33254: do not return an empty list when asking for the contents of a 
namespace package (GH-6467)
https://github.com/python/cpython/commit/2e5fa38c5aaf7630c55ce6dfb8f79df6b3b86076


--
nosy: +miss-islington

___
Python tracker 

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



[issue33370] Addition of mypy cache to gitignore

2018-04-30 Thread Brett Cannon

Change by Brett Cannon :


--
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



[issue33375] warnings: get filename from frame.f_code.co_filename

2018-04-30 Thread Brett Cannon

Change by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-04-30 Thread Jeroen Demeyer

Jeroen Demeyer  added the comment:

> IMO, debating whether a None return means there's absolutely no chance of 
> there being source is silly - the best the loader can say is that it can't 
> provide source.

I don't think it is silly: if "None" means that the loader cannot provide the 
source, then it makes sense to continue looking for the source. If "None" means 
that there is certainly no source, then it does not make sense to continue 
looking.

> On the other hand, what is Cython source code even doing on sys.path?

It's specifically installed for tracebacks (and other debugging). In a way, 
it's no different from installing both .py and .pyc files. Nobody questions 
that, even though the .pyc files are sufficient.

> I sort of understand the benefit, but it does seem to be a practice peculiar 
> to one scenario

Sure, it's particular but it's a real existing scenario.

> and I'm not sure the standard library should deal with it.

Depends what you mean with "deal with it". Basically, all that I'm asking for 
is at least one officially supported way to enable finding sources for 
extension modules. There are many possible ways to fix this, that's why I made 
this post to python-ideas.

> I'm struggling to see how a Python programmer would benefit from access to 
> the source code of a compiled extension anyway.

Cython code looks very much like Python. Very likely, a Python programmer would 
understand the Cython code. Anyway, this is besides the point: even if it just 
benefits the author of the Cython code, it's already useful.

> it's not exactly an urgent issue.

I never proposed to make it a release blocker :-)
It's not urgent but it should still be fixed.

> Cython still needs to work around the issue for users of older Pythons.

No. Older versions already work because there is no ExtensionFileLoader. The 
changes in Python 3.x(?) actually broke this. Certainly in Python 2.7, those 
tracebacks work fine.

--

___
Python tracker 

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



[issue33254] Have importlib.resources.contents() return an interable instead of an iterator

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6358

___
Python tracker 

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



[issue33254] Have importlib.resources.contents() return an interable instead of an iterator

2018-04-30 Thread Brett Cannon

Brett Cannon  added the comment:


New changeset 3ab9365dca8438f89b2060cd3eebe00606133dc4 by Brett Cannon in 
branch 'master':
bpo-33254: do not return an empty list when asking for the contents of a 
namespace package (GH-6467)
https://github.com/python/cpython/commit/3ab9365dca8438f89b2060cd3eebe00606133dc4


--

___
Python tracker 

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



[issue33393] update config.guess and config.sub

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6357

___
Python tracker 

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



[issue33393] update config.guess and config.sub

2018-04-30 Thread Matthias Klose

Matthias Klose  added the comment:


New changeset 7e3545c70cdecd86ffa8fcbffd79b4f78560679f by Matthias Klose in 
branch 'master':
bpo-33393: Update config.guess and config.sub files (#6658)
https://github.com/python/cpython/commit/7e3545c70cdecd86ffa8fcbffd79b4f78560679f


--

___
Python tracker 

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



[issue33377] add new triplets for mips r6 and riscv variants

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6356

___
Python tracker 

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



[issue32797] Tracebacks from Cython modules no longer work

2018-04-30 Thread Paul Moore

Paul Moore  added the comment:

As I noted on python-ideas, continuing to search along sys.path if the loader 
returns None seems to match what the linecache docs say. If the issue had been 
phrased as "the implementation of linecache doesn't follow the docs" then I'd 
say fine, that's a reasonable report of something that we should fix.

But Erik's points are valid - the fact that the documentation describes a 
certain behaviour doesn't mean that it can't be wrong - and the fact that 
no-one else has flagged up the discrepancy before now implies that it's a 
relatively rare case.

IMO, debating whether a None return means there's absolutely no chance of there 
being source is silly - the best the loader can say is that it can't provide 
source. But that doesn't prove anything.

On the other hand, what is Cython source code even doing on sys.path? The whole 
discussion here seems to be based on the premise that extension modules 
(machine code) will be shipped with source code that will get installed 
alongside the binary. That's not the case for C extensions, but appears to be 
for Cython. I sort of understand the benefit, but it does seem to be a practice 
peculiar to one scenario, and I'm not sure the standard library should deal 
with it. (There's a performance cost to that path search, and I'm struggling to 
see how a Python programmer would benefit from access to the source code of a 
compiled extension anyway).

So I think that *either* we should fix the docs to be clearer that the path 
search is only done if the loader is not present or returns None, *or* we 
should implement the path search when the loader returns None. But I don't see 
that there's a strong argument here yet for changing the code - after all, it 
appears that the current behaviour has been round since Python 3.3, so it's not 
exactly an urgent issue. And unless someone is arguing that the change get 
backported, Cython still needs to work around the issue for users of older 
Pythons.

--
nosy: +paul.moore

___
Python tracker 

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



[issue33394] the build of the shared modules is quiet/non-visible when GNU make gets passed macros

2018-04-30 Thread Matthias Klose

Change by Matthias Klose :


--
pull_requests: +6355
stage:  -> patch review

___
Python tracker 

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



[issue33394] the build of the shared modules is quiet/non-visible when GNU make gets passed macros

2018-04-30 Thread Matthias Klose

New submission from Matthias Klose :

the build of the shared modules is quiet/non-visible when GNU make gets passed 
macros. This is was introduced by the change to support BSD make.

GNU make adds all make macros passed on the command line to MAKEFLAGS. If one 
of these macros contains -s, the build of the extensions get quiet.

Also print out how setup.py is called.

--
components: Build
files: verbose.diff
keywords: patch
messages: 315956
nosy: doko
priority: normal
severity: normal
status: open
title: the build of the shared modules is quiet/non-visible when GNU make gets 
passed macros
Added file: https://bugs.python.org/file47558/verbose.diff

___
Python tracker 

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



[issue33393] update config.guess and config.sub

2018-04-30 Thread Matthias Klose

Change by Matthias Klose :


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

___
Python tracker 

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



[issue33377] add new triplets for mips r6 and riscv variants

2018-04-30 Thread Matthias Klose

Matthias Klose  added the comment:


New changeset ddbe976964933cb943c6383a776e800cc7e0f47d by Matthias Klose in 
branch 'master':
bpo-33377: add triplets for mips-r6 and riscv (#6655)
https://github.com/python/cpython/commit/ddbe976964933cb943c6383a776e800cc7e0f47d


--

___
Python tracker 

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



[issue33393] update config.guess and config.sub

2018-04-30 Thread Matthias Klose

New submission from Matthias Klose :

update config.guess and config.sub from http://git.savannah.gnu.org/

--
assignee: doko
components: Build
messages: 315954
nosy: doko
priority: normal
severity: normal
status: open
title: update config.guess and config.sub
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



[issue32769] Add 'annotations' to the glossary

2018-04-30 Thread Andrés Delfino

Andrés Delfino  added the comment:

I just made a PR to start working on the right wording.

--
nosy: +adelfino

___
Python tracker 

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



[issue32769] Add 'annotations' to the glossary

2018-04-30 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +6353
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



[issue33352] [EASY] Windows: test_regrtest fails on installed Python

2018-04-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6352

___
Python tracker 

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



[issue33352] [EASY] Windows: test_regrtest fails on installed Python

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset c3b7a6dfb9c7e69093c9fe78ab587e14743e5152 by Victor Stinner 
(Andrés Delfino) in branch 'master':
bpo-33352: Skip test_regrtest test if rt.bat does not exist (GH-6654)
https://github.com/python/cpython/commit/c3b7a6dfb9c7e69093c9fe78ab587e14743e5152


--

___
Python tracker 

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



[issue33377] add new triplets for mips r6 and riscv variants

2018-04-30 Thread Matthias Klose

Change by Matthias Klose :


--
pull_requests: +6351
stage:  -> patch review

___
Python tracker 

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



[issue33352] [EASY] Windows: test_regrtest fails on installed Python

2018-04-30 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +6350
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



[issue32797] Tracebacks from Cython modules no longer work

2018-04-30 Thread Jeroen Demeyer

Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue31802] 'import posixpath' fails if 'os.path' has not be imported already.

2018-04-30 Thread Mark Shannon

Change by Mark Shannon :


--
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



[issue33391] leak in set_symmetric_difference?

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:

I don't think that an unit test is needed, and I failed to write such test :-)

--
nosy: +vstinner

___
Python tracker 

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



[issue33392] pathlib .glob('*/') returns files as well as directories

2018-04-30 Thread robbuckley

robbuckley  added the comment:

this is workaroundable via constructions like:

list(x for x in p.glob('*/') if x.is_dir())

but I think there's value in behaving like glob.glob(), and keystroke avoidance 
for what must be a fairly common use case

--

___
Python tracker 

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



[issue33392] pathlib .glob('*/') returns files as well as directories

2018-04-30 Thread robbuckley

New submission from robbuckley :

Path.cwd().glob('/*') seems to yield all files and folders in cwd, the same as 
.glob('*').

I believe that glob('*/') should yield only directories, and glob('*') all 
files and directories. this behaviour isnt documented one way or the other. But 
it would be consistent with glob.glob()

console dump follows:

Python 3.6.5 |Anaconda custom (64-bit)| (default, Mar 29 2018, 13:14:23) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.3.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import os

In [2]: from pathlib import Path

In [6]: import glob

In [13]: list(p.glob('*/'))
Out[13]: 
[PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/f1.txt'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/f3.txt'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/d1'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/f2.txt'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/d2')]

In [14]: list(p.glob('*'))
Out[14]: 
[PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/f1.txt'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/f3.txt'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/d1'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/f2.txt'),
 PosixPath('/Users/robertbuckley/python-scripts/pathlib_bug/d2')]

In [15]: glob.glob(os.path.join(str(p), '*/'))
Out[15]: 
['/Users/robertbuckley/python-scripts/pathlib_bug/d1/',
 '/Users/robertbuckley/python-scripts/pathlib_bug/d2/']

In [16]: glob.glob(os.path.join(str(p), '*'))
Out[16]: 
['/Users/robertbuckley/python-scripts/pathlib_bug/f1.txt',
 '/Users/robertbuckley/python-scripts/pathlib_bug/f3.txt',
 '/Users/robertbuckley/python-scripts/pathlib_bug/d1',
 '/Users/robertbuckley/python-scripts/pathlib_bug/f2.txt',
 '/Users/robertbuckley/python-scripts/pathlib_bug/d2']

--
messages: 315949
nosy: robbuckley
priority: normal
severity: normal
status: open
title: pathlib .glob('*/') returns files as well as directories
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



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

2018-04-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 6405feecda6a5d5dd7a4240eb3054a2676ed29b1 by Serhiy Storchaka in 
branch 'master':
bpo-33012: Fix invalid function casts for long_long. (GH-6652)
https://github.com/python/cpython/commit/6405feecda6a5d5dd7a4240eb3054a2676ed29b1


--

___
Python tracker 

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



[issue33391] leak in set_symmetric_difference?

2018-04-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Good catch! Do you mind to create a pull request on GitHub?

--
nosy: +rhettinger, serhiy.storchaka
type:  -> behavior

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset ca405017d5e776a2e3d9291236e62d2e09489dd2 by Victor Stinner in 
branch 'master':
bpo-27645, sqlite: Fix integer overflow on sleep (#6594)
https://github.com/python/cpython/commit/ca405017d5e776a2e3d9291236e62d2e09489dd2


--
nosy: +vstinner

___
Python tracker 

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



[issue33391] leak in set_symmetric_difference?

2018-04-30 Thread lekma

New submission from lekma :

shouldn't otherset be decrefed before returning on error in 
set_symmetric_difference? if not, what am I missing?

--
components: Interpreter Core
files: setobject.c.diff
keywords: patch
messages: 315945
nosy: lekma
priority: normal
severity: normal
status: open
title: leak in set_symmetric_difference?
versions: Python 3.8
Added file: https://bugs.python.org/file47557/setobject.c.diff

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-04-30 Thread lekma

lekma  added the comment:

thinking out loud here: maybe both behavior can be exposed, i.e. a 
PyCapsule_Import that would expect a valid import statement and a Py_GetCapsule 
that would behave more like getattr?

--

___
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.gnu and dmb.dumb objects

2018-04-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
title: setdefault() with a single argument doesn't work for dbm.gdbm and 
dmb.ndbm objects -> setdefault() with a single argument doesn't work for 
dbm.gnu and dmb.dumb objects

___
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-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Actually dbm.ndbm already implements option 1. Only dbm.gnu and dbm.dumb have 
non-working with a single argument setdefault().

--

___
Python tracker 

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



[issue33352] [EASY] Windows: test_regrtest fails on installed Python

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:

The fix is simple, skip the test if the script doesn't exist at:

def test_pcbuild_rt(self):
# PCbuild\rt.bat
script = os.path.join(ROOT_DIR, r'PCbuild\rt.bat')

--
keywords: +easy
title: Windows: test_regrtest fails on installed Python -> [EASY] Windows: 
test_regrtest fails on installed Python

___
Python tracker 

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



[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:

Should we shrink the list of the length hint was way too big? For example, if 
the length hint was 100 but the final list of only 10. Should we shrink in that 
case?

I'm asking because it seems like Pablo's PR doesn't shrink the list in that 
case.

I wasn't sure so I checked, del shrinks the list if needed:

>>> x=list(range(1000))
>>> import sys
>>> sys.getsizeof(x)
9112
>>> del x[1:]
>>> sys.getsizeof(x)
96

--

___
Python tracker 

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



[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-04-30 Thread STINNER Victor

STINNER Victor  added the comment:

See also http://bugs.python.org/issue26814#msg264003 and bpo-26828.

--
nosy: +vstinner

___
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-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7, 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



[issue33256] module is not displayed by cgitb.html

2018-04-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 07ad02f62cc336772e12e3fd837579952b03ca57 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-33256: Replace angle brackets around python object repr to display it 
in html (GH-6442). (GH-6650)
https://github.com/python/cpython/commit/07ad02f62cc336772e12e3fd837579952b03ca57


--

___
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-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6348

___
Python tracker 

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



[issue33217] x in enum.Flag member is True when x is not a Flag

2018-04-30 Thread Rahul Jha

Change by Rahul Jha :


--
pull_requests: +6347
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



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

2018-04-30 Thread Siddhesh Poyarekar

Siddhesh Poyarekar  added the comment:

Yeah, there are multiple such uses that need wrappers to actually fix for gcc8, 
which will be released this week.  I think I'll have more time for some more 
patches in this vein this weekend.

--

___
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-30 Thread STINNER Victor

STINNER Victor  added the comment:

The commit 55edd0c185ad2d895b5d73e47d67049bc156b654 introduced a new warning:

gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall 
-Wstrict-prototypes -O0   -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration   -I. -I./Include   -fPIC -DPy_BUILD_CORE 
-o Objects/longobject.o Objects/longobject.c
Objects/longobject.c:5359:5: warning: initialisation depuis un type pointeur 
incompatible [-Wincompatible-pointer-types]
 long_long,  /*nb_int*/
 ^
Objects/longobject.c:5359:5: note: (près de l'initialisation de « 
long_as_number.nb_int »)
Objects/longobject.c:5376:5: warning: initialisation depuis un type pointeur 
incompatible [-Wincompatible-pointer-types]
 long_long,  /* nb_index */
 ^
Objects/longobject.c:5376:5: note: (près de l'initialisation de « 
long_as_number.nb_index »)


It seems like a conversion to (unaryfunc) is needed when passing long_long as 
nb_int in long_as_number.

--
nosy: +vstinner

___
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-30 Thread miss-islington

miss-islington  added the comment:


New changeset 3d11630ff401cfcdf094cf039cb575332ecaea20 by Miss Islington (bot) 
in branch '3.6':
bpo-21474: Update IDLE word/identifier definition from ascii to unicode. 
(GH-6643)
https://github.com/python/cpython/commit/3d11630ff401cfcdf094cf039cb575332ecaea20


--
nosy: +miss-islington

___
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-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Thank you for the help.  My immediate goal for IDLE is to fix unicode problems, 
to the extent allowed by tk, before 3.7.0.

--
keywords:  -patch
nosy:  -miss-islington
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



[issue33390] matmul @ operator precedence

2018-04-30 Thread Mark Dickinson

Mark Dickinson  added the comment:

Gah! Forgot that my post would reset this issue to open. I'm going to close 
here, since this would be a sufficiently big and unlikely change that it's not 
going to happen without a python-ideas/python-dev discussion.

--
resolution: postponed -> rejected
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



[issue33390] matmul @ operator precedence

2018-04-30 Thread Mark Dickinson

Mark Dickinson  added the comment:

[Steven]
> please take the idea to the numpy and/or Python-Ideas mailing lists for 
> further discussion:

But please do read through the previous discussions before starting a new one! 
See the links in PEP 465, and particularly 
https://mail.scipy.org/pipermail/numpy-discussion/2014-March/069444.html

--
nosy: +mark.dickinson
status: pending -> open

___
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-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6346

___
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-30 Thread miss-islington

miss-islington  added the comment:


New changeset 887b5f8fc622267e1fd48862ea9d0dfd4a0abdc6 by Miss Islington (bot) 
in branch '3.7':
bpo-21474: Update IDLE word/identifier definition from ascii to unicode. 
(GH-6643)
https://github.com/python/cpython/commit/887b5f8fc622267e1fd48862ea9d0dfd4a0abdc6


--
nosy: +miss-islington

___
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-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Raymond. I hesitated to make a choose.

Ned, is it good to add a deprecation warning in setdefault() methods of the dbm 
classes when they called with a single argument in 3.7? Their current behavior 
(no-op or error) is not useful in any case.

--
nosy: +ned.deily

___
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-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> Do we still need this line in fixwordbreaks?

Yes. Loading word.tcl sets tcl_wordchars and tcl_nonwordchars. We should ensure 
that word.tcl is loaded and these variables are set before we change them.

--

___
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-30 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6345

___
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-30 Thread miss-islington

Change by miss-islington :


--
keywords: +patch
pull_requests: +6344
stage: commit review -> patch review

___
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-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 5ff3a161c8a6b525c5e5b3e36e9c43f5a95bda60 by Terry Jan Reedy in 
branch 'master':
bpo-21474: Update IDLE word/identifier definition from ascii to unicode. 
(GH-6643)
https://github.com/python/cpython/commit/5ff3a161c8a6b525c5e5b3e36e9c43f5a95bda60


--

___
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-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Now-closed duplicate #33386 reported that μ, 0x3bc, is not selected as part of 
identifiers when double clicking.  This prompted some research.

The 'Windows' style imitates the behavior of Command Prompt, which I presume is 
a carryover from DOS days.  PowerShell stuck with it, but Notepad, Notepad++, 
Microsoft Word, Firefox, Thunderbird, and ??? have not. I think Tcl should have 
switched long ago.  In any case, I will go with whatever the tcl re engine 
defines as word chars, the 'Motif' style', rather than attempt to write a giant 
re, which would have to change as characters are added.

Do we still need this line in fixwordbreaks?
tk.call('tcl_wordBreakAfter', 'a b', 0) # make sure word.tcl is loaded
I will leave it until you say we don't.

After patching, 'abcμμμdef' ('0x3bc'*3) is selected as one word instead of 
word, nonword, word.  'abc+efg' is still selected in 3 pieces, instead of the 1 
word seen by Command Prompt.

--
keywords:  -patch
stage: patch review -> commit review

___
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-30 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-30 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-30 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