[issue13703] Hash collision security issue

2012-01-21 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-21 at 22:20 +, Antoine Pitrou wrote: > Sounds a bit overkill, and it shouldn't be a public API (which > __methods__ are). Even a private API on dicts would quickly become > visible, since dicts are so pervasive. Fair enough. &

[issue13703] Hash collision security issue

2012-01-21 Thread Dave Malcolm
Dave Malcolm added the comment: 5 more characters: PYTHONHASHTABLEPROTECTION or PYHASHTABLEPROTECTION maybe? I'm in *both* camps: I like hash seed randomization fwiw. I'm nervous about enabling either of the approaches by default, but I can see myself backporting both approaches i

[issue13703] Hash collision security issue

2012-01-22 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-21 at 23:47 +, Alex Gaynor wrote: > Alex Gaynor added the comment: > > On Sat, Jan 21, 2012 at 5:42 PM, Gregory P. Smith > wrote: > > > > > Gregory P. Smith added the comment: > > > > On Sat,

[issue13703] Hash collision security issue

2012-01-22 Thread Dave Malcolm
Dave Malcolm added the comment: I arbitrarily started with 50, and then decided a power of two would be quicker when multiplying. There wasn't any rigorous analysis behind the choice of factor. Though, as noted in msg151796, I've gone off this idea, since I think the "prot

[issue13703] Hash collision security issue

2012-01-23 Thread Dave Malcolm
Dave Malcolm added the comment: I'm attaching an attempt at backporting haypo's random-8.patch to 2.7 Changes relative to random-8.patch: * The randomization is off by default, and must be enabled by setting a new environment variable PYTHONHASHRANDOMIZATION to a non-em

[issue13851] Packaging distutils2 for Fedora

2012-01-24 Thread Dave Malcolm
Dave Malcolm added the comment: Hi Vikash - thanks for working on this. It's normal when packaging code "downstream" for Fedora to file a package review request at bugzilla.redhat.com, following the process here: http://fedoraproject.org/wiki/Package_Review_Process (sorry

[issue13703] Hash collision security issue

2012-01-25 Thread Dave Malcolm
Dave Malcolm added the comment: I'm attaching a patch which implements a hybrid approach: hybrid-approach-dmalcolm-2012-01-25-001.patch This is a blend of various approaches from the discussion, taking aspects of both hash randomization *and* collision-counting. It incorporates code

[issue13703] Hash collision security issue

2012-01-25 Thread Dave Malcolm
Dave Malcolm added the comment: I've found a bug in my patch; insertdict writes the old non-randomized hash value into me_hash at: ep->me_hash = hash; rather than using the randomized hash, leading to issues when tested against a real attack. I'm looking i

[issue13703] Hash collision security issue

2012-01-25 Thread Dave Malcolm
Dave Malcolm added the comment: On Wed, 2012-01-25 at 18:05 +, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > > I'm attaching a revised version of the patch that should fix the above > > issue: > > hybrid-approach-dmalcolm-2012-01-25-002.

[issue13703] Hash collision security issue

2012-01-25 Thread Dave Malcolm
Dave Malcolm added the comment: I think you're right: it will stop matching it during lookup within such a dict, since the dict will be using the secondary hash for "abc", but hash() for the C instance. It will still match outside of the dict, and within other dicts. So yes,

[issue13703] Hash collision security issue

2012-01-26 Thread Dave Malcolm
Dave Malcolm added the comment: On Thu, 2012-01-26 at 21:04 +, Alex Gaynor wrote: > Alex Gaynor added the comment: > > On Thu, Jan 26, 2012 at 4:00 PM, Martin v. Löwis > wrote: > > > > > Martin v. Löwis added the comment: > > > > I'd like to

[issue13703] Hash collision security issue

2012-01-27 Thread Dave Malcolm
Dave Malcolm added the comment: On Fri, 2012-01-27 at 21:02 +, Martin v. Löwis wrote: > Martin v. Löwis added the comment: > > > But then isn't it vulnerable to Frank's first attack as exposed in > > http://mail.python.org/pipermail/python-dev/2012-January/11

[issue13703] Hash collision security issue

2012-01-27 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-28 at 03:03 +, Benjamin Peterson wrote: > Benjamin Peterson added the comment: > > For the record, Barry and I agreed on what we'll be doing for stable releases > [1]. David says he should have a patch soon. > > [1]

[issue13703] Hash collision security issue

2012-01-28 Thread Dave Malcolm
Dave Malcolm added the comment: This turns out to pass without PYTHONHASHRANDOMIZATION in the environment, and fail intermittently with it. Note that "make test" invokes the built python with "-E", so that it ignores the setting of PYTHONHASHRANDOMIZATION in the environme

[issue13703] Hash collision security issue

2012-01-28 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-28 at 20:05 +, Benjamin Peterson wrote: > Benjamin Peterson added the comment: > > I think we don't need to mess with tests in 2.6/3.1, but everything should > pass under 2.7 and 3.2. New version of the patch for

[issue13703] Hash collision security issue

2012-01-28 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-28 at 23:56 +, Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > > I think you should check with randomization enabled, if only to see the > > nature of the failures and if they are expected. > > In

[issue13703] Hash collision security issue

2012-01-29 Thread Dave Malcolm
Dave Malcolm added the comment: On Sun, 2012-01-29 at 00:06 +, Dave Malcolm wrote: I went ahead and added the flag to sys.flags, so now $ make test TESTPYTHONOPTS=-R shows: Testing with flags: sys.flags(debug=0, division_warning=0, inspect=0, interactive=0, optimize=0

[issue13703] Hash collision security issue

2012-01-29 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-28 at 23:56 +, Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > > I think you should check with randomization enabled, if only to see the > > nature of the failures and if they are expected. > > In

[issue13703] Hash collision security issue

2012-01-30 Thread Dave Malcolm
Dave Malcolm added the comment: It's useful for the selftests, so I've kept PYTHONHASHSEED. However, I've removed it from the man page; the only other place it's mentioned (in Doc/using/cmdline.rst) I now explicitly say that it exists just to serve the interpreter&

[issue13703] Hash collision security issue

2012-01-30 Thread Dave Malcolm
Dave Malcolm added the comment: I slightly messed up the test_hash.py changes. Revised patch attached: optin-hash-randomization-for-3.1-dmalcolm-2012-01-30-002.patch -- Added file: http://bugs.python.org/file24371/optin-hash-randomization-for-3.1-dmalcolm-2012-01-30-002.patch

[issue13703] Hash collision security issue

2012-01-30 Thread Dave Malcolm
Dave Malcolm added the comment: Am attaching a backport of optin-hash-randomization-for-3.1-dmalcolm-2012-01-30-002.patch to 2.6 Randomization covers the str, unicode and buffer types; equality of hashes is preserved for these types. -- Added file: http://bugs.python.org/file24375

[issue13925] making assignments to an empty two dimensional list

2012-02-01 Thread Dave E
New submission from Dave E : I might be missing something, but I am expecting the following code to print out a list of lists with each internal list holding one number[0-4], but instead the internal lists are a copy of the list "count". #!/usr/bin/python count = range(4) twoDim

[issue13703] Hash collision security issue

2012-02-06 Thread Dave Malcolm
Dave Malcolm added the comment: On Mon, 2012-02-06 at 10:20 +, Marc-Andre Lemburg wrote: > Marc-Andre Lemburg added the comment: > > STINNER Victor wrote: > > > > STINNER Victor added the comment: > > > >> In a security fix release, we shouldn't

[issue13703] Hash collision security issue

2012-02-06 Thread Dave Malcolm
Dave Malcolm added the comment: > Can't randomization just be applied to integers as well? > It could, but see http://bugs.python.org/issue13703#msg151847 Would my patches be more or less likely to get reviewed with vs without an extension of randomization

[issue13703] Hash collision security issue

2012-02-07 Thread Dave Malcolm
Dave Malcolm added the comment: On Mon, 2012-02-06 at 23:00 +, Marc-Andre Lemburg wrote: > Marc-Andre Lemburg added the comment: > > Alex Gaynor wrote: > > There's no need to cover any container types, because if their constituent > > types are securely hashable

[issue13963] dev guide has no mention of mechanics of patch review

2012-02-07 Thread Dave Malcolm
New submission from Dave Malcolm : I've been waiting for patch review of my work on http://bugs.python.org/issue13703 only to discover that people *have* been reviewing it. It turns out that next to some of the patches in the issue tracker there's a "review" link, wh

[issue13703] Hash collision security issue

2012-02-11 Thread Dave Malcolm
Dave Malcolm added the comment: I'm not quite sure how that would interact with the -R command-line option for enabling randomization. The changes to the docs in the latest patch clarifies the meaning of what I've implemented (I hope). My view is that we should simply e

[issue14001] Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request

2012-02-13 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker <http://bugs.python.org/issue14001> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14066] Crash in imputil.imp.find_module when a *directory* exists with the given name due to double-close of FILE*

2012-02-20 Thread Dave Malcolm
New submission from Dave Malcolm : $ mkdir some_directory_ending_with_a.py $ python -c "import imputil; imputil.imp.find_module('some_directory_ending_with_a')" *** glibc detected *** python: double free or corruption (!prev): 0x01589bf0 *** Aborted What

[issue14066] Crash in imputil.imp.find_module when a *directory* exists with the given name due to double-close of FILE*

2012-02-20 Thread Dave Malcolm
Dave Malcolm added the comment: Duplicate of issue 7732 -- resolution: -> duplicate status: open -> closed superseder: -> imp.find_module crashes Python if there exists a directory named "__init__.py" ___ Python tracker <

[issue13405] Add DTrace probes

2012-02-20 Thread Dave Malcolm
Dave Malcolm added the comment: jcea: BTW, will you be at PyCon US this year? if so, can we sprint on getting the DTrace and SystemTap hooks into CPython in some form acceptable to the rest of the CPython maintainers? -- ___ Python tracker <h

[issue14103] argparser should create a bash_completion script for me.

2012-02-23 Thread Dave Malcolm
Changes by Dave Malcolm : -- components: +Library (Lib) type: -> enhancement ___ Python tracker <http://bugs.python.org/issue14103> ___ ___ Python-bugs-lis

[issue14234] CVE-2012-0876 (hash table collisions CPU usage DoS) for embedded copy of expat

2012-03-08 Thread Dave Malcolm
New submission from Dave Malcolm : Expat 2.1.0 Beta was recently announced: http://mail.libexpat.org/pipermail/expat-discuss/2012-March/002768.html which contains (among other things) a fix for a hash-collision denial-of-service attack (CVE-2012-0876) I'm attaching a patch which mini

[issue14234] CVE-2012-0876 (hash table collisions CPU usage DoS) for embedded copy of expat

2012-03-08 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue14234> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-09 Thread Dave Burton
Dave Burton added the comment: This is a patch for the os.path.realpath() bug under Windows, http://bugs.python.org/issue9949 "os.path.realpath on Windows does not follow symbolic links" ntpath.diff fixes the realpath() function to resolve symbolic links to their targets (te

[issue14243] NamedTemporaryFile usability request

2012-03-09 Thread Dave Abrahams
New submission from Dave Abrahams : NamedTemporaryFile is too hard to use portably when you need to open the file by name after writing it. To do that, you need to close the file first (on Windows), which means you have to pass delete=False, which in turn means that you get no help in

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Dave Abrahams
Dave Abrahams added the comment: I disagree that it's unacceptable for close() and __del__() to behave differently. The acceptable difference would be that __del__() closes (if necessary) /and/ deletes the file on disk, while close() merely closes the file. If you can in fact "

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Dave Burton
Dave Burton added the comment: It seems that the nt module is implemented in the posixmodule.c source file, and the Python 3 version contains the posix__getfinalpathname entry point, but the Python 2 version does not. I presume that PyWin32 could also be used to work around this. Too bad it

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-10 Thread Dave Abrahams
Dave Abrahams added the comment: If file.close() "offers deterministic resource management," then you have to consider the file's open/closed state to be a resource separate from its existence. A NamedTemporaryFile whose close() deterministically managed the open/closed st

[issue9949] os.path.realpath on Windows does not follow symbolic links

2012-03-10 Thread Dave Burton
Dave Burton added the comment: Excellent! The ntpath.py change is nearly identical in Python 2.7 to the change for Python 3.2. The only difference is that instead of: +elif isinstance(path, bytes): +path = os.getcwdb() It is: +elif isinstance(path, unicode

[issue14252] subprocess.Popen.terminate() inconsistent behavior on Windows

2012-03-11 Thread Dave Abrahams
New submission from Dave Abrahams : Try the following script on posix and Windows. On Posix: launched . . . exiting killed on Windows: launched . . . exiting Traceback (most recent call last): File "sp.py", line 16, in p.terminate() File "c:\Python26\lib\subprocess.py

[issue14252] subprocess.Popen.terminate() inconsistent behavior on Windows

2012-03-11 Thread Dave Abrahams
Dave Abrahams added the comment: By the way, the suggested fix would be for terminate() to return a value indicating if the process were already terminated, and not throw an exception in that case. For a user to handle the issue correctly on Windows is rather a nasty project involving a

[issue14243] NamedTemporaryFile unusable under Windows

2012-03-12 Thread Dave Abrahams
Dave Abrahams added the comment: Nick, not to belabor this, but I guess you don't understand the use-case in question very well, or you'd see that delete=False doesn't cover it. The use case is this: I have to write a test for a function that takes a filename as a paramete

[issue13963] dev guide has no mention of mechanics of patch review

2012-03-13 Thread Dave Malcolm
Dave Malcolm added the comment: Some notes from discussion with MvL at PyCon sprint: The ideal is that: - for any patch attached to an issue: the patch is uploaded to a Rietveld instance colocated in the same db as Roundup (bugs.python.org) - if it works, than a "review" link

[issue13963] dev guide has no mention of mechanics of patch review

2012-03-13 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue13963> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13963] dev guide has no mention of mechanics of patch review

2012-03-13 Thread Dave Malcolm
Dave Malcolm added the comment: It would appear that having: [diff] git = on in ~/.hgrc breaks the rietveld integration, since "hg diff" then emits a diff that doesn't identify the hg revision number, and hence the importer can't de

[issue14367] try/except block in ismethoddescriptor() in inspect.py, so that pydoc works with pygame in Python 3.2

2012-03-18 Thread Dave Burton
New submission from Dave Burton : I noticed that pydoc doesn't work for pygame under python 3.2.1 or 3.2.2 for Win32; it just reports: NotImplementedError: scrap module not available (ImportError: No module named scrap) I made a small patch to inspect.py to solve the problem (I just ad

[issue14367] try/except block in ismethoddescriptor() in inspect.py, so that pydoc works with pygame in Python 3.2

2012-03-19 Thread Dave Burton
Dave Burton added the comment: "expect?" Did I type that?? Should be "try/except," of course. -- ___ Python tracker <http://bugs.python.org/issue14367> ___

[issue14367] try/except block in ismethoddescriptor() in inspect.py, so that pydoc works with pygame in Python 3.2

2012-03-22 Thread Dave Burton
Dave Burton added the comment: Well, the exception is NotImplementedError. It's raised explicitly in pygame\__init__.py I uncommented my commented-out print statement in inspect.py, and added a traceback print, and ran pydoc like this: c:\python32\python.exe c:\python32\Lib\pydoc.

[issue14444] Virtualenv not portable from Python 2.7.2 to 2.7.3 (os.urandom missing)

2012-03-29 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker <http://bugs.python.org/issue1> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9960] test_structmembers fails on s390x (bigendian 64-bit): int/Py_ssize_t issue

2012-04-12 Thread Dave Malcolm
Dave Malcolm added the comment: The originally attached patch is no good for the the 2.* branch, as it appears that _testcapimodule.c will not become "ssize_t" safe in Python 2.*; see e.g.: http://hg.python.org/cpython/rev/3ecddf168f1f Am attaching a revised patch that I&

[issue14591] Value returned by random.random() out of valid range

2012-04-16 Thread Dave Reid
New submission from Dave Reid : A particular combination of seed and jumpahead calls seems to force the MT generator into a state where it produces a random variate that is outside the range 0-1. Problem looks like it might be in _randommodule.c:genrand_int32, which produces a value

[issue37092] LoggerAdapter doesn't have fatal() like Logger

2019-05-29 Thread Dave Johansen
New submission from Dave Johansen : Using LoggerAdapter is a convenient way to add extra info to all logs, but it doesn't have the fatal() method like Logger, so it isn't a drop in replacement like it should be. -- components: Library (Lib) messages: 343941 nosy: Dav

[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread Dave Malcolm
Dave Malcolm added the comment: I think when I wrote this I was over-optimistically thinking that we could just add more patterns, but if it's becoming a pain, then your approach looks good to me. -- nosy: +dmalcolm ___ Python tracker &

[issue31212] min date can't be converted to timestamp

2017-08-15 Thread Dave Johansen
New submission from Dave Johansen: This worked in Python 3.6.0 and before: ``` from datetime import datetime d = datetime(1, 1, 1, 0, 0, 0) d.timestamp() ``` The error output is: ``` ValueError: year 0 is out of range ``` But it used to return `-62135658000.0`. Appears to be related to https

[issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp

2017-08-16 Thread Dave Johansen
Dave Johansen added the comment: That's a valid `datetime` (i.e. within the min and max values) and `tzinfo` is `None` so I think it's completely reasonable to assume that `timestamp()` will return the correct value. -- ___ Python trac

[issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp

2017-08-16 Thread Dave Johansen
Dave Johansen added the comment: The use case was parsing user input of ISO 8601 date strings and converting them to UNIX epochs. The input "0001-01-01T00:00:00" is valid, parses to a valid `datetime` and it seems like a reasonable expectation that all of the functions should work

[issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp

2017-08-16 Thread Dave Johansen
Dave Johansen added the comment: Ok, so I understand the issue now. `timestamp()` for naive datetime instances applies the local timezone offset ( https://docs.python.org/3.6/library/datetime.html#datetime.datetime.timestamp ). This is surprising because naive datetime instances usually are

[issue31237] test_gdb disables 25% of tests in optimized builds

2017-08-21 Thread Dave Malcolm
Dave Malcolm added the comment: The problem is that there are so many variables: * which version of which compiler * optimization flags * which version of gdb * which CPU architecture etc (and the compiler and/or gdb could be carrying patches from downstream distributors...) All of these can

[issue32972] unittest.TestCase coroutine support

2019-02-07 Thread Dave Shawley
Dave Shawley added the comment: Hi everyone, I'm trying to reboot conversation on this issue since I would love for this to land in Python 3.8. At the recommendation of Terry Jan Reedy, here is my summary of where I think that the discussion is currently. If anything is misrepres

[issue32972] unittest.TestCase coroutine support

2019-02-07 Thread Dave Shawley
Dave Shawley added the comment: PR 10296 is my implementation of a unittest.TestCase subclass solution to this issue. This comment explains the approach and rationale in detail. Let's discuss this and see if the implementation meets expectations or should be abandoned. I refac

[issue35070] test_posix fails on macOS 10.14 Mojave

2019-04-11 Thread Dave Page
Dave Page added the comment: I'm seeing what appears to my uneducated eyes to be the same failure on Mojave, on a brand new machine which is entirely standalone: 12:16:00 0:00:07 load avg: 4.24 [133/416/1] test_posix failed 12:16:00 test test_posix failed -- Traceback (most recent call

[issue36277] pdb's recursive debug command is not listed in the docs

2019-04-17 Thread Dave Nguyen
Change by Dave Nguyen : -- keywords: +patch pull_requests: +12796 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35070] test_posix fails on macOS 10.14 Mojave

2019-05-03 Thread Dave Page
Dave Page added the comment: The submitted patch from websurfer5 resolves the issue for me. -- ___ Python tracker <https://bugs.python.org/issue35070> ___ ___

[issue9635] Add Py_BREAKPOINT and sys._breakpoint hooks

2018-02-27 Thread Dave Malcolm
Dave Malcolm added the comment: On Fri, 2018-02-23 at 00:16 +, Cheryl Sabella wrote: > Cheryl Sabella added the comment: > > Did PEP553 make this issue obsolete? I *think* they have slightly different scope: if I'm reading it right, PEP553 is about injecting a breakpoint i

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Dave Challis
New submission from Dave Challis : Tested in python 3.6.2: >>> import datetime >>> datetime.datetime.min.strftime('%Y') '1' Expected output: '0001' This means that strftime and strptime aren't necessarily

[issue32195] datetime.strftime with %Y no longer outputs leading zeros

2017-12-01 Thread Dave Challis
Dave Challis added the comment: My mistake, it appears to be related to the OS it's running on rather than the version (I just happened to test with different versions on different OSes). On Mac OS X (with 3.6.2): >>> import datetime >>> datetime.datetime.min.s

[issue32488] Fatal error using pydoc

2018-01-03 Thread Dave Opstad
New submission from Dave Opstad : I'm running 3.6.4 on Mac OS X 10.13.2, bash shell. Doing: $ pydoc modules causes: Please wait a moment while I gather a list of all available modules... Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6 Reproduced this several

[issue32488] Fatal error using pydoc

2018-01-03 Thread Dave Opstad
Dave Opstad added the comment: I think this was my mistake; when I used pydoc3 instead of pydoc it ran to completion. Please feel free to close this; sorry for the noise. -- ___ Python tracker <https://bugs.python.org/issue32

[issue34208] Change in 3.7 expression evaluation?

2018-07-24 Thread Dave Opstad
New submission from Dave Opstad : In 3.6 I get this: >>> x = (100 * 20) >>> x is 2000 False >>> (100 * 20) is 2000 False But in 3.7, I get this: >>> x = (100 * 20) >>> x is 2000 False >>> (100 * 20) is 2000 True This isn't neces

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks! -- ___ Python tracker <https://bugs.python.org/issue9263> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32972] unittest.TestCase coroutine support

2018-10-30 Thread Dave Shawley
Dave Shawley added the comment: Hi all, I took a slightly different direction for adding async/await support to the unittest library. I summarized the approach that I took in a message to python-ideas (https://mail.python.org/pipermail/python-ideas/2018-October/054331.html) and a branch

[issue32971] Docs on unittest.TestCase.assertRaises() should clarify context manager details

2018-11-02 Thread Dave Shawley
Change by Dave Shawley : -- keywords: +patch pull_requests: +9605 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32971> ___ ___ Py

[issue32972] unittest.TestCase coroutine support

2018-11-02 Thread Dave Shawley
Dave Shawley added the comment: I added a different implementation for consideration (https://github.com/python/cpython/pull/10296). -- pull_requests: +9606 ___ Python tracker <https://bugs.python.org/issue32

[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Dave Challis
New submission from Dave Challis: When attempting to detect the presence of CSV headers, delimiters are passed to a regex function without escaping, which causes an exception if a delimiter which has meaning in a regex (e.g. '+', '*' etc.) is used. Code to rep

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-10 Thread Dave Challis
New submission from Dave Challis: This occurred when attempting to decode invalid UTF-8 bytes using "errors='replace'", then attempting to lowercase the produced unicode string. This was also tested in python 2.7, but it doesn't occur there. Code to reproduce: x = b

[issue18213] py-bt errors on backtrace with PyRun_SimpleString and friends

2013-06-14 Thread Dave Malcolm
Dave Malcolm added the comment: pmuldoon: did you truncate the output of bt? (or did the superior gdb you're using do this behind the scenes? I know you hack on gdb itself, and this looks a superior gdb debugging an inferior gdb). The reason for this error: Python Exception (2

[issue18249] Incorrect and incomplete help docs for close() method

2013-06-17 Thread Dave Angel
New submission from Dave Angel: Python 3.3.0 (default, Mar 7 2013, 00:24:38) [GCC 4.6.3] on linux q = open('/dev/null') help(q.close) the entire output is: --- Help on built-in function close: close(...) (END) --- But close(

[issue17449] dev guide appears not to cover the benchmarking suite

2013-07-29 Thread Dave Malcolm
Dave Malcolm added the comment: On Mon, 2013-07-29 at 14:01 +, Ronald Oussoren wrote: > Ronald Oussoren added the comment: > > The attached patch for the benchmark README.txt should document the status > quo. > > -- > Added file: http://bugs.python.org/file3

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-19 Thread Dave Malcolm
Dave Malcolm added the comment: Antoine's patch looks reasonable to me, FWIW. -- ___ Python tracker <http://bugs.python.org/issue18772> ___ ___ Python-bugs-l

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker <http://bugs.python.org/issue14621> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks for filing this bug report. I'm not seeing the equal hashes you describe. I'm using this recipe to hardcode a specific prefix and print the hashes using it: $ gdb --eval-command="break _PyRandom_Init" --eval-command="ru

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Dave Malcolm
Dave Malcolm added the comment: $ gdb --eval-command="break _PyRandom_Init" --eval-command="run" --eval-command="print _Py_HashSecret" --eval-command="set _Py_HashSecret.prefix=0xcdcdcd00" --eval-command="print _Py_HashSecret" --eval-command

[issue9458] xml.etree.ElementTree.ElementTree.write(): encoding handling problems

2012-04-20 Thread Dave Abrahams
Dave Abrahams added the comment: These bugs are annoying. How does one convert a set of examples into a patch? Do you mean you want these to become test cases? -- nosy: +dabrahams ___ Python tracker <http://bugs.python.org/issue9

[issue1572710] cElementTree.SubElement doesn't recognize keyword "attrib"

2012-04-20 Thread Dave Abrahams
Dave Abrahams added the comment: @effbot, I think you may have misread the OP's example. The first two arguments /are/ being passed positionally. In any case, there's a real bug here. cElementTree seems to choke on uses of attrib. Change cElementTree to ElementTree below an

[issue1572710] cElementTree.SubElement doesn't recognize keyword "attrib"

2012-04-20 Thread Dave Abrahams
Dave Abrahams added the comment: On second thought, I see what effbot is trying to say... but it's still a bug. Given the way the interface is declared and the behavior of regular python functions: Element(tag, attrib={}, **extra) indicates that I can pass attrib (or tag, for that m

[issue14443] Distutils test_bdist_rpm failure

2012-04-26 Thread Dave Malcolm
Dave Malcolm added the comment: As a post-processing step, rpmbuild will attempt to byte-compile any .py files it encounters, and the results must be listed in the %files manifest. [1] This is done by the script brp-python-bytecompile, which uses the compileall module. However, my guess is

[issue14443] Distutils test_bdist_rpm failure

2012-04-26 Thread Dave Malcolm
Dave Malcolm added the comment: __os_install_post is defined within /usr/lib/rpm/redhat/macros and contains this fragment: /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \ Hence it will use %{__python} as the default when byte-compiling

[issue14748] spwd.getspall() is returning LDAP (non local) users too

2012-05-08 Thread Dave Malcolm
Dave Malcolm added the comment: Like passwd and group information, the shadow password entries are pulled through libc's Name Service Switch and modules for it, depending on configuration. See "man nsswitch.conf". Hence this is likely to be a configuration difference betwee

[issue14757] INCA: Inline Caching meets Quickening in Python 3.3

2012-05-08 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker <http://bugs.python.org/issue14757> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14774] _sysconfigdata.py doesn't support multiple build configurations

2012-05-10 Thread Dave Malcolm
New submission from Dave Malcolm : When building from source, if I create multiple configuration directories and build from there e.g.: mkdir configs cd configs mkdir config-A cd config-A ../../configure make cd .. mkdir config-B cd config-B ../../configure --enable-shared make cd ../config-A

[issue14774] _sysconfigdata.py doesn't support multiple build configurations

2012-05-10 Thread Dave Malcolm
Dave Malcolm added the comment: Note to self: workaround is to rm ../../Lib/_sysconfigdata.py || make ../../Lib/_sysconfigdata.py before running my tests in either configuration, to force the file to be regenerated using what "make" thinks the se

[issue14776] Add SystemTap static markers

2012-05-10 Thread Dave Malcolm
New submission from Dave Malcolm : I'm attaching a patch which adds static markers for SystemTap for two probeable events within CPython's bytecode interpreter, along with test cases and documentation. I'm hoping to get this merged for 3.3; is this PEP-worthy, or can this b

[issue13405] Add DTrace probes

2012-05-10 Thread Dave Malcolm
Dave Malcolm added the comment: I've refreshed my SystemTap patch, and opened a new issue, issue #14776 to cover SystemTap. Issue #4111 was originally opened on 2008-10-12 as "Add DTrace probes", and was generalized on 2009-12-08 to "Add Systemtap/DTrace probes".

[issue14776] Add SystemTap static markers

2012-05-11 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks Eric, Antoine and Mark. I'm attaching two new patches: a replacement patch for cpython, and a new patch for the devguide I've moved the docs to the dev guide, starting a new "Debugging and Instrumentation" section there. Changes

[issue14776] Add SystemTap static markers

2012-05-11 Thread Dave Malcolm
Changes by Dave Malcolm : Added file: http://bugs.python.org/file25540/devguide-systemtap-2012-05-11-001.patch ___ Python tracker <http://bugs.python.org/issue14

[issue4111] Add Systemtap/DTrace probes

2012-05-11 Thread Dave Malcolm
Dave Malcolm added the comment: Issue #13405 covers DTrace; I've taken the liberty of also opening issue #14776 to cover SystemTap. I hope that once one of these is in the tree it will be easier to get the other one in. -- ___ Python tr

[issue14785] Add sys._debugmallocstats()

2012-05-11 Thread Dave Malcolm
New submission from Dave Malcolm : I'm attaching a patch which generalizes the at-exit PYTHONMALLOCSTATS memory usage report, so that it's available in a regular build and can be triggered from Python, by calling: sys._debugmallocstats() This can be useful when debugging me

[issue14785] Add sys._debugmallocstats()

2012-05-14 Thread Dave Malcolm
Dave Malcolm added the comment: Updated version of the patch, using test.script_helper.assert_python_ok() and adding a NEWS entry -- Added file: http://bugs.python.org/file25579/add-debug-malloc-stats-v2.patch ___ Python tracker <h

[issue14785] Add sys._debugmallocstats()

2012-05-14 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks. I'm attaching an updated version of the patch, wrapping all new C entrypoints within a #ifndef Py_LIMITED_API I also moved the existing _PyObject_DebugMallocStats() entrypoint to within a #ifndef Py_LIMITED_API. As noted above, it is not docum

<    1   2   3   4   5   6   7   >