[issue23710] C API doc for PyObject_HEAD is outdated

2016-07-07 Thread R. David Murray
R. David Murray added the comment: Warnings are big red boxes, and we try to only use those for really critical info. The current text is what we want as far as that goes. -- nosy: +r.david.murray ___ Python tracker

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: In sysconfig.parse_config_h(), the variables in pyconfig.h that have a commented-out '#undef' line are set to 0. Fortunately, there is no Android API level 0. Checking '== 0' ensures that autoreconf has been run to add '#undef ANDROID_API_LEVEL' to

[issue27332] Clinic: first parameter for module-level functions should be PyObject*, not PyModuleDef*

2016-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thank you for your contribution Petr. -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> commit review type: -> behavior versions: +Python 3.5 ___ Python tracker

[issue27332] Clinic: first parameter for module-level functions should be PyObject*, not PyModuleDef*

2016-07-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27456] TCP_NODELAY

2016-07-07 Thread Jim Fulton
Jim Fulton added the comment: I missed the point that you can get a transport's socket using get_extra_info. IMO, this provides an adequate escape from the default and qualifies as a "proper way to set it". I still think the default should be to enable TCP_NODELAY. --

[issue27332] Clinic: first parameter for module-level functions should be PyObject*, not PyModuleDef*

2016-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 870e02f86e08 by Serhiy Storchaka in branch '3.5': Issue #27332: Fixed the type of the first argument of module-level functions https://hg.python.org/cpython/rev/870e02f86e08 New changeset c80054ccbbd8 by Serhiy Storchaka in branch 'default': -

[issue27332] Clinic: first parameter for module-level functions should be PyObject*, not PyModuleDef*

2016-07-07 Thread Petr Viktorin
Petr Viktorin added the comment: Hello, Is there anything I can do to help get this issue resolved? -- ___ Python tracker ___

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't have an opinion about needing this feature. But for accepting it needs more documenting. The signature should be updated, the new feature should be documented in the main text, not only in the versionchanged note. Needed examples of using

[issue27462] NULL Pointer deref in binary_iop1 function

2016-07-07 Thread Emin Ghuliev
Emin Ghuliev added the comment: Nope, invalid bytecode file generated by fuzzer for the purpose of bug researching. Just python doesn't determine whether a variable is empty or valid. -- ___ Python tracker

[issue27463] Floor division is not the same as the floor of division

2016-07-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: The behaviour of both are correct: the binary float nearest to 4.4 is just a smidgen *bigger* than the exact decimal 4.4, so 44//4.4 truncates to 9.0. But floor(44/4.4) evaluates 44/4.4 first, and that rounds rather than truncating, giving 10.0, which then

[issue27462] NULL Pointer deref in binary_iop1 function

2016-07-07 Thread R. David Murray
R. David Murray added the comment: Are you saying python generated an invalid bytecode file? -- nosy: +r.david.murray ___ Python tracker ___

[issue27139] Increased test coverage for statistics.median_grouped

2016-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c4f8b0c5b30 by Steven D'Aprano in branch 'default': Issue27139 patch by Julio C Cardoza. https://hg.python.org/cpython/rev/4c4f8b0c5b30 -- nosy: +python-dev ___ Python tracker

[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2016-07-07 Thread Xiang Zhang
Xiang Zhang added the comment: >From the old comments from Brian it seems he's willing to accept such a >feature. But unfortunately Brian seems not interested in this now. IMHO, this >is good feature especially to people familiar with Bottle and Flask. Writing >in a decorator way seems more

[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 62802d373e9f by Xavier de Gaye in branch 'default': Issue #27434: Version of interpreter running a cross-build and source version must be the same. https://hg.python.org/cpython/rev/62802d373e9f -- nosy: +python-dev

[issue27462] NULL Pointer deref in binary_iop1 function

2016-07-07 Thread Emin Ghuliev
Changes by Emin Ghuliev : -- resolution: not a bug -> wont fix status: pending -> closed ___ Python tracker ___

[issue27377] Add smarter socket.fromfd()

2016-07-07 Thread Neil Schemenauer
Neil Schemenauer added the comment: Adding yet another revised patch. I think this is ready to commit, if someone would like to do it. The documentation for constants can be added as a separate commit, if Martin wants. I think the generic SO_* style documentation is okay. Changes in this

[issue22198] Odd floor-division corner case

2016-07-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27462] NULL Pointer deref in binary_iop1 function

2016-07-07 Thread Emin Ghuliev
New submission from Emin Ghuliev: Python VM parses "0x3b" opcode (INPLACE_MODULO) in the bytecode file. Subsequently VM parses left and right arguments of the opcode (0x3b). If left and right arguments doesn't exists in the bytecode file that causes a segmentation fault. Which triggered by

[issue27463] Floor division is not the same as the floor of division

2016-07-07 Thread Izaak Weiss
New submission from Izaak Weiss: The floor division operator in Python 3 `x//y` acts differently than the floor of the division operator `math.floor(x/y)` in some edge cases due to floating point errors. Consider `44//4.4` and `math.floor(44/4.4)`. These two expressions should, with infinite

[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-07 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Berker Peksag
Berker Peksag added the comment: > I am using 'hg diff' with ~/.hgrc set to 'git = on' and this time, naively > removed the '--git' from the output of 'hg diff' instead of commenting out > 'git = on' in the config file :( You don't need to do that. I've been using the same setting [1] for 5

[issue27462] NULL Pointer deref in binary_iop1 function

2016-07-07 Thread R. David Murray
R. David Murray added the comment: Well, unless you can find a way to reproduce it with python code, it isn't interesting to us. -- resolution: -> not a bug status: open -> pending ___ Python tracker

[issue27463] Floor division is not the same as the floor of division

2016-07-07 Thread R. David Murray
R. David Murray added the comment: I see Steven beat me to posting, but I'll post this anyway since it addresses the existing documentation. Those are already documented as being two different operations. // is "floor" in the sense (as documented in

[issue27463] Floor division is not the same as the floor of division

2016-07-07 Thread R. David Murray
R. David Murray added the comment: That's good enough for me. Closing. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue27463] Floor division is not the same as the floor of division

2016-07-07 Thread Tim Peters
Tim Peters added the comment: Note that the same is true in Python 2. I don't want to document it, though. In `math.floor(44/4.4)`, the subexpression `44/4.4` by itself wholly rules out that "[as if] with infinite precision [throughout the larger expression]" may be in play. `44/4.4` rounds

[issue23710] C API doc for PyObject_HEAD is outdated

2016-07-07 Thread R. David Murray
R. David Murray added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23710] C API doc for PyObject_HEAD is outdated

2016-07-07 Thread Ammar Askar
Ammar Askar added the comment: >The current text is what we want as far as that goes. Roger that, I've reverted the change to make that a warning in the newest diff. -- Added file: http://bugs.python.org/file43657/capidocs.diff-2 ___ Python tracker

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: According to https://stackoverflow.com/questions/38249755/tkinter-not-working-in-cmd-working-in-idle, this code from tkinter import filedialog root = Tk() ran in 3.4.3. After the patch for 3.5.1 (and 3.4.4, 2.7.11) it raises NameError in 3.5.2. --

[issue27248] Possible refleaks in PyType_Ready in error condition

2016-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset f1fcf60863f8 by Benjamin Peterson in branch '3.5': fix refleaks in PyDict_SetItem error cases (closes #27248) https://hg.python.org/cpython/rev/f1fcf60863f8 New changeset 370b2985d462 by Benjamin Peterson in branch '2.7': fix refleaks in

[issue27019] Reduce marshal stack depth for 2.7 on Windows debug build

2016-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6230ead06f65 by Benjamin Peterson in branch '2.7': reduce marshal stack size in debug mode on windows (closes #27019) https://hg.python.org/cpython/rev/6230ead06f65 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open

[issue24557] Refactor LibreSSL / EGD detection

2016-07-07 Thread koobs
koobs added the comment: Thank you Benjamin :) -- versions: +Python 3.5 ___ Python tracker ___ ___

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

2016-07-07 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Hit by missing `python` command from Python/makeopcodetargets.py, too. Is `make touch` the correct way? -- nosy: +Chi Hsuan Yen ___ Python tracker

[issue24557] Refactor LibreSSL / EGD detection

2016-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c0432cf1f2e by Benjamin Peterson in branch '3.5': assume egd unless OPENSSL_NO_EGD is defined—remove configure check (closes #24557) https://hg.python.org/cpython/rev/7c0432cf1f2e New changeset fe168c2b5e95 by Benjamin Peterson in branch

[issue27434] cross-building python 3.6 with an older interpreter fails

2016-07-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: I think the way the condition was written previously is more expressive, so the patch does not change that. The 'not' here expresses the fact that in the shell syntax, the condition is true when the test returns 0 [1], but we still want to express the fact

[issue17711] Persistent id in pickle with protocol version 0

2016-07-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue27369] [PATCH] Tests break with --with-system-expat and Expat 2.2.0

2016-07-07 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : Added file: http://bugs.python.org/file43652/issue27369.patch ___ Python tracker ___

[issue27369] [PATCH] Tests break with --with-system-expat and Expat 2.2.0

2016-07-07 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Added a patch. -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue21496] pyvenv activate_this.py

2016-07-07 Thread Attila-Mihaly Balazs
Attila-Mihaly Balazs added the comment: Hello, A scenario where this would be needed (and where you can't just "execute the script with the python from inside the pyvenv" to get it automatically activate) is when running under mod_wsgi. There sometimes it is needed to activate the virtualenv

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread STINNER Victor
STINNER Victor added the comment: +@unittest.skipIf(sysconfig.get_config_var('ANDROID_API_LEVEL') == 0, + "not an android platform") +def test_is_android(self): +# Use an heuristic, the shell on Android is at /system/bin/sh. +proc =

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think there is any advantage to adding a pure python version of defaultdict (or we would have done it a long time ago). Each time we do this, it creates a host of downstream issues where people notice minor implementation differences between the

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-07 Thread Emanuel Barry
Emanuel Barry added the comment: (Also, if this is going to be rejected still, I think that fixing __all__ to only conditionally add 'deque' and 'defaultdict' should be considered) -- ___ Python tracker

[issue27464] Document that SplitResult & friends are namedtuples

2016-07-07 Thread Mikhail Korobov
New submission from Mikhail Korobov: Docs currently say that urllib.parse.SplitResult is a subclass of tuple, without saying that it is namedtuple. What do you think about documenting it as a namedtuple? It has an useful _replace method which allows to change some part of URL before passing

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: @Berker This does not work for me. I found an old discussion [1] on the git format problem with Rietveld. The thread diverges rapidly toward another subject, "submitting a branch instead of a patch to the issue tracker" but comes back to the original subject

[issue27220] Add a pure Python version of 'collections.defaultdict'

2016-07-07 Thread Emanuel Barry
Emanuel Barry added the comment: I agree that CPython itself gains nothing from having this, as this is so that alternate implementations have it as well. I get what you mean about the minor differences, however I think it's a good thing, as it helps to make sure the tests are precise enough

[issue27465] IDLE:Make help source menu entries unique and sorted.

2016-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: The IDLE doc currently says "Additional help sources may be added here with the Configure IDLE dialog under the General tab." Revise to something like Additional help sources Menu items for display here are added on the General tap of Options => Configure

[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-07 Thread Robby Daigle
New submission from Robby Daigle: For the time2netscape function. expected: Wed, DD-Mon- HH:MM:SS GMT got: Wed DD-Mon- HH:MM:SS GMT In Lib/http/cookiejar.py, line 116 suggests that the format should include a comma while line 123 does not include the comma in the formatted string.

[issue27465] IDLE:Make help source menu entries unique and sorted.

2016-07-07 Thread Terry J. Reedy
New submission from Terry J. Reedy: The 'General' tab of the IDLE configuration menu allows a user to add entries to the Help menu that display a text when clicked. A user might want more than one text available for a given 'topic', such as a doc and how-to for a package. However, there is

[issue27380] IDLE: add base Query dialog with ttk widgets

2016-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, thank you for the review. I intend to follow PEP 8 as best as possible in the code I touch. I also fixed some of the comments. I did a bit of refactoring that make it trivial to check for reuse of help source names. See new issue #27465. All that

[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-07 Thread Evelyn Mitchell
Evelyn Mitchell added the comment: http://web.archive.org/web/19990128171928/http://www51.netscape.com/newsref/std/cookie_spec.html says: The date string is formatted as: Wdy, DD-Mon- HH:MM:SS GMT so the comma should be there. -- nosy: +efm

[issue27461] Optimize PNGs

2016-07-07 Thread Ville Skyttä
New submission from Ville Skyttä: Running PNGs through zopflipng makes them smaller, with no drawbacks. This patch was done with zopflipng version 1.0.1 with the -m option, and decreases the in-tree total size size of all *.png by almost 100KiB. $ find -name "*.png" | xargs du -bc | tail -n 1

[issue27461] Optimize PNGs

2016-07-07 Thread STINNER Victor
STINNER Victor added the comment: Hi, The idea is interesting, but IMO it would be more efficient to contribute to Sphinx, so all documentations will benefit of smallest pictures. There is a similar tool for JPEG. Victor -- nosy: +haypo ___ Python

[issue27461] Optimize PNGs

2016-07-07 Thread Ville Skyttä
Ville Skyttä added the comment: Sure, I plan to suggest this to sphinx as well. One corresponding tool for JPEGs is jpegoptim and its --strip-all option, but there is only ./Mac/BuildScript/resources/background.jpg in the cpython source tree (which despite of the .jpg extension appears to be

[issue27461] Optimize PNGs

2016-07-07 Thread STINNER Victor
STINNER Victor added the comment: > there is only ./Mac/BuildScript/resources/background.jpg in the cpython > source tree (which despite of the .jpg extension appears to be a PNG file so > I don't want to touch that stuff) Oh funny, you're right: it's a PNG file :-) --

[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: Here is the patch that fixes this issue. Patch includes unittests and NEWS entry. -- assignee: -> orsenthil keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file43659/issue27466.patch

[issue27380] IDLE: add base Query dialog with ttk widgets

2016-07-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch posted had code that belongs to #27465 and was deleted before pushing. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27467] distutils.config API different between <=3.5.1 and 3.5.2

2016-07-07 Thread Joe
New submission from Joe: In Python 3k releases leading up to 3.5.2, distutils.config imported "ConfigParser", but now imports "RawConfigParser" in the latest release. The documentation indicates "RawConfigParser" is considered legacy and "ConfigParser" should be used in its place. Was this

[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: Evelyn, Thanks for digging in. The code for time2netscape has been in the current form since it was originally introduced in 2004. If this is a bug, then it has been present since the introduction of the module. If anyone is using this module, they are

[issue27380] IDLE: add base Query dialog with ttk widgets

2016-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 66fe8d9eae6c by Terry Jan Reedy in branch 'default': Issue #27380: IDLE: add query.HelpSource class and tests. https://hg.python.org/cpython/rev/66fe8d9eae6c -- ___ Python tracker