[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not so easy, because it does not work with wantobject=False and can not 
work with future versions of Tk. Actually we should use self.tk instead of 
_default_root, but this will change the signature of _list_from_layouttuple() 
and _val_or_dict(). Due to the risk of breaking existing user code which uses 
these private functions, they should be left with old signature and new 
functions should be added.

--
assignee:  -> serhiy.storchaka
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue21486] optimize v4 & v6 netmask parsing

2014-05-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

With C implementation (issue14373) functools.lru_cache is so fast as manually 
written specialized code.

--

___
Python tracker 

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



[issue21505] cx_freeze multiprocessing bug

2014-05-13 Thread Shivani

New submission from Shivani:

Hey all,
I have problem with multiprocessing and cx_freeze..
I am freezing my UI application.

i have a line in code::->

"multiprocessing.set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))"

when a commented out this line, my UI keeps iterating again and again.
and when i uncomment it, without throwing any error,UI just stuck in its second 
phase.

and moreover spoiling my unfreezen code olso.

What can be the problem with multi processing and cx_freeze relation..?

Thanks in Advance.

--
components: Tkinter
messages: 218503
nosy: shivani
priority: normal
severity: normal
status: open
title: cx_freeze multiprocessing bug
versions: Python 3.3

___
Python tracker 

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



[issue21470] Better seeding for the random module

2014-05-13 Thread Charles-François Natali

Charles-François Natali added the comment:

Thanks for the explanations!

--

___
Python tracker 

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



[issue21470] Better seeding for the random module

2014-05-13 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue21470] Better seeding for the random module

2014-05-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c203df907092 by Raymond Hettinger in branch '3.4':
Issue #21470: Do a better job seeding the random number generator
http://hg.python.org/cpython/rev/c203df907092

--

___
Python tracker 

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



[issue21470] Better seeding for the random module

2014-05-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7b5265752942 by Raymond Hettinger in branch '2.7':
Issue #21470: Do a better job seeding the random number generator
http://hg.python.org/cpython/rev/7b5265752942

--
nosy: +python-dev

___
Python tracker 

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



[issue21495] Sane default for logging config

2014-05-13 Thread Thomas Guettler

Thomas Guettler added the comment:

Thank you for reading and replying. 

Yes, I wrote no concret proposal up to now.

I have this solutions in mind:

logging.config.defaultConfig()

Related https://docs.python.org/2/library/logging.config.html


Loading a python module:


load a module "loggingconfig" this module gets imported like any other python 
module. It is like django loads its settings. It could be possible to check the 
environment variable LOGGINGCONFIG first. It could contain a string which 
defaults to "loggingconfig".

This module has a method "set_up()" which sets up the logging for this 
environment.


Loading from a file:
-

A file searched in this places:

- CWD/.loggingconfig.conf
- VIRTUAL_ENV/.loggingconfig.conf
- HOME/.loggingconfig.conf
- etc/loggingconfig.conf

The file gets loaded with fileConfig()


Module or file config loading
-

I think the module loading is better than the file based solution. That's why I 
think it should be done first. If there is no module found, the file loading 
should be tried.

If not config found


If not config was found, default gets set.

My proposal:
 - loglevel is set to INFO. (Debug gets suppressed)
 - format: '%(asctime)s %(name)s: %(levelname)-8s [%(process)d] %(message)s'
 - logging goes to stdout

---

What is the best way to get this into the python standard library? Should I 
create a PEP?

--

___
Python tracker 

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



[issue21502] freeze.py not working properly with OS X framework builds

2014-05-13 Thread Ned Deily

Changes by Ned Deily :


--
assignee: ronaldoussoren -> ned.deily
nosy: +ned.deily
stage:  -> needs patch
title: freeze.py not working properly on Mac OSX 10.9 -> freeze.py not working 
properly with OS X framework builds
type: compile error -> enhancement

___
Python tracker 

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



[issue21504] can the subprocess module war using os.wait4 and so return usage?

2014-05-13 Thread donald petravick

New submission from donald petravick:

hi,  we use python for the Dark Energy Survey and use the subprocess module to 
run a variety of programs, which we do not control.  One concern we have is to 
monitor system information such as whether the code causes swapping.  It's be 
really useful if

-- The Pipe object (and similar objectsI in the subprocess module could 

- have waits in unix implemented by  os.wait4() for unix, instead of 
os.waitpid()
- have an new data member, rusage, make the resource usage available to the 
caller.

An additional comment is that all of the wait() family of system calls are 
implemented in terms of wait4, and there is an argument that hiding usage has 
no effective cost.  

There is a wait(self,...)  method in pipe. it seems a simple change to 
subprocess.Pipe to call os.wait4 in the unix variant and stash usage in a data 
member.

--
components: Library (Lib)
messages: 218498
nosy: donald.petravick
priority: normal
severity: normal
status: open
title: can the subprocess module war using os.wait4 and so return usage?
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue21401] python2 -3 does not warn about str/unicode to bytes conversions and comparisons

2014-05-13 Thread Josh Cogliati

Josh Cogliati added the comment:

Other than in the source code in Modules/main.c, is -b documented anywhere? 
(For 2.7.6, The html docs, man page, and --help all failed to mention it)

--
nosy: +jrincayc

___
Python tracker 

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



[issue21502] freeze.py not working properly on Mac OSX 10.9

2014-05-13 Thread Jiang-Nan Yang

Changes by Jiang-Nan Yang :


--
nosy:  -ronaldoussoren, yjiangnan
versions: +Python 3.3

___
Python tracker 

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



[issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64

2014-05-13 Thread mattip

mattip added the comment:

This was fixed with changeset 8fa73a0885c9 in Jan 2011, probably should be 
closed

--
nosy: +mattip

___
Python tracker 

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



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-05-13 Thread Nikolaus Rath

Nikolaus Rath added the comment:

On 05/13/2014 12:41 PM, Serhiy Storchaka wrote:
> Note that this is not work with the punycode encoding (and may be some 
> third-party encodings).

I do not understand. Could you elaborate?

--

___
Python tracker 

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



[issue21503] Use test_both() consistently throughout test_importlib

2014-05-13 Thread Eric Snow

New submission from Eric Snow:

test_importlib.util provides the test_both() function that facilitates testing 
both the frozen and source versions of importlib.  The function helps to keep 
the tests more maintainable.  However, the following test modules are not using 
test_both():

Lib/test/test_importlib/test_abc.py
Lib/test/test_importlib/test_api.py
Lib/test/test_importlib/test_locks.py
Lib/test/test_importlib/test_spec.py
Lib/test/test_importlib/test_windows.py

Furthermore, the remaining test modules use test_both() inconsistently.  Here 
is a patch that makes consistent use of test_both() and formats usage in a way 
that helps with readability.

--
assignee: eric.snow
components: Tests
files: use-test_both-consistently.diff
keywords: patch
messages: 218494
nosy: brett.cannon, eric.snow
priority: low
severity: normal
stage: needs patch
status: open
title: Use test_both() consistently throughout test_importlib
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35246/use-test_both-consistently.diff

___
Python tracker 

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



[issue21502] freeze.py not working properly on Mac OSX 10.9

2014-05-13 Thread Jiang-Nan Yang

New submission from Jiang-Nan Yang:

Command:
python3.4 
/Library/Frameworks/Python.framework/Versions/3.4/share/doc/python3.4/examples/Tools/freeze/freeze.py
 okcointrade.py

Error:
Reporting needed directory %s not found

Basically the problem is on lines 235~239: config should be config-3.4m, 
python%s on two lines should be python%sm

After I corrected these errors, the command works, asking me to run make, 
except a warning about "unknown modules remains".

So I run make, another error occurs:
gcc-4.2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m 
-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c 
M_difflib.c
gcc-4.2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m 
-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c 
M_ftplib.c
gcc-4.2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m 
-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c 
M_pydoc.c
gcc-4.2  -Wl,-stack_size,100  -framework CoreFoundation 
Python.framework/Versions/3.4/Python config.o frozen.o M___future__.o 
M___main__.o M__bootlocale.o M__collections_abc.o M__dummy_thread.o 
M__osx_support.o M__sitebuiltins.o M__strptime.o M__sysconfigdata.o 
M__threading_local.o M__weakrefset.o M_abc.o M_argparse.o M_ast.o M_base64.o 
M_bdb.o M_bisect.o M_bz2.o M_calendar.o M_cmd.o M_code.o M_codecs.o M_codeop.o 
M_collections.o M_contextlib.o M_copy.o M_copyreg.o M_datetime.o M_difflib.o 
M_dis.o M_distutils.o M_distutils__errors.o M_distutils__log.o 
M_distutils__spawn.o M_distutils__sysconfig.o M_distutils__text_file.o 
M_doctest.o M_dummy_threading.o M_email.o M_email___encoded_words.o 
M_email___header_value_parser.o M_email___parseaddr.o M_email___policybase.o 
M_email__base64mime.o M_email__charset.o M_email__contentmanager.o 
M_email__encoders.o M_email__errors.o M_email__feedparser.o 
M_email__generator.o M_email__header.o M_email__headerregistry.o 
M_email__iterators.o M_email
 __message.o M_email__parser.o M_email__policy.o M_email__quoprimime.o 
M_email__utils.o M_encodings.o M_encodings__aliases.o M_encodings__latin_1.o 
M_encodings__utf_8.o M_enum.o M_fnmatch.o M_ftplib.o M_functools.o 
M_genericpath.o M_getopt.o M_getpass.o M_gettext.o M_glob.o M_gzip.o 
M_hashlib.o M_heapq.o M_html.o M_html__entities.o M_http.o M_http__client.o 
M_http__cookiejar.o M_http__server.o M_imp.o M_importlib.o 
M_importlib___bootstrap.o M_importlib__machinery.o M_importlib__util.o 
M_inspect.o M_io.o M_json.o M_json__decoder.o M_json__encoder.o 
M_json__scanner.o M_keyword.o M_linecache.o M_locale.o M_logging.o M_lzma.o 
M_mimetypes.o M_ntpath.o M_nturl2path.o M_opcode.o M_operator.o M_optparse.o 
M_os.o M_pdb.o M_pkgutil.o M_platform.o M_plistlib.o M_posixpath.o M_pprint.o 
M_py_compile.o M_pydoc.o M_pydoc_data.o M_pydoc_data__topics.o M_quopri.o 
M_random.o M_re.o M_reprlib.o M_rlcompleter.o M_selectors.o M_shlex.o 
M_shutil.o M_site.o M_socket.o M_socketserver.o M_sre_compile.o M_sre
 _constants.o M_sre_parse.o M_ssl.o M_stat.o M_string.o M_struct.o 
M_subprocess.o M_sysconfig.o M_tarfile.o M_tempfile.o M_textwrap.o 
M_threading.o M_token.o M_tokenize.o M_traceback.o M_tty.o M_types.o 
M_unittest.o M_unittest__case.o M_unittest__loader.o M_unittest__main.o 
M_unittest__result.o M_unittest__runner.o M_unittest__signals.o 
M_unittest__suite.o M_unittest__util.o M_urllib.o M_urllib__error.o 
M_urllib__parse.o M_urllib__request.o M_urllib__response.o M_uu.o M_warnings.o 
M_weakref.o M_webbrowser.o M_xml.o M_xml__parsers.o M_xml__parsers__expat.o 
M_zipfile.o 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/config-3.4m/libpython3.4.a
   -ldl  -framework CoreFoundation   -o okcointrade
clang: error: no such file or directory: 'Python.framework/Versions/3.4/Python'
make: *** [okcointrade] Error 1

I guess that 'Python.framework/Versions/3.4/Python' using a relative location 
might be a problem, so I go into the Makefile, changed 
PYTHONFRAMEWORKDIR=Python.framework
into
PYTHONFRAMEWORKDIR=/Library/Frameworks/Python.framework

Now the above problem disappeared, but a new appeared:
gcc-4.2  -Wl,-stack_size,100  -framework CoreFoundation 
/Library/Frameworks/Python.framework/Versions/3.4/Python config.o frozen.o 
M___future__.o M___main__.o M__bootlocale.o M__collections_abc.o 
M__dummy_thread.o M__osx_support.o M__sitebuiltins.o M__strptime.o 
M__sysconfigdata.o M__threading_local.o M__weakrefset.o M_abc.o M_argparse.o 
M_ast.o M_base64.o M_bdb.o M_bisect.o M_bz2.o M_calendar.o M_cmd.o M_code.o 
M_codecs.o M_codeop.o M_collections.o M_contextlib.o M_copy.o M_copyreg.o 
M_datetime.o M_difflib.o M_dis.o M_distutils.o M_distutils__errors.o 
M_distutils__log.o M_distutils__spawn.o M_distutils__sysconfig.o 
M_distutils__text_file.o M_doctest.o M_dummy_threading

[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2014-05-13 Thread Ned Deily

Ned Deily added the comment:

Berker, if you think it should go into 3.4.1, you need to set the priority to 
"release blocker" to bring it to the attention of the release manager.

--
nosy: +ned.deily

___
Python tracker 

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



[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2014-05-13 Thread Berker Peksag

Berker Peksag added the comment:

Is there a chance to get this into 3.4.1?

--
stage:  -> patch review
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



[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2014-05-13 Thread Eric Ongerth

Eric Ongerth added the comment:

I'm getting the same PermissionError 13:

Error in atexit._run_exitfuncs:
PermissionError: [Errno 13] Permission denied

My case is: I'm running Python 3.4.0 as a non-root user in a docker.io 
container built on ubuntu 14.04.  This user was created during the creation 
(Dockerfile) of the container.  The user has a home directory and that 
directory appears to have the usual/proper permissions.  When I exit the 
python3 REPL I get this error even if all I did was start python3 from the 
command line and then immediately exit.

So maybe the cause is other, or more subtle, than just a user with no home dir 
or home dir with unusual perms?

--
nosy: +Eric.Ongerth

___
Python tracker 

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



[issue21496] pyvenv activate_this.py

2014-05-13 Thread Vinay Sajip

Vinay Sajip added the comment:

You say "from other Python code", but you mean running an external command in a 
subprocess, right? If you know where that command is (which you would need to 
in order to invoke activate_this on the appropriate venv) then you could run 
the command directly from its bin folder in the venv, and it would run with the 
venv's environment (interpreter, sys.path etc.)

--

___
Python tracker 

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



[issue21156] Consider moving importlib.abc.InspectLoader.source_to_code() to importlib.abc.Loader

2014-05-13 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: test needed -> resolved

___
Python tracker 

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



[issue21495] Sane default for logging config

2014-05-13 Thread Vinay Sajip

Vinay Sajip added the comment:

Who decides what's sane and what isn't? You seem to be asking for something, 
but you don't seem to have a concrete proposal.

Are there "sane" defaults in other worlds than the Python world? What are they?

--

___
Python tracker 

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



[issue18062] m68k FPU precision issue

2014-05-13 Thread Stefan Krah

Stefan Krah added the comment:

This should be fixed now.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> HAVE_PY_SET_53BIT_PRECISION for m68k
type:  -> behavior

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue5404] Cross-compiling Python

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2014-05-13 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +sbt

___
Python tracker 

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



[issue12991] Python 64-bit build on HP Itanium - Executable built successfully but modules failed with HP Compiler

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue12271] panel.h is not found even if it's installed on various flavours of SUSE

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue17781] optimize compilation options

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue969718] BASECFLAGS are not passed to module build line

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue1043134] Add preferred extensions for MIME types

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue1615158] POSIX capabilities support

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue1747670] Limiting data copy in xmlrpclib

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue4928] Problem with tempfile.NamedTemporaryFile

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue21370] segfault from simple traceback.format_exc call

2014-05-13 Thread Stefan Krah

Stefan Krah added the comment:

Closing due to lack of response.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed
type:  -> crash

___
Python tracker 

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



[issue21412] Solaris/Oracle Studio: Fatal Python error: PyThreadState_Get when built --with-pymalloc

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue18859] README.valgrind should mention --with-valgrind

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue19554] Enable all freebsd* host platforms

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al).

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue15757] ./configure --with-pydebug on FreeBSD results in -O2 -pipe eventually ending up in CFLAGS.

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler)

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue16721] configure incorrectly adds -OPT:Olimit=0 for clang

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue13837] test_shutil fails with symlinks enabled under Windows

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue15668] PEP 3121, 384 Refactoring applied to random module

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue14141] 2.7.2 64-bit Windows library has __impt_Py* for several symbols instead of __imp__Py*

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue14142] getlocale(LC_ALL) behavior

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
resolution:  -> out of date
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



[issue15192] test_bufio failures on Win64 buildbot

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue5619] Pass MS CRT debug flags into subprocesses

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue14341] sporadic (?) test_urllib2 failures

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue6895] locale._parse_localename fails when localename does not contain encoding information

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue7424] segmentation fault in listextend during install

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue12923] test_urllib fails in refleak mode

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue7836] Add /usr/sfw/lib to OpenSSL search path for Solaris.

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue6467] PyOS_Readline: treatment of "1234EOF"; behavior of builtin_raw_input

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue13869] CFLAGS="-UNDEBUG" build failure

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


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



[issue2552] test_ctypes failed Python 2.6a2 Solaris 10 SUN C

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue13669] XATTR_SIZE_MAX and XATTR_LIST_MAX undefined on kfreebsd/debian with eglibc

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue20051] PA-RISC buildbot: compiler cannot create executables

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue16108] Include maintainer information in register/upload

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue15871] Online docs: make index search always available.

2014-05-13 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-13 Thread Stephen Paul Chappell

Stephen Paul Chappell added the comment:

It seems that most functions and methods do not bother checking if 
_default_root exists before trying to access it. However, upon seeing line 366 
in ttk (if tkinter._support_default_root:), my recommendation would be to 
change line 319 to "if tkinter._support_default_root and 
tkinter._default_root:" to fix the problem. Several similar lines appear in 
tkinter\__init__.py at locations 1835, 1845, and 2050.

--

___
Python tracker 

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



[issue21496] pyvenv activate_this.py

2014-05-13 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue21495] Sane default for logging config

2014-05-13 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue18877] tkinter askopenfilenames does not work in Windows library folder

2014-05-13 Thread AJNeufeld

AJNeufeld added the comment:

I'd like this issue to be reopened.  It does not appear resolved.  It is 
different from the wantobjects=False issue.

Windows 7 has 'libraries' which are folders containing the contents of more 
than one folder.  For instance, on my computer
   > Libraries > Documents
presents the contents of the following 2 folders simultaneously:
   C:\Users\aneufeld\Documents
   C:\Users\Public\Documents

If you execute the script listed in the original bug report, press the [File 
Open] button, press "Libraries" from the left bar, double click "Documents" in 
the main area, and select one or more *FILES* in the displayed list of files, I 
get back:
   ('',)

On the other hand, if I press "Computer" on the left bar, and navigate through 
"C:", "Users", "aneufeld", "My Documents", and select the SAME FILES, I get 
back:
   ('C:/Users/aneufeld/Documents/timelog.txt', 
'C:/Users/aneufeld/Documents/notes.txt')

>From the "> Libraries > Documents" folder, if you navigate into any real 
>folder, the problem goes away.  For example, with the folder ATS in My 
>Documents, press the [File Open] button, press "Libraries" from the left bar, 
>double click "Documents" in the main area, double click ATS, and select the 
>two files, I get:
   ('C:/Users/aneufeld/Documents/ATS/readme.txt', 
'C:/Users/aneufeld/Documents/ATS/Changes.txt')

The issue is, when the file "Foo.txt" is selected in a Library folder, such as 
"Documents", the dialog does not know if that file should be:
   C:/Users/aneufeld/Documents/Foo.txt
or
   C:/Users/Public/Documents/Foo.txt
and returns a null string for the filename.

--
nosy: +AJNeufeld

___
Python tracker 

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



[issue21501] submitting mmap example for use in documentation

2014-05-13 Thread Steve Foley

Steve Foley added the comment:

sorry! this is the correct version ;-)

---

import mmap, os, select

NUM_CHILDREN = 30
MSG_LEN = 9
BUF_LEN = NUM_CHILDREN * MSG_LEN

buf = mmap.mmap(-1, BUF_LEN)
p = select.poll()

def write_buffer(i):
msg = '%s\t%d\n' % (i, os.getpid())
offset = MSG_LEN * i
buf.seek(offset)
buf.write(msg)

def child(i, pipeout):
write_buffer(i)
os.write(pipeout, 'OK\0'.encode())
os._exit(0)

def fork(i, p):
pipein, pipeout = os.pipe()
if os.fork() == 0:
child(i, pipeout)
else:
p.register(pipein)

def loop(msgs, p):
msgs = NUM_CHILDREN
while msgs:
for fd, event in p.poll():
p.unregister(fd)
msgs = msgs - 1


for i in range(NUM_CHILDREN):
fork(i, p)

loop(NUM_CHILDREN, p)

buf.seek(0)
print buf.read(BUF_LEN)

--

___
Python tracker 

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



[issue21486] optimize v4 & v6 netmask parsing

2014-05-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Because that would incur the cost of LRU logic and locking, which we don't need 
here.

--

___
Python tracker 

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



[issue21486] optimize v4 & v6 netmask parsing

2014-05-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why not just use functools.lru_cache?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-05-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Note that this is not work with the punycode encoding (and may be some 
third-party encodings).

--

___
Python tracker 

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



[issue2052] Allow changing difflib._file_template character encoding.

2014-05-13 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file35245/issue2052_html5.diff

___
Python tracker 

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



[issue2052] Allow changing difflib._file_template character encoding.

2014-05-13 Thread Berker Peksag

Berker Peksag added the comment:

Attaching two patches:

issue2052.diff adds a "charset" keyword argument to HtmlDiff.make_file().

issue2052_html5.diff also adds a "charset" keyword argument to 
HtmlDiff.make_file() and updates the markup of HtmlDiff() to HTML5. I tested it 
with Firefox 29 and Chrome 34.

--
keywords: +patch
nosy: +berker.peksag
stage: needs patch -> patch review
versions: +Python 3.5 -Python 3.2
Added file: http://bugs.python.org/file35244/issue2052.diff

___
Python tracker 

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



[issue21501] submitting mmap example for use in documentation

2014-05-13 Thread Steve Foley

New submission from Steve Foley:

Hello, I would like to submit an example for the mmap docs page. It 
demonstrates the use of shared memory and message passing between processes. 
Thanks!



import mmap, os, select

NUM_CHILDREN = 30
MSG_LEN = 8
BUF_LEN = NUM_CHILDREN * MSG_LEN

buf = mmap.mmap(-1, BUF_LEN)
p = select.poll()

def write_buffer(i):
msg = '%s\t%d\n' % (i, os.getpid())
offset = MSG_LEN * i
buf.seek(offset)
buf.write(msg)

def child(i, pipeout):
write_buffer(i)
os.write(pipeout, 'OK\0'.encode())
os._exit(0)

def fork(i, p):
pipein, pipeout = os.pipe()
if os.fork() == 0:
child(i, pipeout)
else:
p.register(pipein)

def loop(msgs, p):
while msgs:
for fd, event in p.poll():
p.unregister(fd)
msgs = msgs - 1

for i in range(NUM_CHILDREN):
fork(i, p)

loop(NUM_CHILDREN, p)

buf.seek(0)
print buf.read(BUF_LEN)

--
assignee: docs@python
components: Documentation
messages: 218478
nosy: docs@python, hudson
priority: normal
severity: normal
status: open
title: submitting mmap example for use in documentation
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue21470] Better seeding for the random module

2014-05-13 Thread Tim Peters

Tim Peters added the comment:

Crytpo generators are a whole different world, and I wouldn't listen to anyone 
save a bona fide expert in that field.  Plausible:  the "hardest thing" OpenSSL 
has to do is generate secure RSA keys.  But the bit length of an RSA key can't 
be taken at face value:  the true strength of such a key is measured by the 
number of operations required to break it.  According to (among many others):

http://en.wikipedia.org/wiki/Key_size#Asymmetric_algorithm_key_lengths

"NIST key management guidelines further suggest that 15360-bit RSA keys are 
equivalent in strength to 256-bit symmetric keys".

So 32 bytes = 256 bits of entropy is sufficient to generate secure 15360-bit 
RSA keys, which is larger than virtually anyone actually uses (so far), 
provided everything else is done exactly right.

For that reason, "bug reports" about OpenSSL using only 32 bytes seem to get 
brushed off, like:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742145

So what does that have to do with Python's random()?  Nothing ;-)

A more fruitful tack would be to investigate switching away from the Mersenne 
Twister.  It was groundbreaking at the time, but nothing lasts forever.  Even 
Wikipedia can come up with a list of its disadvantages now, including "the 
state space is too large and uselessly stresses the CPU cache":

http://en.wikipedia.org/wiki/Mersenne_twister#Disadvantages

Worse (according to me), when it reaches a point where "most of" the bits in 
its state are zeroes, it can take a long time (many calls) before its outputs 
pass randomness tests again - a paucity of 1 bits tends to persist "way too 
long".

More recent algorithms claim to address these flaws, with smaller state and 
similar speed.  But they're marginal improvements, and don't seem to be gaining 
traction quickly.  The Twister was a huge improvement at the time, and caught 
on very quickly.

In the meantime, better safe than sorry.

--

___
Python tracker 

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



[issue21500] Make use of the "load_tests" protocol in test_importlib packages

2014-05-13 Thread Eric Snow

New submission from Eric Snow:

Right now to run importlib tests you can do either of the following:

./python -m tests test_importlib
./python -m tests.test_importlib

Both make use of the regrtest infrastructure.  For test submodules the commands 
are similar:

./python -m tests test_importlib.test_api
./python -m tests.test_importlib.test_api

You can also use unittest directly when testing specific test modules:

./python -m unittest tests.test_importlib.test_api
./python -m unittest 
tests.test_importlib.test_api.Source_ReloadTests.test_reload_location_changed

However, currently you cannot use unittest directly with a test package:

./python -m unittest tests.test_importlib
./python -m unittest tests.test_importlib.source

It would be nice to be able to do so, rather than switching back and forth 
between the unittest CLI and the regrtest CLI.

The change to do so is relatively straight-forward using the "load_tests" 
protocol*.  Just add the following to the __init__.py of the test packages:

 def load_tests(loader, tests, pattern):
 from test import TEST_HOME_DIR as topdir
 startdir = os.path.dirname(__name__)
 pkgtests = loader.discover(startdir, pattern or 'test*.py', topdir)
 tests.addTests(pkgtests)
 return tests

The boilerplate could even be moved to tests.support as a factory function:

 def make_load_tests(modfilename):
 from test import TEST_HOME_DIR as topdir
 startdir = os.path.dirname(modfilename)
 def load_tests(loader, tests, pattern):
 pkgtests = loader.discover(startdir, pattern or 'test*.py', topdir)
 tests.addTests(pkgtests)
 return tests
 return load_tests

In the test package __init__.py:

  load_tests = support.make_load_tests(__name__)

Then using unittest directly with an importlib test package will work as 
expected.  This is also something that could readily apply to any other test 
packages in the suite, which is why the factory function in test.support makes 
sense.

* https://docs.python.org/2/library/unittest.html#load-tests-protocol

--
components: Tests
messages: 218476
nosy: brett.cannon, eric.snow
priority: low
severity: normal
stage: needs patch
status: open
title: Make use of the "load_tests" protocol in test_importlib packages
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



[issue21499] test_importlib incorrectly relies on .__builtins__

2014-05-13 Thread Eric Snow

Changes by Eric Snow :


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



[issue21499] test_importlib incorrectly relies on .__builtins__

2014-05-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 16d26391ec36 by Eric Snow in branch '3.4':
Issue #21499: Ignore __builtins__ in several test_importlib.test_api tests.
http://hg.python.org/cpython/rev/16d26391ec36

New changeset bdf94b2c0639 by Eric Snow in branch 'default':
Merge from 3.4 (for #21499).
http://hg.python.org/cpython/rev/bdf94b2c0639

--
nosy: +python-dev

___
Python tracker 

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



[issue21499] test_importlib incorrectly relies on .__builtins__

2014-05-13 Thread Eric Snow

New submission from Eric Snow:

Per the docs*, a module's __builtins__ may be a module or a dict or even 
missing.  However, test.test_importlib.test_api.ReloadTests checks __builtins__ 
as part of several tests.  Instead, the tests should ignore __bulitins__.  I'll 
push a patch in a minute that fixes that.

* https://docs.python.org/3/library/builtins.html

--
assignee: eric.snow
components: Tests
messages: 218474
nosy: brett.cannon, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: test_importlib incorrectly relies on .__builtins__
type: behavior
versions: 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



[issue19656] Add Py3k warning for non-ascii bytes literals

2014-05-13 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



[issue21329] configparser can't parse MySQL style config

2014-05-13 Thread R. David Murray

R. David Murray added the comment:

The data structure you are asking for bears a resemblance to the data structure 
used by the email package to record message headers.  Email uses a list with a 
dict-like API cobbled together on top.  The difference with your suggestion is 
that email also needs to record the order of the headers, so just having a 
list-of-values for each key isn't adequate.  Any bets on whether or not we 
eventually run across a use of .ini format where the exact order of the 
duplicated keys within the whole list of keys matters? :)

With two use cases that could be served by the same data structure in the 
stdlib, I wonder if it is worth actually building the abstract data type.  
Probably not, but I thought I'd raise the possibility anyway :)

--
nosy: +r.david.murray
type:  -> enhancement
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue21422] int << 0: return the number unmodified

2014-05-13 Thread Francisco Martín Brugué

Francisco Martín Brugué added the comment:

>
> What we want to test is that the return value is of type 'int', which is what 
> Victor's test checks.
>
Thank you for the explanations!

for 2.7.6 type(2 << 62) is  and type(2 << 61) is
 (I suppose it's analogous in a 32 bit machine
around type(2 << 30) so I just wanted to test on that limits).

Is that still relevant? or is too much detail and we should stop here.

Regards,
francis

--

___
Python tracker 

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-13 Thread STINNER Victor

STINNER Victor added the comment:

> This means there's an unexpected gotcha

I prefer to see an exception before sys.stderr is None, instead of not seeing 
the traceback when the application does crash. It is usually a pain to 
reproduce a crash in the exact same conditions.

> if I want my application to still run under Windows when the user has changed 
> the default, I first have to check sys.stderr before enabling faulthandler.

Exactly. It's not really specific to Windows, you may also have sys.stderr on 
UNIX in some cases.

--

___
Python tracker 

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-13 Thread Florian Bruhin

Florian Bruhin added the comment:

The thing is the developer is not necessarely the one controlling if sys.stderr 
is None, sometimes the user is.

For example, see 
https://docs.python.org/3.4/using/windows.html#executing-scripts-without-the-python-launcher
 - an user might have decided to use pythonw by default.

This means there's an unexpected gotcha - if I want my application to still run 
under Windows when the user has changed the default, I first have to check 
sys.stderr before enabling faulthandler.

At the very least I think this should be documented in the faulthandler 
documentation. I noticed the issue when starting my application under Windows 
after using cx_Freeze on it, and as a developer wouldn't have expected (or 
thought about this) at all.

I don't feel like I'm the one to decide this properly though, and I'm uncertain 
what's the right choice, so what you say is probably right ;)

--

___
Python tracker 

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-13 Thread STINNER Victor

STINNER Victor added the comment:

> I personally would prefer failing silently though so the application still 
> runs (if there's no stderr, there just is no fault log), but that's debatable 
> of course.

Nope, there is no debate: there is the Zen of Python :-)

"Errors should never pass silently."

What's the purpose of enabling faulthandler if sys.stderr is None? If you don't 
want faulthandler output, don't enable faulthandler!?

--

___
Python tracker 

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-13 Thread Florian Bruhin

Florian Bruhin added the comment:

I didn't test the patch (I don't have the toolchain set up to do so), but it 
looks like this is indeed an exception which makes more sense to the developer.

When I saw the exception as it is now, I only discovered it's related to stderr 
being None by finding people having a similiar issue with curses, and with the 
new exception it'd be clear to me what happened.

I personally would prefer failing silently though so the application still runs 
(if there's no stderr, there just is no fault log), but that's debatable of 
course.

--

___
Python tracker 

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-13 Thread STINNER Victor

STINNER Victor added the comment:

Attached patch modifies faulthandler to raises a RuntimeError("sys.stderr is 
None") with your use case. Is it what you expected?

--
keywords: +patch
Added file: http://bugs.python.org/file35243/faulthandler.patch

___
Python tracker 

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



[issue21401] python2 -3 does not warn about str/unicode to bytes conversions and comparisons

2014-05-13 Thread Brett Cannon

Brett Cannon added the comment:

I thought we gave ourselves the wiggle room to change the warnings we emitted 
for -3 (I unfortunately can't find a reference to something relating to that in 
the Python 2.7 PEP)?

--

___
Python tracker 

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



[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-13 Thread Brett Cannon

Brett Cannon added the comment:

It's something that could potentially be changed in the future, but no one has 
prioritized it enough to worry about it. Typically this opens a pandora's box 
of wanting to generalize it so it supports custom user optimizations as well 
and then people lose motivation to push it through to the end. =)

--
nosy: +brett.cannon
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue9253] argparse: optional subparsers

2014-05-13 Thread couplewavylines

Changes by couplewavylines :


--
nosy: +couplewavylines

___
Python tracker 

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



[issue21494] getopt error doesnot display correct error

2014-05-13 Thread Eric V. Smith

Changes by Eric V. Smith :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-13 Thread Brett Cannon

Brett Cannon added the comment:

Berker's patch LGTM, so assigning to him to commit.

--
assignee: docs@python -> berker.peksag
nosy: +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



[issue21498] configparser accepts keys beginning with comment_chars when writing

2014-05-13 Thread Florian Bruhin

New submission from Florian Bruhin:

When adding something to a configparser instance which has a key beginning with 
a comment char, it writes the data to a file without generating an error, and 
when reading the file back obviously the data is different as it's a comment:

>>> cp = configparser.ConfigParser()
>>> cp.read_dict({'DEFAULT': {';foo': 'bar'}})
>>> cp.write(sys.stdout)
[DEFAULT]
;foo = bar

This was discussed on python-dev here:
https://mail.python.org/pipermail/python-dev/2014-April/134293.html

Of course there are other corner cases as well, like having a key like "[foo]" 
or "=bar".

I think whatever data I pass into a configparser should also come out again 
when reading the file back.

Since there's no escaping in configparser, I think the ideal solution would be 
configparser refusing to write ambigious values.

While this is technically a backwards-incompatible change, applications doing 
this were broken in the first place, so validation while writing will not break 
anything.

Validating when setting values would be better of course, but this can 
potentially break applications where configparser is used without actually 
writing a file.

--
components: Library (Lib)
messages: 218463
nosy: The Compiler, lukasz.langa
priority: normal
severity: normal
status: open
title: configparser accepts keys beginning with comment_chars when writing
type: behavior

___
Python tracker 

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



[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument

2014-05-13 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Related:
https://groups.google.com/forum/#!topic/dev-python/ytbYwHXKC6o
I'm not sure how what is proposed here would be useful for ThreadPoolExecutor 
but it would definitely be helpful being able to set an initializer for 
ProcessPoolExecutor because right now it seems it's impossible to cleanly 
shutdown the executor, see:
http://noswap.com/blog/python-multiprocessing-keyboardinterrupt

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-13 Thread Florian Bruhin

New submission from Florian Bruhin:

When faulthandler is used while sys.stderr is None (e.g. when using 
pythonw.exe), a (IMHO) confusing exception is raised:

Traceback (most recent call last):
  File "test.py", line 7, in 
 faulthandler.enable()
AttributeError: 'NoneType' object has no attribute 'fileno'

Example script which demonstrates the issue without using pythonw.exe:

import faulthandler
import sys

sys.stderr = None

try:
faulthandler.enable()
except:
sys.stderr = sys.__stderr__
raise

Looking at the code it seems the file passed gets correctly checked against 
NULL and Py_None, but stderr (as fallback) then only gets checked against NULL:

http://hg.python.org/cpython/file/8885fc2e92b3/Modules/faulthandler.c#l141

--
components: Extension Modules
messages: 218461
nosy: The Compiler, haypo
priority: normal
severity: normal
status: open
title: faulthandler should handle sys.stderr being None gracefully
type: behavior
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Alex Gaynor

Alex Gaynor added the comment:

Sorry, I wasn't concerned from a timing attack perspective here, I was 
concerned from an "oh my god implicit coercion is terrible" perspective :-)

--

___
Python tracker 

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Donald Stufft

Donald Stufft added the comment:

Oh, gotcha.

Yea I agree, but it's Python 2.x that's par for the course.

--

___
Python tracker 

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Donald Stufft

Donald Stufft added the comment:

I don't think there's any way around it, nor do I think that it actually leaks 
any meaningful timing.

--

___
Python tracker 

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Alex Gaynor

Alex Gaynor added the comment:

I'm still concerned about the unicode issue, but I'm not sure what the right 
way to fix it is.

--

___
Python tracker 

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-05-13 Thread Donald Stufft

Donald Stufft added the comment:

The attached patch looks pretty good to me.

--

___
Python tracker 

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



  1   2   >