[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



[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



[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



[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



[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



[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



[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



[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



[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



[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

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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[issue29286] Use METH_FASTCALL in str methods

2017-05-31 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1964

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

Changes by STINNER Victor :


--
pull_requests: +1962

___
Python tracker 

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



[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-05-31 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1963

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

STINNER Victor added the comment:

Oh, it's my fault: it's a bug coming from FASTCALL optimizations. The strange 
thing is that the bug wasn't catched by the giant Python test suite :-(

I knew that _PyStack_UnpackDict() has a bug in Python 3.6, but I completely 
forgot to fix it :-(

https://github.com/python/cpython/pull/1886 fixes the bug, but has not test yet.

--

___
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



[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



[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



[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



[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



[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 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 (&view, self, buffer, length, 0, 0) < 0)
return NULL;

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

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



[issue30526] Allow setting line_buffering on existing TextIOWrapper

2017-05-31 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +1965

___
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



[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



[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



[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



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

2017-05-31 Thread Antoine Pietri

Antoine Pietri added the comment:

In Windows/Python 3.6, the behavior matches the documented one, so this could 
actually be an important silent bug when executing a code wrote for Windows in 
another OS. I'd argue to fix it in 3.6 too.

--

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

This is definitely a bug if it really behaves as described.

PRs for fixing the functionality are welcome - I'm inclined to say fix it in 
3.6 as well, but it might be too big a behavioural change if people are already 
working around it.

--
nosy: +steve.dower

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

Antoine Pietri added the comment:

By the way, I'm pasting what I said on the PR here: 

For what it's worth, this bug was the cause of an important downtime in our 
organization, because someone needed to normalize a path that was later passed 
to a .mkdir(parents=True), and it was, in some cases, silently doing the mkdir 
of a wrong path instead of creating all the parents.

--

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



[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



[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



[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



[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



[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



[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



[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

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



[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

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



[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



[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



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

2017-05-31 Thread Thomas Shinnick

New submission from Thomas Shinnick:

Installed using python-3.6.1-amd64.exe then tried to pip install a package.  
Repeatedly had to manually intervene to open up permissions on python install 
subdirs, after getting these errors one at a time from pip:
  PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python 
3.6\\Lib\\site-packages\\fontTools'
  PermissionError: [Errno 13] Permission denied: 'c:\\program files\\python 
3.6\\Scripts\\pylupdate5.exe'
  PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python 
3.6\\share'
Gave up and set "full control" on \python 3.6\ dir and contents.

It seems permissions default to "read-only" subdirs which makes pip installs 
impossible.  Install and pip used under same userid and same session.  I 
thought I'd clicked yes to any question "install for all users".

--
components: Installation
messages: 294872
nosy: Thomas Shinnick
priority: normal
severity: normal
status: open
title: Windows 10 3.6.1 install disallows pip installs of packages
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



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

2017-05-31 Thread Ned Deily

Changes by Ned Deily :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

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

Looks like I was mistaken. My cross compiler was trying to load libgcc_s.so.1 
from the standard location and not liking the one it found. Fixed for now by 
setting LD_LIBRARY_PATH to point at the dir containing the right libgcc_s.so.1

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



[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



[issue30532] email.policy.SMTP.fold() mangles long headers

2017-05-31 Thread Chris Bradley

New submission from Chris Bradley:

When email.policy.SMTP.fold() attempts to wrap a line in which a chunk that 
does not contain a space is longer than the maximum line length, two things go 
wrong:
 - The second line does not begin with a space, creating an invalid header.
 - The space before the long chunk is stripped, causing the line break to occur 
in an invalid place.

In the attached test case, email.policy.SMTP.fold() is called on a line of the 
style:
Content-Disposition: attachment; filename=""

 does not contain any spaces and increases in length with each pass. 
Everything works correctly when 'filename=""' fits onto one line. 
However, once it is longer than the maximum line length, the following happens:
 - the space after the semicolon is dropped
 - the line break often splits up the 'filename' keyword
 - the second line loses the initial whitespace

--
files: test_long_mime_headers.py
messages: 294875
nosy: chr...@emergence.com
priority: normal
severity: normal
status: open
title: email.policy.SMTP.fold() mangles long headers
versions: Python 3.5
Added file: http://bugs.python.org/file46917/test_long_mime_headers.py

___
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



[issue30532] email.policy.SMTP.fold() mangles long headers

2017-05-31 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +barry, r.david.murray

___
Python tracker 

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



[issue30532] email.policy.SMTP.fold() mangles long headers

2017-05-31 Thread Joel Hillacre

Changes by Joel Hillacre :


--
pull_requests: +1968

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2017-05-31 Thread Carl Meyer

New submission from Carl Meyer:

The inspect module contains a getattr_static() function, for accessing an 
arbitrary attribute on a Python object without risking descriptor or 
__getattr__ code execution. This is useful for introspection tools that don't 
want to trigger any side effects.

The inspect module also contains a getmembers() function, which returns a 
mapping of names to values for all the object's members. This function could 
also be very useful to introspection tools, except that internally it uses 
normal getattr, thus reintroduces the risk of arbitrary code execution.

It would be useful to have an equivalent to getmembers() that is 
descriptor-safe. This could be done either by introducing a new 
getmembers_static(), or possibly by adding a `getattr` optional keyword 
argument to getmembers, that would take a getattr-equivalent callable to use in 
fetching attributes from the object. (The latter option might render some 
internal assumptions of getmembers() incorrect, needs experimentation.)

--
components: Library (Lib)
messages: 294876
nosy: carljm
priority: normal
severity: normal
status: open
title: missing feature in inspect module: getmembers_static
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



[issue30532] email.policy.SMTP.fold() mangles long headers

2017-05-31 Thread Joel Hillacre

Joel Hillacre added the comment:

I added a pull request that causes Chris's test to pass. I can confirm that the 
Chris's was not pass for me on master branch.

--
nosy: +jhillacre

___
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'm on it.

--

___
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



[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



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



[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



[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



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


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:

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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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

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



  1   2   >