[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-30 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Changeset 5c77488830bc brings a regression - Android build fails with the following message: export H2PY; H2PY="$PYTHON_FOR_BUILD /home/yen/python3-android/src/cpython/build-target/../Tools/scripts/h2py.py"; \ cd ../Lib/plat-aarch64-linux-gnu; ./regen + _PYTHO

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-30 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Oh didn't see the title of this issue. Here's the patch for Android. -- Added file: https://bugs.python.org/file44260/issue23968-android-regression.patch ___ Python tracker __

[issue27891] Consistently group and sort imports within idlelib modules.

2016-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Part of previous message should be 'at the top where it belongs'. With attached patch, each file compiles and (incomplete) tests pass. Will examine each with side-by-side diff. There might be artifacts from another patch left. -- keywords: +patch Ad

[issue27891] Consistently group and sort imports within idlelib modules.

2016-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Followup is #27892 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue21085] compile error Python3.3 on Cygwin

2016-08-30 Thread Erik Bray
Changes by Erik Bray : Added file: https://bugs.python.org/file44263/3.4-issue21085-struct_siginfo-2.patch ___ Python tracker ___ ___ Python

[issue21085] compile error Python3.3 on Cygwin

2016-08-30 Thread Erik Bray
Changes by Erik Bray : Added file: https://bugs.python.org/file44262/tip-issue21085-struct_siginfo-2.patch ___ Python tracker ___ ___ Python

[issue21085] compile error Python3.3 on Cygwin

2016-08-30 Thread Erik Bray
Changes by Erik Bray : Added file: https://bugs.python.org/file44264/3.3-issue21085-struct_siginfo-2.patch ___ Python tracker ___ ___ Python

[issue21085] compile error Python3.3 on Cygwin

2016-08-30 Thread Erik Bray
Erik Bray added the comment: I've reviewed masamoto's last patch 3.5-issue21085-struct_siginfo-2.patch It applies cleanly and allows the signals module to compile on Cygwin64 2.5.1 / Windows 10. I attached versions of the patch that apply cleanly to tip, 3.4, and 3.3 as well. However, even w

[issue17909] Autodetecting JSON encoding

2016-08-30 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Serhiy, I have reviewed your patch, it seems to be ok. -- nosy: +matrixise ___ Python tracker ___

[issue17909] Autodetecting JSON encoding

2016-08-30 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue27861] sqlite3 type confusion and multiple frees

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

[issue27818] Speed up number format spec parsing

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

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-30 Thread Xiang Zhang
Xiang Zhang added the comment: Serhiy, I've updated the patch. Looking forward to your feedback. -- Added file: https://bugs.python.org/file44265/issue27881_v2.patch ___ Python tracker

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general LGTM. But added several style comments. -- ___ Python tracker ___ ___ Python-bugs-list

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2016-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The last change just sweeps a problem under a rug. For now json.tool never fails with valid data. But with the --no-ensure-ascii option it can fail when output a string not encodable with the locale encoding. All can work with common cases on common UTF-8 en

[issue25596] Use scandir() to speed up the glob module

2016-08-30 Thread Dima Tisnek
Dima Tisnek added the comment: Who can review Serhiy's patch? P.S. core of the patch seems good to me, but I'm not an expert on stdlib. -- nosy: +Dima.Tisnek ___ Python tracker ___

[issue27889] ctypes interfers with signal handling

2016-08-30 Thread Andre Merzky
Andre Merzky added the comment: I can confirm the same unexpected behavior for Python 2.7.6 / Linux radical 4.2.0-25-generic #30~14.04.1-Ubuntu (2nd attempt) Python 2.7.9 / Linux login1.stampede.tacc.utexas.edu 2.6.32-431.17.1.el6.x86_64 (32nd attempt) Python 2.7.10 / Linux gordon-ln2.sdsc.edu

[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-30 Thread Xiang Zhang
Xiang Zhang added the comment: Leave replies and make a trival change in v3. I don't change the other two just as I state in the replies. But please do what you like. -- Added file: https://bugs.python.org/file44266/issue27881_v3.patch ___ Python tra

[issue21085] compile error Python3.3 on Cygwin

2016-08-30 Thread R. David Murray
R. David Murray added the comment: I think it would be reasonable to apply it, unless other devs object, given your confirmation that it solves this particular problem (and, looking at the code, it won't break anything...which the buildbots will confirm). This will only be applied to 3.5 and 3

[issue27350] Compact and ordered dict

2016-08-30 Thread INADA Naoki
Changes by INADA Naoki : Added file: https://bugs.python.org/file44267/compact-dict.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-30 Thread Christian Heimes
Changes by Christian Heimes : Added file: https://bugs.python.org/file44268/AF_ALG-kernel-crypto-support-for-socket-module-3.patch ___ Python tracker ___ __

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-30 Thread Erik Bray
Erik Bray added the comment: Here's a first stab at a patch for this. A linked list is maintained which maps pthread_key_t instances to an int "key_id" that is used for the PyThread API. Each function needs to map a given key_id to the actual pthread_key_t. This adds a little bit of overhea

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-30 Thread Erik Bray
Changes by Erik Bray : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-30 Thread Erik Bray
Changes by Erik Bray : -- keywords: +patch Added file: https://bugs.python.org/file44269/issue25658-1.patch ___ Python tracker ___ __

[issue27818] Speed up number format spec parsing

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: > Moving some functions to template file adds yet about 2%. This is too small > for adding new file. I agree. I checked just after writing my previous comment and in fact str%args doesn't use a C template neither, it also uses PyUnicode_READ() which is fine. Th

[issue27893] BytesParser.parsebytes docstring fix

2016-08-30 Thread Ville Skyttä
Changes by Ville Skyttä : -- assignee: docs@python components: Documentation files: parser.patch keywords: patch nosy: docs@python, scop priority: normal severity: normal status: open title: BytesParser.parsebytes docstring fix type: enhancement Added file: http://bugs.python.org/file442

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: -1 for your change issue25658-1.patch. It adds a O(n) slowdown to PyThread_set_key_value() whereas the performance of this function matters. Moreover, the code currently works fine on Linux, I fail to see why we should make Python slower to support a new platf

[issue2445] Use The CygwinCCompiler Under Cygwin

2016-08-30 Thread Erik Bray
Erik Bray added the comment: I have confirmed Masayuki's patch (3.4-distutils-shlibext.patch) fixes a few build issues on Cygwin. At its core, what it's fixing is allowing UnixCCompiler.find_library_file to find import libraries on Cygwin. That in turn is necessary for --with-system-ffi to

[issue2445] Use The CygwinCCompiler Under Cygwin

2016-08-30 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: -christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue27894] Fix to_addrs refs in smtplib docs

2016-08-30 Thread Ville Skyttä
Changes by Ville Skyttä : -- assignee: docs@python components: Documentation files: smtplib-doc.patch keywords: patch nosy: docs@python, scop priority: normal severity: normal status: open title: Fix to_addrs refs in smtplib docs type: enhancement Added file: http://bugs.python.org/file4

[issue27895] Spelling fixes

2016-08-30 Thread Ville Skyttä
Changes by Ville Skyttä : -- assignee: docs@python components: Documentation files: spelling.patch keywords: patch nosy: docs@python, scop priority: normal severity: normal status: open title: Spelling fixes type: enhancement Added file: http://bugs.python.org/file44272/spelling.patch _

[issue27895] Spelling fixes

2016-08-30 Thread Ville Skyttä
Changes by Ville Skyttä : Removed file: http://bugs.python.org/file44272/spelling.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27895] Spelling fixes

2016-08-30 Thread Ville Skyttä
Changes by Ville Skyttä : Added file: http://bugs.python.org/file44273/spelling2.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue27895] Spelling fixes

2016-08-30 Thread Ville Skyttä
Changes by Ville Skyttä : Removed file: http://bugs.python.org/file44273/spelling2.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue27895] Spelling fixes

2016-08-30 Thread Ville Skyttä
Changes by Ville Skyttä : Added file: http://bugs.python.org/file44274/spelling3.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue27896] Allow passing sphinx options to Doc/Makefile

2016-08-30 Thread Julien
New submission from Julien: Context: - Providing french translation to docs.python.rg/fr/: http://bugs.python.org/issue26546 - Simplifying my first proposition of docsbuild-scripts: https://github.com/python/docsbuild-scripts/pull/1 Goals: - Simplify my modifications of docsbuild-scripts

[issue26284] Fix telco benchmark

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: I worked on a new version of the benchmark suite, it is now called performance and moved to GitHub: https://github.com/python/performance In performance 0.1.2, bm_telco.py uses BytesIO for input and six.StringIO for output. The output is just one number per li

[issue11734] Add half-float (16-bit) support to struct module

2016-08-30 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Raymond. I'll do a final pass and aim to apply this in the next couple of days. -- ___ Python tracker ___ _

[issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: This issue was fixed in the new flavor of the benchmark, the new performance project: https://github.com/python/performance -- dependencies: -Fix telco benchmark resolution: -> fixed status: open -> closed ___ Pyth

[issue25423] Deprecate benchmarks that execute too quickly

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: I believe that this issue was indirectly fixed by the issue #26275. The new flavor of the benchmark suite now calibrates (computes the number of outter loop iterations) each benchmark based on time, no more using a fixed number of loop iteartions. Brett: Can

[issue22458] Add fractions benchmark

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: Can you please send a pull request to the new https://github.com/python/performance project? -- nosy: +haypo ___ Python tracker ___ ___

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-08-30 Thread Xiang Zhang
New submission from Xiang Zhang: When supplied a custom string with upper returning a non-string, pysqlite_connection_create_collation will fail assertion and crash. Serhiy, I think we can use the same way in set_isolation_level to avoid this. -- components: Library (Lib) files: create

[issue22881] show median in benchmark results

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: The new https://github.com/python/performance benchmark suite now displays the median rather than the arithmetic mean (average) by default (it also displays the standard deviation). See the perf issue for a discussion about median vs mean: https://github.com/h

[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: The new https://github.com/python/performance benchmark suite has a very different design than the old https://hg.python.org/benchmarks benchmark suite: * it now only runs benchmarks in a virtual environment * dependencies are installed in the venv by pip * the

[issue18899] make pystone.py Py3 compatible in benchmark suite

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: > Oh, pystone... I didn't know we had included that particular horror in the > benchmark suite :-) pystone was removed from the new https://github.com/python/performance benchmark suite. I suggest to close this issue as outdated. -- nosy: +haypo ___

[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2016-08-30 Thread Tomas Orsava
Tomas Orsava added the comment: This problem has already been addressed in issue 27208, and it was fixed by updating the documentation to reflect the new repr(). Therefore, I believe this issue can be closed. -- nosy: +torsava ___ Python tracker

[issue26284] Fix telco benchmark

2016-08-30 Thread STINNER Victor
STINNER Victor added the comment: @Stefan: Can you please check bm_telco.py and maybe propose a pull request if something is wrong? -- ___ Python tracker ___ ___

[issue27898] regexp performance degradation between 2.7.6 and 2.7.12

2016-08-30 Thread Steve Newcomb
New submission from Steve Newcomb: Our most regular-expression-processing-intensive Python 2.7 code takes 2.5x more execution time in 2.7.12 than it did in 2.7.6. I discovered this after upgrading from Ubuntu 14.04 to Ubuntu 16.04. Basically this code runs thousands of compiled regular expre

[issue11734] Add half-float (16-bit) support to struct module

2016-08-30 Thread Mark Dickinson
Mark Dickinson added the comment: There's some NaN behaviour that needs fixing in the packing code: packing a NaN currently creates a signalling NaN rather than a quiet NaN, and the sign of a NaN isn't respected. (One can make a strong argument that the sign of the NaN doesn't matter, but we'r

[issue27895] Spelling fixes

2016-08-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue23591] enum: Add Flags and IntFlags

2016-08-30 Thread Ethan Furman
Ethan Furman added the comment: Patch includes tests, but not docs. >From a previous comment: --- > As it stands, Weird(7) would be , and if A was not > defined an error would be raised. Actually, it would be since BC has a higher value than A. -- stage: -> patch

[issue27898] regexp performance degradation between 2.7.6 and 2.7.12

2016-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: It would be helpful if you could run "hg bisect" with your set-up to isolate the change that causes the problem. Alternatively, make a small set of regular expressions that demonstrate the performance regression. -- nosy: +rhettinger _

[issue2445] Use The CygwinCCompiler Under Cygwin

2016-08-30 Thread David Stanek
Changes by David Stanek : -- nosy: -dstanek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue26359] CPython build options for out-of-the box performance

2016-08-30 Thread Brett Cannon
Brett Cannon added the comment: Just FYI, Alecsandru, I plan on applying your patches this week or next, so if you can just double-check they still apply cleanly that would be great. -- ___ Python tracker

[issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write)

2016-08-30 Thread Israel Fruchter
New submission from Israel Fruchter: Both on python2.7 and python3.4 >>> from xml.etree import cElementTree as ET >>> text = 'its > < & '' >>> root = ET.fromstring(text.encode('utf-8')) >>> ET.tostring(root, method="xml") its > < & ' I would expected to return the same as the input to be a compl

[issue25423] Deprecate benchmarks that execute too quickly

2016-08-30 Thread Brett Cannon
Brett Cannon added the comment: I trust you fixed it. :) -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[issue2445] Use The CygwinCCompiler Under Cygwin

2016-08-30 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue23591] enum: Add Flags and IntFlags

2016-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Ethan] > My experience is that a module maintainer, or somebody claiming to speak > for the module maintainer, can close any issue in their area at any > time regardless of the number of core devs in favor of a change. Ethan, it is still up to you and the o

[issue27898] regexp performance degradation between 2.7.6 and 2.7.12

2016-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: According to your profile results all re functions are 2.5-4 times faster under 2.7.12 than under 2.7.6. May be I misinterpret it? Note that 96-99% of time (2847.099 of 2980.718 seconds under 2.7.6 and 4474.890 of 4519.872 seconds under 2.7.12) is spent in p

[issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write)

2016-08-30 Thread Israel Fruchter
Israel Fruchter added the comment: I've now found http://bugs.python.org/issue2647, and seem like this was classify as not a bug. maybe documetion should say it ? or anther way to actuly decide about how to output those -- ___ Python tracker

[issue27895] Spelling fixes

2016-08-30 Thread Raymond Hettinger
New submission from Raymond Hettinger: Thanks for the patch. Some of these were a bit embarrassing. Removed the Lib/test/decimaltestdata because this is from an external source (not our code) that is periodically refreshed. I had to hand edit some of the changes to test_asyncio because the

[issue27895] Spelling fixes

2016-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 75d6d5d9b674 by Raymond Hettinger in branch 'default': Issue #27895: Spelling fixes (Contributed by Ville Skyttä). https://hg.python.org/cpython/rev/75d6d5d9b674 -- nosy: +python-dev ___ Python tracker

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually making slicing always working is easier than I expected. Maybe it is even easier than raise an error. PySlice_GetIndicesEx() is split on two functions. First convert slice attributes to Py_ssize_t, then scale them to appropriate range depending on t

[issue27895] Spelling fixes

2016-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: FYI, the patch did not apply cleanly to Python 3.5 so this was applied to 3.6 only. If someone feels this is important to them, they are welcome to backport the applicable parts of the patch. -- resolution: -> fixed status: open -> closed ___

[issue27898] regexp performance degradation between 2.7.6 and 2.7.12

2016-08-30 Thread Steve Newcomb
Steve Newcomb added the comment: On 08/30/2016 12:46 PM, Raymond Hettinger wrote: > Raymond Hettinger added the comment: > > It would be helpful if you could run "hg bisect" with your set-up to isolate > the change that causes the problem. I don't think I understand you. There's no difference i

[issue27900] ctypes fails to find ncurses via ncursesw on Arch Linux

2016-08-30 Thread daniel hahler
New submission from daniel hahler: The following code fails on Arch Linux: import ctypes.util print(ctypes.util.find_library("ncurses")) It first looks at "ldconfig -p" (via _findSoname_ldconfig), which only contains: libncursesw.so.6 (libc6,x86-64) => /usr/lib/libncursesw.so.6

[issue23591] enum: Add Flags and IntFlags

2016-08-30 Thread Ethan Furman
Ethan Furman added the comment: Raymond, thanks for your support. I am happy to have a flags variant. The advice to wait and let Enum mature instead of adding the Flag variant at the beginning was sound, and we have a better product to show for it now. The four base Enum-type classes will be

[issue24139] Use sqlite3 extended error codes

2016-08-30 Thread Aviv Palivoda
Aviv Palivoda added the comment: Attached is a patch to enable the extended error codes. This patch should be dependent on issue 16379. Without returning the sqlite error code in the exception the extended error code does not reveal any information not currently available. As you can see in ht

[issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write)

2016-08-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> XML munges apos entity in tag content ___ Python tracker ___

[issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write)

2016-08-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue11734] Add half-float (16-bit) support to struct module

2016-08-30 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch: - Fix NaN packing behaviour. - Expand documentation note on the half-precision format, with links to the wikipedia pages for IEEE 754 and for half-precision. (No direct link to IEEE 754 itself, since it isn't publicly available.) - Use unpack_hal

[issue11734] Add half-float (16-bit) support to struct module

2016-08-30 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: +Python 3.6 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27898] regexp performance degradation between 2.7.6 and 2.7.12

2016-08-30 Thread Steve Newcomb
Steve Newcomb added the comment: On 08/30/2016 01:24 PM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > According to your profile results all re functions are 2.5-4 times faster > under 2.7.12 than under 2.7.6. May be I misinterpret it? I can't explain the profiler's report.

[issue11734] Add half-float (16-bit) support to struct module

2016-08-30 Thread Mark Dickinson
Mark Dickinson added the comment: I missed Antoine's 2015 comments on the test code. Here's one more version of the patch, which addresses those comments. -- Added file: http://bugs.python.org/file44282/cpython-struct-float16-v9.patch ___ Python trac

[issue27889] ctypes interfers with signal handling

2016-08-30 Thread Andre Merzky
Andre Merzky added the comment: I also see the problem on 2.7.11, on MacOS, but with significantly lower frequency. I can't tell if that is due to changes in Python, the different architecture, or whatever... $ python -V Python 2.7.11 $ uname -a Darwin cameo.local 14.4.0 Darwin Kernel Versio

[issue22458] Add fractions benchmark

2016-08-30 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue23591] enum: Add Flags and IntFlags

2016-08-30 Thread Vedran Čačić
Vedran Čačić added the comment: The weirdest thing is that it already works pretty well in output of re.compile. >>> re.compile('', re.I | re.M) re.compile('', re.IGNORECASE|re.MULTILINE) >>> _.flags # re.UNICODE == 32 added automatically 42 So the only thing we should enhance

[issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5

2016-08-30 Thread Anthony Flury
New submission from Anthony Flury: Consider the following code in Python2.7 & Python3.5 import inspect class a(object): def m(self): pass in Python 2.7 inspect.ismethod(a.m) returns True in Python 3.5 inspect.ismethod(a.m) returns False Not

[issue27842] Order CSV header fields

2016-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb3e2a5be31b by Raymond Hettinger in branch 'default': Issue #27842: The csv.DictReader now returns rows of type OrderedDict. https://hg.python.org/cpython/rev/bb3e2a5be31b -- nosy: +python-dev ___ Python

[issue27842] Order CSV header fields

2016-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Steve. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-b

[issue23591] enum: Add Flags and IntFlags

2016-08-30 Thread Ethan Furman
Ethan Furman added the comment: Since we're using re as the sample, here's where re.I is defined: Lib/re.py: - I = IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE # ignore case As already mentioned, re.I results in 2, and a re.compile object is not usable as a re flag. > Also, I suppose

[issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5

2016-08-30 Thread Mark Dickinson
Mark Dickinson added the comment: Note that Python 3 did away with unbound methods: in Python 3, `a.m` is simply a function, so there's little the `inspect` module can do to distinguish it from a regular top-level function. https://docs.python.org/3/whatsnew/3.0.html#operators-and-special-meth

[issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5

2016-08-30 Thread R. David Murray
R. David Murray added the comment: They are both correct. In 2.7 a class method is a method. In python3, a class method is a function. As for the docs, the python3 docs say that it returns true for "a bound method on an object", while the python2 docs say "a bound or unbound method". A clas

[issue27895] Spelling fixes

2016-08-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 89ce78ce1bfa by Raymond Hettinger in branch 'default': Issue #27895: Strengthen the dict reader tests. https://hg.python.org/cpython/rev/89ce78ce1bfa -- ___ Python tracker

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I like this. Very nice. What I understand is that callers that access PySlice_GetIndicesEx via the header file (included with Python.h) will see the function as a macro. When the macro is expanded, the length expression will be evaluated after any __index__

[issue27894] Fix to_addrs refs in smtplib docs

2016-08-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue27842] Order CSV header fields

2016-08-30 Thread Steve Holden
Steve Holden added the comment: A pleasure. Pretty heavily committed at present, but all Python related so maybe there'll be more small positive improvements. -- ___ Python tracker

[issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS

2016-08-30 Thread Jaroslav
New submission from Jaroslav: Setup = profile data from machine - - Win 7 (64bit) - Python 3.5.2 (32bit) data analyzed on - Lubuntu 16.04 (64bit) incl. Python 3 issue - method strip_dirs() cannot extract the base name since it assumes the Unix-

[issue11734] Add half-float (16-bit) support to struct module

2016-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mark probably already knows this, but I found this SO answer to be informative: http://stackoverflow.com/questions/3886988/how-to-distinguish-different-types-of-nan-float-in-python -- ___ Python tracker

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2016-08-30 Thread Miko Ohtamaa
Miko Ohtamaa added the comment: I think there is something more in this. I am running Python 3.5.0 (default, Apr 24 2016, 12:47:36). Sparkpost servers require AUTH LOGIN approach as per their instructions https://support.sparkpost.com/customer/portal/articles/1988470-smtp-connection-problems

[issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5

2016-08-30 Thread Anthony Flury
Anthony Flury added the comment: Not sure I agree with closing this. I am not convinced (as a reasonably seasoned developer) that the documentation is clear. It may not be a bug in the code, resulting as it does from a change in the way methods are implemented in Python 3.5, but I do think tha

[issue22450] urllib doesn't put Accept: */* in the headers

2016-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Update: After more research, I learned that while 'Accept: */*' should not have an effect on the origin webserver, it can and does have an effect on proxy servers. Origin servers are allowed to vary the content-type of responses when given different Accep

[issue27903] Avoid ResourceWarnings from platform._dist_try_harder

2016-08-30 Thread Ville Skyttä
New submission from Ville Skyttä: Use opened files as context managers. -- components: Library (Lib) files: platform-resourcewarning.patch keywords: patch messages: 273969 nosy: scop priority: normal severity: normal status: open title: Avoid ResourceWarnings from platform._dist_try_hard

[issue22450] urllib doesn't put Accept: */* in the headers

2016-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Putting it another way: To an origin server, 'Accept: */*' means it can return anything it wants. To a proxy server, the absence of an accept header means in can return anything it has cached (possibly different from what the origin server would have ret

[issue27904] Let logging format more messages on demand

2016-08-30 Thread Ville Skyttä
New submission from Ville Skyttä: Avoid some string formatting operations on disabled log levels. -- files: logging.patch keywords: patch messages: 273971 nosy: scop priority: normal severity: normal status: open title: Let logging format more messages on demand type: performance Added f

[issue27895] Spelling fixes

2016-08-30 Thread Ville Skyttä
Ville Skyttä added the comment: Right, I noticed the asyncio test breakage as well, that was one of the reasons I attached a couple of versions of the patch. spelling3 was not supposed to contain the breaking changes any more, maybe you worked on an earlier one? Anyway, thanks. -- __

[issue18899] make pystone.py Py3 compatible in benchmark suite

2016-08-30 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS

2016-08-30 Thread R. David Murray
R. David Murray added the comment: We could add to the compatibility paragraph that compatibility with files produced by the same program on a different platform is not guaranteed. For the option, that would be an enhancement, and you should open a new issue for that. -- assignee: ->

[issue27905] Add documentation for typing.Type

2016-08-30 Thread Michael Lee
New submission from Michael Lee: This patch adds some documentation for typing.Type[C]. The content itself is mostly an abbreviated version of the description from PEP 484 -- let me know if the patch is too terse or needs more examples. -- assignee: docs@python components: Documentatio

[issue27893] email.parser.BytesParser.parsebytes docs fix

2016-08-30 Thread Martin Panter
New submission from Martin Panter: Actually it seems the parameter is called *text*: >>> BytesParser().parsebytes(bytes=b"") TypeError: parsebytes() got an unexpected keyword argument 'bytes' >>> BytesParser().parsebytes(text=b"") -- components: +email nosy: +barry, martin.panter, r.da

  1   2   >