[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-07-28 Thread Jami Lindh
Jami Lindh added the comment: Also, I'm not sure what is the development status in Python 3.4 but in my case this bug happened using the Debian Jessie Python version 3.4.2-2 -- versions: +Python 3.4 ___ Python tracker

[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-07-28 Thread Jami Lindh
Jami Lindh added the comment: In my opinion, this is still a clear case of "invalid input, raise an error", but I don't think AssertionError is the right one. Maybe just don't catch the unexpected binascii.Error and let it fly towards the user? I might go even one step further and just let

[issue27641] Do not build Programs/_freeze_importlib when cross-compiling

2016-07-28 Thread Martin Panter
Martin Panter added the comment: Here is another possible option. It is still a bit of a hack, because the configure script inserts comments into the makefile, but this is already done e.g. with @EXPORT_MACOSX_DEPLOYMENT_TARGET@. The advantage is we get to keep the filenames of the

[issue17599] mingw: detect REPARSE_DATA_BUFFER

2016-07-28 Thread Eryk Sun
Eryk Sun added the comment: REPARSE_DATA_BUFFER is defined in the WDK filesystem header, km\ntifs.h. It's not defined in the user-mode SDK. -- nosy: +eryksun ___ Python tracker

[issue17600] mingw: build-in windows modules (winreg)

2016-07-28 Thread Martin Panter
Martin Panter added the comment: Here is a quick merge with the current code. First concern: The patch adds special support if KEY_WOW64_64KEY is not defined, claiming to be for _WIN32_WINNT < 0x502, however these days I think Python dropped support for Windows XP etc, so we can probably drop

[issue27648] Message of webbrowser.py something wrong.

2016-07-28 Thread 김태환
New submission from 김태환: I'm using Python 3.5.1+ and Ubuntu 16.04. When I open new tab to Chrome using 'webbrowser.open()'. Some message prints next to shell prompt like below. ``` asd 저장소가 생성되었습니다... 첫 위키 페이지를 만들기 위해 Save Page 버튼을 눌러주세요! ['asd'] (Shell prompt) $ 기존 브라우저 세션에 새 창을 생성했습니다. ```

[issue17599] mingw: detect REPARSE_DATA_BUFFER

2016-07-28 Thread Martin Panter
Martin Panter added the comment: Leading underscore is a good idea. I have no idea if VC14 includes the structure, but I suspect if it was added with this name, we would know because it would cause the same conflict that Min GW caused. -- Added file:

[issue17596] mingw: add wincrypt.h in Python/random.c

2016-07-28 Thread Martin Panter
Martin Panter added the comment: For the record, the first error without this patch is ../Python/random.c:26:1: error: unknown type name 'HCRYPTPROV' According to , the header to use is , but we use

[issue17596] mingw: add wincrypt.h in Python/random.c

2016-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 11ed7c49f5df by Martin Panter in branch 'default': Issue #17596: MINGW: add wincrypt.h in Python/random.c https://hg.python.org/cpython/rev/11ed7c49f5df -- nosy: +python-dev ___ Python tracker

[issue17596] mingw: add wincrypt.h in Python/random.c

2016-07-28 Thread Martin Panter
Martin Panter added the comment: I think this one should be fairly safe; any breakage should be pretty obvious by watching the buildbots. -- stage: patch review -> commit review ___ Python tracker

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2016-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think 3.4 and 3.5 were pretty current as of .0 release, or certainly as of .0b1. Have we updated to new unicode (9.0), like tcl? Martin used to do that. -- ___ Python tracker

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Martin Panter
Martin Panter added the comment: Okay, leaving this open for a 2.7 patch. BTW thanks for your work; I tried to tackle these warnings a while ago, but I didn’t know enough about Sphix/RST/etc. The 2.7 change should be fairly easy; I can give it a crack if you’re not that interested in 2.7.

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Martin Panter
Changes by Martin Panter : -- versions: +Python 2.7 ___ Python tracker ___ ___

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8bac90be by Martin Panter in branch '3.5': Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting. https://hg.python.org/cpython/rev/8bac90be New changeset 6fbb7c9d77c6 by Martin Panter in branch 'default': Issue #26462:

[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-07-28 Thread R. David Murray
R. David Murray added the comment: It might be better to add a character: that will produce garbage as the last byte, but that could serve as an alert that something is wrong...and we don't know if the extra character is at the end or at the beginning of the base64 encoded string, or if, as

[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-07-28 Thread R. David Murray
R. David Murray added the comment: Thanks for narrowing this down. There are two problems: the first is that the base64 module is raising "Incorrect padding" when the issue is actually that the input string cannot be decoded using the base64 algorithm no matter what padding might be

[issue22645] Unable to install Python 3.4.2 amd64 on Windows 8.1 Update 1

2016-07-28 Thread Berker Peksag
Berker Peksag added the comment: This was marked as 'fixed' almost two years ago. I tried to install 3.4.3, uninstall 3.4.3 and install 3.4.4 again in Win 10 and it worked fine for me. I guess this was left open accidentally. -- nosy: +berker.peksag status: open -> closed

[issue27643] test_ctypes fails on AIX with xlc

2016-07-28 Thread Martin Panter
Martin Panter added the comment: The test seems to be comparing ctypes and native C bit-field structures, c_int and c_short versus native int and short. In general in C, if a bit-field has type “int” without a signed or unsigned qualifier, it is up to the implementation which mode is chosen.

[issue27355] Strip out the last lingering vestiges of Windows CE support

2016-07-28 Thread Zachary Ware
Zachary Ware added the comment: See #23085 for more about our libffi situation. For this issue, with silence from Tim and Mark I say commit at will (and kill Modules/_ctypes/libffi_arm_wince/ as well). -- stage: patch review -> commit review ___

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2016-07-28 Thread Zachary Ware
Zachary Ware added the comment: There have also been a few updates to 8.5 since we last updated the version we ship with 2.7; has there been anything in 8.5.15-19 that we should pick up? -- versions: +Python 2.7 -Python 3.6 ___ Python tracker

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2016-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset abfda075eb37 by Zachary Ware in branch 'default': Issue #27647: Update Windows build to Tcl/Tk 8.6.6 https://hg.python.org/cpython/rev/abfda075eb37 -- nosy: +python-dev ___ Python tracker

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-28 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Added two small comments to the review. -- ___ Python tracker ___ ___

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-28 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue27598] Add SizedIterable to collections.abc and typing

2016-07-28 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Vinay Sajip added the comment: Added belopolsky and meador.inge to nosy as they are listed as ctypes experts in the experts index (Amaury was already there). -- nosy: +meador.inge ___ Python tracker

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Vinay Sajip added the comment: In my view, the best should not be the enemy of the good, and pragmatism beats purity. I don't have the resources to test this functionality on all platforms - just Windows and Linux - and am not familiar with other platforms like AIX, Solaris or the BSDs. The

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2016-07-28 Thread Zachary Ware
Zachary Ware added the comment: I've done a test build (32-bit Release) and everything went fine. It looks like we get to drop our patches, which is enough for me to want to do this for 3.6. We historically haven't kept our Tcl/Tk sources extremely up to date on Windows, though; is there

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread R. David Murray
R. David Murray added the comment: If you have a copy of your original agreement you could fax it to the PSF, but it is probably easier to just to sign the electronic one. -- nosy: +r.david.murray ___ Python tracker

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread Lele Gaifax
Lele Gaifax added the comment: WRT to the agreement form, I guess I'll have to compile it even if I already contributed to Python decades ago (ObjC, readline, NeXT support...), right? Will try to do whatever is needed in the next days... -- ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Michael Felt
Michael Felt added the comment: imho - it is not correct to only make a modification of this nature for a single platform. To be realistic, if the "design" goal is to 'find' what dlopen() will find when given a argument without a pathname component - then gcc should not be used, and perhaps

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2016-07-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Current Tcl/Tk version in Windows build is 8.6.4.2. Tcl/Tk 8.6.6 was released yesterday. https://sourceforge.net/p/tcl/mailman/message/35246302/ -- components: Tkinter, Windows messages: 271581 nosy: paul.moore, serhiy.storchaka, steve.dower,

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread Lele Gaifax
Lele Gaifax added the comment: For the documentation see https://github.com/lelit/cpython/commit/bd82f8de9800ae40b33ddf1e4b7d72f10bc9c10e or the attached patch. -- Added file: http://bugs.python.org/file43930/issue27645-doc.patch ___ Python tracker

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Changes by Vinay Sajip : -- hgrepos: -130 ___ Python tracker ___ ___

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux

2016-07-28 Thread Vinay Sajip
Vinay Sajip added the comment: I have updated the patch to apply against 3.6, and changed it to be more conservative: it only uses ld and LD_LIBRARY_PATH when trying to find a library if the existing gcc-based method fails. Seeing that this issue has been around for so long, I would really

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch! I haven't had a chance to review the patch yet, but we also need documentation updates to Doc/library/sqlite3.rst. -- nosy: +berker.peksag stage: -> patch review ___ Python tracker

[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2016-07-28 Thread Mihai Capotă
Changes by Mihai Capotă : -- nosy: +mihaic ___ Python tracker ___ ___ Python-bugs-list

[issue27646] yield from expression can be any iterable

2016-07-28 Thread Terry J. Reedy
New submission from Terry J. Reedy: https://docs.python.org/3/reference/expressions.html#yield-expressions says "When yield from is used, it treats the supplied expression as a subiterator. All values produced by that subiterator ...". To me "treats..expression as a subiterator" means that

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread Lele Gaifax
Changes by Lele Gaifax : -- keywords: +patch Added file: http://bugs.python.org/file43928/issue27645.patch ___ Python tracker ___

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread Emanuel Barry
Emanuel Barry added the comment: That's really nice, thank you for doing this! To get your code reviewed, though, you should upload a patch here. With git, you can do 'git diff > my_patch_file_name.patch' in your local repo, then you can upload the resulting file here. If you haven't done so

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread Lele Gaifax
Lele Gaifax added the comment: Here is a preliminary implementation: https://github.com/lelit/cpython/commit/b7456eb6a55568639a41efb5d88ab4d9b3c20337 -- ___ Python tracker

[issue27645] Supporting native backup facility of SQLite

2016-07-28 Thread Lele Gaifax
New submission from Lele Gaifax: It would be nice if the sqlite3 stdlib module could expose the SQLite Online Backup API. I'm willing to implement it, as encouraged by Paul Moore. See also: https://mail.python.org/pipermail/python-dev/2016-July/145570.html -- components: Extension

[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-28 Thread nemunaire
Changes by nemunaire : Removed file: http://bugs.python.org/file43900/fix_sslsocket_init_without_socket_3.3-3_6.patch ___ Python tracker ___

[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-28 Thread nemunaire
nemunaire added the comment: Here is a new patch with tests on constructor. The patch on the feature is quite different: instead of testing for None socket, I choose to delay the != SOCK_STREAM check in the later condition, when we know we treat a socket. Tests include different constructor

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-28 Thread Michael Lee
New submission from Michael Lee: This is a patch to update the documentation on the typing module. It expands the section on type aliases and adds a section on [NewType][0]. Since support for NewType was [recently added][1] to mypy, it seemed like a prudent time to update the docs to describe

[issue26865] Meta-issue: support of the android platform

2016-07-28 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Maybe the term "normal usages" is not accurate. I was trying to refer all possible Python usages on Android, and the test suite is a subset of them, so they should be fixed, too. I propose the aforementioned change (creating another meta-issue) because there

[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()

2016-07-28 Thread STINNER Victor
STINNER Victor added the comment: I don't like this idea anymore ("add block=False parameter to os.urandom()"), so I close this issue. I wrote the PEP 524 to propose to make os.urandom() blocking on Linux. The discussion moved to the security-sig mailing list. -- resolution: ->

[issue27250] Add os.urandom_block()

2016-07-28 Thread STINNER Victor
STINNER Victor added the comment: I don't support this idea anymore, so I close the issue. I wrote the PEP 524 to propose to make os.urandom() blocking on Linux. The discussion moved to the security-sig mailing list. -- resolution: -> rejected status: open -> closed

[issue27404] Misc/NEWS: add [Security] prefix to Python 3.5.2 changelog

2016-07-28 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26865] Meta-issue: support of the android platform

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Some dependent issues, like issue26852, issue26859 and issue27640, are for > reducing the size of an installation. How about moving them to another > meta-issue? First they are not critical for normal usages on Android. Second > they are not limited to

[issue26865] Meta-issue: support of the android platform

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: Roman, can you please enter a new issue for that problem. -- ___ Python tracker ___

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Julien
Julien added the comment: Decorater: Colors used by the documentation are defined here: https://github.com/sphinx-doc/sphinx/blob/master/sphinx/pygments_styles.py#L22 you can easily modify it and rebuild the doc ``(cd Doc; make html)``. Take a look at existing themes

[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-28 Thread Mark Dickinson
Mark Dickinson added the comment: I guess that would be the minimal change necessary to remove ambiguity. But I tend to think that >>> (0).to_bytes(0, 'big', signed=True) should also be an error. (And of course both these should still be errors with 'big' replaced with 'little'.) --

[issue26852] add the '--enable-sourceless-distribution' option to configure

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: > About doko's note and your response: unless this patch does not install the > source (I haven't looked), the __pycache__ files *will* be rebuilt at > interpreter start, according to the text you quoted. Right, and since the source files are removed, the

[issue27623] int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero

2016-07-28 Thread Anders Lorentsen
Anders Lorentsen added the comment: So, am I to understand that the only corner case we should fix is that >>> (-1).to_bytes(0, 'big', signed=True) should raise an overflow error (currently it returns b'') ? -- Added file:

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-28 Thread Anton Backer
Changes by Anton Backer : Removed file: http://bugs.python.org/file43924/581663cb2d4d.diff ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-28 Thread Anton Backer
Changes by Anton Backer : -- keywords: +patch Added file: http://bugs.python.org/file43924/581663cb2d4d.diff ___ Python tracker ___

[issue26852] add the '--enable-sourceless-distribution' option to configure

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: > and if the only reason is to reduce space by omitting the source, then it > should also not install the source so the name is wrong :) I miss your point, msg271515 said earlier "the patch removes all *.py files". The patch does a sourceless distribution: no

[issue27643] test_ctypes fails on AIX with xlc

2016-07-28 Thread Michael Felt
Michael Felt added the comment: So, it seems to be a compiler issue - when built using gcc (v4.7.4) the tests take a bit longer, but no failures. root@x065:[/data/prj/aixtools/python/python-2.7.12.1/Lib/ctypes/test]../../../python runtests.py A 0x1001f 0 B 0x2001d 0 C 0x3001a 0 D 0x40016 0 E

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Julien
Julien added the comment: Martin: OK, let's apply this to 3.6 / 3.5 with this one, and I'll provide independent patch for 2.7 if needed (long time without building 2.7 doc). -- ___ Python tracker

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the tzdata folks have agreed [1] that there is a problem with the Morocco rules in the Africa file and will likely fix it in the next release. This is an interesting situation where a bug in tzcode masks a bug in tzdata while glibc

[issue27404] Misc/NEWS: add [Security] prefix to Python 3.5.2 changelog

2016-07-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset a576a34f5386 by Victor Stinner in branch '3.5': NEWS: tag security related changes with [Security] prefix https://hg.python.org/cpython/rev/a576a34f5386 New changeset 6a2de662eeb7 by Victor Stinner in branch 'default': Merge 3.5 (issue #27404)

[issue27131] Unit test random shuffle

2016-07-28 Thread Jonathan Kross
Jonathan Kross added the comment: Just giving this one a bump to see if it can be applied soon. -- ___ Python tracker ___

[issue27643] test_ctypes fails on AIX with xlc

2016-07-28 Thread Michael Felt
Michael Felt added the comment: FYI: similar (exact) results when 64-bit mode: root@x064:[/data/prj/aixtools/python/python-2.7.12.1/Lib/ctypes/test]../../../python ./runtests.py A 0x1001f 0 B 0x2001d 0 C 0x3001a 0 D 0x40016 0 E 0x50011 0 F 0x6000b 0 G 0x70004 0 H 0x80018 4 I 0x9000f 4 M 0x1000e

[issue27643] test_ctypes fails on AIX with xlc

2016-07-28 Thread Michael Felt
New submission from Michael Felt: I am preparing a system with gcc to see if it is compiler related, i.e., goes away with gcc. On the one hand, fingers crossed - but on the other, having bitfields working regardless of the compiler should be preferred. This issue is similar to a Solaris (C

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread R. David Murray
R. David Murray added the comment: Martin: your summary is correct. A new feature should also have a What's New entry, of course; I think that's the only essential you left out. Decorator: general comments (eg: color of docs, etc) aren't really useful comments on a specific bug report, and

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Martin Panter
Martin Panter added the comment: Usually my technique is to apply the 3.6 patch to 3.5, fix up any conflicts, and leave the 3.6-only bits out (which get rejected by the patch process anyway). But dedicated patch(es) may be useful. Especially for 2.7, where there are probably independent

[issue26851] android compilation and link flags

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: Yes, the packager must use appropriately either CFLAGS CPPFLAGS [1] and LDFLAGS, or CC. I am using: CC="clang --sysroot=$(SYSROOT) -target $(TARGET) -gcc-toolchain $(GCC_TOOLCHAIN)". [1] See issue 27453, for the remaining problem upon using CPPFLAGS.

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Decorater
Decorater added the comment: Also I was thinking maybe I could figure out how to Add in asyncio to 2.7 anyway (well latest one that is) because why not. With as many things using asyncio now days it would be cake for those python 2 users. -- ___

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Decorater
Decorater added the comment: tbh it would be nice if the entire documentation was recolored to look more 'interesting' to read. And to also have it in a way that people who lean visually can learn the info easier instead of them trying to read a giant wall of text that they may or may not

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Julien
Julien added the comment: Hi, Would you like me to also provide patches for different versions? I only provided patches for the default branch, but I'll gladly see this applied on other branches, as I often build them all. Also is a documented policy about maintaining the documentation? I

[issue26865] Meta-issue: support of the android platform

2016-07-28 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Some dependent issues, like issue26852, issue26859 and issue27640, are for reducing the size of an installation. How about moving them to another meta-issue? First they are not critical for normal usages on Android. Second they are not limited to Android -

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Julien
Julien added the comment: Hi, Indentation in whatsnew/3.2 fixed. Colors in this block are clearly not perfect, but I think that's another subject. -- Added file: http://bugs.python.org/file43923/issue26462.v7.diff ___ Python tracker

[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-07-28 Thread Jami Lindh
Jami Lindh added the comment: I stumbled upon this bug as well while fuzzing with AFL. The curious thing is that email.message_from_string still accepts that garbled message as a valid email. -- nosy: +CryptidVulpes versions: +Python 3.4 Added file:

[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-07-28 Thread Jami Lindh
Jami Lindh added the comment: I also attached a minimal script containing only the decode call and the garbage payload. -- Added file: http://bugs.python.org/file43922/issue27397_poc_minimal.py ___ Python tracker

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Ned Deily
Ned Deily added the comment: Also, has anyone tried bundling the std lib into a zlib? I know that option has been around for a long time but I don't know if it still works or is even being used. Presumably, that would be another way to save space and file system entries. --

[issue26851] android compilation and link flags

2016-07-28 Thread Martin Panter
Martin Panter added the comment: Where is the code that sets the clang -target argument, or gcc -march? Is it hidden away somewhere in the autoconf code? Do you manually set it with ‘./configure CFLAGS="-target . . ." ’? -- ___ Python tracker

[issue27637] int.to_bytes(-1, ...) should automatically choose required count of bytes

2016-07-28 Thread Mark Dickinson
Mark Dickinson added the comment: [Martin] > I don’t like special values. Agreed. If we wanted to add this, the obvious API would be to simply make the size optional (which would force passing the endianness by name or explicitly passing a default value of `None`, but that doesn't seem like

[issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders

2016-07-28 Thread Mark Dickinson
Mark Dickinson added the comment: -1 from me; it feels like a needless expansion of the API. -- ___ Python tracker ___

[issue27642] import and __import__() fails silently without a ImportError and does not add the module to the file's namespace.

2016-07-28 Thread R. David Murray
R. David Murray added the comment: Questions like this are more appropriate for the python-list mailing list, or even python-tutor. -- nosy: +r.david.murray resolution: -> not a bug status: open -> closed ___ Python tracker

[issue27642] import and __import__() fails silently without a ImportError and does not add the module to the file's namespace.

2016-07-28 Thread Emanuel Barry
Emanuel Barry added the comment: Yeah, just add 'global testplugin' at the top of your function, before your import it (you'll also need a global statement if you want to delete/re-import it). You might want to take a look at importlib if you wish to dynamically load modules (especially

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread R. David Murray
R. David Murray added the comment: About doko's note and your response: unless this patch does not install the source (I haven't looked), the __pycache__ files *will* be rebuilt at interpreter start, according to the text you quoted. -- ___ Python

[issue27642] import and __import__() fails silently without a ImportError and does not add the module to the file's namespace.

2016-07-28 Thread Decorater
Decorater added the comment: But* -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27642] import and __import__() fails silently without a ImportError and does not add the module to the file's namespace.

2016-07-28 Thread Decorater
Decorater added the comment: yeah I just noticed it is in sys.modules but does not get defined globally. Bug maybe there is a hack to make it global? -- resolution: not a bug -> status: closed -> open ___ Python tracker

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread R. David Murray
R. David Murray added the comment: Our official position (so far, mobile is a new use case since the last time it was discussed) is that we don't go out of our way to support sourceless distribution, and in general we discourage it. That is, it is left to the packager of a sourceless program

[issue27642] import and __import__() fails silently without a ImportError and does not add the module to the file's namespace.

2016-07-28 Thread Emanuel Barry
Emanuel Barry added the comment: `import` merely adds the imported module to the current namespace which, in your code, is some local (non-global) namespace. It is successfully imported but never used, and quickly falls out of scope. You also check for `testplugin in sys.modules`, but you

[issue27642] import and __import__() fails silently without a ImportError and does not add the module to the file's namespace.

2016-07-28 Thread Decorater
New submission from Decorater: So, I have some code. I tried to make a 'plugin' for my bot I made in python. However it seems to not be able to import it which it should be able to. The code I used is here: https://bpaste.net/show/e4445c47490d I dont even know why it is not addign it to the

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-28 Thread R. David Murray
R. David Murray added the comment: LGTM, but this is change we should probably only make in a feature release, with a note in the What's New porting section. -- nosy: +r.david.murray stage: -> needs patch versions: +Python 3.6 -Python 3.5 ___

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: > but these are rebuilt when you start the interpreter, aren't they? No. Quoting PEP 3147: Case 4: legacy pyc files and source-less imports Python will ignore all legacy pyc files when a source file exists next to it. In other words, if a foo.pyc

[issue26851] android compilation and link flags

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I am still curious what configures the preprocessor to set __ARM_ARCH to 7 (I > guess the clang -target argument?) Yes, the -target clang argument or the -march gcc argument. > and why we can’t set LDFLAGS at the same time or place. Is it just more >

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: No, if you remove PEP3147 (like the Buildroot patch does), and install only the .pyc files, you have a smaller Python installation, and nothing gets "re-generated", since what you already have are the .pyc files. The .py files are not even installed on the

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Matthias Klose
Matthias Klose added the comment: but these are rebuilt when you start the interpreter, aren't they? -- ___ Python tracker ___

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Ned Deily
Ned Deily added the comment: I think a proposal to add an option like this requires more discussion, probably a PEP. -- nosy: +ned.deily ___ Python tracker

[issue27640] add the '--disable-test-suite' option to configure

2016-07-28 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: We have a similar patch in Buildroot (see https://git.buildroot.org/buildroot/tree/package/python3/0017-Add-an-option-to-disable-installation-of-test-module.patch) so we would be very happy to see this patch merged. Note that we also have many more patches

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread koobs
Changes by koobs : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: See https://git.buildroot.org/buildroot/tree/package/python3/0016-Add-importlib-fix-for-PEP-3147-issue.patch -- ___ Python tracker

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Thomas Petazzoni
Thomas Petazzoni added the comment: I can also say that in the Buildroot project, we have patches to get rid of the PEP3147 stuff. Indeed, the PEP3147 forces one to have both the .py *and* the .pyc file for a given module. If you have only the .pyc file, Python does not recognize it and it

[issue23085] update internal libffi copy to 3.2.1

2016-07-28 Thread Ned Deily
Ned Deily added the comment: We should be able to make things work for OS X installer builds one way or another so don't let that be a factor. -- ___ Python tracker

[issue26865] Meta-issue: support of the android platform

2016-07-28 Thread Roman Evstifeev
Roman Evstifeev added the comment: While not only android issue, there is a problem with dumbdbm module: it internally tries to do os.chmod() on a FAT-formatted sdcard and fails, because FAT does not support chmod. -- ___ Python tracker

[issue26462] Patch to enhance literal block language declaration

2016-07-28 Thread Martin Panter
Martin Panter added the comment: One last change I think needs making to the same demo, the “code-block” needs indenting under the bullet point: * The interpreter can now be started with a quiet option, ``-q``, to prevent the copyright and version information from being displayed in the

[issue26852] add the '--enable-legacy-pyc-files' option to configure

2016-07-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: > hmm, I really don't buy the space-saving argument. you are saving some space > with shorter path names, nothing more. so why do you introduce this option? No, compileall is run with '-b', so there are no PEP 3147 __pycache__ directories, and with an

  1   2   >