[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset d03fd5d041b6f514daf0aabc0c159d8727c33980 by Mariatta Wijaya in 
branch '2.7':
Issue #29329: Improve documentation for hex(). Patch by Ammar Askar
https://github.com/python/cpython/commit/d03fd5d041b6f514daf0aabc0c159d8727c33980


--

___
Python tracker 

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



[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
resolution:  -> fixed
stage: commit review -> resolved

___
Python tracker 

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



[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks, Pekka, Eryk, Ammar, and Zachary :)

--
status: open -> closed

___
Python tracker 

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



[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7804789368a by Mariatta Wijaya in branch '2.7':
Issue #29329: Improve documentation for hex(). Patch by Ammar Askar
https://hg.python.org/cpython/rev/d7804789368a

--
nosy: +python-dev

___
Python tracker 

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



[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Zachary Ware

Zachary Ware added the comment:

LGTM.

--
assignee: docs@python -> Mariatta
nosy: +Mariatta, zach.ware
stage: needs patch -> commit review

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 by Mariatta Wijaya in 
branch 'master':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/abfa17511f7ce8f1a6394f28f82ffb9a916fcf03

New changeset 848eeb1debc94a82660bf5af4e3d554b02b81c2e by Mariatta Wijaya in 
branch 'master':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/848eeb1debc94a82660bf5af4e3d554b02b81c2e

New changeset 35519d021ece942efc4a710ea3e94bcc5c06b130 by Mariatta Wijaya in 
branch 'master':
Issue #29381: merge with 3.6
https://github.com/python/cpython/commit/35519d021ece942efc4a710ea3e94bcc5c06b130


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 3f5b24dd4b38bf885a80f4bb5f605cd6b0c49ead by Mariatta Wijaya in 
branch '2.7':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/3f5b24dd4b38bf885a80f4bb5f605cd6b0c49ead


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 848eeb1debc94a82660bf5af4e3d554b02b81c2e by Mariatta Wijaya in 
branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/848eeb1debc94a82660bf5af4e3d554b02b81c2e


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks, Jim, Marco, and Raymond :)

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df356d3c916e by Mariatta Wijaya in branch '2.7':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://hg.python.org/cpython/rev/df356d3c916e

--

___
Python tracker 

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



[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki

INADA Naoki added the comment:

microbench:
$ ./python.patched -m perf timeit --compare-to `pwd`/python.default -s "d = 
b''" -- "d.decode('ascii')"
python.default: . 109 ns +- 1 ns
python.patched: . 102 ns +- 1 ns

Median +- std dev: [python.default] 109 ns +- 1 ns -> [python.patched] 102 ns 
+- 1 ns: 1.08x faster (-7%)

$ ./python.patched -m perf timeit --compare-to `pwd`/python.default -s "l = 
[42]" -- "l.count(42)"
python.default: . 66.0 ns +- 0.9 ns
python.patched: . 60.0 ns +- 0.3 ns

Median +- std dev: [python.default] 66.0 ns +- 0.9 ns -> [python.patched] 60.0 
ns +- 0.3 ns: 1.10x faster (-9%)

--

___
Python tracker 

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



[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki

INADA Naoki added the comment:

Here is the result. I'll investigate mako result.

+ ../python.default -m perf compare_to default.json patched.json -G 
--min-speed=1
Slower (20):
- mako: 40.9 ms +- 0.4 ms -> 44.7 ms +- 0.6 ms: 1.09x slower (+9%)
- chaos: 298 ms +- 3 ms -> 308 ms +- 2 ms: 1.03x slower (+3%)
- telco: 19.7 ms +- 0.6 ms -> 20.2 ms +- 0.5 ms: 1.03x slower (+3%)
- scimark_sor: 478 ms +- 7 ms -> 491 ms +- 11 ms: 1.03x slower (+3%)
- xml_etree_process: 238 ms +- 3 ms -> 245 ms +- 4 ms: 1.03x slower (+3%)
- logging_simple: 31.1 us +- 0.3 us -> 31.9 us +- 0.3 us: 1.03x slower (+3%)
- logging_format: 36.4 us +- 0.3 us -> 37.2 us +- 0.4 us: 1.02x slower (+2%)
- nqueens: 264 ms +- 3 ms -> 270 ms +- 3 ms: 1.02x slower (+2%)
- fannkuch: 1.07 sec +- 0.02 sec -> 1.09 sec +- 0.03 sec: 1.02x slower (+2%)
- django_template: 401 ms +- 5 ms -> 409 ms +- 3 ms: 1.02x slower (+2%)
- call_method_slots: 14.6 ms +- 0.2 ms -> 14.9 ms +- 0.1 ms: 1.02x slower (+2%)
- meteor_contest: 199 ms +- 2 ms -> 203 ms +- 2 ms: 1.02x slower (+2%)
- logging_silent: 735 ns +- 9 ns -> 746 ns +- 11 ns: 1.02x slower (+2%)
- sqlalchemy_declarative: 314 ms +- 4 ms -> 318 ms +- 4 ms: 1.01x slower (+1%)
- genshi_text: 89.1 ms +- 1.3 ms -> 90.2 ms +- 1.3 ms: 1.01x slower (+1%)
- unpack_sequence: 131 ns +- 2 ns -> 133 ns +- 2 ns: 1.01x slower (+1%)
- call_method: 15.1 ms +- 0.2 ms -> 15.3 ms +- 0.1 ms: 1.01x slower (+1%)
- scimark_monte_carlo: 263 ms +- 6 ms -> 266 ms +- 6 ms: 1.01x slower (+1%)
- unpickle_pure_python: 834 us +- 16 us -> 843 us +- 15 us: 1.01x slower (+1%)
- pathlib: 51.2 ms +- 0.9 ms -> 51.7 ms +- 0.7 ms: 1.01x slower (+1%)

Faster (11):
- scimark_lu: 457 ms +- 49 ms -> 407 ms +- 7 ms: 1.12x faster (-11%)
- chameleon: 30.2 ms +- 0.6 ms -> 28.8 ms +- 0.4 ms: 1.05x faster (-5%)
- xml_etree_parse: 314 ms +- 12 ms -> 303 ms +- 8 ms: 1.04x faster (-4%)
- sqlite_synth: 10.3 us +- 0.2 us -> 9.94 us +- 0.25 us: 1.03x faster (-3%)
- pickle_pure_python: 1.28 ms +- 0.02 ms -> 1.25 ms +- 0.02 ms: 1.03x faster 
(-3%)
- xml_etree_iterparse: 223 ms +- 5 ms -> 218 ms +- 7 ms: 1.02x faster (-2%)
- scimark_fft: 730 ms +- 19 ms -> 716 ms +- 18 ms: 1.02x faster (-2%)
- nbody: 243 ms +- 5 ms -> 239 ms +- 6 ms: 1.02x faster (-2%)
- tornado_http: 377 ms +- 4 ms -> 373 ms +- 4 ms: 1.01x faster (-1%)
- sympy_expand: 1.02 sec +- 0.01 sec -> 1.01 sec +- 0.01 sec: 1.01x faster (-1%)
- unpickle: 32.1 us +- 0.3 us -> 31.8 us +- 0.2 us: 1.01x faster (-1%)

Benchmark hidden because not significant (33):

--

___
Python tracker 

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



[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki

INADA Naoki added the comment:

I'm running pyperformance.

--
Added file: http://bugs.python.org/file46487/loadmethod-methoddescr.patch

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 483d9133fd7e by Mariatta Wijaya in branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://hg.python.org/cpython/rev/483d9133fd7e

New changeset 762a93935afd by Mariatta Wijaya in branch 'default':
Issue #29381: merge with 3.6
https://hg.python.org/cpython/rev/762a93935afd

--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


--
stage:  -> resolved

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


--
resolution:  -> fixed

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 by Mariatta Wijaya in 
branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://github.com/python/cpython/commit/abfa17511f7ce8f1a6394f28f82ffb9a916fcf03


--

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


--
status: open -> closed

___
Python tracker 

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



[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3d712292f2fa by Mariatta Wijaya in branch '3.6':
Issue #29381: Clarify ordering of UNIX shebang line as source encoding line
https://hg.python.org/cpython/rev/3d712292f2fa

--
nosy: +python-dev

___
Python tracker 

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



[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Could anyone please make a review of my explanation comment? 
> I have doubts about a wording.

The wording is correct and clear.

--

___
Python tracker 

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



[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Eryk Sun

Eryk Sun added the comment:

This case is similar to issue 29079. It should only attempt to make the parent 
to handle ENOENT if self and self.parent aren't equal. Here's the snippet from 
Path.mkdir:

try:
self._accessor.mkdir(self, mode)
except FileExistsError:
if not exist_ok or not self.is_dir():
raise
except OSError as e:
if e.errno != ENOENT:
raise
self.parent.mkdir(parents=True)
self._accessor.mkdir(self, mode)

--
nosy: +eryksun
stage:  -> needs patch
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



[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

> * Create unbound PyCFunction and cache it

Does it mean create a new private type, similar to PyCFunction_Type 
(PyCFunctionObject) but without the self attribute?

IMHO creating a new type is complex. I'm not sure that it's worth it, 
especially if the _PyMethodDescr_FastCallKeywords() idea is simpler to 
implement and "fast enough".

--

___
Python tracker 

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



[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

INADA Naoki: "LOAD_METHOD support was based on tp_fastcall. (...) Other ideas 
to support LOAD_METHOD for C function are: * Add 
_PyMethodDescr_FastCallKeywords and call it in call_function."

It seems like a very small subset of tp_fastcall. If it provides a significant 
speedup, I really like the idea :-) I would be happy to see a "subset of 
tp_fastcall" merged. At least my whole tp_fastcall experiment wouldn't be 
worthless :-)

What would be the main change which would provide a speedup? Avoid the creation 
of a temporary tuple to pass positional arguments?

--

___
Python tracker 

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
nosy:  -gregory.p.smith

___
Python tracker 

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

INADA Naoki added the comment:
> My motivation is improve speed,

Ah, if the motivation is performance, I would like to see benchmark
results :-) I understand that an AST optimizer would help to produce
more efficient bytecode, right?

> reduce memory usage,

I noticed an issue with the peephole optimizer: the constant folding
step keeps original constants. Moving constant folding to the AST
stage fixes this issue by design.

> and quicker startup time for real world applications.

You mean faster import time on precompiled .pyc files, right? It's
related to the hypothetical faster bytecode.

> If some optimization in FAT optimizer has significant speedup, I want to try 
> it.

See http://fatoptimizer.readthedocs.io/en/latest/microbenchmarks.html#microbench

FYI it took me something like 2 months to build FAT Python
"infrastructure": fix CPython bugs, design guards, design the AST
optimizer, write unit tests, etc. I didn't spend much time on
efficient optimizations. But for my first rule was to not break the
CPython test suite! Not break the Python semantics, otherwise it would
be impossible to put enable the optimizer by default in CPython, which
is my long term goal.

--

___
Python tracker 

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



[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

> * Add _PyMethodDescr_FastCallKeywords and call it in call_function.

This option seems to be the easiest to implement.

--

___
Python tracker 

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



[issue29417] Sort entries in foo.dist-info/RECORD

2017-02-01 Thread Douglas Greiman

New submission from Douglas Greiman:

Feature Request: It would make reproducible builds easier if the 
[package].dist-info/RECORD files were sorted in some deterministic way.  For 
example, building a Docker image twice and comparing the results.

The current ordering seems to be arbitrary, and I didn't find any PEPs that 
specify one way or the other.

I'm not sure what would need to be updated for this change.  The whole 
pip/distutils/setuptools ecosystem is a bit murky.

--
components: Distutils
messages: 286729
nosy: dgreiman, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Sort entries in foo.dist-info/RECORD
type: enhancement

___
Python tracker 

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



[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki

INADA Naoki added the comment:

LOAD_METHOD support was based on tp_fastcall.

Without LOAD_METHOD support, methoddescr_get is called and
stack layout after LOAD_METHOD is:

  NULL, (bound)PyCFunction, arg1, arg2, ... argN

With LOAD_METHOD support, stack layout is:

  PyMethodDescrObject, self, arg1, ... argN

And tp_call (or tp_fastcall) of method descriptor is called when CALL_METHOD.

Without tp_fastcall, it means pack tuple happens.
It is more heavy than creating temporary PyCFunction.

---

Other ideas to support LOAD_METHOD for C function are:

* Add _PyMethodDescr_FastCallKeywords and call it in call_function.
* Create unbound PyCFunction and cache it

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2017-02-01 Thread INADA Naoki

INADA Naoki added the comment:

OK, let's forget Py_HASH_CUTOFF for now and focus on SipHash-13.

--

___
Python tracker 

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread INADA Naoki

INADA Naoki added the comment:

My motivation is improve speed, reduce memory usage, and quicker
startup time for real world applications.  If some optimization in
FAT optimizer has significant speedup, I want to try it.

But this time, my motivation is I felt "everyone think constant folding
should go to AST from peephole, there is a patch about it, but unfortunately
it was suspended (because of lack of reviewers, maybe)."

As reading #28813, I think there are consensus about constant folding
should go AST.

--

___
Python tracker 

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread Eugene Toder

Eugene Toder added the comment:

Yes, doing optimizations on AST in CPython is unlikely to give any sizable 
speed improvements in real world programs. Python as a language is not suited 
for static optimization, and even if you manage to inline a function, there's 
still CPython's interpreted overhead and boxed types that dwarf the effect of 
the optimization.

The goal of this patch was never to significantly improve the speed. It was to 
replace the existing bytecode peephole pass with cleaner and simpler code, 
which also happens to produce slightly better results.

--

___
Python tracker 

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



[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

> @yselivanov I just wanted to use the handler to avoid storing the callback 
> and args in my own data structure (I would just store the handlers whenever I 
> may need to reschedule). Not a big deal, I don't have to use handler as a 
> storage space, if it's not supported across implementations.

Alright, closing the issue. Thanks!

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



[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Steve Dower

Steve Dower added the comment:

Might be worth checking if this is resolved with issue29079, which is already 
in for 3.6.1.

--

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

Hum, I don't know well how Python tracing works, but if we had a new
"instruction level debugging" feature, it must be an opt-in feature.
Existing debuggers must not be flooded by such events.

--

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread George King

George King added the comment:

Thanks to both of you for your feedback. I will take a stab at updating the 
patch with Victor's suggestions as soon as I can.

--

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread George King

George King added the comment:

Attached is a demo of using the feature as a fancy replacement for __ltrace__. 
It demonstrates using a closure for the local trace function to track the 
previous offset, and prints the offset transitions as src -> dst pairs. This 
helped me learn a lot about how exception handling works at the bytecode level.

--
Added file: http://bugs.python.org/file46486/inst-trace-demo.py

___
Python tracker 

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



[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Max

Max added the comment:

@yselivanov I just wanted to use the handler to avoid storing the callback and 
args in my own data structure (I would just store the handlers whenever I may 
need to reschedule). Not a big deal, I don't have to use handler as a storage 
space, if it's not supported across implementations.

--

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread George King

George King added the comment:

Xavier, this is a misunderstanding; sorry for not being more clear. When I said 
"remove the `else`", I was proposing this:

+ if (tstate->inst_tracing) {
+   result = call_trace(func, obj, tstate, frame, PyTrace_INSTRUCTION, Py_None);
+ }

Line-oriented tracers/debuggers would not have set trace_instructions, so they 
would not receive any 'instruction' events, and should not suffer.

The motivation for this suggestion was that for tracers that *are* interested 
in instructions, it *might* be simpler to get two calls, one of 'line', and one 
of 'instruction'. Maybe it's a bad idea though.

--

___
Python tracker 

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



[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Dan Buchoff

Changes by Dan Buchoff :


--
type:  -> behavior

___
Python tracker 

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



[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Dan Buchoff

New submission from Dan Buchoff:

If a path has a non-existent anchor, Path.mkdir can get into a RecursionError 
as it tries to recursively create the parent. I expect a more sane error.

This is readily reproducible in Windows with `Path('Z:').mkdir(parents=True)`

Example execution:

Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> Path('Z:').mkdir(parents=True)
Traceback (most recent call last):
  File "C:\Python36\lib\pathlib.py", line 1231, in mkdir
self._accessor.mkdir(self, mode)
  File "C:\Python36\lib\pathlib.py", line 388, in wrapped
return strfunc(str(pathobj), *args)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'Z:'

During handling of the above exception, another exception occurred:

...

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python36\lib\pathlib.py", line 1238, in mkdir
self.parent.mkdir(parents=True)
  File "C:\Python36\lib\pathlib.py", line 1238, in mkdir
self.parent.mkdir(parents=True)
  File "C:\Python36\lib\pathlib.py", line 1238, in mkdir
self.parent.mkdir(parents=True)
  [Previous line repeated 989 more times]
  File "C:\Python36\lib\pathlib.py", line 1231, in mkdir
self._accessor.mkdir(self, mode)
  File "C:\Python36\lib\pathlib.py", line 388, in wrapped
return strfunc(str(pathobj), *args)
RecursionError: maximum recursion depth exceeded

--
components: Library (Lib), Windows
messages: 286717
nosy: Dan Buchoff, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Path.mkdir can get into a recursive error loop
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

> I do not agree, Python debuggers are already really really slow. They should 
> not have to process 'instruction' trace events as this would happen if George 
> does "Remove the `else` to always trace with PyTrace_INSTRUCTION, rather than 
> as an alternate to PyTrace_LINE as it does now".

Hum, there are two things:

* attached patch adds an else to the C maybe_call_line_trace(): I don't think 
that it's possible to notice the overhead in a debugger implemented in pure 
Python. If you are concerned by the change, we need a micro-benchmark.

* existing debuggers may have to be extended to support PyTrace_INSTRUCTION and 
so may be slowed down. Maybe I misunderstood what you wrote? For me, it's an 
opt-in feature: you must call sys.settraceinstr() instead of sys.settrace(), 
otherwise you don't get PyTrace_INSTRUCTION events. From the user point of 
view, I expect that the debugger starts at LINE level, but only switch to 
instruction level when I explicitly ask it to do so.

--

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> About performances: it's fine to add anything to maybe_call_line_trace(), it 
> cannot impact performances when tracing is not used.

I do not agree, Python debuggers are already really really slow. They should 
not have to process 'instruction' trace events as this would happen if George 
does "Remove the `else` to always trace with PyTrace_INSTRUCTION, rather than 
as an alternate to PyTrace_LINE as it does now".
I understand that this was a suggestion :)

--

___
Python tracker 

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



[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

> Is it safe to use the _callback and _args attributes of asyncio.Handle? Is it 
> possible to officially expose them as public API?

I'd be -1 on exposing them.  Alternative asyncio event loop implementations 
such as uvloop don't have those attributes, and it's not always possible to add 
them.

> My use case:
>   def reschedule(handle):
>  event_loop.call_later(new_delay, handle._callback, *handle._args)
>  handle.cancel()

Why don't you just call `event_loop.call_later(delay, callback)`?

--

___
Python tracker 

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



[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

> Yury, I'm more than happy to help! I've spent a decent amount of time 
> learning about code objects, byte code, etc. and I'd love to put that 
> knowledge to use. Let me know the best way to find these issues on the 
> tracker or otherwise.

Certainly!

There seem to be a lot of issues with inspect.findsource and inspect.getsource 
functions. Quick search results: #28121 and #26890 (and I know there are few 
more open issues).

For PEP 525 we need to add two new functions to the inspect module (I 
overlooked them and didn't add them to 3.6): inspect.getasyncgeneratorstate and 
inspect.getasyncgeneratorlocals (mirroring inspect.getgeneratorstate and 
inspect.getgeneratorlocals).

There are some issues that nobody even replied to, like #26577.  For those the 
protocol is usually to reproduce the problem first, and then make a 
patch/tests.  You can use advanced search on this tracker to find issues like 
that one.

If you are into async world, you can work on adding 
contextlib.asyncontextmanager decorator.  Although this one should first be 
discussed on the python-ideas mailing list.

Also, if you are into C programming, Victor Stinner, INADA Naoki and I are 
trying to optimize Python ceval loop from time to time (you knowledge of 
dis/opcodes can be helpful), so you can look for those kind of open issues too.

--

___
Python tracker 

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



[issue29300] Modify the _struct module to use FASTCALL and Argument Clinic

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

> It looks to me that the type of the self parameter can be changed from 
> PyObject* to PyStructObject*. This will make the patch larger but the final 
> code simpler.

I like the idea, but I prefer to do in a separated change, once the first big 
one is merged. Otherwise, the first patch will do too many unrelated things at 
the same time IMHO.

--

___
Python tracker 

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 9f889393ab0362229c42bc31056f3ef9735a1d27 by Serhiy Storchaka in 
branch 'master':
Issue #20185: Converted the int class to Argument Clinic.
https://github.com/python/cpython/commit/9f889393ab0362229c42bc31056f3ef9735a1d27


--

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Guido van Rossum

Guido van Rossum added the comment:

A new Sphinx declaration sounds great to me, but you might want to check
with some Sphinx or Python-docs expert.

I somehow misread the code of IocpProactor.connect(), so ignore that part
-- the point is that it's not always a coroutine.

--

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

inst-tracing-2.diff:

* Rebased patch applied on Mercurial, I had to fix a conflict in sys_settrace()
* I replaced your PyEval_SetTraceInstructions() function with a new private 
_PyEval_SetTraceEx() method
* I changed sys.settrace() API to convert the trace_instructions parameter to 
keyword only: sys.settrace(func, True) raises a TypeError (I added an unit test 
for that).

About the API, I see an issue: the "old=sys.gettrace(); sys.settrace(old)" 
pattern doesn't work anymore, since old doesn't contain the trace_instructions 
flag :-/ So I suggest to add a new method and make it exclusive with 
sys.settrace(), sys.settraceinstr() / sys.gettraceinstr():

* sys.settrace() raises an exception of sys.gettraceinstr() is not None
* sys.settraceinstr() raises an exception of sys.gettrace() is not None

The sys module is a critical module, so the API should probably be discussed on 
python-dev (later?).

About performances: it's fine to add anything to maybe_call_line_trace(), it 
cannot impact performances when tracing is not used.

Can you please try to reimplement something like __lltrace__ on top of 
sys.settraceinstr()? It would be a nice example of the API, but also a good 
reason to add sys.settraceinstr().

See the issue #25571 "Improve the lltrace feature with the Py_Debug mode".

Currently, the __lltrace__ feature requires a Python compiled in debug mode, 
which is not convenient. Moreover, it requires to put a __ltrace__ variable in 
global variables.

The best would be able to add an instruction level debugger inside pdb! It 
would be a cool tool to learn Python and to play with the bytecode!

--
Added file: http://bugs.python.org/file46485/inst-tracing-2.diff

___
Python tracker 

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



[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Max

New submission from Max:

Is it safe to use the _callback and _args attributes of asyncio.Handle? Is it 
possible to officially expose them as public API?

My use case: 

handle = event_loop.call_later(delay, callback)

# this function can be triggered by some events
def reschedule(handle):
  event_loop.call_later(new_delay, handle._callback, *handle._args)
  handle.cancel()

--
components: asyncio
messages: 286709
nosy: gvanrossum, max, yselivanov
priority: normal
severity: normal
status: open
title: Exposing handle._callback and handle._args in asyncio
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

> Maybe we should switch all these to "awaitable"?

I like this!  Would it be OK to add a new sphinx declaration?  So that:

   .. coroutinemethod:: AbstractEventLoop.shutdown_asyncgens()

would become:

   .. awaitable:: AbstractEventLoop.shutdown_asyncgens()
   
?

> Also note that in proactor_events.py, sock_connect() is *not* a coroutine. 

Yeah, those small incompatibilities are inevitable for asyncio 
programs/frameworks -- something that returns a Future may occasionally become 
a coroutine.  Your idea to document API methods as "awaitables" seems to be the 
right way to go.

> In fact I'm not sure what it is -- it calls self._proactor.connect() which 
> appears to return None from the code in windows_events.py. That's presumably 
> a separate bug.

It looks like it returns the result of "IocpProactor.connect()" call, which 
returns an _OverlappedFuture instance (I don't really know Windows part of 
asyncio code, so I might be missing something).

--

___
Python tracker 

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



[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Emily Morehouse

Emily Morehouse added the comment:

Serhiy, thank you for the update. I looked over your patch to ensure that I 
understood your solution. I also appreciate your tests, as I was able to see 
other edge cases that I perhaps would not have thought of.

Yury, I'm more than happy to help! I've spent a decent amount of time learning 
about code objects, byte code, etc. and I'd love to put that knowledge to use. 
Let me know the best way to find these issues on the tracker or otherwise.

--

___
Python tracker 

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



[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

pickle-appends-extend-3.patch LGTM.

Even if I don't see any refleak, you might just run "./python -m test -R 3:3 
test_pickle" just to be sure :-)

--

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Guido van Rossum

Guido van Rossum added the comment:

The word coroutine has a more specific meaning though (and we have 
iscoroutine*() inspection functions to check for it).

Maybe we should switch all these to "awaitable"?

Also note that in proactor_events.py, sock_connect() is *not* a coroutine. In 
fact I'm not sure what it is -- it calls self._proactor.connect() which appears 
to return None from the code in windows_events.py. That's presumably a separate 
bug.

--

___
Python tracker 

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



[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

Emily, if you have time and want to help us with the inspect module, we have 
many other unresolved issues.  I'd be happy to help you with code reviews etc.

--

___
Python tracker 

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



[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Victor. Your wording looks simpler to me.

--
Added file: http://bugs.python.org/file46484/pickle-appends-extend-3.patch

___
Python tracker 

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



[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

> Could anyone please make a review of my explanation comment? I have doubts 
> about a wording.

I'm not fluent in english, so I'm not the best for this task. But I reviewed 
your patch ;-)

--

___
Python tracker 

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



[issue29339] Interactive: Move to same indentation level as previousline

2017-02-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> The only way that I can think of is to delay indentation until the first 
> character is typed, and not to indent if it is a space or tab.

This will not help for "else" or "except".

--

___
Python tracker 

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



[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue23980] Documentation for format units starting with 'e' is inconsistent

2017-02-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa7ac93d23b2 by Serhiy Storchaka in branch 'default':
Issue #20185: Converted the int class to Argument Clinic.
https://hg.python.org/cpython/rev/aa7ac93d23b2

--

___
Python tracker 

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread STINNER Victor

STINNER Victor added the comment:

At the AST level, you have a wide range of possible optimizations. See the 
optimizations that I implemented in fatoptimizer (FAT Python) to have an idea:
http://fatoptimizer.readthedocs.io/en/latest/optimizations.html

FAT Python adds guards checked at runtime, something not possible (not wanted) 
here.

But if you start with constant folding, why not implementing constant 
propagation as well? What about loop unrolling?

Where is the limit? If you implement the AST optimizer in C, the limit will 
probably be your C skills and your motivation :-) In Python, the limit is more 
the Python semantics which is... hum... not well defined. For example, does it 
break the Python semantics to replace [i for i in (1, 2, 3)] with [1, 2, 3]? 

What if you use a debugger? Do yo expect a list comprehension or a literal list?

FYI I suspended my work on FAT Python because almost no other core developer 
was interested. I didn't get any support, whereas I need support to push core 
FAT Python features like function specialization and runtime checks (PEP 510, 
see also PEP 511). Moreover, I failed to show any significant speedup on 
non-trivial functions. I abandoned before investigating function inlining, even 
if FAT Python already has a basic support for function inlining.

This issue is open since 2011. The question is always the same: is it worth it?

An alternative is to experiment an AST optimizer outside CPython and come back 
later with more data to drive the design of such optimizer. With FAT Python, I 
chose to add hooks in the Python compiler, but different people told me that 
it's possible to do that without such hook but importlib (importlib hooks).

What do you think Naoki?

--

___
Python tracker 

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



[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +xdegaye

___
Python tracker 

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



[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You were on right way Emily. Sorry for crossing your road, but I already had a 
written patch.

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

___
Python tracker 

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



[issue29339] Interactive: Move to same indentation level as previousline

2017-02-01 Thread 12345 67890

12345 67890 added the comment:

That one is pretty tricky. The only way that I can think of is to delay 
indentation until the first character is typed, and not to indent if it is a 
space or tab. 

From: Serhiy Storchaka
Sent: Wednesday, February 1, 2017 2:39 PM
To: xov...@gmail.com
Subject: [issue29339] Interactive: Move to same indentation level as 
previousline

Serhiy Storchaka added the comment:

Any autoindetation breaks pasting from the clipboard since there is no way to 
distinguish characters entered from the keyboard from characters pasted from 
the clipboard. In IDLE or other visual shell we can add a special menu entry 
and hotkeys for pasting from clipboards without autoindenting, but in a REPL in 
text terminal this is not possible.

IPython3 solved this issue by adding special magic functions, but this is not a 
way for CPython.

--
nosy: +serhiy.storchaka

___
Python tracker 

___

--
title: Interactive: Move to same indentation level as previous line -> 
Interactive: Move to same indentation level as previousline

___
Python tracker 

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



[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 97c8ec91eb10a04c797e4dac99971e4152abcbec by Serhiy Storchaka in 
branch '2.7':
Issue #29028: Fixed possible use-after-free bugs in the subscription of the
https://github.com/python/cpython/commit/97c8ec91eb10a04c797e4dac99971e4152abcbec


--

___
Python tracker 

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



[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8cfa6d3065b3 by Serhiy Storchaka in branch '2.7':
Issue #29028: Fixed possible use-after-free bugs in the subscription of the
https://hg.python.org/cpython/rev/8cfa6d3065b3

--
nosy: +python-dev

___
Python tracker 

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



[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a889c5524520 by Serhiy Storchaka in branch '2.7':
Issue #29354: Fixed inspect.getargs() for parameters which are cell
https://hg.python.org/cpython/rev/a889c5524520

--
nosy: +python-dev

___
Python tracker 

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



[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please make a review of my explanation comment? I have doubts 
about a wording.

--

___
Python tracker 

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



[issue29339] Interactive: Move to same indentation level as previous line

2017-02-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Any autoindetation breaks pasting from the clipboard since there is no way to 
distinguish characters entered from the keyboard from characters pasted from 
the clipboard. In IDLE or other visual shell we can add a special menu entry 
and hotkeys for pasting from clipboards without autoindenting, but in a REPL in 
text terminal this is not possible.

IPython3 solved this issue by adding special magic functions, but this is not a 
way for CPython.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Yury Selivanov

Yury Selivanov added the comment:

I think the original idea was to document that all methods of the loop are 
coroutines, so that:

1. if a user needs a Future object they call ensure_future: 

   fut = asyncio.ensure_future(loop.method())

2. it gives us ability to refactor things. For instance, sock_connect was a 
method that returned Futures, but at one point of 3.5 we changed it to be 
coroutine.  Because the method was documented as a coroutine, it wasn't 
strictly a backwards incompatible way.

In general, I think it would be safer for us to simple make all loop methods 
coroutines. Or, less radical, just keeping the status quo: document everything 
as a coroutine.

--

___
Python tracker 

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



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 1947d33a0a1c2ba006397579ec6235528faea9fd by Guido van Rossum in 
branch 'master':
Issue #29377: Add three new wrappers to types.py (Manuel Krebber).
https://github.com/python/cpython/commit/1947d33a0a1c2ba006397579ec6235528faea9fd


--

___
Python tracker 

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



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


--
stage:  -> resolved

___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 94aa4efdf0196de9f99b6f1bd68322939d8d6974 by Berker Peksag in 
branch 'master':
Issue #29407: Remove redundant ensure_future() calls in factorial example
https://github.com/python/cpython/commit/94aa4efdf0196de9f99b6f1bd68322939d8d6974

New changeset 96104636fa5bd3054367d4667d86d43690c24293 by Berker Peksag in 
branch 'master':
Issue #29407: Merge from 3.5
https://github.com/python/cpython/commit/96104636fa5bd3054367d4667d86d43690c24293

New changeset 6b569a0de28e3c341837030d6aa739422d315a6f by Berker Peksag in 
branch 'master':
Issue #29407: Merge from 3.6
https://github.com/python/cpython/commit/6b569a0de28e3c341837030d6aa739422d315a6f


--

___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 94aa4efdf0196de9f99b6f1bd68322939d8d6974 by Berker Peksag in 
branch '3.5':
Issue #29407: Remove redundant ensure_future() calls in factorial example
https://github.com/python/cpython/commit/94aa4efdf0196de9f99b6f1bd68322939d8d6974


--

___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Changes by Roundup Robot :


___
Python tracker 

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



[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 94aa4efdf0196de9f99b6f1bd68322939d8d6974 by Berker Peksag in 
branch '3.6':
Issue #29407: Remove redundant ensure_future() calls in factorial example
https://github.com/python/cpython/commit/94aa4efdf0196de9f99b6f1bd68322939d8d6974

New changeset 96104636fa5bd3054367d4667d86d43690c24293 by Berker Peksag in 
branch '3.6':
Issue #29407: Merge from 3.5
https://github.com/python/cpython/commit/96104636fa5bd3054367d4667d86d43690c24293


--

___
Python tracker 

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



[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Berker Peksag

Berker Peksag added the comment:

Here's a patch. sock_connect() wrapped by @coroutine in 
Lib/asyncio/selector_events.py so I left it as-is. Let me know if it still 
needs to be updated:

@coroutine
def sock_connect(self, sock, address):
"""Connect to a remote socket at address.

This method is a coroutine.
"""
...

return (yield from fut)

--
assignee:  -> docs@python
components: +Documentation
keywords: +patch
nosy: +docs@python
stage:  -> patch review
Added file: http://bugs.python.org/file46483/issue29344.diff

___
Python tracker 

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



[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-02-01 Thread Xavier de Gaye

Xavier de Gaye added the comment:

I have left some comments on Rietveld after a partial code review.

IMO for reasons of repeatability and easier maintenance [1], all the tests 
should be run with the pty set in a known mode, whether canonical or raw, and a 
test involving pty.spawn() should ensure that the chosen mode will be set by 
this function, or should skip it otherwise.

[1] For example when investigating the random failures in PtyTest reported by 
Cornelius in the patch comments, one has to wonder: "Oh, maybe it fails on this 
foreign system because the pty is not in raw mode there".

--
nosy: +xdegaye

___
Python tracker 

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



  1   2   3   >