[issue25277] test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

The bug was reproduced with faulthandler:

FAIL: test_all (test.test_eintr.EINTRTests)
Timeout (0:10:00)!
Thread 0x000802006400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 402 in test_sigwaitinfo
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", 
line 600 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", 
line 648 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/runner.py", 
line 176 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1775 in _run_suite
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1809 in run_unittest
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 470 in test_main
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 474 in 

The same error occurred multiple times on buildbots FreeBSD 10.0 and 9.x.

--
title: test_eintr hangs on randomly on "AMD64 FreeBSD 9.x 3.x" -> 
test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

___
Python tracker 

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



[issue25287] test_crypt fails on OpenBSD

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Hum, the test now fails differently :-(

==
FAIL: test_methods (test.test_crypt.CryptTestCase)
--
Traceback (most recent call last):
  File 
"/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_crypt.py", line 
29, in test_methods
self.assertTrue(len(crypt.methods) >= 1)
AssertionError: False is not true

--

___
Python tracker 

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



[issue25306] test_huntrleaks_fd_leak() of test_regrtest hangs on Windows

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Ok, it looks like the issue was fixed.

--
keywords: +buildbot
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue25351] pyvenv activate script failure with specific bash option

2015-10-09 Thread s-wakaba

New submission from s-wakaba:

When writing bash shellscripts, I always set options "set -ueC" for strict 
error checking. However, loading pyvenv's activate and deactivate scripts from 
bash with "-u" option, they are failure because they may refer undefined shell 
variables.

I hope activate script and deactivate function are enclosed like following block

_OLD_BASH_OPTIONS="$-"
set +u

### script body ##

set -$_OLD_BASH_OPTIONS
unset _OLD_BASH_OPTIONS


Another option, all shell-variables in the script change like

$SPAM -> ${SPAM:-}

--
components: Library (Lib)
messages: 252593
nosy: s-wakaba
priority: normal
severity: normal
status: open
title: pyvenv activate script failure with specific bash option
type: enhancement
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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-09 Thread Vinay Sajip

Vinay Sajip added the comment:

This is already supported. There is a logging.handlers.MemoryHandler which 
allows you to buffer logging events and then pass the buffered events to 
another handler when some condition is met, such as e.g. buffer full or some 
severity threshold is exceeded. Flushing the buffer to the other handler can be 
customised by subclassing and overriding shouldFlush() and perhaps flush() 
methods.

https://docs.python.org/2/library/logging.handlers.html#memoryhandler

I can perhaps add a cookbook recipe to illustrate, so I'll leave this issue 
open for now, as a reminder.

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Laura Creighton

New submission from Laura Creighton:

webmaster is hearing from children who have downloaded 3.5 but who
are still getting 2.7 when they click on desktop Python icons, and
type python at a console prompt.

a checkbox on the installer saying 'make this my default python' that
would then go off any do all that is necessary in this regard would
make their lives easier.

--
components: Installation, Windows
messages: 252595
nosy: lac, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add 'make this my default python' to windows installs for Python3.5 and 
later
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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

bench_bytes_format.py: micro-benchmark testing a few formats. Some tests are 
focused on the implementation of _PyBytesWriter to ensure that the optimization 
is efficient.

Except of a single test (which is not really revelant, it takes less than 500 
nanoseconds), all tests are faster.

The b"xx %s" % b"y" test confirms that the optimization disabling 
overallocation for the last write is effective.

Results:

Common platform:
Timer info: namespace(adjustable=False, 
implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, 
resolution=1e-09)
Python unicode implementation: PEP 393
CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Platform: Linux-4.1.6-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two
CFLAGS: -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes
Timer: time.perf_counter
Bits: int=32, long=64, long long=64, size_t=64, void*=64

Platform of campaign orig:
SCM: hg revision=1aae9b6a6929 tag=tip branch=default date="2015-10-09 01:34 
-0400"
Timer precision: 64 ns
Python version: 3.6.0a0 (default:1aae9b6a6929, Oct 9 2015, 11:33:56) [GCC 5.1.1 
20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 11:34:11

Platform of campaign writer:
SCM: hg revision=fc2c11a19ae1+ tag=tip branch=default date="2015-10-09 11:48 
+0200"
Timer precision: 61 ns
Python version: 3.6.0a0 (default:fc2c11a19ae1+, Oct 9 2015, 12:16:16) [GCC 
5.1.1 20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 12:16:31

---++--
use smaller buffer |   orig |writer
---++--
b"hello %s" % b"world" |  13 ns (*) |   12 ns (-5%)
b"hello %-100s" % b"world" | 158 ns (*) |  98 ns (-38%)
b"x=%d" % 123  |  13 ns (*) | 12 ns
b"x=%f" % 1.2  |  13 ns (*) | 13 ns
b"x=%100d" % 123   | 156 ns (*) |  166 ns (+7%)
---++--
Total  | 353 ns (*) | 301 ns (-15%)
---++--

-+-+---
"hello %s" % long_string |orig | writer
-+-+---
fmt = b"hello %s"; arg = b"x" * 10; fmt % arg|   98 ns (*) |   86 ns (-12%)
fmt = b"hello %s"; arg = b"x" * 100; fmt % arg   |   85 ns (*) |  87 ns
fmt = b"hello %s"; arg = b"x" * 10**3; fmt % arg |  298 ns (*) |  208 ns (-30%)
fmt = b"hello %s"; arg = b"x" * 10**5; fmt % arg |  4.8 us (*) |  4.39 us (-9%)
-+-+---
Total| 5.28 us (*) | 4.77 us (-10%)
-+-+---

---+-+---
b"xx %s" % b"y"|orig | writer
---+-+---
fmt = b"x" * 10 + b"%s"; fmt % b"y"|   99 ns (*) |   81 ns (-18%)
fmt = b"x" * 100 + b"%s"; fmt % b"y"   |  189 ns (*) |   87 ns (-54%)
fmt = b"x" * 10**3 + b"%s"; fmt % b"y" | 1.12 us (*) |  209 ns (-81%)
fmt = b"x" * 10**5 + b"%s"; fmt % b"y" | 88.4 us (*) | 8.49 us (-90%)
---+-+---
Total  | 89.8 us (*) | 8.87 us (-90%)
---+-+---

--+-+---
%f|orig |   
  writer
--+-+---
n = 200; fmt = b"%f" * n; arg = tuple([1.2]*n); fmt % arg | 37.2 us (*) | 29.6 
us (-21%)
--+-+---

+-+---
%i  |orig | 
writer
+-+---
n = 200; fmt = b"%f" * n; arg = tuple([12345]*n); fmt % arg | 49.4 us (*) | 
42.8 us (-13%)
+-+---

-+-+---
Summary  |orig | writer
-+-+---
use smaller buffer   |  353 ns (*) |  301 ns (-15%)
"hello %s" % long_string | 5.28 us (*) | 4.77 us (-10%)
b"xx %s" % b"y"  | 89.8 us (*) | 8.87 us (-90%)
%f   | 37.2 us (*) | 29.6 us (-21%)
%i   | 49.4 us (*) | 42.8 us (-13%)
-+--

[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2f3cbdc0f2d by Victor Stinner in branch 'default':
Issue #25349: Optimize bytes % args using the new private _PyBytesWriter API
https://hg.python.org/cpython/rev/b2f3cbdc0f2d

--
nosy: +python-dev

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Emanuel Barry

Emanuel Barry added the comment:

What about the `py' launcher? It will always launch the latest installed 
version.

--
nosy: +ebarry

___
Python tracker 

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



[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch modifies unicode escape and raw unicode escape encoders to use 
the new _PyBytesWriter API.

The patch is optimized to encode Latin1 characters: encoding Latin1 characters 
when no character is escaped should not have to call _PyByte_Resize() at all.

When characters are escaped or a BMP or non-BMP string is encoded, 
overallocation is used to reduce the number of _PyByte_Resize(). It uses 
_PyBytesWriter overallocation strategy instead of always overallocate for the 
worst case.

_PyBytesWriter also embeds a small buffer allocated on the stack which also 
avoids calls to _PyBytes_Resize() when the output fits into 512 bytes.

--
files: unicode_escape.patch
keywords: patch
messages: 252599
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use _PyBytesWriter for unicode escape and raw unicode escape encoders
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40727/unicode_escape.patch

___
Python tracker 

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



[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

A few more encoders should be updated to use _PyBytesWriter API:

* Code Page (Windows only)
* Charmap
* UTF-7
* UTF-16
* UTF-32

--

___
Python tracker 

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



[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

The _PyBytesWriter API was added in the issue #25318. See also the issue #25349 
which optimized bytes % args.

--

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Buildbots still like this new API :-) (no test failure recently)

I reworked the API a little bit to make its usage simpler in Unicode encoders. 
I started to open new issues to using this new API in more functions producing 
byte strings.

I consider that this issue can now be closed. I'm happy, the API looks good to 
me and the modified code is faster.

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

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Changes by Florin Papa :


Added file: http://bugs.python.org/file40729/mpx_enable_2_7_v4.patch

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Florin Papa added the comment:

I have modified the small object allocator to set proper bounds  for the 
pointers it returns. Please see the updated patches.

--
Added file: http://bugs.python.org/file40728/mpx_enable_3_6_v4.patch

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks. For the record, the whole test suite still passes? This is good to know 
:)

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Florin Papa added the comment:

I ran the full Grand Unified Python Benchmarks suite on Python 3.6 and 2.7 
before submitting the patches and everything went well. Sorry I did not mention 
it :)

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Steve Dower

Steve Dower added the comment:

The py launcher will prefer 2.7 because that's what was decided when it was 
added. We're probably getting to a stage where we can revert that.

Unfortunately, there's no way we can reliably fix system configuration without 
corrupting the users machine. Using the py launcher with -3 is currently the 
best way to do it.

I don't know where the desktop shortcuts are coming from - they're not ours, so 
we can't fix them.

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I meant the test suite ("python -m test.regrtest"). I presume you did, just 
checking :-)

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Emanuel Barry

Emanuel Barry added the comment:

Oh, I didn't know the py launcher preferred 2.7 - I always work with 3.x; my 
bad.

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Florin Papa added the comment:

I ran regrtest now and there are a few tests that fail. I will look into the 
cause of this and provide a solution.

--

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Eric V. Smith

Eric V. Smith added the comment:

I think the best way to approach this is to generate (in code) all of the 
places where string prefixes appear. There's StringPrefix, endpats, 
triple_quotes, and single_quoted.

With the currently valid combinations of f, b, r, and u, I count 24 
combinations:
['B', 'BR', 'Br', 'F', 'FR', 'Fr', 'R', 'RB', 'RF', 'Rb', 'Rf', 'U', 'b', 'bR', 
'br', 'f', 'fR', 'fr', 'r', 'rB', 'rF', 'rb', 'rf', 'u']

If I add "fb" strings (plus raw), I count 72 combinations:
['B', 'BFR', 'BFr', 'BR', 'BRF', 'BRf', 'BfR', 'Bfr', 'Br', 'BrF', 'Brf', 'F', 
'FBR', 'FBr', 'FR', 'FRB', 'FRb', 'FbR', 'Fbr', 'Fr', 'FrB', 'Frb', 'R', 'RB', 
'RBF', 'RBf', 'RF', 'RFB', 'RFb', 'Rb', 'RbF', 'Rbf', 'Rf', 'RfB', 'Rfb', 'U', 
'b', 'bFR', 'bFr', 'bR', 'bRF', 'bRf', 'bfR', 'bfr', 'br', 'brF', 'brf', 'f', 
'fBR', 'fBr', 'fR', 'fRB', 'fRb', 'fbR', 'fbr', 'fr', 'frB', 'frb', 'r', 'rB', 
'rBF', 'rBf', 'rF', 'rFB', 'rFb', 'rb', 'rbF', 'rbf', 'rf', 'rfB', 'rfb', 'u']

Coding these combinations by hand seems insane.

--

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +belopolsky

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread shanmbic

New submission from shanmbic:

The test for datetime module keeps failing. 

test test_datetime failed -- Traceback (most recent call last):
  File "/home/shantanu/cpython/Lib/test/datetimetester.py", line 215, in 
test_issue23600
self.assertEqual(t - t.utcoffset(), u)
AssertionError: datet[22 chars]26, 11, 1, 
tzinfo=) != datet[22 chars]26, 12, 1, 
tzinfo=)

In datetimetester.py , in function test_issue23600 , line 196:
the variable DSTDIFF has been assigned timedelta of 1 hour, I guess it should 
be , 

DSTDIFF = timedelta(hours=0)

It passes the test then. 

The comment in the function code says -  
"""Simple time zone which pretends to always be in summer time, since that's 
what shows the failure.""" Was the test written to fail on purpose ?  

Thanks

--
components: Extension Modules, ctypes
messages: 252609
nosy: shanmbic
priority: normal
severity: normal
status: open
title: test_datetime failing
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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Eric V. Smith

Eric V. Smith added the comment:

Oops, make that 80 combinations (I forgot the various 'fb' ones):

['B', 'BF', 'BFR', 'BFr', 'BR', 'BRF', 'BRf', 'Bf', 'BfR', 'Bfr', 'Br', 'BrF', 
'Brf', 'F', 'FB', 'FBR', 'FBr', 'FR', 'FRB', 'FRb', 'Fb', 'FbR', 'Fbr', 'Fr', 
'FrB', 'Frb', 'R', 'RB', 'RBF', 'RBf', 'RF', 'RFB', 'RFb', 'Rb', 'RbF', 'Rbf', 
'Rf', 'RfB', 'Rfb', 'U', 'b', 'bF', 'bFR', 'bFr', 'bR', 'bRF', 'bRf', 'bf', 
'bfR', 'bfr', 'br', 'brF', 'brf', 'f', 'fB', 'fBR', 'fBr', 'fR', 'fRB', 'fRb', 
'fb', 'fbR', 'fbr', 'fr', 'frB', 'frb', 'r', 'rB', 'rBF', 'rBf', 'rF', 'rFB', 
'rFb', 'rb', 'rbF', 'rbf', 'rf', 'rfB', 'rfb', 'u']


import itertools as _itertools

def _all_string_prefixes():
# The valid string prefixes. Only contain the lower case versions,
#  and don't contain any permuations (include 'fr', but not
#  'rf'). The various permutations will be generated.
_valid_string_prefixes = ['b', 'r', 'u', 'f', 'br', 'fr', 'fb', 'fbr']
result = set()
for prefix in _valid_string_prefixes:
for t in _itertools.permutations(prefix):
# create a list with upper and lower versions of each
#  character
for u in _itertools.product(*[(c, c.upper()) for c in t]):
result.add(''.join(u))
return result

--

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Yes, we should get signoff from someone who was involved in the original 
security fix, since it was a security fix.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25350] Stronger type enforcement (feature request)

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Check out the types module and PEP 484.

--
nosy: +r.david.murray
resolution:  -> out of date
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



[issue6953] readline documenation needs work

2015-10-09 Thread Gabi Davar

Changes by Gabi Davar :


--
nosy: +Gabi.Davar

___
Python tracker 

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



[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d471cf4a73b2 by R David Murray in branch '3.5':
#25328: add missing raise keyword in decode_data+SMTPUTF8 check.
https://hg.python.org/cpython/rev/d471cf4a73b2

New changeset 576128c0d068 by R David Murray in branch 'default':
Merge #25328: add missing raise keyword in decode_data+SMTPUTF8 check.
https://hg.python.org/cpython/rev/576128c0d068

--
nosy: +python-dev

___
Python tracker 

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



[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Thanks, Xiang.  Your analysis was correct and your patch is good.

For anyone who is curious, Barry discovered this while writing tests for a new 
aiosmtpd, which is based on the existing smtpd code.

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

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

No, that delta being one hour is the whole point of that test.

I've nosied Alexander.  He'll probably need more information about the 
environment in which you are seeing this.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25355] Windows 3.5 installer does not add python to "App Paths" key

2015-10-09 Thread Oscar Benjamin

New submission from Oscar Benjamin:

>From the mailing list:
https://mail.python.org/pipermail/python-list/2015-October/697744.html

'''
The new installer for 3.5 doesn't create an "App Paths" key for
"python.exe" like the old installer used to do (see the old
Tools/msi/msi.py). Without that, unless python.exe is in the search
PATH, "Win+R -> python" and running "start python" in the command
prompt won't work. You can of course add the key manually as the
default value for
"[HKLM|HKCU]\Software\Microsoft\Windows\CurrentVersion\App
Paths\python.exe". IMO, this makes it the 'system' Python.
'''

Is this an intentional change or an oversight?

--
components: Installation
messages: 252618
nosy: oscarbenjamin
priority: normal
severity: normal
status: open
title: Windows 3.5 installer does not add python to "App Paths" key
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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Eric V. Smith

Eric V. Smith added the comment:

My first attempt. Many more tests are needed.

I'm going to need to spend some time trying to figure out how parts of 
tokenize.py actually works. I'm not sure, for example, that endpats is 
initialized correctly. There definitely aren't enough tests, since if I comment 
out parts of endpats the tests still pass.

--
Added file: http://bugs.python.org/file40730/issue25311.diff

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Gian Carlo Martinelli

New submission from Gian Carlo Martinelli:

IDLE (using Python 3.4 on Ubuntu) does not recognize accent key presses (ex: ~, 
^, ').

This makes it impossible to program in some languages.

--
components: IDLE
messages: 252620
nosy: Gian Carlo Martinelli
priority: normal
severity: normal
status: open
title: Idle (Python 3.4 on Ubuntu) does not allow typing accents
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-09 Thread CM

CM added the comment:

Hi Thanks for your response.
So as you have correctly surmised I am using a software package call oof. I ran 
the package using gdb and this is the output that I got. I'm having the same 
issue on i.e. Segmentation fault on three machines, one is a Linux 
Centos/Redhat server (Python 2.7.8), and two macs (python 2.7.10). The gdb 
output below is from the Centos Server machine. 

Again not sure if it helps but I'm only posting all the information I have 
since it wouldn't be entirely easy for me to provide a test case without you 
actually having the software package installed. Thanks in advance. 


---

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd54c0700 (LWP 22786)]
PyObject_Malloc (nbytes=32) at Objects/obmalloc.c:813
813 Objects/obmalloc.c: No such file or directory.
in Objects/obmalloc.c
Missing separate debuginfos, use: debuginfo-install expat-2.0.1-11.el6_2.x86_64 
fontconfig-2.8.0-3.el6.x86_64 freetype-2.3.11-14.el6_3.1.x86_64 
glibc-2.12-1.149.el6_6.5.x86_64 keyutils-libs-1.4-4.el6.x86_64 
krb5-libs-1.10.3-10.el6_4.6.x86_64 libICE-1.0.6-1.el6.x86_64 
libSM-1.2.1-2.el6.x86_64 libX11-1.6.0-2.2.el6.x86_64 libXau-1.0.6-4.el6.x86_64 
libXcursor-1.1.13-6.20130524git8f677eaea.el6.x86_64 
libXdamage-1.1.3-4.el6.x86_64 libXext-1.3.1-2.el6.x86_64 
libXfixes-5.0-3.el6.x86_64 libXrender-0.9.7-2.el6.x86_64 
libXt-1.1.4-6.1.el6.x86_64 libart_lgpl-2.3.20-5.1.el6.x86_64 
libcom_err-1.41.12-18.el6.x86_64 libgcc-4.4.7-4.el6.x86_64 
libgfortran-4.4.7-4.el6.x86_64 libgnomecanvas-2.26.0-4.el6.x86_64 
libgomp-4.4.7-4.el6.x86_64 libjpeg-turbo-1.2.1-3.el6_5.x86_64 
libpng-1.2.49-1.el6_2.x86_64 libselinux-2.0.94-5.3.el6_4.1.x86_64 
libstdc++-4.4.7-4.el6.x86_64 libtiff-3.9.4-10.el6_5.x86_64 
libuuid-2.17.2-12.14.el6.x86_64 libxcb-1.8.1-1.el6.x86_64 
openssl-1.0.1e-16.el6_5.15.x86_64 zlib-1.2.3-29.el6.x8
 6_64
(gdb) where
#0  PyObject_Malloc (nbytes=32) at Objects/obmalloc.c:813
#1  0x77a90c3d in _PyObject_New (tp=0x77dc3840) at 
Objects/object.c:244
#2  0x77b2cb2d in newlockobject (self=) at 
./Modules/threadmodule.c:164
#3  thread_PyThread_allocate_lock (self=) at 
./Modules/threadmodule.c:746
#4  0x77af3741 in call_function (f=, 
throwflag=) at Python/ceval.c:4017
#5  PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2679
#6  0x77af54ae in PyEval_EvalCodeEx (co=0x7fffef74bbb0, globals=, locals=, 
args=, argcount=2, kws=0x7fffa40040c8, kwcount=0, 
defs=0x7fffef771068, defcount=1, closure=0x0)
at Python/ceval.c:3265
#7  0x77af365a in fast_function (f=, 
throwflag=) at Python/ceval.c:4129
#8  call_function (f=, throwflag=) at 
Python/ceval.c:4054
#9  PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2679
#10 0x77af54ae in PyEval_EvalCodeEx (co=0x7fffef75b6b0, globals=, locals=, 
args=, argcount=1, kws=0x7fff5d3de7d8, kwcount=0, 
defs=0x7fffeecdf068, defcount=1, closure=0x0)
at Python/ceval.c:3265
#11 0x77af365a in fast_function (f=, 
throwflag=) at Python/ceval.c:4129
#12 call_function (f=, throwflag=) at 
Python/ceval.c:4054
#13 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2679
#14 0x77af54ae in PyEval_EvalCodeEx (co=0x7fffe6669c30, globals=, locals=, 
args=, argcount=3, kws=0x7fff5d3e1bb0, kwcount=0, 
defs=0x7fffe6661fe0, defcount=2, closure=0x0)
at Python/ceval.c:3265
#15 0x77af365a in fast_function (f=, 
throwflag=) at Python/ceval.c:4129
#16 call_function (f=, throwflag=) at 
Python/ceval.c:4054
#17 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2679
#18 0x77af54ae in PyEval_EvalCodeEx (co=0x77e2ad30, globals=, locals=, 
args=, argcount=2, kws=0x77f97068, kwcount=0, 
defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3265
#19 0x77a73778 in function_call (func=0x7fffeece2938, 
arg=0x7fff563836c8, kw=0x7fff5642b4b0)
at Objects/funcobject.c:526
#20 0x77a441a3 in PyObject_Call (func=0x7fffeece2938, arg=, kw=)
at Objects/abstract.c:2529
#21 0x77af214a in ext_do_call (f=, 
throwflag=) at Python/ceval.c:4346
#22 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2718
#23 0x77af54ae in PyEval_EvalCodeEx (co=0x77e342b0, globals=, locals=, 
args=, argcount=2, kws=0x77f97068, kwcount=0, 
defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3265
#24 0x77a73778 in function_call (func=0x7fffeece2cf8, 
arg=0x7fff563cf638, kw=0x7fff5642b398)
at Objects/funcobject.c:526
#25 0x77a441a3 in PyObject_Call (func=0x7fffeece2cf8, arg=, kw=)
at Objects/abstract.c:2529
#26 0x77af214a in ext_do_call (f=, 
throwflag=) at Python/ceval.c:4346
#27 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2718
---Type  to continue, or q  to quit---

--
status: closed -> open

___
Python tracker 

___
__

[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think Ned meant "it is *not* likely to be in the python interpreter or 
standard library", and that you should seek help from the third party people 
trying to track down the problem.  *If* it turns out to be python or the 
stdlib, which means you've managed to find a reproducer that does *not* involve 
the third party packages, *then* come back and reopen the issue.

Like Ned said, good luck, but we really can't provide you any more help here 
until the third party packages are eliminated from the equation.

--
nosy: +r.david.murray
status: open -> closed

___
Python tracker 

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



[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-09 Thread CM

CM added the comment:

I understood what Ned meant, and I did seek advice from the third party 
software creator, it was the first thing I did because like you stated I 
thought it was an issue with the third party software and not python. Coming to 
this bug website was my last resort but I can see that it doesn't make sense

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Laura Creighton

Laura Creighton added the comment:

checking, these kids are using computers where, at some point, somebody moved 
the idle shortcut from their 2.7 folder to the desktop.  Which was probably a 
very bad idea.

But what should I tell them to do to get 3.5 there instead?

(adding IDLE to 'Type')

--
components: +IDLE

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

New submission from STINNER Victor:

The base64.b64encode() function calls binascii.b2a_base64() and then strips the 
newline. It would be more efficient to directly not add a newline.

Attached patch adds an optional newline parameter to binascii.b2a_base64(). It 
also modifies base64.b64encode() to call binascii.b2a_base64() with 
newline=False.

--
files: binascii_b2a_base64_newline.patch
keywords: patch
messages: 252625
nosy: haypo
priority: normal
severity: normal
status: open
title: Add an optional newline parameter to binascii.b2a_base64() to not add a 
newline
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40731/binascii_b2a_base64_newline.patch

___
Python tracker 

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



[issue25303] py_compile disregards PYTHONDONTWRITEBYTECODE and -B

2015-10-09 Thread Éric Araujo

Éric Araujo added the comment:

I had the same reasoning as RDM when I worked on byte-compilation in 
distutils2: https://hg.python.org/distutils2/rev/7c0a88497b5c

Using py_compile or compileall means that you want to create pyc or pyo files.
Defining PYTHONDONTWRITEBYTECODE or -B means that you don’t want the Python 
interpreter to byte-compile module as a side-effect of importing them.
These two things seem orthogonal to me.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

+1. Not sure about the parameter name, but if no one suggests better, it LGTM. 
Added comments on Rietveld.

What about adding the same parameter to binascii.b2a_uu()?

--
nosy: +ncoghlan, pitrou, serhiy.storchaka

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

@shanmbic - did you recompile C modules before running the tests?

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

bytes_formatlong.patch: Fast-path for b'%d' % int and other integer formatters. 
It avoids the creation of a temporary bytes object, it writes directly into the 
writer, as '%d' % int (Unicode).

--
Added file: http://bugs.python.org/file40732/bytes_formatlong.patch

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I forgot to add an unit test.

> What about adding the same parameter to binascii.b2a_uu()?

This function is used in Lib/encodings/uu_codec.py and Lib/uu.py, but the 
newline is not stripped. So I don't think that it's worth to add an optional 
parameter.

--

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch to take Serhiy's comments in account and now with an unit test!

--
Added file: http://bugs.python.org/file40733/binascii_b2a_base64_newline-2.patch

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Oh by the way, the new parameter is a keyword only parameter. It's not possible 
to write b2a_base64(data, False). Maybe I should also add an unit test for this.

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Steve Dower

Steve Dower added the comment:

They can find the 3.5 shortcut in their Start Menu (either by browsing or 
searching for "IDLE") and then move that to their desktop.

Depending on operating system version, moving it could be:

* drag from the Start Menu to the desktop and drop it
* right-click and choose "Send To -> Desktop (create shortcut)", OR
* right-click, choose "Open File Location" and then right-click again in the 
new window and choose "Send To -> Desktop (create shortcut)"

--

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2015-10-09 Thread Steve Dower

Changes by Steve Dower :


--
nosy: +steve.dower

___
Python tracker 

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



[issue25303] py_compile disregards PYTHONDONTWRITEBYTECODE and -B

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree that the proposal as written should be rejected.  I am inclined to 
think this issue should be closed.

I do not understand the claim about 'python -m py_compile'.  For me, this does 
nothing, as I would expect from reading the code.  If args = sys.arg[1:] is 
empty, the else clause for loop immediately quits.

Syntax checking is easily done with compile; that is how IDLE does it.  
  python -c "compile(open().read(), '', 'exec').
should do what Pavel tried to do, except for getting a SyntaxError instead of 
py_compile.PyCompileError.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25312] Cryptic error message if incorrect spec is set on a callable mock

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +michael.foord

___
Python tracker 

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



[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +ezio.melotti, michael.foord, rbcollins
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



[issue25307] Enhancing the argparse help output

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +bethard
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-09 Thread Alex Warhawk

Alex Warhawk added the comment:

Even after enabling client cache one still has to call SSL_set_session. See 
documentation of SSL_CTX_set_session_cache_mode point SSL_SESS_CACHE_CLIENT.

I started thinking about not exposing a SSL_SESSION object to the user but 
rather extending wrap_socket to take an already established socket as argument 
and use that socket's session object. This way I can ensure that both sockets 
share the same SSL context

I am not really convinced by this idea myself, what do you think about this? 
Any better ideas?

--

___
Python tracker 

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



[issue25331] Using Windows doc should list service packs needed to install

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> needs patch
title: https://docs.python.org/3.5/using/windows.html should list whcih windows 
service packs are -> Using Windows doc should list service packs needed to 
install
type:  -> enhancement
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



[issue25334] telnetlib: process_rawq() and binary data

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A new method is an API change is an enhancement only allowed in a future 
version. If this is the only change needed to support another RFC also, the 
idea seems plausible, but I am not an Inet protocol expert.  
https://tools.ietf.org/html/rfc854.html
https://tools.ietf.org/html/rfc856.html
https://tools.ietf.org/html/rfc5198 proposed 854 update for unicode

--
nosy: +r.david.murray, terry.reedy
stage:  -> patch review
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread shanmbic

shanmbic added the comment:

@belopolsky - Yeah, I recompiled all the C modules successfully, still it fails 
the test. I am running Ubuntu 14.10

--

___
Python tracker 

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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

OK, I'll change the title to reflect the current proposal, and we'll see if 
anyone is interested in proposing a patch.

The bug with python -m py_compile is when you do:

python -m py_compile myscript

where myscript is a file containing python code (note there is no .py 
extension).  In this case you will end up with:

  __pycache__/myscriptcpython-36.pyc

(for example).  This is clearly a bug, but should be reported in a new issue.

--
title: py_compile disregards PYTHONDONTWRITEBYTECODE and -B -> Add option to 
py_compile to compile for syntax checking without writing bytecode

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Tim Peters

Tim Peters added the comment:

This is just hard to believe.  The symptom you describe is exactly what's 
expected if you got the new test suite but did not compile the new C code, both 
added by the fix for:

http://bugs.python.org/issue23600

Since we have numerous buildbots on which the test passes, what's special about 
your setup?  The changes here were quite straightforward.  Please double-check.

--
nosy: +tim.peters

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Changes by Brett Cannon :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

Here is a new patch that addresses Serhiy's comments.

--
Added file: http://bugs.python.org/file40734/issue25099.diff

___
Python tracker 

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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

You can verify a script is syntactically correct by compiling it to an AST or 
just calling compile() which is another way of doing essentially what `import` 
does but without having to worry about import-related side-effects in the code 
being checked.

But is this really worth adding to the stdlib? You can run your tests to verify 
the code is syntactically sound, run pylint, etc. I think this is probably 
straying a bit too much into the tooling arena to make the maintenance burden 
worth having in the stdlib.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue25358] Unexpected behaviour when converting large float to int

2015-10-09 Thread Nicolas Primeau

New submission from Nicolas Primeau:

Converting arbitrarily large float type numbers to integer type number results 
in a non trivially different number.

This can be repeated in all Python versions, same with Python 2 with longs.

Expected behaviour would be an integer representation of 1e+44, and some_number 
== int_version.

Example:
>>> some_number = 1
>>> type(some_number)

>>> float_version = float(some_number)
>>> float_version
1e+44
>>> type(float_version)

>>> int_version = int(float_version)
>>> type(int_version)

>>> int_version
18821361405306422640701865984
>>> int_version == some_number
False
>>> int_version == float_version
True

--
components: Interpreter Core
messages: 252642
nosy: Nicolas Primeau
priority: normal
severity: normal
status: open
title: Unexpected behaviour when converting large float to int
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



[issue25335] ast.literal_eval fails to parse numbers with leading "+"

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am pretty sure the 2.x anomaly is tied up with having short ints plus the 
anomaly of having one more negative than positive int.

>>> 2147483648
2147483648L
>>> -(2147483648)
-2147483648L
>>> -2147483648
-2147483648

I believe the last result was once the same as the middle result because I 
remember reading or even writing the explanation that -2147483648 is (was) 
parsed as -(2147483648) (or something like this).

Raymond' also made more liberal in other ways: literal_eval('(+1)+(-1)') in now 
0 instead of ValueError: malformed string. The 3.x doc was not changed to 
match, though.

--
nosy: +terry.reedy
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



[issue25341] File mode wb+ appears as rb+

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +benjamin.peterson, pitrou, stutzbach

___
Python tracker 

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



[issue25329] test_json crashes with stack overflow on Windows

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

See also #25342 and its list of related failures.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Well, the thing is that py_compile *already* has all the needed logic, the flag 
would just allow us to add an if statement before the two lines that write the 
compiled bytecode out to the file system.  py_compile also has the advantage 
that it supports the importlib loader logic.  The goal here (from my point of 
view) is to have a simple command line way of checking the syntax of a script, 
so that last may not be important.  

The python -c using 'compile(open' *is* reasonably brief, but it is not as 
elegant as the 'perl -c' mentioned in the linked stackoverflow question.  
'python -m py_compile' isn't quite a succinct as 'perl -c', but it is a lot 
closer than 

  python -c "compile(open().read(), '', 'exec')"

and a lot easier to remember.  Now, you can argue that referencing perl in this 
context is a bit of 'keeping up with the joneses', but I think there is an 
argument to be made that it is worthwhile in this case.  I won't be heartbroken 
if the idea gets shot down, though :)

--

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy: +@nkit

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This question has been asked multiple times before.  I think it should be 
documented that as far as the language goes, there is no answer.  Raymond's 
answer is a start.  Dima, where would you expect to find such a disclaimer 
(other than in the FAQ)?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17908] Unittest runner needs an option to call gc.collect() after each test

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy: +@nkit

___
Python tracker 

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



[issue25347] assert_has_calls output is formatted inconsistently

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Maybe @shanmbic has a clock skew and _datetime.so does not get recompiled?

I would try to do make clean or even make distclean and rebuild everything.

--

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Yes, I find that if there's something that might be a compilation problem, 
doing a make distclean and a build from scratch is a good idea to confirm it.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Dima Tisnek

Dima Tisnek added the comment:

Ideally I'd like 2 sources:

1. a whole section on atomic operations in language and CPython implementation

2. annotation of standard library methods, e.g.:
set().add(element)  [atomic] or [CPython: atomic(*)]
(*) assuming basic types, note about what custom methods would break this 
guarantee; the reference could be to 1.

--

___
Python tracker 

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



[issue17908] Unittest runner needs an option to call gc.collect() after each test

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy:  -@nkit

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy:  -@nkit

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

I wrote bench_bytes_int.py micro-benchmark, results are below.

Oh, I did'n expected a real difference even for simple code like b'%d' % 12345 
(32% faster). So I consider that it's enough to apply the optimization.

Common platform:
Timer: time.perf_counter
Bits: int=32, long=64, long long=64, size_t=64, void*=64
CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Platform: Linux-4.1.6-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two
Python unicode implementation: PEP 393
Timer info: namespace(adjustable=False, 
implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, 
resolution=1e-09)
CFLAGS: -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes

Platform of campaign orig:
SCM: hg revision=576128c0d068 tag=tip branch=default date="2015-10-09 10:20 
-0400"
Python version: 3.6.0a0 (default:576128c0d068, Oct 9 2015, 22:36:21) [GCC 5.1.1 
20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 22:36:36
Timer precision: 62 ns

Platform of campaign writer:
Python version: 3.6.0a0 (default:576128c0d068+, Oct 9 2015, 22:28:09) [GCC 
5.1.1 20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 22:34:53
SCM: hg revision=576128c0d068+ tag=tip branch=default date="2015-10-09 10:20 
-0400"
Timer precision: 65 ns

+-+---
%i  |    orig | 
writer
+-+---
n = 1; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg   |  155 ns (*) |  
105 ns (-32%)
n = 5; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg   |  546 ns (*) |  
306 ns (-44%)
n = 10; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg  | 1.03 us (*) |  
543 ns (-47%)
n = 25; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg  | 2.49 us (*) | 
1.27 us (-49%)
n = 100; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg | 10.1 us (*) | 
5.25 us (-48%)
n = 200; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg | 20.5 us (*) | 
10.8 us (-47%)
n = 500; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg | 48.8 us (*) | 
24.6 us (-50%)
+-+---
Total   | 83.6 us (*) | 
42.9 us (-49%)
+-+---

---+-+---
x=%i   |    orig |  
   writer
---+-+---
n = 1; fmt = b"x=%d " * n; arg = tuple([12345]*n); fmt % arg   |  173 ns (*) |  
123 ns (-29%)
n = 5; fmt = b"x=%d " * n; arg = tuple([12345]*n); fmt % arg   |  602 ns (*) |  
372 ns (-38%)
n = 10; fmt = b"x=%d " * n; arg = tuple([12345]*n); fmt % arg  | 1.14 us (*) |  
668 ns (-42%)
n = 25; fmt = b"x=%d " * n; arg = tuple([12345]*n); fmt % arg  |  2.8 us (*) | 
1.56 us (-44%)
n = 100; fmt = b"x=%d " * n; arg = tuple([12345]*n); fmt % arg | 11.1 us (*) | 
6.12 us (-45%)
n = 200; fmt = b"x=%d " * n; arg = tuple([12345]*n); fmt % arg | 21.5 us (*) | 
12.1 us (-44%)
n = 500; fmt = b"x=%d " * n; arg = tuple([12345]*n); fmt % arg | 53.5 us (*) | 
29.8 us (-44%)
---+-+---
Total  | 90.8 us (*) | 
50.7 us (-44%)
---+-+---

+-+---
%x  |    orig | 
writer
+-+---
n = 1; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg   |  155 ns (*) |  
105 ns (-32%)
n = 5; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg   |  545 ns (*) |  
306 ns (-44%)
n = 10; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg  | 1.03 us (*) |  
543 ns (-47%)
n = 25; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg  | 2.49 us (*) | 
1.26 us (-49%)
n = 100; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg |  9.9 us (*) | 
5.07 us (-49%)
n = 200; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg | 19.8 us (*) | 
10.1 us (-49%)
n = 500; fmt = b"%d" * n; arg = tuple([12345]*n); fmt % arg | 48.9 us (*) | 
24.5 us (-50%)
+-+---
Total   | 82.8 us (*) | 
41.9 us (-49%)
+-+---

--+-+-

[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think what Terry was asking was, where would you expect to see the disclaimer 
that *no* operations are guaranteed to be atomic?  That's what we're inclining 
toward (though we'll probably need a signoff from Guido).

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There used to be such a checkbox, but apparently it had problems.  But there is 
still something with that effect, at least in part.  When I installed 3.5.0, 
'python' was switched from 3.4 to 3.5.  That did not happen with the 
preliminary releases, because I did somethng different.  Sorry, I don't 
remember what.

I don't like using the start menu over and over either.  So I pin frequently 
used programs to the taskbar -- always visible.  The 2.7 IDLE icon just says 
Python GUI.  In 3.4, it is Python 3.4 GUI.  Ditto for 3.5 and the future.

Steve: when Firefox and some other programs upgrade, the pinned icon remains.  
When Python upgrades, the pinned IDLE icon disappears.  When, as is normal, the 
upgrade is in the same directory, is there any way to leave the icon, since it 
still points to the right directory and filename?  Or is this icon binary 
specific?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25358] Unexpected behaviour when converting large float to int

2015-10-09 Thread eryksun

eryksun added the comment:

int(float_version) is returning the actual integer value represented by the 
float, which is the closest approximation possible using an [IEEE 754 
binary64][1], i.e. a C double. Here's one way to compute this value manually:

from struct import pack
from fractions import Fraction

some_number = 1 * 10**44
float_version = float(some_number)

n = int.from_bytes(pack('>d', float_version), 'big')
sign = n >> 63
exp = ((n >> 52) & (2**11 - 1)) - 1023
nmantissa = n & (2**52 - 1)
significand = 1 + sum(Fraction((nmantissa >> (52 - i)) & 1, 2**i)
  for i in range(52))

>>> (-1)**sign * significand * 2**exp
Fraction(18821361405306422640701865984, 1)

Or just use the as_integer_ratio method:

>>> float_version.as_integer_ratio()
(18821361405306422640701865984, 1)

[1]: https://en.wikipedia.org/wiki/Double-precision_floating-point_format

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Dima Tisnek

Dima Tisnek added the comment:

To clarify, Python language disclaimer can be in the general atomic operations 
or multithreading section.

What I'd really like to see is documented, practical CPython and stdlib 
behaviour.

I'm under the impression that there's quite a bit of code out there that relies 
on what's actually atomic in CPython.

d.

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d9a89c9137d2 by Victor Stinner in branch 'default':
Issue #25349: Optimize bytes % int
https://hg.python.org/cpython/rev/d9a89c9137d2

New changeset 4d46d1588629 by Victor Stinner in branch 'default':
Issue #25349: Add fast path for b'%c' % int
https://hg.python.org/cpython/rev/4d46d1588629

--

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added new comments.

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I implemented all optimizations which were already implemented in str % 
args. I close the issue.

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

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Hello, i am totally new.I went through Pythons Developers guide and would like 
to learn so please tell me what i should learn to resolve this issue.

--
nosy: +@nkit

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

IDLE uses tkinter which wraps the tcl/tk GUI framework.  Tk handles key 
presses.  So this is almost certainly not an IDLE bug, or even a tkinter bug. 
Unless you can demonstrate otherwise, I will closing this as a CPython issue.

Since this is the first report I know of reporting a problem with ascii chars, 
there is almost certainly something peculiar about your system.  You should 
probably ask for help on python-list (or use the gmane.comp.python.general 
mirror as news.gmane.org).  Here are some preliminary questions.

Do the keys work in the Ubuntu console?
Do the keys work in interactive python (not IDLE), started with 'python' at the 
console prompt.
In IDLE, go to Help->About IDLE.  What is the Tk version.
  Best if 8.6.x, if before 8.5.18, upgrade.

Run the following program (IDLE editor is fine).

from tkinter import *
root = Tk()
text = Text(root)
text.pack()
text.focus_set()  # required to work
root.mainloop()

Try typing in the text box, including the problem chars.  What happens?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Gian Carlo Martinelli

Gian Carlo Martinelli added the comment:

1) Do the keys work in the Ubuntu console?
Yes.

2) Do the keys work in interactive python (not IDLE), started with 'python' at 
the console prompt.
Yes.

3) In IDLE, go to Help->About IDLE.  What is the Tk version.
  Best if 8.6.x, if before 8.5.18, upgrade.
8.6.1

4) Try typing in the text box, including the problem chars.  What happens?
Ran the program, all characters work perfectly.

--

___
Python tracker 

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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread Pavel Roskin

Pavel Roskin added the comment:

That's what I have now:

check:
$(PYTHON) -m py_compile $(SOURCES)
rm -f $(addsuffix c, $(SOURCES))

make check
python -m py_compile redacted-build redacted-git-diff redacted-git-gc 
redacted-git-status redacted-init redacted-server
redactedbuilder.py
rm -f redacted-buildc redacted-git-diffc redacted-git-gcc redacted-git-statusc 
redacted-initc redacted-serverc redactedb
uilder.pyc

That's what David is suggesting:

check:
for file in $(SOURCES); do \
python -c "compile(open('$$file').read(), '', 'exec')" || exit 1; \
done

make check
for file in redacted-build redacted-git-diff redacted-git-gc 
redacted-git-status redacted-init redacted-server redactedb
uilder.py; do \
python -c "compile(open('$file').read(), '', 'exec')" || exit 1; \
done

That's what I could have if I live long enough to see Python 3.6 on my 
development machine.

check:
$(PYTHON) -m py_compile --no-output $(SOURCES)

make check
python -m py_compile --no-output redacted-build redacted-git-diff 
redacted-git-gc redacted-git-status redacted-init redacted-server
redactedbuilder.py

If that does not seem like an important improvement, then I can live with what 
I have.

--

___
Python tracker 

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



[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Short summary.

Ok, I optimized ASCII, Latin1 and UTF-8 codecs (encoders and decoders) for the 
most common error handlers.

* ASCII and Latin1 encoders: surrogateescape, replace, ignore, 
backslashreplace, xmlcharrefreplace
* ASCII decoder: surrogateescape, replace, ignore
* (Latin1 decoder cannot fail)
* UTF-8 encoder: surrogateescape, surrogatepass, replace, ignore, 
backslashreplace, xmlcharrefreplace
* UTF-8 decoder: surrogateescape, replace, ignore

The code to handle other error handlers in encoders has also be optimized.

Surrogateescape has now an efficent implementation for ASCII, Latin1 and UTF-8 
encoders and decoders.

--

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

I have addressed Serhiy's comments again.

--
Added file: http://bugs.python.org/file40736/issue25099.diff

___
Python tracker 

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



[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

INADA Naoki: "I want to Python 3.4 and Python 3.5 solve this issue since it's 
critical problem for some people."

On microbenchmarks, the optimization that I just implemented in Python 3.6 are 
impressive. The problem is that the implementation is quite complex. If I 
understood correctly, you are asking to optimize decoders and encoders for 
ASCII and UTF-8 (modify 4 functions) for the surrogateescape error handler. Is 
that right? Would UTF-8 be enough or not?

I don't like backporting optimizations which are not well tested right now. To 
optimize encoders, I wrote a full new _PyBytesWriter API. We cannot backport 
this new API, even if it's private. So the backport may be more complex than 
the code in the default branch.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think you are correct, and I wouldn't be surprised if there is some in the 
stdlib as well.

--

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Yes same answers as Gian characters worked perfectly

--

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread shanmbic

shanmbic added the comment:

make distclean worked. I guess too many reverts in hg caused some issue. :)

--

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Tim Peters

Changes by Tim Peters :


--
components: +Library (Lib) -Extension Modules, ctypes
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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

Thanks to Serhiy for all of the reviews!

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 34bbd537b3e6 by Brett Cannon in branch '3.5':
Issue #25099: Skip relevant tests in test_compileall when an entry on
https://hg.python.org/cpython/rev/34bbd537b3e6

New changeset 21f3a92e0c6d by Brett Cannon in branch 'default':
Merge for issue #25099
https://hg.python.org/cpython/rev/21f3a92e0c6d

--
nosy: +python-dev

___
Python tracker 

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



[issue21264] test_compileall fails to build in the installed location

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

I consider this fixed by way of issue #25099. If that's wrong then feel free to 
open the issue again.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> test_compileall fails when run by unprivileged user on 
installed Python
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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On the side issue: While the example given, which uses the py_compile.compile 
defaults via the command line interface, is useless, I disagree that writing a 
.pyc file for a file without .py is a bug.

Python will run python code with any filename as main module (and not write 
.pyc).  It will only import the *same code* (and normally write .pyc) if the 
filename ends with .py (or .pyw on windows).  However, 'import script' will 
import script.pyc (on the search path) without a script.py file existing.  
Using py_compile.compile('script', 'script.pyc') makes that possible.  (I just 
tried it.)

.

--

___
Python tracker 

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



[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-09 Thread L

Changes by L :


--
components: IO
files: io.openBugEx.py
nosy: sentinel
priority: normal
severity: normal
status: open
title: io.open() fails to open ascii file if LANG env not set
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file40737/io.openBugEx.py

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yes, I was asking where to put the disclaimer.  The thread docs would be 
approriate if there is nothing already.

Guido has been very reluctant to put any performance guarantees in the language 
reference.  I believe he said that O(f(n)) info even for CPython should be in 
the wiki -- and taken as a guideline, not a iron guarantee.

Further discussion might be better directed to python-ideas, after a search of 
the pydev and python-ideas archives (most easily done with the gmane mirrors, I 
believe).

--

___
Python tracker 

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



  1   2   >