[issue30509] Optimize calling type slots

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PR 1883 cleans up the code related to calling type slots.

* Use _PyObject_LookupSpecial() instead of lookup_maybe() in set_names(). This 
isn't performance critical.
* Inline lookup_maybe() in _PyObject_LookupSpecial(). This was the only 
remaining use of lookup_maybe().
* Replace lookup_maybe_method() and following raising an exception with 
lookup_method() in call_method().
* Replace lookup_method() with lookup_maybe_method() if the exception is 
ignored.
* Update outdated comments.
* Use call_method() in slot_sq_item. The comment about super-optimized version 
was outdated, now call_method() implements this.

--

___
Python tracker 

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



[issue27115] IDLE: replace uses of tkinter simpledialog with query.Query

2017-05-31 Thread Louie Lu

Louie Lu added the comment:

Terry, on the original issue about goto dialog, I would like to propose another 
approach, instead of using query.Query or simpledialog, how about to make it as 
a single-window application like sublime text: 
http://docs.sublimetext.info/en/latest/file_management/file_navigation.html#goto-anything

I'm now doing some experience on this, and it will push forward for what #30422 
want to do.

--

___
Python tracker 

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



[issue30509] Optimize calling type slots

2017-05-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1959

___
Python tracker 

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



[issue30521] IDLE: Add navigate bar and replace current goto dialog

2017-05-31 Thread Louie Lu

New submission from Louie Lu:

Propose a sublime-like navigate bar to replace current goto dialog.

Navigate bar current support two different mode: prefix ':' for goto line, and 
prefix '@' for goto symbol.

When user use shortcut Ctrl+G to open goto line, it will prompt out a navigate 
bar on the top of the editor.text with prefix ':', user can enter valid lineno, 
and it will highlight the line on the editor.

After return, it will close the navigate bar and clear the highlight, user 
cursor will be set to the target lineno.

--
assignee: terry.reedy
components: IDLE
messages: 294819
nosy: louielu, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Add navigate bar and replace current goto dialog
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30495] IDLE: modernize textview module

2017-05-31 Thread Terry J. Reedy

Terry J. Reedy added the comment:

1. I prefer to not deal with ttk styles yet, unless forced, and we don't seem 
to be here.
2. Yes, I wanted to get rid of that useless frame as part of refactoring.
3. 'self.x = x = expr' is a semi-common idiom.  A local name is nice when there 
are multiple local references to the object.  Dereferencing a local name is 
faster than an attribute, though it may not be enough to worry about unless 
there is a loop.  No having so many 'self.' prefixes makes the code less 
cluttered and probably easier to read. The attribute is obviously needed to 
(directly) refer to the widget outside the method, whether in other methods of 
the class or outside functions such as in tests. You have probably noticed 
expression statements, like "Widget(parent, opt=val).grid(...), where no Python 
binding is kept.

--

___
Python tracker 

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



[issue30520] loggers can't be pickled

2017-05-31 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Loggers could simply be pickled and unpickled by name, but pickle currently 
tries the hard way:

>>> import pickle
>>> import logging
>>> log = logging.getLogger('foo')
>>> pickle.dumps(log)
Traceback (most recent call last):
  File "", line 1, in 
pickle.dumps(log)
TypeError: can't pickle _thread.RLock objects

--
components: Library (Lib)
messages: 294818
nosy: pitrou, vinay.sajip
priority: normal
severity: normal
status: open
title: loggers can't be pickled
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30495] IDLE: modernize textview module

2017-05-31 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Old 2, references; my other main bookmark is the tk reference.
https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm
It is harder to read at first, but more complete, accurate, and up to date.  
Unfortunately, even it does not specify all the OS-specific divergences.

--

___
Python tracker 

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



[issue30521] IDLE: Add navigate bar and replace current goto dialog

2017-05-31 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1960

___
Python tracker 

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



[issue25324] Importing tokenize modifies token

2017-05-31 Thread Albert-Jan Nijburg

Albert-Jan Nijburg added the comment:

I've updated token.rst and Misc/NEWS. Let me know if the wording is correct.

--

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

Maybe the feature already exists but I failed to find it. Since I'm suprised 
that nobody implements that before (in unittest), I wait for a first feedback 
before starting to document the new feature and to write an unit test for it.

support.run_unittest() doesn't use unittest.main() and so don't support the new 
--list-tests option.

--

___
Python tracker 

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



[issue30517] Enum does not recognize enum.auto as unique values

2017-05-31 Thread Max

Max added the comment:

Ah sorry about that ... Yes, everything works fine when used properly.

--
resolution:  -> not a bug
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



[issue30522] Allow replacing a StreamHandler's stream

2017-05-31 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Right now it is probably possible using something like:

handler.acquire()
try:
handler.flush()
handler.stream = new_stream
finally:
handler.release()

but it would be nice to have an officially-supported method to do that.

Context: if I reconfigure sys.stderr, I'd like to update all handlers that have 
a reference to the old sys.stderr.

--
messages: 294820
nosy: pitrou, vinay.sajip
priority: normal
severity: normal
status: open
title: Allow replacing a StreamHandler's stream
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue29512] regrtest refleak: implement bisection feature

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

First step: I created the issue #30523, "unittest: add --list-tests option to 
only display the list of test names, don't run tests".

--

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-05-31 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1961

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-05-31 Thread Julien Palard

Julien Palard added the comment:

If it can be of any help, pytest have a "pytest --collect-only", it may make 
sense to use the same option name for consistency. I also though about 
"--dry-run" but I still prefer --list-tests or --collect-only.

--
nosy: +mdk

___
Python tracker 

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



[issue30522] Allow replacing a logging.StreamHandler's stream

2017-05-31 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Oh, yes, sorry.  This is about logging.

--
title: Allow replacing a StreamHandler's stream -> Allow replacing a 
logging.StreamHandler's stream

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

I wrote this patch because I'm trying to find which test of test_threading 
leaks a reference:

./python -m test -R 3:3 test_threading

Usually, I modify Lib/test/test_threading.py to remove tests one by one. I 
"bisect" the test manually. But this process is slow and painful, and it seems 
like we have many tests which leak references!

--

___
Python tracker 

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



[issue30522] Allow replacing a StreamHandler's stream

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

Which StreamHandler class? Is this issue related to logging? If yes, please 
mention it in the title ;-)

--
nosy: +haypo

___
Python tracker 

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



[issue30448] test_subprocess creates a core dump on FreeBSD

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

Sadly, I'm unable to reproduce the issue on my FreeBSD 11 VM :-(

--

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-05-31 Thread STINNER Victor

New submission from STINNER Victor:

Attached pull requests adds a --list-tests option to only display the list of 
test names, don't run tests.

It's a first step to implement the issue #29512: "regrtest refleak: implement 
bisection feature".

--
components: Tests
messages: 294825
nosy: ezio.melotti, haypo, michael.foord, rbcollins
priority: normal
severity: normal
status: open
title: unittest: add --list-tests option to only display the list of test 
names, don't run tests
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30403] PEP 547: Running extension modules using -m switch

2017-05-31 Thread Nick Coghlan

Nick Coghlan added the comment:

This proposal is now PEP 547: 
https://github.com/python/peps/commit/cd84e206f58cf929eea235fb894cff1db2a1dabf

--
title: Running extension modules using -m switch -> PEP 547: Running extension 
modules using -m switch

___
Python tracker 

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



[issue30524] iter(classmethod, sentinel) broken for Argument Clinic class methods?

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

next(iter(datetime.now, None)) can be turned into a nice test.

--

___
Python tracker 

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



[issue30527] PyMemoryView_FromBuffer memory leak

2017-05-31 Thread Christoph Reiter

New submission from Christoph Reiter:

I'm using the following code

PyObject *
get_memoryview (PyObject *self) {
Py_buffer view;

...

// this takes a ref on self
if (PyBuffer_FillInfo (, self, buffer, length, 0, 0) < 0)
return NULL;

// this returns a  object
return PyMemoryView_FromBuffer ();
}

The problem is that when I call release() on the returned memory object
the buffer does not get release and as a result the exporter leaks.

Am I missing something or is this a bug?

--
messages: 294851
nosy: lazka
priority: normal
severity: normal
status: open
title: PyMemoryView_FromBuffer memory leak

___
Python tracker 

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



[issue30527] PyMemoryView_FromBuffer memory leak

2017-05-31 Thread Christoph Reiter

Christoph Reiter added the comment:

Ah, so if I understand correctly, exposing always requires something 
implementing the buffer interface in some way. I might require multiple 
different memoryviews for this object, so maybe some proxy object implementing 
it might work.

Thanks Stefan for your quick help.

--
resolution:  -> not a bug
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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is definitely a bug and I think the fixes should be backported.

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



[issue30524] iter(classmethod, sentinel) broken for Argument Clinic class methods?

2017-05-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> high

___
Python tracker 

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



[issue30504] Allow inspecting buffering attribute of IO objects

2017-05-31 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ah, I had forgotten about the `line_buffering` attribute. Thank you.

--

___
Python tracker 

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



[issue30509] Optimize calling type slots

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you, I know about this, but it takes twice more time, so I don't use it 
regularly. And it doesn't allow to compare three versions. :-(

--

___
Python tracker 

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



[issue30095] HTMLCalendar allow custom classes

2017-05-31 Thread Walter Dörwald

Walter Dörwald added the comment:

See my comments on the pull request: https://github.com/python/cpython/pull/1439

After you address those, IMHO this is ready to be merged.

--

___
Python tracker 

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



[issue30527] PyMemoryView_FromBuffer memory leak

2017-05-31 Thread Stefan Krah

Stefan Krah added the comment:

"Py_buffer view" is stack allocated. One can use memoryviews based on such 
buffers *inside* a function, but not return them.

--
nosy: +skrah

___
Python tracker 

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



[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2017-05-31 Thread Hristo Venev

New submission from Hristo Venev:

`ipaddress.IPv4Network('127.0.0.0/16').reverse_pointer = 
'0/16.0.0.127.in-addr.arpa'` is definitely wrong. I think it should be 
'0.127.in-addr.arpa'.

A funnier case, `ipaddress.IPv6Network('2001:db8::/32').reverse_pointer = 
'2.3./.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa'`.

For the case where no single reverse pointer exists (e.g. `127.0.0.0/13`), I 
think it should be `None`.

--
components: Library (Lib)
messages: 294854
nosy: h.venev
priority: normal
severity: normal
status: open
title: ipaddress.IPv{4,6}Network.reverse_pointer is broken
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



[issue30526] Allow setting line_buffering on existing TextIOWrapper

2017-05-31 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Currently, if you want to change the line buffering behaviour of standard 
streams, you can create a new stream and assign it to 
sys.{stdout,stderr,stdin}.  Unfortunately, it is common for references to the 
old streams to be stored in various places (such as logging configuration, or 
third-party libraries).  Replacing them all is probably a hopeless cause.  It 
would be much better if one could simply write `sys.stdout.line_buffering = 
True` and be done with it.

--
components: IO
messages: 294850
nosy: benjamin.peterson, pitrou, stutzbach
priority: normal
severity: normal
status: open
title: Allow setting line_buffering on existing TextIOWrapper
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30527] PyMemoryView_FromBuffer memory leak

2017-05-31 Thread Stefan Krah

Stefan Krah added the comment:

"Py_buffer view" needs to go into the exporting object.  That object needs  a 
getbufferproc().  That getbufferproc() can use  PyBuffer_FillInfo() to fill in 
the view that is now kept alive because it's in the object.

The object then supports the buffer protocol and memoryviews can be created 
automatically from the Python level without any further C code.

--

___
Python tracker 

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



[issue30527] PyMemoryView_FromBuffer memory leak

2017-05-31 Thread Christoph Reiter

Christoph Reiter added the comment:

hm, ok.

Any idea how I can create a memoryview that is usable from Python then?

--

___
Python tracker 

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



[issue30527] PyMemoryView_FromBuffer memory leak

2017-05-31 Thread Stefan Krah

Stefan Krah added the comment:

Sorry, actually I wasn't totally clear:  The exporting object just needs a 
getbufferproc() that can respond to buffer requests and keeps track of how many 
views are exported.

"View in the object" is misleading and not necessary; it can be used for some 
advanced stuff.

--

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Steve Dower

Steve Dower added the comment:

Ah, looks like they require symlinks for the whole test, which means you need 
to be admin when running them on Windows.

Zach - do we have any buildbots running as admin for symlink tests?

--
nosy: +zach.ware

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 56ddfd2eea4d98456a9a99bf2a718f21ee6b2be2 by Mariatta (csabella) 
in branch 'master':
bpo-27618: Clarify that threading.Lock is a factory function (GH-1307)
https://github.com/python/cpython/commit/56ddfd2eea4d98456a9a99bf2a718f21ee6b2be2


--
nosy: +Mariatta

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 958e815fe014e9a3c64f3568b883c2a7b32a4e2e by Mariatta (csabella) 
in branch '3.5':
bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1895)
https://github.com/python/cpython/commit/958e815fe014e9a3c64f3568b883c2a7b32a4e2e


--

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-31 Thread Yury Selivanov

Yury Selivanov added the comment:

I propose to start using the issues [1] as there are so many topics we'll have 
to discuss.  Feel free to create new issue for whatever idea you have!

[1] https://github.com/asyncio-docs/cpython-aiodocs/issues

--

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1969

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Eryk Sun

Eryk Sun added the comment:

> Ah, looks like they require symlinks for the whole test, 
> which means you need to be admin when running them on Windows.

The privilege to create symlinks isn't filtered out of a standard user's token. 
Are there any buildbots already running as a standard user? In that case it may 
be simpler to modify the user's rights via secpol.msc: Local Policies -> User 
Rights Assignment -> Create symbolic links.

Support could also be added for the new feature in Windows 10 to allow 
unprivileged creation of symlinks when the system is in developer mode and the 
flag SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE [1] is used. A keyword-only 
option to use this flag could be backported to 3.6 and enabled by default in 
3.7.

[1]: https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10

--
nosy: +eryksun

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Thanks, Mariatta.  I've backported to 3.5 and 3.6 with the new cherry_picker 
instructions.

--

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks :)

--
resolution:  -> fixed
stage: backport needed -> resolved
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 9abd0bf68f73b3beb56954e22740f0efcf04bc79 by Mariatta (csabella) 
in branch '3.6':
bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1894)
https://github.com/python/cpython/commit/9abd0bf68f73b3beb56954e22740f0efcf04bc79


--

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1975

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Antoine Pietri

Antoine Pietri added the comment:

I added a fix for the tests and the code.

--

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Zachary Ware

Zachary Ware added the comment:

> do we have any buildbots running as admin for symlink tests?

No, as far as I know.  I just took Eryk's suggestion and gave the buildslave 
user on my Windows 8.1 bot rights to create symbolic links, though.  It's now 
rebooting after updates, we'll see how it does shortly.

--

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1974

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 9139f23464ed0f71cb0e34a535a5b7ddf7fad748 by Mariatta in branch 
'2.7':
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1898)
https://github.com/python/cpython/commit/9139f23464ed0f71cb0e34a535a5b7ddf7fad748


--

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage: backport needed -> resolved

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1976

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Steve Dower

Steve Dower added the comment:

The initial fix should be easy:

--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -329,8 +329,6 @@ class _PosixFlavour(_Flavour):
 if e.errno != EINVAL:
 if strict:
 raise
-else:
-return newpath
 # Not a symlink
 path = newpath

However, the trick is going to be in the tests, which are shared between POSIX 
and Windows - and are apparently passing on Windows right now. I'm not entirely 
sure why that is, but it may not be as simple here as "works on POSIX".

--

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1972

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1973

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-31 Thread Yury Selivanov

Yury Selivanov added the comment:

I've created a repo for discussing and making next version of asyncio docs: 
https://github.com/asyncio-docs/cpython-aiodocs. Feel free to join!

--

___
Python tracker 

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



[issue30499] Deprecated note in set documentation

2017-05-31 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review
versions: +Python 3.7

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage: resolved -> backport needed
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-31 Thread Yury Selivanov

Yury Selivanov added the comment:

> I can experiment with memcached as well but I think this proposal is a good 
> idea and would work well with Redis.

I like it! Let's use Redis as an example. Please open an issue at asyncio-docs 
to discuss the details.

--

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 9522159bc41f2be0f4aafd0fa182669876aca47f by Mariatta in branch 
'3.6':
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1897)
https://github.com/python/cpython/commit/9522159bc41f2be0f4aafd0fa182669876aca47f


--

___
Python tracker 

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



[issue22702] to improve documentation for join() (str method)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 1721b06a78a4fd7942d9658ac8add6911a1a03e3 by Mariatta in branch 
'3.5':
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1896)
https://github.com/python/cpython/commit/1721b06a78a4fd7942d9658ac8add6911a1a03e3


--
nosy: +Mariatta

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2017-05-31 Thread Milan Oberkirch

Changes by Milan Oberkirch :


--
pull_requests: +1979

___
Python tracker 

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



[issue30531] Windows 10 3.6.1 install disallows pip installs of packages

2017-05-31 Thread Steve Dower

Steve Dower added the comment:

You can try installing with "--user" to install to a per-user directory, start 
running pip from an administrative command/PowerShell prompt, or use the venv 
module to create a virtual environment.

Alternatively, if you select the default installation options you will get one 
that you can modify freely, but because it's in your user directory nobody else 
on the machine can use it.

Installing to Program Files is supposed to be read only. You're welcome to open 
it up, just be aware that it is a security risk to do so.

--

___
Python tracker 

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



[issue30531] Windows 10 3.6.1 install disallows pip installs of packages

2017-05-31 Thread Eryk Sun

Eryk Sun added the comment:

You installed Python for all users, which defaults to installing in 
%ProgramFiles% or %ProgramFiles(x86)%. Python's installation directory inherits 
the security of its parent directory, which in this case grants full control 
only to SYSTEM, TrustedInstaller, and Administrators. Standard users are 
granted only read and execute access. Thus if you're logged on as a standard 
user or UAC-restricted administrator, adding and removing packages requires 
running pip from an elevated command prompt (cmd.exe) that's "[r]un as 
administrator".

A per-user installation, on the other hand, defaults to installing in a 
subdirectory of the user's "%LocalAppData%\Programs" directory, for which the 
user should have full control.

In either case you can change the default installation directory. In general, I 
wouldn't recommend installing for all users to an untrusted location, but 
you're of course free to do that if you want.

--
nosy: +eryksun
resolution:  -> not a bug
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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Cheryl Sabella

Cheryl Sabella added the comment:

*bump*

The PR was approved by R. David Murray a while ago.  I can backport once it's 
merged.

Thanks!

--
nosy: +csabella

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-31 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks for the PR Cheryl. 

You can backport using cherry_picker.py 
Note that there's a recent update to it: 
https://github.com/python/core-workflow/tree/master/cherry_picker

--
stage: patch review -> backport needed

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-31 Thread Eric Appelt

Eric Appelt added the comment:

> 2b - I propose to take a simple protocol like Memcache or 
> Redis and simply implement it using the streams API.  We’ll only
> need two methods: set and get; and in the end we’ll teach the user
> how things really work and how to design async APIs.

I decided to make myself a test subject for this idea using Redis since 
although I use Redis a lot at work I've never looked at the underlying Redis 
protocol. I also haven't used the streams API in a long time, and never for 
anything other than simple exploration.

I worked on this the other night and found the Redis protocol simple enough to 
understand and was able to write a simple and somewhat clumsy client the other 
night with a bit of work: 
https://gist.github.com/appeltel/09d77eb489494ae1e2703933108cb60a

One thing that might be good about the Redis protocol for this purpose is that 
the parsing isn't completely trivial but it isn't overly complex either. For 
example, a response string can be given in either the simple format, which 
begins with a "+" byte and then terminates with "\r\n", or it can be in a 
binary safe format where a token of the form "$123\r\n" is sent first, 
signaling that the next 123 bytes are the result to be followed by another 
"\r\n" termination. There is also the sentinel value "$-1\r\n" which may signal 
an unset key. Thus the string "foo" might be sent as "+foo\r\n" or 
"$3\r\nfoo\r\n".

So I think this can be reasonably described in a few brief paragraphs and it is 
much more interesting (to me) than an echo client/server example.

The tutorial should probably also include a link to a rudimentary server 
implementation of an in-memory key/value store implementing the Redis protocol 
and supporting just GET and SET, as the reader may not be able to easily stand 
up Redis for a variety of reasons or lack of knowledge.

I can experiment with memcached as well but I think this proposal is a good 
idea and would work well with Redis.

--

___
Python tracker 

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



[issue30436] importlib.find_spec raises AttributeError when parent is not a package/module

2017-05-31 Thread Milan Oberkirch

Changes by Milan Oberkirch :


--
pull_requests: +1977

___
Python tracker 

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



[issue30436] importlib.find_spec raises AttributeError when parent is not a package/module

2017-05-31 Thread Milan Oberkirch

Milan Oberkirch added the comment:

I added a PR changing the exception raised as suggested, reviews welcome!

--
nosy: +zvyn

___
Python tracker 

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



[issue30499] Deprecated note in set documentation

2017-05-31 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This is good to go.

--
assignee: rhettinger -> Mariatta
nosy: +Mariatta

___
Python tracker 

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



[issue30509] Optimize calling type slots

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 4e624ca50a665d7e4d527ab98932347ff43a19b0 by Serhiy Storchaka in 
branch 'master':
bpo-30509: Clean up calling type slots. (#1883)
https://github.com/python/cpython/commit/4e624ca50a665d7e4d527ab98932347ff43a19b0


--

___
Python tracker 

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



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-05-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> patch review

___
Python tracker 

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



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-05-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1966

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Zopieux

Zopieux added the comment:

I agree bpo-30177 is not a suitable fix for this issue, as it fixes the doc 
instead of fixing the actual underlying bug in the function behavior.

This bug can lead to files being added to the wrong (parent) directory, which 
is quite critical.

--
nosy: +zopieux

___
Python tracker 

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



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-05-31 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Python parser supports only ' ', '\t', '\x0c' and '\r' as whitespaces. The 
parser of f-strings raises incorrect error messages for subexpressions 
consistent only from whitespaces, if they contain whitespaces out this set.

>>> eval("\xa0")
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1
 
^
SyntaxError: invalid character in identifier
>>> eval("f'''{\xa0}'''")
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1
SyntaxError: f-string: empty expression not allowed

--
components: Interpreter Core
messages: 294869
nosy: eric.smith, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Incorrect error messages for invalid whitespaces in f-string 
subexpressions
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PR 1888 makes error messages for f-string subexpressions consistent with error 
messages for expressions out of f-strings, simplifies and speeds up the parsing 
code.

--

___
Python tracker 

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



[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-05-31 Thread Mariano Anaya

New submission from Mariano Anaya:

The example on which tries to create a method from the function's __get__ 
doesn't work for Python 3.5+. It would give this error:

TypeError: method expected 2 arguments, got 3

The 3rd parameter, needs to be removed.

--
assignee: docs@python
components: Documentation
messages: 294871
nosy: Mariano Anaya, docs@python
priority: normal
pull_requests: 1967
severity: normal
status: open
title: Descriptors HowTo: Example on function.__get__ needs update
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue28791] update sqlite to 3.19.2

2017-05-31 Thread Big Stone

Changes by Big Stone :


--
title: update sqlite to 3.17.0 -> update sqlite to 3.19.2

___
Python tracker 

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



[issue30527] PyMemoryView_FromBuffer memory leak

2017-05-31 Thread Christoph Reiter

Christoph Reiter added the comment:

In case someone ends up here with a similar problem, here is my solution using 
a proxy object: 
https://github.com/pygobject/pycairo/blob/4ab80df68dd99a8e4bfb0c6a88dc5b2a9b0f3f10/cairo/bufferproxy.c

--

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Steve Dower

Steve Dower added the comment:

Ah, didn't catch that it doesn't occur on Windows - that explains why I've 
never seen it before.

Yes, definitely fix and backport. Adding the RMs in case they want to delay any 
upcoming releases to get the fix.

--
nosy: +larry, ned.deily
priority: normal -> critical

___
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

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have concerns about following cases.

* f-string containing multiple equivalent subexpressions:

f'{x} {x}'

or

f'''
{x}
{x}
'''

* f-string containing escaped newlines:

f'''\
\
{x}\
\
'''

The tests look slightly verbose and fragile to me. If once the parser will 
produce more efficient tree (see issue26415), the tests may fail. Needed more 
tests (for cases mentioned above), and adding them will add more verbose code. 
Maybe just find the child (or several children) of specific type and check 
lineno and col_offset only for it and few its children? If this will make the 
tests simpler. But if tests can't be made simpler, we should live with this.

--
nosy: +eric.smith, serhiy.storchaka

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-31 Thread Ned Deily

Ned Deily added the comment:

We have less than 2 weeks until cutoff for 3.6.2 so it would be great if 
someone would take this on.

--

___
Python tracker 

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



[issue30392] default webbrowser fails on macOS Sierra 10.12.5

2017-05-31 Thread Ned Deily

Ned Deily added the comment:

Good news!  Apple appears to have fixed the osascript regression in the most 
recent macOS 10.12.6 public beta (version 2).  So I'm going to mark this issue 
as "pending fixed" until the official release of 10.12.6.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> pending

___
Python tracker 

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



[issue17852] Built-in module _io can loose data from buffered files at exit

2017-05-31 Thread Neil Schemenauer

Neil Schemenauer added the comment:

Well, I just spent a couple of hours debugging a problem caused by this issue.  
You could argue that I should be calling close() on all of my file-like objects 
but I agree with Armin that the current "most of the time it works" behaviour 
is quite poor.

In my case, the issue is exactly what Antoine Pitrou suggests: if the FileIO 
object gets finalized before the BufferedIO object wrapping it then the 
buffered data gets lost. That depends on the order that the GC calls finalizers.

Armin's suggestion of keeping a list of open buffered files and flushing them 
before exiting seems like a simple and robust solution.  Having a warning for 
unclosed files is fine but in order to make porting Python 2 code as painless 
as possible, matching the safer behavior of Python 2 would be worth the extra 
bit of flush logic.

--
nosy: +nascheme

___
Python tracker 

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



[issue25324] Importing tokenize modifies token

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If move COMMENT, NL and ENCODING to the token module, their documentation 
should be moved from tokenize.rst to token.rst.

I have asked on Python-Dev whether this is a right way. [1]

[1] https://mail.python.org/pipermail/python-dev/2017-May/148080.html

--

___
Python tracker 

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



[issue30525] Expose SCTs on TLS connections

2017-05-31 Thread Alex Gaynor

New submission from Alex Gaynor:

CT (https://www.certificate-transparency.org/) is starting to become a thing! 
It'd be great if we exposed SCTs (whether from TLS extensions, OCSP, or 
embedded in the certificate) for TLS connections. This would allow higher level 
protocols to begin acting on them.

This would need to be an OpenSSL 1.1.0+ feature.

--
assignee: christian.heimes
components: SSL
messages: 294838
nosy: alex, christian.heimes, dstufft, janssen
priority: normal
severity: normal
status: open
title: Expose SCTs on TLS connections
versions: Python 3.7

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

I used testr which has a --list-tests option:
http://testrepository.readthedocs.io/en/latest/MANUAL.html#listing-tests

--

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2017-05-31 Thread Daniel Birnstiel

Daniel Birnstiel added the comment:

While having to deal with this bug for a while I have written a small library 
using `pthread_atfork`: https://github.com/Birne94/python-atfork-lock-release

It allows registering atfork-hooks (similar to the ones available by now) and 
frees the stdout/stderr as well as manually provided io locks. I guess it uses 
some hacky ways to get the job done, but resolved the issue for me and has been 
working without problems for some weeks now.

--

___
Python tracker 

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



[issue30509] Optimize calling type slots

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PR 1883 seems doesn't affect indexing, PR 1861 makes it 1.7 times faster.

$ ./python -m perf timeit -s 'class A:' -s '  def __getitem__(s, i): return 
t[i]' -s 'a = A(); t = tuple(range(1000))' --duplicate 100 'list(a)'

Unpatched:  Mean +- std dev: 498 us +- 26 us
PR 1863:Mean +- std dev: 496 us +- 31 us
PR 1861:Mean +- std dev: 288 us +- 7 us

--

___
Python tracker 

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



[issue30524] iter(classmethod, sentinel) broken for Argument Clinic class methods?

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It works in 3.5 and 3.7, but raises a StopIteration in 3.6.

--
components: +Interpreter Core
keywords: +3.6regression
versions:  -Python 3.7

___
Python tracker 

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



[issue30455] Generate C code from token.py and not vice versa

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The regular expression tokenize.Funny also can be generated. Information is not 
enough for distinguish between Operator, Bracket and Special, but seems this 
isn't needed.

Some token names can be generated from Grammar/Grammar. But needed an 
additional mapping for relations between token strings and names ('+' <-> PLUS, 
etc).

--

___
Python tracker 

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



[issue30524] iter(classmethod, sentinel) broken for Argument Clinic class methods?

2017-05-31 Thread Martijn Pieters

New submission from Martijn Pieters:

I'm not sure where exactly the error lies, but issue 27128 broke iter() for 
Argument Clinic class methods. The following works in Python 3.5, but not in 
Python 3.6:

from datetime import datetime
from asyncio import Task

next(iter(datetime.now, None))
next(iter(Task.all_tasks, None))

In 3.6 StopIteration is raised:

>>> next(iter(datetime.now, None))
Traceback (most recent call last):
  File "", line 1, in 
StopIteration
>>> next(iter(Task.all_tasks, None))
Traceback (most recent call last):
  File "", line 1, in 
StopIteration

(In 3.5 a `datetime.datetime` and `set` object are produced, respectively)

The only thing these two methods have in common is that they are class methods 
with no arguments, parsed out by the Argument Clinic generated code (so using 
_PyArg_Parser).

What appears to have changed is that iter() was switched from using 
PyObject_Call to _PyObject_FastCall, see 
https://github.com/python/cpython/commit/99ee9c70a73ec2f3db68785821a9f2867c3f637f

--
messages: 294835
nosy: mjpieters
priority: normal
severity: normal
status: open
title: iter(classmethod, sentinel) broken for Argument Clinic class methods?
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue30524] iter(classmethod, sentinel) broken for Argument Clinic class methods?

2017-05-31 Thread Martijn Pieters

Martijn Pieters added the comment:

Forgot to addthis: this bug was found via 
https://stackoverflow.com/questions/44283540/iter-not-working-with-datetime-now

--

___
Python tracker 

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



[issue30524] iter(classmethod, sentinel) broken for Argument Clinic class methods?

2017-05-31 Thread Emanuel Barry

Changes by Emanuel Barry :


--
nosy: +haypo, serhiy.storchaka
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue30509] Optimize calling type slots

2017-05-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, wrong data. PR 1883 makes indexing 1.2 times faster, PR 1861 makes it 
1.7 times faster

$ ./python -m perf timeit -s 'class A:' -s '  def __getitem__(s, i): return 
t[i]' -s 'a = A(); t = tuple(range(1000))' --duplicate 100 'list(a)'

Unpatched:  Mean +- std dev: 498 us +- 26 us
PR 1883:Mean +- std dev: 351 us +- 10 us
PR 1861:Mean +- std dev: 288 us +- 7 us

--

___
Python tracker 

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



[issue30509] Optimize calling type slots

2017-05-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
Removed message: http://bugs.python.org/msg294837

___
Python tracker 

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



[issue30507] Elements reports it is a list on Element.remove

2017-05-31 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Thanks for the feedback, Raymond. I'll try to shift my focus on more pressing 
issues. (Closing as rejected)

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



[issue25324] Importing tokenize modifies token

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:


New changeset fc354f07855a9197e71f851ad930cbf5652f9160 by Victor Stinner 
(Albert-Jan Nijburg) in branch 'master':
bpo-25324: copy tok_name before changing it (#1608)
https://github.com/python/cpython/commit/fc354f07855a9197e71f851ad930cbf5652f9160


--

___
Python tracker 

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



[issue30509] Optimize calling type slots

2017-05-31 Thread STINNER Victor

STINNER Victor added the comment:

FYI you can use "./python -m perf timeit --compare-to=./python-ref" if you keep 
the "reference" Python (unpatched), so perf computes for you the "?.??x 
slower/faster" factor ;-)

--

___
Python tracker 

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2017-05-31 Thread Barry Davis

Barry Davis added the comment:

I meant my cross compiled python, not my cross compiler.

--

___
Python tracker 

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



[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-05-31 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review

___
Python tracker 

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



  1   2   >