[issue34651] Disallow fork in a subinterpreter.

2018-09-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: +1 agreed. this is the simplest approach to start with. Code to restrict: os.fork itself and disallowing the use of preexec_fn on subprocess within subinterpreters. feel free to ignore preexec_fn in subprocess for the time being if desired, we already

[issue6721] Locks in the standard library should be sanitized on fork

2018-09-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 19003841e965bbf56fd06824d6093620c1b66f9e by Gregory P. Smith in branch 'master': bpo-6721: Hold logging locks across fork() (GH-4071) https://github.com/python/cpython/commit/19003841e965bbf56fd06824d60936

[issue34658] subprocess with preexec_fn when fork() fails could corrupt PyErr state

2018-09-13 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +8723 ___ Python tracker <https://bugs.python.org/issue34658> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34658] subprocess with preexec_fn when fork() fails could corrupt PyErr state

2018-09-13 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed versions: -Python 3.6 ___ Python tracker <https://bugs.python.or

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: Given the FreeBSD default and seeming desirability of vfork for this use case, is there a good reason using vfork could not be the default behavior on any OS that supports it? -- ___ Python tracker <ht

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: Give all of this, the lesson I'd take away is perhaps that we should just provide the constant in the os module when available at build time (a configure check) and let people who find a need to use it on their system check for its presence and use

[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

2018-09-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Agreed on not exposing it. It seems obsolete in recent glibc and the older glibc implementations that had it may have made questionable decisions. :) Thanks for chiming in Florian, and thanks Pablo for your detailed investigation

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue34776> ___ ___ Python-bugs-list m

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw, agreed that this should wait for 3.7.2. -- ___ Python tracker <https://bugs.python.org/issue34776> ___ ___ Python-bug

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2018-09-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue29988> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34826] io.BufferedReader crashes in 2.7 on memoryview attribute access

2018-09-27 Thread Gregory P. Smith
New submission from Gregory P. Smith : The following test code segfaults on Python 2.7: ```python import io class X(io.RawIOBase): def readable(self): return True def readinto(self, b): if isinstance(b, memoryview): print(b.format) # XXX boom, crashes here. return 0

[issue15994] memoryview to freed memory can cause segfault

2018-09-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith versions: +Python 3.7, Python 3.8 -Python 3.5 ___ Python tracker <https://bugs.python.org/issue15

[issue34850] Emit a syntax warning for "is" with a literal

2018-09-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: The problem with a SyntaxWarning is that the wrong people will see it. It gets in the way of users of applications that happen to be written in Python. scenarios: (a) A Python interpreter gets upgraded, and suddenly the _users_ of an application start

[issue34850] Emit a syntax warning for "is" with a literal

2018-09-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: If we were to ship a "chaos" mode in the CPython interpreter itself, I assume you envision an interpreter flag and/or env var? If it required someone compiling the interpreter a special way I don't think it would be widely adopted wi

[issue34867] Add mode to disable small integer and interned string caches

2018-10-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: The intent is to use only enable this during testing / continuous integration. -- ___ Python tracker <https://bugs.python.org/issue34

[issue6721] Locks in the standard library should be sanitized on fork

2018-10-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 3b699932e5ac3e76031bbb6d700fbea07492641d by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-6721: Hold logging locks across fork() (GH-4071) (#9291) https://github.com/python/cpyt

[issue35011] Update to expat removed the pyexpatns.h, causing link time symbol conflicts vs other versions in an application

2018-10-17 Thread Gregory P. Smith
New submission from Gregory P. Smith : These lines used to exist in Modules/expat/expat_external.h: /* Namespace external symbols to allow multiple libexpat version to co-exist. */ #include "pyexpatns.h" https://github.com/python/cpython/commit/5dc3f23b5fb0b510926012cb3732dae63cd

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: Not a release blocker as most users probably do not run into this problem, but the pyexpatns.h mechanics should be restored. -- assignee: -> gregory.p.smith components: +Build, Extension Modules nosy: +benjamin.peterson stage: -> needs

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: This appears to not have been shipped in a release yet. It is new in 3.6.7. cc'ing ned daily to see if he wants to include the fix (the PR is trivial, coming ASAP). I don't have a good feel for how this impacts the real world or not. We notic

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +9290 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 9d4712bc8f26bf1d7e626b53ab092fe030bcd68d by Gregory P. Smith in branch 'master': bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939) https://github.com/python/cpython/commit/9d4712bc8f26bf1d7e626b53ab092f

[issue35011] expat: Restore the use of pyexpatns.h to avoid link time conflicts vs other versions

2018-10-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34912] Update overflow checks in resize_buffer

2018-10-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: correct, i don't see an obvious problem in the existing code. -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/is

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI, An example of other fallout from this change - patsy broke and needed this fix: https://github.com/pydata/patsy/commit/4f53bbaf58c0bf1a9bed73fc67c7c6d0aa7f4e20#diff-53c70e68c6dfd4fe9b08427792cb2bd6 -- nosy: +gregory.p.smith

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: some pylint fallout appears to be addressed in https://github.com/PyCQA/pylint/commit/2698cbe56b44df7974de1c3374db8700296c6fad -- ___ Python tracker <https://bugs.python.org/issue33

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset dfba1f67e7f1381ceb7cec8fbcfa37337620a9b0 by Gregory P. Smith (Tal Einat) in branch 'master': bpo-33899: Mention tokenize behavior change in What's New (GH-10073) https://github.com/python

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-10-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith versions: +Python 3.7 ___ Python tracker <https://bugs.python.org/issue33012> ___ ___ Python-bugs-list m

[issue33015] Fix function cast warning in thread_pthread.h

2018-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: I left comments on the github PRs with reasons why, but PR 6008 seems correct. PR 10057 would leave us with undefined behavior. -- ___ Python tracker <https://bugs.python.org/issue33

[issue33015] Fix function cast warning in thread_pthread.h

2018-10-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: This is presumably also present in 3.6 and 2.7 so I've tagged those on the issue, but for this kind of change i'd leave it up to release managers to see if they want to backport something of this nature that late in those release cycles. Obser

[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Gregory P. Smith
New submission from Gregory P. Smith : The behavior change introduced in 3.6.7 and 3.7.1 via https://bugs.python.org/issue33899 has further consequences: ```python >>> tokenize.untokenize(tokenize.generate_tokens(io.StringIO('#').readline)) Traceback (most recent call last)

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue35107 filed to track further fallout from this API change. -- ___ Python tracker <https://bugs.python.org/issue33

[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: Interesting! I have a 3.6.2 sitting around and cannot reproduce that "x=1" behavior. I don't know what the behavior _should_ be. It just feels natural that untokenize should be able to round trip anything tokenize or generate_tokens

[issue35193] Off by one error in peephole call to find_op on case RETURN_VALUE

2018-11-08 Thread Gregory P. Smith
New submission from Gregory P. Smith : An off by one error was introduced to peephole.c by the "off by one error fix" in https://bugs.python.org/issue28517. Clang's memory sanitizer detects it (msan). find_op is ultimately called with h == codelen so it accesses one byte out

[issue28517] Dead code in wordcode

2018-11-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: the off by one error fix here introduced a new off by one error. PR coming, follow https://bugs.python.org/issue35193 for that. -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue28

[issue35193] Off by one error in peephole call to find_op on case RETURN_VALUE

2018-11-08 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +9698 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35193> ___ _

[issue35193] Off by one error in peephole call to find_op on case RETURN_VALUE

2018-11-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 49fa4a9f1ef387e16596f271414c855339eadf09 by Gregory P. Smith in branch 'master': bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418) https://github.com/python/cpython/commit/49fa4a9f1ef387e16596f271414c85

[issue35193] Off by one error in peephole call to find_op on case RETURN_VALUE

2018-11-08 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +9703 ___ Python tracker <https://bugs.python.org/issue35193> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35193] Off by one error in peephole call to find_op on case RETURN_VALUE

2018-11-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 65e1a1fd311943866361fcb288c0df65dadbe092 by Gregory P. Smith in branch '3.6': bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418) (GH-10422) https://github.com/python/cpyt

[issue35193] Off by one error in peephole call to find_op on case RETURN_VALUE

2018-11-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm working on getting a memory-sanitizer buildbot setup. I'm so happy it made finding and debugging this relatively easy. -- resolution: -> fixed stage: patch review -> resolved status

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-11 Thread Gregory P. Smith
New submission from Gregory P. Smith : clang's memory sanitizer (-fsanitize=memory) turns up useful problems in code. I'm working on getting a CPython buildbot running it setup but would like our build to be cleaner to start with before I run that. These are the initial fixes re

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +9746 ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailin

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 1584a0081500d35dc93ff88e5836df35faf3e3e2 by Gregory P. Smith in branch 'master': bpo-35214: Initial clang MemorySanitizer support (GH-10479) https://github.com/python/cpython/commit/1584a0081500d35dc93ff88e5836df

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +9749 ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 5f4d05d83fde05fed0b6554d0beee4f1c1f1d8f1 by Gregory P. Smith in branch '3.7': [3.7] bpo-35214: Initial clang MemorySanitizer support (GH-10479) (GH-10492) https://github.com/python/cpython/commit/5f4d05d83fde05fed0b6554d0beee4

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +9751 ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: it still seems relevant, having better docs is always good. -- ___ Python tracker <https://bugs.python.org/issue25

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 3b5b1c0931cd32253bbf2f3bd74e90ff821e026e by Gregory P. Smith in branch '3.6': [3.6] bpo-35214: Initial clang MemorySanitizer support (GH-10479) (GH-10493) https://github.com/python/cpython/commit/3b5b1c0931cd32253bbf2f3bd74e90

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +9760 ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: yeah, i've been surprised how far i was able to get from an oss CPython tree and pre-built clang 7 binary installation. If you have headers installed for common libraries like libssl-dev and libreadline-dev you can't produce an interpreter th

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +9763 ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: > Can we prefix MEMORY_SANITIZER with _Py_? Yes, I wondered if I should do that. not that I expect anyone would ever define it to mean anything else, but that seems like the right thing to do. https://github.com/python/cpython/pull/10

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 3015fb8ce4d25603434b9b44bb7effb98a481532 by Gregory P. Smith in branch 'master': bpo-35214: Add _Py_ prefix to MEMORY_SANITIZER def. (GH-10503) https://github.com/python/cpython/commit/3015fb8ce4d25603434b9b44bb7eff

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-13 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +9766 ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 746b2d35ea47005054ed774fecaed64fab803d7d by Gregory P. Smith in branch 'master': bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506) https://github.com/python/cpython/commit/746b2d35ea47005054ed774fecaed6

[issue31354] Fixing a bug related to LTO only build

2018-11-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: Is it an actual problem to compile extension modules with -flto? (I realize as an extension module there isn't a huge benefit to the concept unless it happens to have multiple source files or link against a non-shared li

[issue23734] zipimport should not check pyc timestamps against zipped py files

2018-11-13 Thread Gregory P. Smith
Gregory P. Smith added the comment: Correct, this issue was filed before we had the new pyc options (which came out of our September core dev. sprint in 2016 iirc). I'll just close it, the way forward for people using zip files on modern CPython interpreters is to explicitly use th

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-13 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +9789 ___ Python tracker <https://bugs.python.org/issue35214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset b6f4472dc4190e2fd668490d86aeefd2ab0df935 by Gregory P. Smith in branch '2.7': [2.7] bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506) (GH-10538) https://github.com/python/cpyt

[issue31354] Fixing a bug related to LTO only build

2018-11-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- priority: normal -> release blocker ___ Python tracker <https://bugs.python.org/issue31354> ___ ___ Python-bugs-list mai

[issue31354] Fixing a bug related to LTO only build

2018-11-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.6, Python 3.8 ___ Python tracker <https://bugs.python.org/issue31354> ___ ___ Python-bugs-list mailin

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker <https://bugs.python.or

[issue24209] Allow IPv6 bind in http.server

2018-11-18 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.8 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue24209> ___ ___ Python-bugs-list mailin

[issue16114] incorrect path in subprocess.Popen() FileNotFoundError message

2013-06-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: I backported the fix to this in the subprocess32 3.2.5rc1 release I made a week or two ago. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue4199] add shorthand global and nonlocal statements

2013-06-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: Closing and rejecting based on said discussion. http://mail.python.org/pipermail/python-dev/2013-June/127143.html -- nosy: +gregory.p.smith resolution: -> rejected status: open -> closed ___ Python tracker

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

2013-07-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: I was merely refactoring for PEP3137, the original version of all that code prior to 2.7 was in Objects/stringobject.c and long predates me. -- ___ Python tracker <http://bugs.python.org/issue10

[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2013-07-08 Thread David P. Kendal
New submission from David P. Kendal: On python-ideas I proposed the addition of a way to iterate over the graphemes of a string, either as part of the unicodedata library or as a method on the built-in str type. <http://mail.python.org/pipermail/python-ideas/2013-July/021916.html> I pr

[issue13788] os.closerange optimization

2013-07-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: _posixsubprocess already uses the Linux getdent64 syscall when available (though for different reasons: readdir is not safe in that context). http://hg.python.org/cpython/file/3f3cbfd52f94/Modules/_posixsubprocess.c#l227 Probing for procfs at configure time

[issue18408] Fixes crashes found by pyfailmalloc

2013-07-09 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue18408> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18418] Thread.isAlive() sometimes True after fork

2013-07-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: This patch makes sense to me. I've gone over the code and I cannot spot any adverse effects. I was wondering in particular if anything would be surprised to find a non-started thread in _active within the short window where that will be true but no

[issue8998] add crypto routines to stdlib

2013-08-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: The interest is there but nobody is designing or implementing it. Realistically, make a module sporting the proposed API and put it up on pypi and after success there: raise the issue on python-ideas. Read the entire thread here first before designing such

[issue8998] add crypto routines to stdlib

2013-08-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: Python already ships with SSL support so the legal ship might have sailed ages ago if thats what PSF lawyers say. (IANAL) -- resolution: -> later status: open -> closed ___ Python tracker <http://bugs.p

[issue18606] Add statistics module to standard library

2013-08-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: note, http://docs.scipy.org/doc/scipy/reference/stats.html#statistical-functions is a very popular module for statistics in Python. One of the more frequent things I see people include the entire beast of a code base (scipy and numpy) for is the student&#

[issue18739] math.log of a long returns a different value of math.log of an int

2013-08-14 Thread Gregory P. Smith
New submission from Gregory P. Smith: This is a very odd inconsistency in math.log behavior. That said, it is probably only a single bit imprecision at the end of the float result. Still, 10 == 10L so I'd expect math.log of both to give the same result. oss/cpython/2.7:LOAS$ ./python P

[issue18739] math.log of a long returns a different value of math.log of an int

2013-08-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: We found this while refactoring an API to be more consistent about returning longs vs ints in specific cases. This resulted in another unittest that was using math.log for a nicer display of the value by magnitude to fail as the result was slightly

[issue18742] Abstract base class for hashlib

2013-08-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: your patch makes sense to me. -- ___ Python tracker <http://bugs.python.org/issue18742> ___ ___ Python-bugs-list mailin

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I don't see a patch attached, but I do not recall any good reason off the top of my head for preexec_fn to be called as late as it is. Moving it up to be called before the fd closing loop makes sense as a bug fix. All bets are off when it comes to

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2013-08-16 Thread Gregory P. Smith
New submission from Gregory P. Smith: A few times now I've seen people write something that overrides and re-implements the unittest.TestCase run() method, copying most of the implementation but adding one feature: The ability for pdb.post_mortem() to be called after every phase of exec

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks! Backported to subprocess32 in https://code.google.com/p/python-subprocess32/source/detail?r=4ba30d9c64296ea0d2959790ab22d0f1a2678064 -- ___ Python tracker <http://bugs.python.org/issue18

[issue18851] subprocess's Popen closes stdout/stderr filedescriptors used in another thread when Popen errors

2013-08-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: fyi - i am unable to reproduce this when using subprocess32 instead of subprocess. https://pypi.python.org/pypi/subprocess32 That is what i recommend _anyone_ using Python 2.x use instead. Regardless if this was reintroduced in 2.7.5 we need to re-fix it

[issue15507] test_subprocess assumes SIGINT is not being ignored.

2013-08-29 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker <http://bugs.pyt

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - use the changes made in http://bugs.python.org/issue12268 as a guide for how to deal with EINTR properly at the C level. See the _PyIO_trap_eintr() function for example. See also _eintr_retry_call() in Lib/subprocess.py. FWIW, there are times when

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: I wrote too many words. In short: time.sleep()'s behavior should remain as it is today given how it is documented to behave. If you disagree, consider adding an optional interruptable=False parameter so that both behavior options exist. ALL IO call

[issue17276] HMAC: deprecate default hash

2013-08-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: comments added to the review. I don't think a DeprecationWarning should be raised as that'll infuriate users of python programs more than developers who can fix code. -- ___ Python trac

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: That warning is correct, there's a bug in the code. but given this is only a bug when PyMem_MALLOC returns NULL I do not expect this to be an issue for anyone who does not already have issues. Regardless, I'm

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: already fixed, I just manually returned NULL. :) I suppose we could change PyErr_NoMemory's definition in 3.3 to return a "void *" instead of "PyObject *" but I'd rather not. In this case the warning caused me to examine th

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-04-20 Thread Gregory P. Smith
New submission from Gregory P. Smith : telnetlib uses select.select. This limits it to being able to work when file descriptors are still below FD_SETSIZE (often 1024) meaning it can't be used in some large programs today. It should use poll. (it is probably easy to fix this an

[issue1522400] irda socket support

2012-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Your updated patch looks fine to me. I don't see any reason not to commit it and mention it in the release notes. If it has bugs, they can be discovered and fixed later by people with actual relevant hardware an interest. --

[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: I don't have a problem with always compiling them. Distro packagers should see that the stand alone versions are not distributed with their package that has a dependency on openssl as they'll just be a waste of space. But that is up to the dist

[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: regarding the attached patch, rather than changing the test at all, I'd leave it as is. The test as is will do what we want on the buildbots (warning us if they failed to compile when in debug mode). I am not concerned about it testing if they com

[issue14726] Lib/email/*.py use an EMPTYSTRING global instead of ''

2012-05-04 Thread Gregory P. Smith
New submission from Gregory P. Smith : Lib/email/*.py are fond of using EMPTYSTRING = '' and within the code: EMPTYSTRING.join(...) instead of just writing: ''.join(...) They should just do the latter. It'll avoid a name lookup and look less silly t

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: going forward with reinit_locks.diff makes sense. I've added comments to it in the code review link. It is "Patch Set 3" -- ___ Python tracker <http://bugs.py

[issue14853] test_file.py depends on sys.stdin being unseekable

2012-05-18 Thread Gregory P. Smith
New submission from Gregory P. Smith : ./python Lib/test/test_file.py# passes ./python Lib/test/test_file.py , ) not raised == FAIL: testStdin (__main__.PyOtherFileTests

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: Anyone using a preexec function in subprocess has already declared that they like deadlocks so that isn't an issue. :) -- ___ Python tracker <http://bugs.python.org/i

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: threading locks cannot be used to protect things outside of a single process. Any code using them to do that is broken. In your examples you are suggesting a class that wants to do one or more mysql actions within a destructor and worried that the __del__

[issue6721] Locks in python standard library should be sanitized on fork

2012-05-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: We could make any later attempt to acquire or release a lock that was reinitialized while it was held raise an exception. Such exception raising behavior should be conditional at lock construction time; some code (such as logging) never wants to deal with

[issue6721] Locks in python standard library should be sanitized on fork

2012-06-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: subprocess has nothing to do with this bug. subprocess is safe as of Python 3.2 (and the subprocess32 backport for 2.x). Its preexec_fn argument is already documented as an unsafe legacy. If you want to replace subprocess, go ahead, write something new

[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-03 Thread Gregory P. Smith
New submission from Gregory P. Smith : == ERROR: test_exist_ok_existing_directory (__main__.MakedirTests) -- Traceback (most recent call last): File "Lib

[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue14992> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15000] posixsubprocess module broken on x32

2012-06-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: What is x32? -- ___ Python tracker <http://bugs.python.org/issue15000> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    21   22   23   24   25   26   27   28   29   30   >