[issue26488] hashlib command line interface

2016-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here is a quick check versus other command-line tools: $ md5 xml_prolog.diff MD5 (xml_prolog.diff) = c30e1fe70651d5a472efe9598db70771 $ python3.6 -m hashlib md5 xml_prolog.diff c30e1fe70651d5a472efe9598db70771 $ shasum -a 1 xml_prolog.diff

[issue26488] hashlib command line interface

2016-03-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue26647] Wordcode

2016-03-29 Thread Demur Rumed
Demur Rumed added the comment: I'll dig up benchmark results when I get home, but I'd be interested to get results on a less wannabe RISC CPU The change is to have all instructions take an argument. This removes the branch on each instruction on whether to load oparg. It then also aligns

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2016-03-29 Thread Paul Morelle
Changes by Paul Morelle : -- nosy: +madprog ___ Python tracker ___ ___ Python-bugs-list

[issue26488] hashlib command line interface

2016-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Overall, I'm +1 on the idea and think the patch looks good. There are two issues to look at: 1) Neither the md5 or shasum command-line tools offer control over the blocksize. I suggest that option be dropped from the command-line API giving a nice

[issue26666] File object hook to modify select(ors) event mask

2016-03-29 Thread Zack Weinberg
New submission from Zack Weinberg: This is pretty esoteric, please bear with me. I'm attempting to enhance a transparent-SOCKS module (https://github.com/Anorov/PySocks) to support non-blocking connect(). This means, you should be able to do this: socks.set_default_proxy(socks.SOCKS5,

[issue26488] hashlib command line interface

2016-03-29 Thread SilentGhost
SilentGhost added the comment: I've left some comment on rietveld yesterday, not sure if you got the e-mail. -- ___ Python tracker ___

[issue26647] Wordcode

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > This also means that if I want to create something like a tracer that tracks > some information for each instruction, I can allocate an array of codesize/2 > bytes, then index off of half the instruction index. This isn't currently > done in peephole.c, nor

[issue26632] __all__ decorator

2016-03-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 28, 2016, at 04:26 PM, Serhiy Storchaka wrote: >There is a helper in test.support that helps to add a test for __all__, and >we slowly add these test for all modules. So this is not large issue for the >stdlib. > >New module level names are added not

[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-03-29 Thread Vinay Sajip
Vinay Sajip added the comment: The change you mention was in response to Issue #26348. The patch supplied there introduced the $ characters you say aren't required. I'm not a fish user, but it would seem that "$__VENV_PROMPT__" would resolve to the *value* of the environment variable

[issue26219] implement per-opcode cache in ceval

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: See the issue #26647 which may make the implementation of this cache simpler. See also my message about inline caching: https://bugs.python.org/issue26647#msg262622 -- ___ Python tracker

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-03-29 Thread STINNER Victor
Changes by STINNER Victor : -- title: Wordcode -> ceval: use Wordcode, 16-bit bytecode ___ Python tracker ___

[issue26488] hashlib command line interface

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: About the compatibility with existing tools, I recall a discussion when the tarfile module got a CLI. First I expected a clone of the UNIX tar command, but it was decided to design a new *simpler* CLI. --- $

[issue26661] python fails to locate system libffi

2016-03-29 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-03-29 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Build ___ Python tracker ___ ___

[issue26647] Wordcode

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > The change is to have all instructions take an argument. This removes the > branch on each instruction on whether to load oparg. (...) Oh ok, I like that :-) I had the same idea. Your patch contains unrelated changes, you should revert them to have a change

[issue26647] Wordcode

2016-03-29 Thread Demur Rumed
Changes by Demur Rumed : -- nosy: +abarnert ___ Python tracker ___ ___ Python-bugs-list

[issue18844] allow weights in random.choice

2016-03-29 Thread Steven Basart
Steven Basart added the comment: The entire function of weighted choice. I removed the generator and replaced it by adding an optional argument to specify an amount by which you want to call this function. -- Added file: http://bugs.python.org/file42323/weighted_choice_v3.patch

[issue26488] hashlib command line interface

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > I think we should add a dependency in issue 14156 for this issue. Maybe you can start using strings for filename parameters and open files manually, and later consider switching back to FileType once it's fixed? --

[issue26654] asyncio is not inspecting keyword arguments of functools.partial

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > Oh, wow. I didn't even know we special-case partial() there. I wrote the code doing that. I did it to get more readable and shorter logs since asyncio produces a lot of logs. Example: Exception in callback print("Hello", "World!")() at ...:4 without

[issue26659] slice() leaks memory when part of a cycle

2016-03-29 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue18844] allow weights in random.choice

2016-03-29 Thread Steven Basart
Steven Basart added the comment: Reopen this idea but removing the generator from weighted choice. -- nosy: +progressive-o Added file: http://bugs.python.org/file42322/weighted_choice_v3.diff ___ Python tracker

[issue26624] Windows hangs in call to CRT setlocale()

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > The deadlock is between a CRT thread initialization lock and Windows's > process-wide module initialization lock. So if anything is being loaded on > demand by the watchdog thread, it's probably locked too (and that could be > within the CRT or the OS, so

[issue26666] File object hook to modify select(ors) event mask

2016-03-29 Thread Zack Weinberg
Zack Weinberg added the comment: > Obvious question: why not working on the asyncio support in this library? The whole point of a transparent SOCKS module is that it provides a function that's a *drop-in replacement* for socket.socket(). An asyncio-based SOCKS module would have a completely

[issue26666] File object hook to modify select(ors) event mask

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > I'm attempting to enhance a transparent-SOCKS module > (https://github.com/Anorov/PySocks) to support non-blocking connect(). Obvious question: why not working on the asyncio support in this library? -- components: +asyncio nosy: +gvanrossum, haypo,

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: The issue looks to be fixed in Python 3.5 (future version 3.5.2) and 3.6, I close the issue. I repeat myself: On Python 3, don't store filenames as bytes, it's a bad practice. Use unicode, it works on all platforms and gives access to the full Unicode

[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-03-29 Thread STINNER Victor
Changes by STINNER Victor : -- title: FreeBSD: "invalid slot offset" error on _ssl, _curses_panel and _testmultiphase extensions -> configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

[issue26667] Update importlib to accept pathlib.Path objects

2016-03-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Support Path objects in the posix module ___ Python tracker ___

[issue26667] Update importlib to accept pathlib.Path objects

2016-03-29 Thread Brett Cannon
New submission from Brett Cannon: We should go through importlib and update the various APIs to accept pathlib.Path objects and not just str. -- messages: 262618 nosy: brett.cannon priority: normal severity: normal status: open title: Update importlib to accept pathlib.Path objects

[issue10682] With '*args' or even bare '*' in def/call argument list, trailing comma causes SyntaxError

2016-03-29 Thread Mike Lissner
Mike Lissner added the comment: This is an old issue, but where I run into it frequently is when I use the format function and string interpolation. For example, this throws a SyntaxError: "The name of the person is {name_first} {name_last}".format( **my_obj.__dict__, ) Because strings

[issue26606] logging.baseConfig is missing the encoding parameter

2016-03-29 Thread Vinay Sajip
Vinay Sajip added the comment: But you can open a stream using the encoding you want and pass it as the stream= parameter to basicConfig(). Why does that not work for you? -- ___ Python tracker

[issue26641] doctest doesn't support packages

2016-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 32539353eb95 by Victor Stinner in branch 'default': doctest now supports packages https://hg.python.org/cpython/rev/32539353eb95 -- nosy: +python-dev ___ Python tracker

[issue26641] doctest doesn't support packages

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: I pushed a different fix using module.__path__ since my use case is the test module splitted into at least two directories. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-03-29 Thread Martin Panter
Martin Panter added the comment: Maybe the configure.ac code for generating opcode.h is a better alternative. It looks like it prints a warning but would continue with the build: if test "$PYTHON" = not-found; then OPCODEHGEN="@echo python: $PYTHON! cannot run

[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-03-29 Thread Martin Panter
Martin Panter added the comment: Typeslots.inc is listed in the .hgtouch file, so you might be able to work around by running “make touch” before building. I noticed there are other boostrap scripts that require a “python” command via various mechanisms, e.g. Python/makeopcodetargets.py is

[issue26666] File object hook to modify select(ors) event mask

2016-03-29 Thread Martin Panter
Martin Panter added the comment: Python’s select() call operates at a minimal OS level. I don’t completely understand your __preselect__() etc proposal, but it does sound like you are trying to invent another higher-level “asynchronous” framework like asyncio. I think you are wrong about the

[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > Typeslots.inc is listed in the .hgtouch file, so you might be able to work > around by running “make touch” before building. My initial issue is that "import ssl" fails with : invalid slot offset. This error is really strange and Google doesn't know it. I

[issue26649] Fail update installation: 'utf-8' codec can't decode

2016-03-29 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> third party status: open -> closed ___ Python tracker ___

[issue26658] test_os fails when run on Windows ramdisk

2016-03-29 Thread Eryk Sun
Eryk Sun added the comment: > I'm inclined to believe that this is a bug in the ImDisk device driver Junctions, and other filesystem reparse points, are implemented by volume devices, not disk devices. NTFS and ReFS support reparse points, but FAT, FAT32, and exFAT do not. Does the current

[issue26659] slice() leaks memory when part of a cycle

2016-03-29 Thread SilentGhost
Changes by SilentGhost : -- nosy: +benjamin.peterson, georg.brandl, pitrou, yselivanov ___ Python tracker ___

[issue26638] Avoid warnings about missing CLI options when building documentation

2016-03-29 Thread Martin Panter
Martin Panter added the comment: FTR the warnings that I am fixing were apparently enabled in Sphinx 1.3.4, reverted in 1.3.6, and added in 1.4. -- ___ Python tracker

[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-29 Thread Udo Eberhardt
Udo Eberhardt added the comment: So this is a trade-off between consistent behavior and efficiency. My point of view is that glob is for enumerating matching files and it should consistently return the real file names. Typically glob will be called with a pattern like '*.txt' and it will have

[issue26660] tempfile.TemporaryDirectory() cleanup exception on Windows if readonly files created

2016-03-29 Thread SilentGhost
Changes by SilentGhost : -- nosy: +georg.brandl versions: +Python 3.6 ___ Python tracker ___

[issue16500] Add an 'atfork' module

2016-03-29 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list

[issue25829] Mixing multiprocessing pool and subprocess may create zombie process, and cause program to hang.

2016-03-29 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list

[issue26633] multiprocessing behavior combining daemon with non-daemon children inconsistent with threading

2016-03-29 Thread Robert Cope
Changes by Robert Cope : -- nosy: +rpcope1 ___ Python tracker ___ ___ Python-bugs-list

[issue25805] Failure in test_pkgutil run from command-line

2016-03-29 Thread SilentGhost
Changes by SilentGhost : -- nosy: +r.david.murray versions: +Python 3.5 ___ Python tracker ___

[issue26661] python fails to locate system libffi

2016-03-29 Thread Robert Kuska
New submission from Robert Kuska: Python fails to locate system version of ffi when building. We delete bundled version of ffi and build process fail with following error: error: [Errno 2] No such file or directory: '/builddir/build/BUILD/Python-3.5.1/Modules/_ctypes/libffi' This is caused

[issue26662] FreeBSD: "invalid slot offset" error on _ssl, _curses_panel and _testmultiphase extensions

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: Oh ok, I understood the issue. --- [haypo@freebsd ~/prog/python/default]$ rm Objects/typeslots.inc [haypo@freebsd ~/prog/python/default]$ make python ./Objects/typeslots.py < ./Include/typeslots.h >

[issue26663] asyncio _UnixWritePipeTransport._close abandons unflushed writes

2016-03-29 Thread Robert Smallshire
Changes by Robert Smallshire : -- type: -> behavior ___ Python tracker ___ ___

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2b25fa7e3b7a by Victor Stinner in branch 'default': Fix os._DummyDirEntry.is_symlink() https://hg.python.org/cpython/rev/2b25fa7e3b7a -- ___ Python tracker

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-29 Thread Xiang Zhang
Xiang Zhang added the comment: Url handling in http.server is not perfect and there have already been some issues talking about it, i.e, issue5714, issue14567. -- ___ Python tracker

[issue26647] Wordcode

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I don't have the context. Can you please explain your change? What did you do? What is the rationale? Do you expect better performances? If yes, please run the Python benchmark suite and post results here. What is the new format of bytecode? etc.

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-03-29 Thread David Bolen
David Bolen added the comment: I'm including some comments here from an email thread I had with Victor about this issue on the Win8 buildbot, which led to his recent changeset 2b25fa7e3b7a. The Win8 3.x failure (the 5 != 4 length error) was due to the revision of os._DummyDirEntry (introduced

[issue26624] Windows hangs in call to CRT setlocale()

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: Jeremy: Did you update your buildbot? It looks like the deadlock occurred again: - http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7478/steps/test/logs/stdio (...) 0:14:50 [398/400] test_concurrent_futures (101 sec) --

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-29 Thread Thomas
Thomas added the comment: Martin Panter: Regarding the warning, you appear to be correct. However, reading the source of http.server again made me notice _url_collapse_path(path) which seems to have some overlap with translate_path. Also it crashes with an IndexError if path contains '..'.

[issue26662] FreeBSD: "invalid slot offset" error on _ssl, _curses_panel and _testmultiphase extensions

2016-03-29 Thread STINNER Victor
New submission from STINNER Victor: I built Python 3.6 (default) on FreeBSD using: ./configure --cache-file=config_debug.cache --with-pydebug CFLAGS=-O0 make I'm using FreeBSD current, uname -a: FreeBSD freebsd 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r296485: Tue Mar 8 07:04:36 UTC 2016

[issue26663] asyncio _UnixWritePipeTransport._close abandons unflushed writes

2016-03-29 Thread Robert Smallshire
New submission from Robert Smallshire: Note: This report is based on a close reading of the asyncio code, rather than having experienced defective behaviour in test or production. The documentation for BaseTransport.close() states: "Close the transport. If the transport has a buffer for

[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-03-29 Thread 鄭景文
Changes by 鄭景文 : -- components: +Library (Lib) versions: +Python 3.6 ___ Python tracker ___

[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-03-29 Thread SilentGhost
Changes by SilentGhost : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > BTW, with respect to changeset 2b25fa7e3b7a, I'm not sure it has quite the > right semantics for is_dir, at least not if it's supposed to parallel > os.path.isdir(). I believe that should return True for a symbolic link to a > directory, which it doesn't

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: Since all test_os now pass again on 3.x buildbots (after a few months of red buildbots), I backported the _DummyDirEntry fixes to 3.5. David: > The 3.5 branch failure about the mis-matched tuple values from the walk is a > separate issue, (...) I'm sorry, I

[issue26654] asyncio is not inspecting keyword arguments of functools.partial

2016-03-29 Thread iceboy
iceboy added the comment: Created a PR https://github.com/python/asyncio/pull/328. Please review. Thanks. -- ___ Python tracker ___

[issue26643] regrtest: rework libregrtest.save_env submodule

2016-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset c5944a76697b by Victor Stinner in branch '3.5': Issue #26643: Add missing shutil resources to regrtest.py https://hg.python.org/cpython/rev/c5944a76697b -- nosy: +python-dev ___ Python tracker

[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-03-29 Thread 鄭景文
New submission from 鄭景文: I use venv module to make a virtual environment in cpython3.6. After it, I try to activate it with fish, but it give me an error, like the screenshot. I open the activate.fish and remove the $ sign in line 58 and 59, then the activate file works. I open the

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset c38ac7ab8d9a by Victor Stinner in branch '3.5': Issue #25911: Backport os._DummyDirEntry fixes https://hg.python.org/cpython/rev/c38ac7ab8d9a -- ___ Python tracker

[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-03-29 Thread 鄭景文
Changes by 鄭景文 : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue26295] Random failures when running test suite in parallel (-m test -j0) caused by test_regrtest

2016-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7ddd72b70ea by Victor Stinner in branch 'default': Issue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest doesn't https://hg.python.org/cpython/rev/f7ddd72b70ea New changeset c83349c129c9 by Victor Stinner in branch 'default':

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-03-29 Thread Brett Cannon
Brett Cannon added the comment: So that file wasn't to make sure importlib was used by the test suite but to actually make sure importlib.__import__ was heavily exercised (it's not the same as builtins.__import__ which is an accelerated C version). But thanks to test_importlib.util that

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-03-29 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-03-29 Thread STINNER Victor
New submission from STINNER Victor: Docstring of the file: """Run Python's standard test suite using importlib.__import__. Tests known to fail because of assumptions that importlib (properly) invalidates are automatically skipped if the entire test suite is run. Otherwise all command-line

[issue18844] allow weights in random.choice

2016-03-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch. Can I get you to fill out a contributor agreement? -- ___ Python tracker ___

[issue26666] File object hook to modify select(ors) event mask

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: > The whole point of a transparent SOCKS module is that it provides a function > that's a *drop-in replacement* for socket.socket(). Fully transparent asynchronous I/O is an old dream of developers. You may try eventlet if you like monkey-patching. It's a

[issue26639] Tools/i18n/pygettext.py: replace deprecated imp module with importlib

2016-03-29 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #20021 '"modernize" makeopcodetargets.py"' (now closed). -- nosy: +berker.peksag, serhiy.storchaka ___ Python tracker

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-03-29 Thread Demur Rumed
Demur Rumed added the comment: I've attached some benchmarking results as requested There is 1 failing test which doesn't fail in master for test_trace; the unit test for #9936 -- Added file: http://bugs.python.org/file42324/wcpybm.txt ___ Python

[issue18844] allow weights in random.choice

2016-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is wrong with generators? -- ___ Python tracker ___ ___

[issue26665] pip is not bootstrapped by default

2016-03-29 Thread Axel Luttgens
New submission from Axel Luttgens: Relevant page: https://docs.python.org/2/library/ensurepip.html One may read: In most cases, end users of Python shouldn’t need to invoke this module directly (as pip should be bootstrapped by default), but it may be needed if installing pip

[issue26624] Windows hangs in call to CRT setlocale()

2016-03-29 Thread Steve Dower
Steve Dower added the comment: The deadlock is between a CRT thread initialization lock and Windows's process-wide module initialization lock. So if anything is being loaded on demand by the watchdog thread, it's probably locked too (and that could be within the CRT or the OS, so not easy to

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-03-29 Thread Demur Rumed
Demur Rumed added the comment: To clarify format of extended arg listings: 1st column is the number of instances of EXTENDED_ARG being emitted, 2nd column is length of bytecode, followed by filename The previous numbers were of modules, which generally are run-once and listing many

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-03-29 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the benchmark results, Demur, but I think the benchmarks Victor was talking about hg.Python.org/benchmarks -- ___ Python tracker