[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You need just replace unsigned_int with unsigned_long in Clinic declaration for 
fcntl.ioctl in Modules/fcntlmodule.c and regenerate Clinic code (make clinic).

--
nosy: +larry, serhiy.storchaka

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

Zachary Ware added the comment:
> To be fair, other buildbots are also segfaulting (or otherwise silently 
> failing) on those:

Sorry, the following issues are unrelated.

> 3.4 on XP, test_json:
> http://buildbot.python.org/all/builders/x86%20XP-4%203.4/builds/1190/steps/test/logs/stdio

This one is old. We don't really support Windows XP. If I recall
correctly, Windows XP doesn't handle correctly stack overflow.

> 3.5 on 7, test_tokenize:
> http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.5/builds/250/steps/test/logs/stdio

This is a timeout, not a crash.

--

___
Python tracker 

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



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-08 Thread koobs

koobs added the comment:

Thanks for the insight Serhiy. A few questions ..

Is clinic code updated based on *.c declarations at build time? If not when/how 
is the best place/method to run this for our ports/package builds?

Does your suggestion to switch unsigned_int to unsigned_long imply that the 
following lines are no longer necessary?

-if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
+if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",

How do we get something like this fixed upstream for FreeBSD/OSX?

If left un-patched, what is the impact on the user/system? Just a warning on 
console?

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



[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 08/09/2015 01:21, David Barnett a écrit :
> 
> My use case was that I had an equality check like this failing:
>   expected_path = pathlib.Path.cwd() / pathlib.Path('some/path')
>   pathlib.Path('some/path') == expected_path
> I suppose I should file that as a separate bug because semantically those 
> paths are equal, but I was trying to work around it like
>   pathlib.Path('some/path').resolve() == expected_path
> which in my case still failed because some/path was a symlink.

Semantically, the paths are equal only in that particular system
configuration, with os.getcwd() pointing to a particular directory. Path
comparison is done on "pure" path objects (as explained in the
documentation) and therefore doesn't take into account system specifics.
This makes comparisons much more predictable.

Currently the way to implement "absolute" comparison is to call
.resolve() on both paths. Note you might care about actual file identity
and call os.path.samefile() instead.

> Even if that's fixed, I would still expect to run into cases where I
wanted to print specifically the relative or absolute path in
informational messages and would not want to follow symlinks (e.g., in
"Requested path X not found", the user would recognize the absolute path
as the one they entered but not necessarily the symlink-resolved version).

Yes... and yet that may be misleading, since the "absolute" path
obtained may not correspond to the actual one, especially if ".."
fragments are collapsed.

I'll have to think about this one a bit more.

--

___
Python tracker 

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



[issue23415] add-to-pydotorg does not support .exe installers for Windows

2015-09-08 Thread Larry Hastings

Larry Hastings added the comment:

I fixed it.  My original attempted hack had bad regular expressions.  Once my 
regular expressions worked properly it was all fine.

--
resolution:  -> fixed
stage: needs patch -> 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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Christoph Gohlke

New submission from Christoph Gohlke:

This issue was first mentioned at .

The attached script (test_dll_load_failed.py) builds up to 256 C extension 
modules and imports them. On Python 3.4.3 the script passes while on Python 
3.5.0rc3 the script fails with:

```
Traceback (most recent call last):
File "test_dll_load_failed.py", line 42, in 
import_module(name)
File "X:\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 986, in _gcd_import
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 577, in module_from_spec
File "", line 903, in create_module
File "", line 222, in _call_with_frames_removed
ImportError: DLL load failed: A dynamic link library (DLL) initialization 
routine failed.
```

Tested on Windows 7 and 10, 64 bit, with Python 3.5.0rc3, 32 and 64 bit.

Due to this issue the "scientific stack" is practically unusable. For example, 
Pandas unit tests error or abort. In a Jupyter notebook, the following simple 
imports fail (using current builds from 
):

```
In [1]:

import matplotlib.pyplot
import pandas
import statsmodels.api
---
ImportError   Traceback (most recent call last)
 in ()
  1 import matplotlib.pyplot
  2 import pandas
> 3 import statsmodels.api



X:\Python35\lib\site-packages\scipy\signal\__init__.py in ()
276 # The spline module (a C extension) provides:
277 # cspline2d, qspline2d, sepfir2d, symiirord1, symiirord2
--> 278 from .spline import *
279 
280 from .bsplines import *

ImportError: DLL load failed: A dynamic link library (DLL) initialization 
routine failed.
```

The cause of this issue is that as of Python 3.5.0rc1 C extension modules are 
linked statically to the multi-threaded runtime library (/MT) instead of the 
multi-threaded DLL runtime library (/MD). A process can not load more than 127 
statically-linked CRT DLLs using LoadLibrary due to a limit of fiber-local 
storage (FLS) as mentioned in the following links:




To put the 127 limit in perspective: the pywin32 package contains 51 C 
extension modules, pygame 36, scipy 65, and scikit-image 41. 

In addition to C extension modules, the 127 limit also applies to 
statically-linked CRT DLLs that are dynamically loaded via Ctypes or 
LoadLibrary.

--
components: Extension Modules, Windows
messages: 250169
nosy: cgohlke, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python 3.5.0rc3 on Windows can not load more than 127 C extension modules
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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Christoph Gohlke

Changes by Christoph Gohlke :


Added file: http://bugs.python.org/file40402/test_dll_load_failed.py

___
Python tracker 

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



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No, the clinic code is not updated at build time. Your should either update 
clinic code just after patching Modules/fcntlmodule.c (Python 3 is needed), or 
update clinic code at patch creation time and include changes of generated 
clinic files in the patch.

Generated clinic files contain a code for argument parsing 
(PyArg_ParseTuple...).

I don't know if there is easy way to make this change conditionally for 
FreeBSD/OSX. The only way that I know is writing custom converters.

Perhaps the original commit log is outdated. What was the type of code at the 
time of this log? Now it is unsigned int and this doesn't make sign extension 
when casted to unsigned long. While the code parameter is in the range 
0..0x, unpatched code shouldn't have any visible effects.

--

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tests failed on Mac OS X.
http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.5/builds/254/steps/test/logs/stdio
==
FAIL: test_make_tarball (test.test_shutil.TestShutil)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.5.murray-snowleopard/build/Lib/test/test_shutil.py",
 line 986, in test_make_tarball
self.assertEqual(tarball, base_name + '.tar.gz')
AssertionError: '/private/var/folders/0-/0-cd8XI2HU86vol3rX[38 chars]r.gz' != 
'/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++T[30 chars]r.gz'
- 
/private/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpy8jleen7/archive.tar.gz
? 
+ /var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpy8jleen7/archive.tar.gz


==
FAIL: test_make_zipfile (test.test_shutil.TestShutil)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.5.murray-snowleopard/build/Lib/test/test_shutil.py",
 line 1075, in test_make_zipfile
self.assertEqual(res, base_name + '.zip')
AssertionError: '/private/var/folders/0-/0-cd8XI2HU86vol3rX[35 chars].zip' != 
'/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++T[27 chars].zip'
- 
/private/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpgs7euvvg/archive.zip
? 
+ /var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpgs7euvvg/archive.zip


--

This was fixed in bbf72b164720.

--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-08 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Interesting.  Let me have a look.

--

___
Python tracker 

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



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-08 Thread koobs

koobs added the comment:

@Serhiy

If by "type of code at the time of commit" you mean upstream python code, 
msg250163 contains a link to what bits we replace in fcntlmodule.c and that "I 
-> k" has always been the same.

--

___
Python tracker 

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



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Originally the type of the code variable in fcntl_ioctl() was int. In 
cbad1f5cabb1 it was changed to unsigned int. I guess that the log message that 
you cited was written before this.

--

___
Python tracker 

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



[issue25028] Reading unicode json string fails depending on LANG env

2015-09-08 Thread Yves Müller

New submission from Yves Müller:

I am trying to read json containing a UTF-8 string from a file. It works when 
running it from a shell with LANG=en_GB.utf8 set, but fails from the empty 
environment.

> python3 --version
Python 3.4.0
> cat test.json 
{ "test": "Ümläute" }
> env -u LANG python3 -c 'import json; json.load(open("test.json"))'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.4/json/__init__.py", line 265, in load
return loads(fp.read(),
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: 
ordinal not in range(128)
> > env LANG=en_GB.UTF-8 python3 -c 'import json; 
> > print(json.load(open("test.json")))'
{'test': 'Ümläute'}

--
components: Unicode
messages: 250175
nosy: ezio.melotti, haypo, yves
priority: normal
severity: normal
status: open
title: Reading unicode json string fails depending on LANG env
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



[issue25023] time.strftime('%a'), ValueError: embedded null byte, in ko locale

2015-09-08 Thread eryksun

eryksun added the comment:

It seems VC 14 has a bug here. In the new C runtime, strftime is implemented by 
calling wcsftime as follows:

size_t const result = _Wcsftime_l(wstring.get(), maxsize, wformat.get(), 
timeptr, lc_time_arg, locale);
if (result == 0)
return 0;

// Copy output from wide char string
if (!WideCharToMultiByte(lc_time_cp, 0, wstring.get(), -1, string, 
static_cast(maxsize), nullptr, nullptr))
{
__acrt_errno_map_os_error(GetLastError());
return 0;
}

return result;

The WideCharToMultiByte call returns the number of bytes in the converted 
string, but strftime doesn't update the value of "result". 

This worked correctly in the old CRT. For example, in 3.4 built with VC 10:

>>> sys.version_info[:2]
(3, 4)
>>> locale.setlocale(locale.LC_ALL, 'kor_kor') 
'Korean_Korea.949'
>>> time.strftime('%a')
'\ud654'

Here's an overview of the problem in 3.5, stepped through in the debugger:

>>> sys.version_info[:2]
(3, 5)
>>> locale.setlocale(locale.LC_ALL, 'ko')
'ko'
>>> time.strftime('%a')
Breakpoint 0 hit
ucrtbase!Wcsftime_l:
07fe`e9e6fd74 48895c2410  mov qword ptr [rsp+10h],rbx 
ss:`003df6d8=00666ce0

wcsftime returns the output buffer length in wide characters:

0:000> pt; r rax
rax=0001

WideCharToMultiByte is called to convert the wide-character string to the 
locale encoding:

0:000> pc
ucrtbase!Strftime_l+0x17f:
07fe`e9e6c383 ff15dfa00200callqword ptr 
[ucrtbase!_imp_WideCharToMultiByte (07fe`e9e96468)] ds:07fe`
e9e96468={KERNELBASE!WideCharToMultiByte (07fe`fd631be0)}
0:000> p
ucrtbase!Strftime_l+0x185:
07fe`e9e6c389 85c0testeax,eax

This returns the length of the converted string (including the null):

0:000> r rax
rax=0003

But strftime ignores this value, and instead returns the wide-character string 
length, which gets passed to PyUnicode_DecodeLocaleAndSize:

0:000> bp python35!PyUnicode_DecodeLocaleAndSize
0:000> g
Breakpoint 1 hit
python35!PyUnicode_DecodeLocaleAndSize:
`5ec15160 4053pushrbx
0:000> r rdx
rdx=0001

U+D654 was converted correctly to '\xc8\cad' (codepaged 949):

0:000> db @rcx l3
`007e5d20  c8 ad 00 ...

However, since (str[len] != '\0'), PyUnicode_DecodeLocaleAndSize errors out as 
follows:

0:000> bd 0,1; g
Traceback (most recent call last):
  File "", line 1, in 
ValueError: embedded null byte

It works as expected if the length is manually changed to 2:

>>> time.strftime('%a')
Breakpoint 1 hit
python35!PyUnicode_DecodeLocaleAndSize:
`5ec15160 4053pushrbx
0:000> r rdx=2
0:000> g
'\ud654'

The string is null-terminated, so can time_strftime simply substitute 
PyUnicode_DecodeLocale in place of PyUnicode_DecodeLocaleAndSize?

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

___
Python tracker 

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



[issue25023] time.strftime('%a'), ValueError: embedded null byte, in ko locale

2015-09-08 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +belopolsky -serhiy.storchaka

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

All builds on edelsohn-fedora-ppc64 are red starting from build 55 for 3.x and 
build 41 for 3.5. 3.4 is green.
http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/55/
http://buildbot.python.org/all/builders/PPC64%20Fedora%203.5/builds/41/

==
ERROR: test_TimeRE_recreation (test.test_strptime.CacheTests)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.5.edelsohn-fedora-ppc64/build/Lib/test/test_strptime.py",
 line 565, in test_TimeRE_recreation
_strptime._strptime_time('10', '%d')
  File 
"/home/shager/cpython-buildarea/3.5.edelsohn-fedora-ppc64/build/Lib/_strptime.py",
 line 494, in _strptime_time
tt = _strptime(data_string, format)[0]
  File 
"/home/shager/cpython-buildarea/3.5.edelsohn-fedora-ppc64/build/Lib/_strptime.py",
 line 312, in _strptime
_TimeRE_cache = TimeRE()
  File 
"/home/shager/cpython-buildarea/3.5.edelsohn-fedora-ppc64/build/Lib/_strptime.py",
 line 190, in __init__
self.locale_time = LocaleTime()
  File 
"/home/shager/cpython-buildarea/3.5.edelsohn-fedora-ppc64/build/Lib/_strptime.py",
 line 75, in __init__
self.__calc_am_pm()
  File 
"/home/shager/cpython-buildarea/3.5.edelsohn-fedora-ppc64/build/Lib/_strptime.py",
 line 114, in __calc_am_pm
am_pm.append(time.strftime("%p", time_tuple).lower())
MemoryError

--

--
components: Extension Modules
messages: 250177
nosy: David.Edelsohn, larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: MemoryError in test_strptime
type: crash
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



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

If necessary, perhaps we could unconditionally change the Python-level argument 
to unsigned_long, and then add a conditional bit in the C code to convert it to 
int if appropriate.

But I wonder if most of the problem is fixed by Issue 1471 (linked from the 
commit Serhiy identified). As I see it, your patch should now only be needed to 
support “code” values outside of the range of unsigned_int, e.g. that require > 
32 bits.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25025] Missing 3.5.0 RC3 tarballs (FTP)

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

They seem to be there now:

https://www.python.org/ftp/python/3.5.0/Python-3.5.0rc3.tar.xz
https://www.python.org/ftp/python/3.5.0/Python-3.5.0rc3.tgz

Perhaps you were just too impatient? Or maybe confused by the strange sorting, 
EXE files following tar files?

--
nosy: +martin.panter

___
Python tracker 

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



[issue25028] Reading unicode json string fails depending on LANG env

2015-09-08 Thread Martin Panter

Martin Panter added the comment:

By default, open("test.json") will open the file in text mode, decoding from 
the encoding determined by your environment. See 
, in particular, “The 
default encoding is platform dependent (whatever locale.getpreferredencoding() 
returns)”.

If your file’s encoding is determined some other way, you should specify that 
other encoding. For JSON, I understand UTF-8 is generally always used, so you 
should call open("test.json", encoding="utf-8").

--
nosy: +martin.panter
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue24937] Multiple problems in getters & setters in capsulethunk.h

2015-09-08 Thread Petr Viktorin

Petr Viktorin added the comment:

This patch removes capsulethunk.h from the docs, and directs the kind reader to 
the py3c project, which carries a fixed and tested version of it, along with 
the docs.


Larry, would you be OK with releasing capsulethunk.h under the MIT license? The 
PSF license is not suitable for external projects, and mixing licenses is 
somewhat awkward.

--
versions:  -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file40403/capsulethunk-py3c.patch

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

Yes, according to C99 the shift is undefined:

6.5.7:

"If the value of the right operand is negative or is greater than
 or equal to the width of the promoted left operand, the behavior
 is undefined."

--

___
Python tracker 

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



[issue13053] Add Capsule migration documentation to "cporting"

2015-09-08 Thread Petr Viktorin

Petr Viktorin added the comment:

As capsulethunk.h is only needed for Python 2.6 and below, which are no longer 
maintained, in issue24937 we are discussing moving the header to an external 
project.

--
nosy: +encukou

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

If the scientific stack is unusable, I think this should be a release
blocker.

--
nosy: +skrah
priority: normal -> release blocker

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +larry

___
Python tracker 

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



[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-08 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +easy
stage:  -> needs patch

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-08 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

An alternative patch.  Please test this since I don't have a development system.

--
keywords: +needs review
Added file: http://bugs.python.org/file40404/itertoolsmodule.c.patch

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-08 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

There are two problems with the previous patch:
1) it can put out of bounds values into lz->indices.  This can cause problems 
then next time product_next() is called.
2) the case of a pool having zero size is not dealt with (it wasn't before 
either).
My patch should deal with both cases, but please verify since I don't have 
access to a python dev system at the moment.

--

___
Python tracker 

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



[issue25014] Add contextlib.itercm()

2015-09-08 Thread Ezio Melotti

Ezio Melotti added the comment:

> Having spent a few days pondering this after Ezio first mentioned the
> concept to me on IRC, I'm rejecting this on the basis of "not every 3 
> line function needs to be in the standard library".

When I first mentioned this to Nick on IRC, the implementation of itercm() was 
a not-so-trivial function that called __enter__/__exit__ manually while 
catching StopIteration.  It only occurred to me while posting this issue, that 
the same could be achieved with a simple `yield from` in a `with`.
I also didn't realize that the __exit__ called in case of error in the attached 
example was triggered by the garbage collector.
I therefore agree that a somewhat obscure and non-deterministic three-liner 
doesn't belong in the standard library.  Thanks everyone for the feedback!

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

Perhaps the stack overflow hypothesis applies here, too.

You could try changing Py_DEFAULT_RECURSION_LIMIT in ceval.c
to lower values.

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Larry Hastings

Larry Hastings added the comment:

This is your wheelhouse, Steve.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Larry Hastings

Larry Hastings added the comment:

Any clue here?  Is this unaligned access?

--

___
Python tracker 

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



[issue24937] Multiple problems in getters & setters in capsulethunk.h

2015-09-08 Thread Larry Hastings

Larry Hastings added the comment:

I'm the author of capsulethunk.h, and I am happy to relicense it under MIT.

How would you feel about leaving capsulethunk.h there, for posterity's sakes, 
but adding "for updates please see py3c"?  We could even update the 
capsulethunk.h there.  I'm not saying "we have to do it this way", I'm asking 
whether the users would be better served by leaving the example around vs 
removing it and forcing them to go looking on an external web site.

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread David Edelsohn

David Edelsohn added the comment:

PPC64 is not a strict alignment system.  The system is running a non-recent 
release of Fedora, so it could be a bad interaction with libc.

--

___
Python tracker 

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



[issue25025] Missing 3.5.0 RC3 tarballs (FTP)

2015-09-08 Thread koobs

koobs added the comment:

@Martin, weird, I'm still not seeing any files/dirs matching 'rc3'. 

I have refreshed properly (cache-control 0 + empty cache) and still getting a 
similar listing.

Fresh fetch output on the index URL:

Python-3.5.0rc1.tar.xz 11-Aug-2015 01:00 
14798596^M
Python-3.5.0rc1.tar.xz.asc 11-Aug-2015 
01:00 819^M
Python-3.5.0rc1.tgz 11-Aug-2015 00:59 
20038557^M
Python-3.5.0rc1.tgz.asc 11-Aug-2015 01:00 
819^M
Python-3.5.0rc2.tar.xz 25-Aug-2015 17:26 
14841476^M
Python-3.5.0rc2.tar.xz.asc 25-Aug-2015 
17:26 819^M
Python-3.5.0rc2.tgz 25-Aug-2015 17:25 
20055455^M
Python-3.5.0rc2.tgz.asc 25-Aug-2015 17:26 
819^M
python-3.5.0a1-amd64-webinstall.exe
 08-Feb-2015 03:14  916296^M
python-3.5.0a1-amd64.exe 08-Feb-2015 
03:14 22844576^M
python-3.5.0a1-macosx10.5.pkg 
08-Feb-2015 02:28 25160803^M
python-3.5.0a1-macosx10.5.pkg.asc 
8-Feb-2015 02:28 819^M

Resolved host is: 103.245.222.223

Perhaps too-aggressive cache configuration, or not so good revalidate settings 
@ Fastly?

--

___
Python tracker 

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



[issue16893] Generate Idle help from Doc/library/idle.rst

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

Ok. In case you're curious or might find it useful elsewhere, I've attached 
sphinxview.py, which renders the HTML into a text widget (with formatting, it's 
not converted to plain text).

--
Added file: http://bugs.python.org/file40405/sphinxview.py

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Let me experiment today with a few of the proposals I posted in the other 
thread and get back to you.

I suspect someone will need to ship vcruntime.dll, and I'd rather it was the 
extension.

--

___
Python tracker 

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



[issue25022] Remove PC/example_nt/

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Go for it.

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

I ran test_strptime & test_os with tracemalloc: test_os memory peak is higher 
than test_strptime memory peak (I ran the two tests independently). So the bug 
cannot be reproduce on my Fedora 22 (x86_64).

--
nosy: +haypo

___
Python tracker 

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



[issue24937] Multiple problems in getters & setters in capsulethunk.h

2015-09-08 Thread Petr Viktorin

Petr Viktorin added the comment:

Thank you for the license.

I mentioned my project mainly as a place where this code can be *tested*. I 
have no problem with keeping capsulethunk.h in the Python docs, and 
synchronizing the two projects if changes are made on either side. In other 
words, feel free to use the first patch :)

Regarding users – in my opinion, including a whole header directly in the docs 
is questionable (to me it smells of untested copy-paste code), and the link 
goes to hg.python.org – an external site from the users' point of view.
Also, if someone needs to port CObject, their extension is very likely to be 
complicated enough to need much more material than the HOWTO provides.
See py3c's `modernization docs`_ for several things the HOWTO doesn't address.
So, in my obviously biased opinion, linking to py3c will help users.
(Perhaps a link to py3c should be at the top of the HOWTO, but that's not for 
this issue. I'm working to get to a point where I'm comfortable suggesting 
that.)

There's obviously the question of whether I should be improving the HOWTO 
rather than starting my own thing. I have three reasons: testability, the fact 
that py3c docs are already way too long for a HOWTO, and the fact that py3c is 
quite opinionated. (The more opinionated, the more more in-depth the solutions 
can be. I've been toning it down lately, though.)


_ modernization docs: 
http://py3c.readthedocs.org/en/latest/guide-modernization.html

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

Oh wait, the VmPeak is *much* high when running test_strptime:

* test_os VmPeak: 380 992 kB
* test_strptime VmPeak: 8 608 972 kB (8 GB!?)

1 GB should be enough for everybody:

$ bash -c 'ulimit -v 100; ./python -m test -v test_strptime'
..
==
ERROR: test_TimeRE_recreation (test.test_strptime.CacheTests)
--
Traceback (most recent call last):
  ...
  File "/home/haypo/prog/python/default/Lib/_strptime.py", line 75, in __init__
self.__calc_am_pm()
  File "/home/haypo/prog/python/default/Lib/_strptime.py", line 114, in 
__calc_am_pm
am_pm.append(time.strftime("%p", time_tuple).lower())
MemoryError

--

___
Python tracker 

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



[issue25030] io.[Text]IOBase.seek doesn't take keyword parameter

2015-09-08 Thread shiyao.ma

New submission from shiyao.ma:

The doc is here: https://docs.python.org/3.5/library/io.html#io.IOBase.seek
and here: https://docs.python.org/3.5/library/io.html#io.TextIOBase.seek

It is said the parameter list is in the form of:
seek(offset, whence=SEEK_SET)

But actually only:
seek(offset) or seek(offset, whence) is allowed.

Passing seek(offset, whence=SEEK_FOOBAR) will throw an error.

The patch fixes the function signature as seek(offset[, whence])

--
assignee: docs@python
components: Documentation
files: seek.patch
keywords: patch
messages: 250200
nosy: berker.peksag, docs@python, ezio.melotti, introom
priority: normal
severity: normal
status: open
title: io.[Text]IOBase.seek doesn't take keyword parameter
versions: Python 3.5
Added file: http://bugs.python.org/file40406/seek.patch

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

It's a regression introduced by c31dad22c80d (Issue #24917).

--
nosy: +steve.dower

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

The change c31dad22c80d introduced a regression: issue #25029.

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

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

Oh, tracemalloc sees the memory peak of 8 GB too:

$ ./python -X tracemalloc -i -m test -v test_strptime
...
SystemExit: True
>>> import tracemalloc; tracemalloc.get_traced_memory()[1] / 1024.**2
8201.658247947693

Memory peak:  8201.7 MB (8.2 GB!).

--

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-08 Thread Tim Tisdall

Tim Tisdall added the comment:

Martin, looks good.  Thanks for pointing out how to properly tag the version 
change, and thanks for adding me to the ACKS file.

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I would blame this change: 
.  The rest should not 
have any effect on Linux.

--
nosy: +belopolsky

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

Script to reproduce the issue:
---
import time
import locale
import pprint

time_tuple = time.struct_time((1999,3,17,1,44,55,2,76,0))

p1 = time.strftime("%p", time_tuple)
print("current LC_TIME", repr(p1))

locale.setlocale(locale.LC_TIME, ('de_DE', 'UTF8'))
p2 = time.strftime("%p", time_tuple)
print("de_DE (UTF8)", repr(p2))
---

Output:
---
$ python3.4 bug.py
current LC_TIME 'AM'
de_DE (UTF8) ''
---

The problem is that strftime()/wcsftime() *can* return 0, it's not an error. 
Whereas c31dad22c80d considers that if buflen is 0 but fmtlen is smaller than 
5, we must retry with a larger buffer.

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

Again, this issue remembers me the idea of rewriting strftime() in Python. We 
already have _strptime.py.

--

___
Python tracker 

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



[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread David Barnett

David Barnett added the comment:

Right, and to clarify a bit further why I didn't just use A.resolve() == 
B.resolve() from the beginning, this is in a unit test where the equality check 
wasn't in my code. I wanted to assert I received a certain call on my mock, like
  mock_open_method.assert_called_once_with(pathlib.Path('foo'))
so it's much more convenient to be able to create a path object that matches 
with my target path instead of more complicated matching.

--

___
Python tracker 

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



[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread David Barnett

David Barnett added the comment:

And the symlinks for my paths refer to really cryptic hashes in a virtual 
filesystem for the tests, so rendering them into the assertion failed errors 
would really make the failure messages hard to interpret.

--

___
Python tracker 

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



[issue25000] _mock_call does not properly grab args and kwargs

2015-09-08 Thread Michael Foord

Michael Foord added the comment:

This is actually the specified and documented behaviour of mock when it is 
passed mutable arguments. Deep copying arguments on calls is rife with 
potential problems (not everything can be copied and it breaks comparison by 
identity). The documentation suggests ways around this:

https://docs.python.org/3/library/unittest.mock-examples.html#coping-with-mutable-arguments

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Guido van Rossum

Guido van Rossum added the comment:

Also, Theo believes that our Mersenne Twister is outdated and os.urandom() is 
the only reasonable alternative. So we might as well keep it fast.

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Sorry Larry.

I'll fix it.

--
assignee:  -> steve.dower
priority: normal -> release blocker

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

Yes, stopping changing asyncore/asynchat also means it becomes a stable target 
for people who *are* using it for 2/3 code.  We may have effectively done this 
already (without closing the open issues): the last asyncore-specific change 
(as opposed to library-wide changes that also hit asyncore) was a 
ResourceWarning added by Victor in June of 2014.  Likewise for asynchat.

--

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

I'll fix it on #25029. This thread is already too long for my liking.

--
resolution:  -> fixed
status: open -> closed
superseder:  -> MemoryError in test_strptime

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread eryksun

eryksun added the comment:

Steve, it seems to me that for MSVC the EINVAL test should come first:
   
_Py_BEGIN_SUPPRESS_IPH
olderr = errno;
errno = 0;
buflen = format_time(outbuf, i, fmt, &buf);
err = errno;
errno = olderr;
_Py_END_SUPPRESS_IPH

if (buflen == 0 && err == EINVAL) {
PyErr_SetString(PyExc_ValueError, "Invalid format string");
break;
}

Then the old test could be restored, i.e. (buflen > 0 || i >= 256 * fmtlen).

--
nosy: +eryksun

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

The two cases are not parallel, in that NamedTemporaryFile closes the file at 
the end of the context manager, whereas the *only* thing the TemporaryDirectory 
does is delete the directory on cleanup.

There is some value to the "parallel interface" argument, so I'm only -0 on 
this.

--
nosy: +r.david.murray
type:  -> enhancement

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

Is Python-core built with /MD? I cannot see the flags in the buildbot
logs.

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

Ah, interesting.  We know that there are stack overflow issues on the ICC 
windows build (they show up consistently in a debug build).

--

___
Python tracker 

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



[issue25025] Missing 3.5.0 RC3 tarballs (FTP)

2015-09-08 Thread Berker Peksag

Berker Peksag added the comment:

koobs and I have confirmed(on #python-dev) this was a cache issue.

--
nosy: +berker.peksag
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



[issue25025] Missing 3.5.0 RC3 tarballs (FTP) on Fastly nodes

2015-09-08 Thread koobs

koobs added the comment:

Was a bug, now fixed (adjust title/resolution to compensate)

Thanks Berker!

--
resolution: not a bug -> fixed
title: Missing 3.5.0 RC3 tarballs (FTP) -> Missing 3.5.0 RC3 tarballs (FTP) on 
Fastly nodes

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

If you care of smooth python 2 => python 3 migration, I suggest to
deprecate smtpd and remove it later, when asyncore & asynchat will
also be removed (ex: in Python 4?).

I suggest to write a *new* SMTP server module using asyncio. As I
explained, the API will be very different for the user of the API.

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Kind-of... We use the same flags I described in my blog[1] so that we don't 
have any version-specific dependencies.

You should (might) see /MT in the build logs, but then we replace most of the 
static CRT with the dynamic (but versionless) one. The versioned parts 
(including the FlsAlloc call - module initialization is compiler version 
specific) are statically linked.

I'm going to try and update distutils to build with /MD again (sorry 
Christoph!) and include vcruntime###.dll in the output. That way, people who 
bdist_wheel will include all of their own dependencies and don't have to worry 
about whether users are on Python 3.5.0 or 3.9.9.

[1]: http://stevedower.id.au/blog/building-for-python-3-5/

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

It seems to be /MTd. Sorry for the noise (and yay! for horizontal scrolling :).

--

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

@eryksun - that's exactly what I've just done :)

Unfortunately, I don't have a _locale module, so I can't do Victor's test. 
Attached my patch in case Victor is around to test it.

--
keywords: +patch
Added file: http://bugs.python.org/file40407/25029_1.patch

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

My test runs the following command on Linux (Fedora 22):

make && bash -c 'ulimit -v 100; ./python -u -m test -v test_strptime' 

* current default branch (rev 3c0c153d6b02): MemoryError
* with 25029_1.patch: the test pass

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

The reason I asked: We had issues where extension modules linked
against a different CRT had isolated locale settings from the
interpreter, i.e., changes made by the module would not be seen
by the interpreter.

I don't know if this is still an issue with the new runtimes.

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

It shouldn't be - locale state is in the shared part of the CRT. That is one of 
the reasons I was keen to move to this model (everyone seems to think that 
FILE* is the only problem with mixing CRT versions :) )

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread Stefan Krah

Stefan Krah added the comment:

Visual studio apparently has the option /F to set the stack size.
Maybe ICC has one, too.

--

___
Python tracker 

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



[issue25031] IDLE - file list improvements

2015-09-08 Thread Mark Roseman

New submission from Mark Roseman:

This is a placeholder for what will be a series of patches to the FileList to 
generalize and enhance it.

This is part of generalizing pieces of IDLE to be more flexible, including 
things like editors not necessarily being in toplevel windows, dialogs not 
being modal, etc.

The goal is to turn the FileList into an application "hub" that knows about the 
various pieces of the application, and can be used for communication between 
them. Some aspects of this will include:

1. Ensuring other modules don't use internal implementation (e.g. 
dict/inversedict) so can change it later.

2. Merging PyShellFileList into here (will keep things simpler).

3. Having FileList launch/keep track of certain dialogs (e.g. config) or other 
non-editor components.

4. Eventually take on some other responsibilities from editors, part of a 
general component/container refactoring.

--
components: IDLE
messages: 250229
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - file list improvements
type: enhancement
versions: Python 2.7, Python 3.4, 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



[issue25031] IDLE - file list improvements

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

This first patch is a straight refactoring so that other modules do not touch 
the FileList internals. 

This is done in two steps. First, we remove references to inversedict etc. from 
outside FileList.

Second, we run all notifications through FileList. So for example when the 
config dialog wants to notify all editors of changes, it previously walked 
through the list of windows and called various editor methods directly. Now, 
the config dialog asks FileList to notify all editors. Each editor implements 
the callback to make the needed changes. 

Same code, just moved to a more appropriate place. The config dialog no longer 
needs any knowledge of FileList or of EditorWindow. Later more of these sorts 
of callbacks will be added. Doing it this way provides a framework where 
different components might respond differently to these notifications.

--
keywords: +patch
Added file: http://bugs.python.org/file40408/hide_flist_internals.patch

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

By the way Stefan, if you want a copy of the ICC compiler to test with, you can 
contact robert.s.c...@intel.com.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread Brett Cannon

Brett Cannon added the comment:

Victor's suggestion also aligns with my thinking on the subject as well: 
deprecate the modules but simply leave them sitting there for compatibility 
reasons until Python 4 of whenever we feel like the Python 2 transition is done 
for those that will ever bother making the switch. That way people's 
expectations are in the proper alignment of where things will end up and code 
won't break if it straddles Python 2 & 3 short of having to silence a 
deprecation warning. I think this is a good use of PendingDeprecationWarning 
and the message both in the deprecation and the docs can make it clear that the 
removal date is not planned but you should avoid using the module in new code.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread STINNER Victor

STINNER Victor added the comment:

> Ideally these modules should emit a deprecation warning starting in 3.6

Is it ok to add the PendingDeprecationWarning in Python 3.5.1?

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread Guido van Rossum

Guido van Rossum added the comment:

> Is it ok to add the PendingDeprecationWarning in Python 3.5.1?

I prefer to wait until 3.6.  A bugfix release should not rock the boat, it 
should not make your code emit new warnings.

--

___
Python tracker 

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



[issue24813] Idle Help dialogs shouldn't be modal

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

Have attached about.patch, which changes the about dialog to no longer be 
modal, as well as does a substantial redesign, where the various help texts are 
displayed within the dialog itself, rather than launching (further modal) new 
windows.

Note: this new dialog works on both Tk 8.4 and 8.5+

--
keywords: +patch
Added file: http://bugs.python.org/file40409/about.patch

___
Python tracker 

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



[issue22179] Idle. Search dialog found text not highlited on Windows

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

See #24972 for fix

--

___
Python tracker 

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



[issue18590] Found text not always highlighted by Replace dialog on Windows

2015-09-08 Thread Mark Roseman

Mark Roseman added the comment:

See #24972 for fix

--

___
Python tracker 

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



[issue16893] Generate Idle help from Doc/library/idle.rst

2015-09-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This looks more maintainable than I expected, so I will definite try it out.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

In addition to a PendingDeprecationWarning in 3.6, it might be nice to put a 
note in the asyncore/asynchat docs like we did for optparse.

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-08 Thread Steve Dower

Steve Dower added the comment:

Attached a fix for distutils that will include the required vcruntime DLL with 
the extension.

This is purely Python source code and only needs to be patched on the build 
machine.

I have tested with a numpy build from source (setup.py bdist_wheel) and it 
works correctly on a clean Win7 machine with only a Python 3.5.0rc3 install.

When multiple vcruntime###.dll files are available, the first one that is 
loaded wins. This means that if you can guarantee a particular import occurs 
first, you can omit the DLL elsewhere in your package. There is no way to 
determine this automatically, 

Because of the way I wrote the patch, if you build with DISTUTILS_USE_SDK set, 
you will get the old static linking unless you also define PY_VCRUNTIME_REDIST 
to the path of the file to include. If the redist file cannot be found (you 
probably don't have the compiler either, but assuming you do), you will get the 
old static linking. I think this is the right balance of "works-by-default" and 
"I know what I'm doing let me control it" (though now I put them next to each 
other, I could rename the variable to DISTUTILS_VCRUNTIME_REDIST).

Will work up a test for it, but wanted to get feedback on the approach first.

--
keywords: +patch
Added file: http://bugs.python.org/file40410/25027_1.patch

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Tim Peters

Tim Peters added the comment:

Guido, you're clearly talking with someone who knows too much ;-)  If we're 
using the Twister for _anything_ related to crypto-level randomness, then I'd 
appalled - it was utterly unsuitable for any such purpose from day 1.  But as a 
general-purpose generator for non-crypto uses, it remains an excellent choice, 
and still a nearly de facto standard for "almost all" such purposes.  There are 
general-purpose generators I like better now, but won't push in that direction 
until the Twister's "nearly de facto standard" status fades.  Better to be a 
follower than a leader in this area.

--
nosy: +tim.peters

___
Python tracker 

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



[issue25032] IDLE - same menubar across application

2015-09-08 Thread Mark Roseman

New submission from Mark Roseman:

Right now the menubar is slightly different for the shell (has Debug) and the 
editor windows (has Format and Run). I'd like to suggest the same menubar be 
used for all windows.

Rationale:

1. Easier to use, especially for systems that share a single menubar visually 
across the top of screen.

2. Later on we'll likely have situations where shell and one or more editors 
are part of the same toplevel window.


Implementation Notes:

1. Tk lets you reuse the same menubar across multiple toplevel windows (it 
actually creates a 'clone' every time it gets attached to the window).

2. This will simplify code e.g. for managing help and windows menus, which now 
have to do the same thing for multiple menubars.

3. Using tabbed windows, while it's possible to swap the menubar on the fly as 
you swap windows, it's not necessarily desirable to do so.

4. I've mocked up a system for menu validation/dispatch that will simplify how 
menu commands are handled now depending on what window is in front, and makes 
it easier to ensure the right things are enabled/disabled based on context.

--
components: IDLE
messages: 250242
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - same menubar across application
versions: Python 2.7, Python 3.4, 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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Guido van Rossum

Guido van Rossum added the comment:

To Theo it's probably inconceivable that anyone would be using random numbers 
for anything besides crypto security. :-) His favorite is arc4random() (but he 
notes it's not based on RC4 anymore, but uses chacha -- I have no idea what any 
of that means :-). He did say userland PRNG a few times.

--

___
Python tracker 

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



[issue25033] Python 2.7.10 make - fails on some Standard Library Modules

2015-09-08 Thread Ron Barak

New submission from Ron Barak:

UnixWare7 only supports Python 1.6

I added Python 2.7.10 from sources.

Python works, but its make did not finish cleanly: several Standard Library 
modules failed to build (see attached: it has to be a screenshot since 
VirtualBox does not support cut-and-paste on UnixWare).

Can you suggest what should be done so that `multiprocessing`, `ssl`, and 
`select` will compile/build successfully?

--
components: Build
files: Python_make_failure.PNG
messages: 250244
nosy: ronbarak
priority: normal
severity: normal
status: open
title: Python 2.7.10 make - fails on some Standard Library Modules
versions: Python 2.7
Added file: http://bugs.python.org/file40411/Python_make_failure.PNG

___
Python tracker 

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



[issue25033] Python 2.7.10 make - fails on some Standard Library Modules

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

This tracker is for reporting bugs in python.  Our help forum is the 
python-list mailing list.  Please post your questions there.

--
nosy: +r.david.murray
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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Donald Stufft

Donald Stufft added the comment:

(A)RC4 and ChaCha are just two stream ciphers that let you encrypt some data, 
they work by essentially producing a psuedo-random stream of data in a 
deterministic manner based off of a key, and than that is XOR'd with the data 
you want to encrypt. arc4random (ab)uses this and uses "real" entropy (e.g. 
randomness pulled from random noise on the network and such) as the "key" and 
then uses the psuedo-random stream of data as the values you get when you ask 
arc4random for some random data. The actual process is quite a bit more complex 
then that, but that's the basic gist.

Userspace PRNG's are not a very good idea for reasons better explained by an 
expert: http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/

And yea, using MT for anything that needs a CSPRNG (that is, a 
Cryptographically Secure Psuedo Random Number Generator) is a real bad idea, 
because the numbers it outputs are not "really" random. I'm of a mind that the 
APIs should default to CSPRNGs (so ``random`` should default to SystemRandom) 
and using something like MT should be opt in via something like 
"UnsafeFastRandom) or something. That ship is almost certainly sailed at this 
point though.

--
nosy: +dstufft

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 Thread Donald Stufft

Donald Stufft added the comment:

Oh yea, and (A)RC4 is broken and shouldn't be used for anything anymore, ChaCha 
is much better and is pretty great.

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Re-opening because there is still the issue of adding a deprecation warning on 
import.  Brett, can you either point me toward or post here the code you are 
planning to use for other stdlib modules?

--
nosy: +brett.cannon
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue22197] Allow better verbosity / output control in test cases

2015-09-08 Thread Michael Foord

Michael Foord added the comment:

Using the runner as a "context" passed to test cases (and accessible from 
tests) for this kind of configuration seems like a good approach to me.

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-08 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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-08 Thread Brett Cannon

Brett Cannon added the comment:

Typically it's warnings.warn(message, DeprecationWarning, stacklevel=2), but 
that stack level is wrong for Python 3.3 - 3.4 (fixed in 3.5.0). If this is 
purely for Python 3.6 I might be adding a nicer API for module deprecations, 
but if this is for other versions then the call above is the right one except 
for Python 3.3/3.4.

--

___
Python tracker 

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



[issue22197] Allow better verbosity / output control in test cases

2015-09-08 Thread R. David Murray

R. David Murray added the comment:

I like that approach as well, it is the kind of API I've been finding myself 
writing a fair bit lately (a context passed to class instances that otherwise 
don't store global state themselves).

--

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-08 Thread John Leitch

John Leitch added the comment:

Glancing over the code, I see the issues you describe. Tonight I will verify 
your revised patch and report back.

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-08 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue24913] deque.index() overruns deque boundary

2015-09-08 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue24899] Add an os.path <=> pathlib equivalence table in pathlib docs

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue10716] Modernize pydoc to use better HTML and separate CSS

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-09-08 Thread Adam

Changes by Adam :


--
nosy: +azsorkin

___
Python tracker 

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



  1   2   >