[issue27364] Deprecate invalid unicode escape sequences

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I am trying out your patch at the moment. There are plenty of test suite failures; I ran the test suite with approximately the following: ./python -bWerror -m test -Wr -j0 -u network -x

[issue27364] Deprecate invalid unicode escape sequences

2016-08-11 Thread Emanuel Barry
Emanuel Barry added the comment: Hmm, that's odd, I recall some of the failures from testing, and thought I fixed them. Some of these are brand new, though, so thanks! I'll run and fix the tests (and modules as well); should likely have a patch by the weekend :) --

[issue16764] Make zlib accept keyword-arguments

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Xiang’s patch looks okay from a correctness point of view -- ___ Python tracker ___

[issue10721] Remove HTTP 0.9 server support

2016-08-11 Thread Martin Panter
Martin Panter added the comment: There are a few small benefits from removing it, but I am not too fussed if we decide to leave it. * If we keep it, should we fix it so that it doesn’t deadlock? Otherwise, we carry around buggy and untested code that claims to be a HTTP 0.9 server but isn’t.

[issue15495] enable type truncation warnings for gcc builds

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Issue 23545 has a patch with some comments from me about adding other warnings via “autoconf foo”, so you could copy from that if you want. The few warnings that I glanced at do not look troublesome. But maybe it is worth working around them to see other

[issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9

2016-08-11 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +Remove HTTP 0.9 server support ___ Python tracker ___

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-11 Thread Rolf Krahl
Rolf Krahl added the comment: Ok, here comes the next version of the patch. I made the changes discussed in the last post and addressed the review comments. Looks like we are converging towards a final version. -- Added file: http://bugs.python.org/file44076/issue12319_11.patch

[issue27502] Python -m Module Vulnerable to Buffer Over Flow.

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: Your "buffer overflow" png shows the regular "414 request-uri too large" traceback. A traceback is not a crash (I wonder if we need an faq for this). -- nosy: +skrah resolution: -> not a bug stage: -> resolved status: open -> closed

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-11 Thread Berker Peksag
Berker Peksag added the comment: Raymond, please stop hijacking issues. This doesn't have anything to do with multiprocessing and there are already four core developers in the nosy list. If you really want to assign it to someone else, please at least wait for a month or ask if they have time

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I am pretty happy with the latest patch. I left one comment. I will try to give it a more thorough review and actually test it out at some point, but I don’t anticipate any major problems. -- ___ Python tracker

[issue27730] Update shutil to work with max file path length on Windows

2016-08-11 Thread Steve Dower
Steve Dower added the comment: I thought I'd tested GetFullPathNameW and seen the limit kick in at 260, but if that's not actually the case (across all platforms we support) then yes, let's use that. When I reread the documentation yesterday it didn't guarantee the result would include the

[issue23545] Turn on extra warnings on GCC

2016-08-11 Thread Martin Panter
Martin Panter added the comment: The proposed options add exactly one warning for me (ignoring warnings from libffi). How would you work around this: ./Include/pymem.h:136:18: warning: comparison is always false due to limited range of data type [-Wtype-limits] ( ((size_t)(n) >

[issue27734] Memory leaks at Python35-32

2016-08-11 Thread Zachary Ware
Zachary Ware added the comment: Please don't remove yourself from the nosy list, we need your input to figure out exactly what may need to be fixed. -- nosy: +Филипп Пономарев ___ Python tracker

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Any news on the remaining failures for year 2037? Yes, the problem was tracked to a bug [1] in zic. If the buildbots get regular updates, the problem will go away with the next tzdata release. Meanwhile, I'll try to figure out a way to suppress the

[issue27737] email.header.Header.encode() crashes with IndexError on spaces only value

2016-08-11 Thread Tim Graham
New submission from Tim Graham: Python 2.7: >>> from email.header import Header >>> Header(' ').encode() '' Python 3.2+ (I didn't check older versions of Python 3): >>> Header(' ').encode() Traceback (most recent call last): File "", line 1, in File

[issue27643] test_ctypes fails on AIX with xlc

2016-08-11 Thread Michael Felt
Michael Felt added the comment: Had some flooding (leaking pipes, rather values) issues to fix. Will look at this asap. On 04-Aug-16 10:58, Martin Panter wrote: > Martin Panter added the comment: > > Okay, so to be clear, I am assuming XLC supports all of the following fields, > and uses

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 05120447f2c6 by Alexander Belopolsky in branch 'default': Issue #24773: Fix and speed-up ZoneInfoCompleteTest. https://hg.python.org/cpython/rev/05120447f2c6 -- ___ Python tracker

[issue21018] [patch] added missing documentation about escaping characters for configparser

2016-08-11 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-11 Thread Michael Felt
Michael Felt added the comment: On 02-Aug-16 15:34, Martin Panter wrote: > Martin Panter added the comment: > > For 2.7, adding the automatic RTLD_MEMBER mode does not seem like a bug fix > to me. Currently, I understand this code could load two separate libraries: > > file =

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Can the size of the tests be reduced, [...]? Yes, the long test walks the zoneinfo tree and runs on every tzfile including the aliases. I am going to change that to parsing the zone.tab file for the list of zone names. This should shorten the time

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-11 Thread REIX Tony
REIX Tony added the comment: With XLC v13 -O2, using -qalias=noansi for building Objects/longobject.o only and not for all the other .o files did fix the 10 more failed tests I see with -O2 compared to -O0 (7-8 failed tests). So, ANSI-aliasing in Objects/longobject.c is the issue. About

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Evelyn Mitchell
Evelyn Mitchell added the comment: Thank you Raymond for a detailed patch update. I will mention that matlab does not support this conversion [1]. R doesn't support engineering notation, either. It may be that this conversion isn't expected to be part of the standard library, and people are

[issue27738] odd behavior in creating list of lambda expressions

2016-08-11 Thread Emanuel Barry
Emanuel Barry added the comment: This is due to the fact that Python evaluates the variable 'n' when the function is called, not when it is created. As such, the variable holds the latest value for all functions, and they exhibit identical behaviour. Workaround: ... f = lambda x, n=n:

[issue27738] odd behavior in creating list of lambda expressions

2016-08-11 Thread John Sahr
New submission from John Sahr: The following produces unexpected behavior. I think that it should produce a list of six different lambda expressions, but after creation, all six lambda expressions produce the same output. It's possible that I'm missing something about Python. # begin

[issue12345] Add math.tau

2016-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: It's okay if Python occasionally shows its lighter side in unexpected places. Think of the delight of future (junior) high schoolers who discover that Python participates in the tau debate. :-) Also, I think this video by Vi Hart should be linked to from

[issue27737] email.header.Header.encode() crashes with IndexError on spaces only value

2016-08-11 Thread SilentGhost
Changes by SilentGhost : -- nosy: +barry, r.david.murray stage: -> needs patch type: -> behavior versions: -Python 3.2, Python 3.3 ___ Python tracker

[issue17153] tarfile extract fails when Unicode in pathname

2016-08-11 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial

2016-08-11 Thread Ben Hoyt
Ben Hoyt added the comment: Removing that whole example sounds good to me, thanks. -- ___ Python tracker ___

[issue27739] add math.sign/signum

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: copysign() is part of the standard C maths library (that is why it was added to the math module). sgn/sign/signum was used in old languages that didn't have copysign() (Basic, Pascal, etc). -- ___ Python tracker

[issue27739] add math.sign/signum

2016-08-11 Thread Ankur Dedania
New submission from Ankur Dedania: Add a new function to the math module sign/signum https://en.wikipedia.org/wiki/Sign_function -- messages: 272459 nosy: AnkurDedania priority: normal severity: normal status: open title: add math.sign/signum type: enhancement versions: Python 3.6

[issue27739] add math.sign/signum

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: sgn(x) is the same as copysign(1.0, x). The math module doesn't support complex numbers and shouldn't. -- ___ Python tracker

[issue12345] Add math.tau

2016-08-11 Thread Tim Peters
Tim Peters added the comment: For those insisting that tau is somehow unnatural, just consider that the volume of a sphere with radius r is 2*tau/3*r**3 - the formula using pi instead is just plain impossible to remember ;-) -- ___ Python tracker

[issue27739] add math.sign/signum

2016-08-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: If this is added, should this signum function be the two value version that returns 1 for zero, or the three value version that returns 0? Should it distinguish between signed zeroes +0.0 and -0.0? What should it do for NANs (raise, return a NAN, copy the

[issue27739] add math.sign/signum

2016-08-11 Thread Ankur Dedania
Ankur Dedania added the comment: sign/signum isn't the same as copysign, and doesn't support complex numbers -- ___ Python tracker ___

[issue12345] Add math.tau

2016-08-11 Thread Vedran Čačić
Vedran Čačić added the comment: Guido once again shows he is not a mathematicians (honestly, most of the "arguments" for tau are plain nonsense), but he is a fantastic popularizer. I (and most of the other professional mathematicians) will love Python a tiny bit less, but a horde of people

[issue27739] add math.sign/signum

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See math.copysign(). https://docs.python.org/3/library/math.html#math.copysign -- nosy: +serhiy.storchaka ___ Python tracker

[issue12345] Add math.tau

2016-08-11 Thread Evelyn Mitchell
Changes by Evelyn Mitchell : -- nosy: -Evelyn Mitchell ___ Python tracker ___ ___

[issue12345] Add math.tau

2016-08-11 Thread Aaron Meurer
Changes by Aaron Meurer : -- nosy: +Aaron.Meurer ___ Python tracker ___ ___

[issue12345] Add math.tau

2016-08-11 Thread Aaron Meurer
Aaron Meurer added the comment: If this is implemented, it would be (as far as I can tell) the only thing in the math module that isn't also implemented in any of the standard external math libraries. None of numpy, scipy, sympy, or mpmath implement tau (if I'm missing one that others think

[issue27741] datetime.datetime.strptime functionality description incorrect

2016-08-11 Thread Nicholas Colclasure
New submission from Nicholas Colclasure: The datetime.datetime.strptime documentation states that it is equivalent to datetime(*(time.strptime(date_string, format)[0:6])), but the time.struct_time returned by time.strptime does not include microseconds, implying that datetime's strptime would

[issue11566] hypot define in pyconfig.h clashes with g++'s cmath

2016-08-11 Thread Kay Hayen
Kay Hayen added the comment: This also affects Python2.7.12 on Windows with latest MinGW. I think something similar needs to be added for GCC version check: /* VS 2010 and above already defines hypot as _hypot */ #if _MSC_VER < 1600 #define hypot _hypot #endif Not sure which gcc version first

[issue12345] Add math.tau

2016-08-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 11/08/2016 20:07, Tim Peters a écrit : > > For those insisting that tau is somehow unnatural, just consider > that the volume of a sphere with radius r is 2*tau/3*r**3 - the formula using > pi instead is just plain impossible to remember ;-) Thank you, I'm

[issue12345] Add math.tau

2016-08-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch needs a documentation update, by the way. -- ___ Python tracker ___

[issue12345] Add math.tau

2016-08-11 Thread Aaron Meurer
Aaron Meurer added the comment: I also wonder, if math will be gaining constants that no one uses like tau, if it will also gain constants that people actually do use (currently math just has pi, e, inf, and nan). [i for i in dir(numpy) if isinstance(getattr(numpy, i), float)] reveals

[issue12345] Add math.tau

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: Aaron, I may be wrong, but I understood this to be something like: >>> from __future__ import barry_as_FLUFL >>> 3 <> 10 True I *do* hope sympy supports that! :-) -- nosy: +skrah ___ Python tracker

[issue27128] Add _PyObject_FastCall()

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Do you suggest to not add these 2 new functions? Yes, I suggest to not add them. The API for calling is already too large. Internally we can directly use _PyObject_FastCall(), and third party code should get benefit from optimized

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-11 Thread Xiang Zhang
New submission from Xiang Zhang: I think the doc of Py_CompileStringExFlags has two flaws: 1. Py_CompileStringExFlags should be replaced by Py_CompileStringObject from the context. Py_CompileStringExFlags in the context is meaningless. 2. *filename* is a byte string that should be decoded but

[issue27739] add math.sign/signum

2016-08-11 Thread R. David Murray
R. David Murray added the comment: This has been previously discussed and rejected, in issue 829370. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> math.signum(int) ___ Python tracker

[issue12345] Add math.tau

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general, the volume, in n-dimensional Euclidean space, of the unit n-ball, is given by V_n = pi**(n/2) / gamma(n/2+1) or V_n = (tau/2)**(n/2) / gamma(n/2+1) -- ___ Python tracker

[issue16764] Make zlib accept keyword-arguments

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Xiang Zhang, could you please provide results of benchmarking zlib.decompress and decompressobj.decompress in simplest case with and without the patch? PyArg_ParseTupleAndKeywords can be slower than PyArg_ParseTuple even for positional arguments, and we

[issue12345] Add math.tau

2016-08-11 Thread Emanuel Barry
Emanuel Barry added the comment: I think that whether or not something is trivial doesn't really correlate to whether or not it has its place in the language. After all, `math.pi` is 3.1416, and most people using pi will not worry about more than 4 decimal digits. Those who do are presumably

[issue23545] Turn on extra warnings on GCC

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just add -Wno-type-limits. -- ___ Python tracker ___ ___ Python-bugs-list

[issue12345] Add math.tau

2016-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: Let those other libraries follow. -- ___ Python tracker ___ ___

[issue27506] make bytes/bytearray delete a keyword argument

2016-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyArg_ParseTupleAndKeywords can be slower than PyArg_ParseTuple even for positional arguments. We need benchmarking results (especially after committing a patch for issue27574). What is the purpose of adding support of the delete argument as keyword

[issue12345] Add math.tau

2016-08-11 Thread Aaron Meurer
Aaron Meurer added the comment: Emanuel Barry, that is both untrue and irrelevant (sorry to be blunt, but that's a total straw man on my and I believe other's argument). The fact that the only mathematical constants in math are pi and e (nan and inf aren't really "mathematical" constants)

[issue25825] AIX shared library extension modules installation broken

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Patch1 looks fine to me, though I will have to rely on you people to verify that it does what it’s supposed to. Do you want me to commit it straight away, or wait for your follow-up patch? -- ___ Python tracker

[issue16764] Make zlib accept keyword-arguments

2016-08-11 Thread Xiang Zhang
Xiang Zhang added the comment: OK. Simplest test with positional arguments. Without patch: ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz")' 'zlib.decompress(a, 15, 16384)' 100 loops, best of 3: 0.841 usec per loop ./python -m timeit -s 'import zlib; a

[issue27614] Race in test_docxmlrpc.py

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Thanks for the explanation. It seems a bit strange that the server thread was running so slow while the main thread did one thousand polls over at least one second. Perhaps there is a blocking DNS call hidden somewhere in it somewhere? In any case, I am pretty

[issue12345] Add math.tau

2016-08-11 Thread Lisa Roach
Lisa Roach added the comment: I've updated the test to assert tau is equal to 2*math.pi, as well as updated the docs and cmath. Let me know if I have made any errors! -- nosy: +lisroach Added file: http://bugs.python.org/file44080/tau3.diff ___

[issue27181] Add geometric mean to `statistics` module

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Tests fail on a Power PC buildbot: http://buildbot.python.org/all/builders/PPC64LE%20Fedora%203.x/builds/1476/steps/test/logs/stdio == FAIL: testExactPowers (test.test_statistics.Test_Nth_Root)

[issue27506] make bytes/bytearray delete a keyword argument

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I agree it would be worth checking for a slowdown. As well as giving the option of omitting the table argument, it would make call sites easier to read. It would avoid suggesting that the first argument is translated to the second, like maketrans(). data =

[issue12345] Add math.tau

2016-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW I don't plan to have more constants there, at the current rate we'll be fine for centuries. :-) What worries me more is proposals to add Python functions to math... --Guido (mobile) -- ___ Python tracker

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-11 Thread Martin Panter
Martin Panter added the comment: Both parts of your commit seem to have helped. However I found two failures still happening, and one new failure: 1. Casablanca and El_Aaiun still failing since the original commit:

[issue23545] Turn on extra warnings on GCC

2016-08-11 Thread Martin Panter
Martin Panter added the comment: I didn’t look too closely, but I did see that _ssl_locks_count is unsigned int. I was compiling for x86-64 Linux, where int is 32 bits and size_t is 64. So maybe GCC was optimizing the (size_t) cast away, and then rightfully warning that the largest unsigned

[issue23545] Turn on extra warnings on GCC

2016-08-11 Thread Antti Haapala
Antti Haapala added the comment: I don't think adding -Wno-type-limits is a good idea. The good question is how that can be happening, e.g. how PY_SSIZE_T_MAX divided by sizeof anything can be *more* than max(size_t)? E.g now that I stare at the code, *that* warning should be impossible if

[issue26081] Implement asyncio Future in C to improve performance

2016-08-11 Thread INADA Naoki
INADA Naoki added the comment: Implemented FutureIter -- Added file: http://bugs.python.org/file44081/futures.patch ___ Python tracker ___

[issue27584] New addition of vSockets to the python socket module

2016-08-11 Thread Kushal Das
Kushal Das added the comment: The patch can be applied, and build successfully. I have ran the current test suite[1]. The two failed tests do not seem to be have anything to do with this patch (read the end of the consoleText output). I think the thing remaining is the new test cases, and

[issue27721] distutils strtobool returns 0 and 1 rather than False and True

2016-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Joseph, I concur that with Ned that we're best off leaving this alone (risk of breaking doctests with the changing repr, risk of fooling an overly specific type test, etc). The code is not incorrect and does correspond with its docstring which

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Evelyn. I've refined this a bit to incorporate the more precise wording in the decimal arithmetic specification (see http://speleotrove.com/decimal/daconvs.html ). Also added the missing doctests and synced-up the wording between the docstrings

[issue27730] Update shutil to work with max file path length on Windows

2016-08-11 Thread Eryk Sun
Eryk Sun added the comment: Standard users have SeChangeNotifyPrivilege, which allows traversing a directory that they can't access, so Python should only work with paths as strings instead of trying to open a directory handle. I think it's best to make Windows do as much of the

[issue16764] Make zlib accept keyword-arguments

2016-08-11 Thread Xiang Zhang
Xiang Zhang added the comment: I agree with Martin and suggest make the following changes: 1. Make wbits and bufsize of zlib.decompress keyword arguments. 2. Make max_length of decompressobj.decompress keyword argument. I'd prefer others to stay position-only as now. Attach a patch doing the

[issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial

2016-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for noticing this. It looks like this particular example is now pointless and should be removed. The subsequent examples do a much better job of showing typical practices. -- nosy: +rhettinger Added file:

[issue27721] distutils strtobool returns 0 and 1 rather than False and True

2016-08-11 Thread SilentGhost
Changes by SilentGhost : -- resolution: not a bug -> wont fix stage: patch review -> resolved ___ Python tracker ___

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-11 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. Mind to merge? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Davin, would you like to finish this one (NEWS and ACKS entries) and get it committed? -- assignee: -> davin nosy: +rhettinger ___ Python tracker

[issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial

2016-08-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___

[issue10721] Remove HTTP 0.9 server support

2016-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is so very little code in support of HTTP/0.9 that I don't think we get any benefit from removing it. So why bother with the churn? It is cleaner to just leave it place. -- nosy: +rhettinger ___ Python

[issue27735] 'module' object has no attribute 'SIGALRM' - singal module

2016-08-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: The documentation for the "SIG*" constants says: """ Note that not all systems define the same set of signal names; only those names defined by the system are defined by this module. """ -- nosy: +ronaldoussoren

[issue27729] Provide a better error message when the file path is too long on Windows

2016-08-11 Thread Eryk Sun
Eryk Sun added the comment: The NT runtime API RtlDosPathNameToRelativeNtPathName_U_WithStatus returns an informative error code, STATUS_NAME_TOO_LONG (0xC106). This gets translated to the less information but still useful Windows code ERROR_PATH_NOT_FOUND (0x0003). The CRT error table

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-08-11 Thread Antti Haapala
Antti Haapala added the comment: Ok, after reading the "spec" it seems that the engineering exponent is indeed printed for positive exponents *if* the precision of the number is less than the digits of the exponent, which I didn't realize that I should be testing. However the *precision* of

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-11 Thread REIX Tony
REIX Tony added the comment: Thanks a lot Stefan, that should completely explain my issues. -fno-strict-aliasing -fwrapv for gcc So, that means that you would get better performance if you applied on Python v2.7 what Python v3.5 did about Py_SIZE(x) . However, there are probably other places

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Antti Haapala
Antti Haapala added the comment: @Stefan after reading the bad standard I agree that it follows the standard, as unfortunate as it is. However, that part is then also wrong in Raymond's documentation patch. It should be something like: the exponent is adjusted to a multiple of 3 if *any*

[issue27574] Faster parsing keyword arguments

2016-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Normally, LGTM is an almost useless comment, but the patch does in fact look good to me. I like how compact and straight-forward the changes are to the individual parsing calls. -- nosy: +rhettinger ___ Python

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-08-11 Thread Antti Haapala
Antti Haapala added the comment: Indeed engineering notation is now utterly broken, the engineering notation is not printed for pretty much _any *engineering* numbers at all_ in 3.6. Engineering numbers mean numbers that could be met in an *engineering* context, not cosmological! --

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: @Antti Please think before you write and stop making unfounded allegations. -- ___ Python tracker ___

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-11 Thread Nofar Schnider
Nofar Schnider added the comment: On it! -- nosy: +Nofar Schnider ___ Python tracker ___ ___ Python-bugs-list

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-11 Thread REIX Tony
REIX Tony added the comment: Hi Raymond I've got several email exchanges with the IBM XLC expert. From his own study of my issue, his conclusion is that this kind of Python v2 coding is not ANSI-aliasing safe. It seems that there is a standard that requires C code to NOT do some kinds of

[issue27735] 'module' object has no attribute 'SIGALRM' - singal module

2016-08-11 Thread Ram Vallury
New submission from Ram Vallury: 'module' object has no attribute 'SIGALRM' SIGALRM is not identified in windows, python 2.7. There is no explicit mention of this in documentation as well. === $ python Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: In 2.7 we use -fno-strict-aliasing and -fwrapv for gcc. I think it is probably required to use the equivalent options for xlc. These are examples of things that have been cleaned up in 3.x. 2.7 actually relies on these options. --

[issue12345] Add math.tau

2016-08-11 Thread Nofar Schnider
Nofar Schnider added the comment: I agree with Raymond. In my opinion, it doesn't seem like there is a need to add such a constant. I know many of my previous and current colleagues would not use it (why should them if they can just write "2 * math.pi" ?) It seems that the efforts to spread the

[issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults

2016-08-11 Thread Simon McVittie
Simon McVittie added the comment: This might be a duplicate of https://bugs.python.org/issue24853 but there wasn't enough detail on that bug for me to be sure. -- ___ Python tracker

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Antti Haapala
Antti Haapala added the comment: Raymond: your doc patch is not quite right. Decimal('123e1') is converted to Decimal('1.23e3') internally already; so that str(d) will print 1.23e3, scientific notation of that number is '1.23e3' and engineering notation is '1.23e3', thus not a good example. A

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-11 Thread Rolf Krahl
Rolf Krahl added the comment: Martin, > _is_textIO(): I’m sorry but I still prefer the TextIOBase check over > read(0). Each option has a disadvantage, but with TextIOBase, the > disadvantage only affects text files, not byte files. Ok, this is a valid argument. > Maybe another option is to

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm not clear on how non-use of the macro is causing your observed failures or whether that is due to a compiler bug. That said, I don't see any downside to using Py_SIZE everywhere it is applicable. -- ___

[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: @Antti The behavior follows this standard: http://speleotrove.com/decimal/decarith.html Nothing we can do about it even if we wanted to. -- ___ Python tracker

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +loewis, tim.peters ___ Python tracker ___

[issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults

2016-08-11 Thread Simon McVittie
New submission from Simon McVittie: dbus-python has a regression test for https://bugs.freedesktop.org/show_bug.cgi?id=23831 which repeatedly initializes the interpreter, imports dbus and finalizes the interpreter. This test passes in Python up to 3.5, but is failing under Python 3.6 nightly

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2016-08-11 Thread Simon McVittie
Simon McVittie added the comment: http://bugs.python.org/issue27736 might be related, or even a duplicate of this. -- nosy: +smcv ___ Python tracker ___

[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: On Thu, Aug 11, 2016 at 09:17:10AM +, Antti Haapala wrote: > However the *precision* of decimals is meaningless anyhow. Add a very > precisely measured '0e0' to any number and the sum also has exponent of 0, > and is thus never displayed in exponential

[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-11 Thread Stefan Krah
Stefan Krah added the comment: On Thu, Aug 11, 2016 at 09:29:44AM +, REIX Tony wrote: > -fno-strict-aliasing -fwrapv for gcc > > So, that means that you would get better performance if you applied on Python > v2.7 what Python v3.5 did about Py_SIZE(x) . > However, there are probably other

  1   2   >