[issue11176] give more meaningful argument names in argparse documentation

2012-07-09 Thread Greg Roodt
Greg Roodt added the comment: I've made the minor edits required after the review to my simplification of the first example. David, perhaps we combine our efforts? Use my simple first example to explain the very basics, then continue the explanation with the pizza example? Im happy e

[issue1076515] shutil.move clobbers read-only files.

2012-07-09 Thread Greg Roodt
Greg Roodt added the comment: I can add some more info to the docs if anybody feels they are required, but I think they are sufficient. It already mentions that it copies file contents and that the correct permissions are required. This is mentioned in the docs for shutil.copyfile: The

[issue8823] urllib2 does not catch httplib.BadStatusLine

2012-07-11 Thread Greg Roodt
Greg Roodt added the comment: By the way, the issue can be recreated by running the following: netcat -l -p -e "echo HTTP/1.1 1000 OK" & python -c "import urllib2; urllib2.urlopen('http://localhost:')" This happens on

[issue15510] textwrap.wrap('') returns empty list

2012-08-07 Thread Greg Ward
Greg Ward added the comment: Random comments from original author of textwrap.py, in case anyone cares at this point... * This is a pretty obscure edge case, and I admit that it never occurred to me when writing the code. (If it had, I would have tested it!) * One can debate endlessly about

[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-18 Thread Greg Stein
Changes by Greg Stein : -- nosy: -gstein ___ Python tracker <http://bugs.python.org/issue15653> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1516] make _ctypes work with non-gcc compilers

2012-10-18 Thread Greg Couch
Greg Couch added the comment: On Thu, 18 Oct 2012, Trent Nelson wrote: > Trent Nelson added the comment: > > Hi Greg, > >I realize it's been a good five years since you first raised this >issue, but I was wondering if you ever ended up making any progress >

[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-06-15 Thread Greg Ward
New submission from Greg Ward: When using shutil.copytree() on Linux to copy to a VFAT filesystem, it crashes like this: Traceback (most recent call last): File "/data/src/cpython/3.4/Lib/shutil.py", line 336, in copytree copystat(src, dst) File "/data/src/cpython/3.

[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-06-15 Thread Greg Ward
Greg Ward added the comment: In 3.3 and earlier, copytree() crashes roughly as described in issue1545, with shutil.Error that wraps the underlying "Operation not permitted" error from trying to chmod() something in a VFAT filesystem. Since this appears to accurately reflect what

[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-06-15 Thread Greg Ward
Greg Ward added the comment: Bad news: because reproducing this requires sudo (to mount an arbitrary filesystem), I'm not sure it's possible/desirable to add test code for it. Good news: the fix is trivial, and it passes my manual test. Here's a patch: --- a/Lib/shutil.py +++

[issue3754] cross-compilation support for python build

2013-02-05 Thread Greg Hellings
Greg Hellings added the comment: I'm trying to cross-compile the latest default out of Mercurial based on the status of this. Currently it fails with the following invocation: $ ../configure --host=i686-w64-mingw32 --build=x86_64-redhat-linux-gnu --target=i686-w64-mingw32 --prefix=/usr

[issue3754] cross-compilation support for python build

2013-02-05 Thread Greg Hellings
Greg Hellings added the comment: Bummer, the patches in that issue do not apply cleanly to either the 3.3.0 released tarball nor to the 3.3 branch from hg. -- ___ Python tracker <http://bugs.python.org/issue3

[issue16851] Hint about correct ismethod and isfunction usage

2013-02-11 Thread Greg Couch
Greg Couch added the comment: In my opinion, the Python 2.7 results are wrong. In Python 2.7, inspect.ismethod returns True for both bound and unbound methods -- ie., is broken according to the documentation. As a workaround, I'm using: def is_bound_method(obj): return hasatt

[issue19536] MatchObject should offer __getitem__()

2013-11-10 Thread Greg Ward
Greg Ward added the comment: >>> import this [...] There should be one-- and preferably only one --obvious way to do it. -- nosy: +gward ___ Python tracker <http://bugs.python.or

[issue20893] ctypes crash during PyFinalize when librt used

2014-03-11 Thread Greg Harris
New submission from Greg Harris: When interacting with librt via a ctypes.Structure object I can reliably cause the python interpreter to crash during Py_Finalize *after* all of my code has executed. It appears to only happen on structures that have been passed to the mq_getattributes call

[issue7114] HTMLParser doesn't handle

2009-10-12 Thread Greg Baker
New submission from Greg Baker : I believe what I'm seeing here is somewhat related to issue 670664, but is easier to handle because of the CDATA structure. Basically, HTMLParser doesn't recognize CDATA sections at all, so their content is incorrectly parsed like normal data. The fo

[issue7340] Doc for sys.exc_info has warning that is no longer valid

2009-11-17 Thread Greg Hewgill
New submission from Greg Hewgill : Based on a short discussion on python-dev: http://mail.python.org/pipermail/python-dev/2009-November/094306.html the "Warning" box in the documentation for sys.exc_info needs to be updated in light of PEP 3134, and perhaps moved elsewhere since the

[issue6454] Add "example" keyword argument to optparse constructor

2009-11-22 Thread Greg Ward
Greg Ward added the comment: > but I feel there is a better and more general > solution - just provide some minimal formatting for description: treat > empty line as paragraph separator. Then I would be able to add example > or anything else to the description formatting it as neces

[issue7378] unexpected truncation of traceback

2009-11-23 Thread Greg Hewgill
New submission from Greg Hewgill : Quite by accident, I came across a case where Python would quit generating traceback text and skip printing the actual exception information. Here is a sample program: exec(compile("spam()", ".", "exec")) and the output in P

[issue1859] textwrap doesn't linebreak on "\n"

2009-11-28 Thread Greg Ward
Greg Ward added the comment: > Greg, any comment on this issue? Yes, two: 1) textwrap does not handle paragraphs or paragraph breaks in any way. That was a deliberate limitation to keep the code from getting any hairier. People have complained about this in the past, and I h

[issue1229239] optionally allow mutable builtin types

2009-02-17 Thread Greg Couch
Greg Couch added the comment: FYI, I was able to work around this and use an unmodified Python by subtyping type and overriding the setattr method as shown below. It's a lot messier than patching Python. static int Mutable_SetAttr(PyObject *obj, PyObject *name, PyObject *

[issue5403] test_md5 segfault

2009-03-02 Thread Greg Bakker
Changes by Greg Bakker : -- nosy: +gregb ___ Python tracker <http://bugs.python.org/issue5403> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1565509] Repair or Change installation error

2009-03-29 Thread Greg Hazel
Greg Hazel added the comment: IE renamed the file for me. So this is not uncommon. -- status: closed -> open ___ Python tracker <http://bugs.python.org/issue1

[issue5710] ctypes should return composite types from callbacks

2009-04-06 Thread Greg Holling
New submission from Greg Holling : We have an application that calls a 3rd party library that returns a structure (by value) from a callback. I'm including some sample code that duplicates the behavior. The problem is that return types from callbacks cannot be anything other than s

[issue1759845] subprocess.call fails with unicode strings in command line

2009-05-11 Thread Greg Couch
Greg Couch added the comment: I like the C patch better. It only tries to decode non-unicode objects with the filesystem (mbcs) encoding. This fits in with Python 3.0 perfectly where all strings are unicode. In 2.5, strings are assumed to be in the mbcs encoding, to match the Windows ANSI

[issue1704474] test_optparse.py mod. for jython

2009-06-01 Thread Greg Ward
Greg Ward added the comment: I just took a look at the original patch uploaded by drtimcouper. IMHO it would be cleaner and simpler to modify optparse.py so that it behaves as consistently as possible under Jython and CPython. For example, optparse should catch the ValueError raised when a

[issue1704474] optparse tests fail under Jython

2009-06-01 Thread Greg Ward
Changes by Greg Ward : -- components: +Library (Lib) -Tests title: test_optparse.py mod. for jython -> optparse tests fail under Jython ___ Python tracker <http://bugs.python.org/issue1

[issue6270] Menu deletecommand fails if command is already deleted

2009-06-11 Thread Greg Couch
New submission from Greg Couch : Sometime around Python 2.5.4, Menu.delete was changed to delete associated entry commands (and thus plug a memory leak). This broke Pmw.OptionMenu because it already had similar code, so when Menu.delete was called, the commands were already gone, and a TclError

[issue6270] Menu deletecommand fails if command is already deleted

2009-06-11 Thread Greg Couch
Changes by Greg Couch : Added file: http://bugs.python.org/file14266/delcmd.patch ___ Python tracker <http://bugs.python.org/issue6270> ___ ___ Python-bugs-list mailin

[issue6270] Menu deletecommand fails if command is already deleted

2009-06-11 Thread Greg Couch
Changes by Greg Couch : Removed file: http://bugs.python.org/file14265/delcmd.patch ___ Python tracker <http://bugs.python.org/issue6270> ___ ___ Python-bugs-list mailin

[issue5555] optparse

2009-06-30 Thread Greg Ward
Greg Ward added the comment: > This is an edited-down excerpt form the optparse documentation from: > > http://docs.python.org/library/optparse.html > > "... the traditional Unix syntax is a hyphen (“-“) followed by a > single letter [...] Some other option syntaxes

[issue5555] optparse: clarify option concatenation in docs

2009-06-30 Thread Greg Ward
Changes by Greg Ward : -- title: optparse -> optparse: clarify option concatenation in docs ___ Python tracker <http://bugs.python.org/issue> ___ ___ Py

[issue7580] distutils makefile from python.org installer doesn't work on OS X Snow Leopard

2010-05-19 Thread Greg Słodkowicz
Greg Słodkowicz added the comment: Doesn't breaking installation of packages on a major platform warrant a quicker release of a fix? -- nosy: +Greg.Slodkowicz ___ Python tracker <http://bugs.python.org/i

[issue3423] DeprecationWarning message applies to wrong context with exec()

2010-06-09 Thread Greg Hazel
Greg Hazel added the comment: Searching the file for "raise" is sort of pointless, since exec() takes a string which might have come from anywhere, and there might be any number of exec() calls in the module. See: http://codepad.org/7EBMhb0O There are at least two reasonable an

[issue9023] distutils relative path errors

2010-06-18 Thread Greg Hazel
New submission from Greg Hazel : Probably applies to more versions, but I only tested on 2.5.2 and 2.6.5. Distutils incorrectly constructs paths for the build/temp directory when relative paths are used in the "sources" list. This can result in failing to make the build/temp direct

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel
Greg Hazel added the comment: This is still an issue. The bug I'm reporting had been explained well, I thought, but I'll repeat it in summary: There is no way to pass around traceback objects without holding references to an excessive number of objects. Traceback raising typicall

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel
Greg Hazel added the comment: The objects I do want in the traceback are the objects necessary to print a traceback, but not the locals and globals of each frame. For example: def bar(): x = "stuff" raise Exception("example!") bar() prints: Traceback (most recent

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel
Greg Hazel added the comment: It seems this is partially addressed in a big red "Warning" section of the docs on sys.exc_info: http://docs.python.org/release/3.1/library/sys.html#sys.exc_info and is captured in the "Open Issue: Garbage Collection" section for PEP-3134: h

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel
Greg Hazel added the comment: It depends on how you look at it. Those two issues describe the surprising behavior of the same references I'm talking about here, when the lifetime of the traceback reference is only inside the same frame. This ticket describes the surprising behavior of

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-26 Thread Greg Hazel
Greg Hazel added the comment: > you should *expect* all those values to persist, so that shouldn't be > "surprising". It's not something I expected, and the warnings around traceback objects are a good indication that other developers have not expected it either. O

[issue2236] Distutils' mkpath implementation ignoring the "mode" parameter

2010-06-28 Thread Greg Ward
Greg Ward added the comment: > Is it too late for 2.7? I have no idea. It does look as though someone has written unit tests for distutils, so the patch needs a test change too. Henrique? -- stage: -> unit test needed ___ Python tracker

[issue4106] multiprocessing occasionally spits out exception during shutdown

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: For what it's worth, I think I have a simpler reproducer of this issue. Using freshly-compiled python-from-trunk (as well as multiprocessing-from-trunk), I get tracebacks from the following about 30% of the time: """ import m

[issue4106] multiprocessing occasionally spits out exception during shutdown

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: I'm on Ubuntu 10.04, 64 bit. -- ___ Python tracker <http://bugs.python.org/issue4106> ___ ___ Python-bugs-list mailing list

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-08 Thread Greg Brockman
New submission from Greg Brockman : I have recently begun using multiprocessing for a variety of batch jobs. It's a great library, and it's been quite useful. However, I have been bitten several times by situations where a worker process in a Pool will unexpectedly di

[issue9207] multiprocessing occasionally spits out exception during shutdown

2010-07-08 Thread Greg Brockman
New submission from Greg Brockman : On Ubuntu 10.04, using freshly-compiled python-from-trunk (as well as multiprocessing-from-trunk), I get tracebacks from the following about 30% of the time: """ import multiprocessing, time def foo(x):

[issue4106] multiprocessing occasionally spits out exception during shutdown

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: Sure thing. See http://bugs.python.org/issue9207. -- ___ Python tracker <http://bugs.python.org/issue4106> ___ ___ Python-bug

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: That's likely a mistake on my part. I'm not observing this using the stock version of multiprocessing on my Ubuntu machine(after running O(100) times). I do, however, observe it when using either python2.7 or python2.6 with multiprocessing-from

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: No, I'm not using the Google code backport. To be clear, I've tried testing this with two versions of multiprocessing: - multiprocessing-from-trunk (r82645): I get these exceptions with ~40% frequency - multiprocessing from Ubuntu 10.04 (version 0

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: > Wait - so, you are pulling svn trunk, compiling and running your test > with the built python executable? Yes. I initially observed this issue while using 10.04's Python (2.6.5), but wanted to make sure it wasn't fixed by using a newer int

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: Yeah, I've just taken a checkout from trunk, ran './configure && make && make install', and reproduced on: - Ubuntu 10.04 32-bit - Ubuntu 9.04 32-bit -- ___ Python tracker &l

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-08 Thread Greg Brockman
Greg Brockman added the comment: With the line commented out, I no longer see any exceptions. Although, if I understand what's going on, there still a (much rarer) possibility of an exception, right? I guess in the common case, the worker_handler is in the sleep when shutdown begins.

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-09 Thread Greg Brockman
Greg Brockman added the comment: Think http://www.mail-archive.com/python-l...@python.org/msg282114.html is relevant? -- ___ Python tracker <http://bugs.python.org/issue9

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-10 Thread Greg Brockman
Greg Brockman added the comment: Cool, thanks. I'll note that with this patch applied, using the test program from 9207 I consistently get the following exception: """ Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recen

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-10 Thread Greg Brockman
Greg Brockman added the comment: What about just catching the exception? See e.g. the attached patch. (Disclaimer: not heavily tested). -- Added file: http://bugs.python.org/file17934/shutdown.patch ___ Python tracker <http://bugs.python.

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2010-07-12 Thread Greg Brockman
Greg Brockman added the comment: With pool.py:272 commented out, running about 50k iterations, I saw 4 tracebacks giving an exception on pool.py:152. So this seems to imply the race does exist (i.e. that the thread is in _maintain_pool rather than time.sleep when shutdown begins). It looks

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-12 Thread Greg Brockman
Greg Brockman added the comment: Thanks much for taking a look at this! > why are you terminating the second pass after finding a failed > process? Unfortunately, if you've lost a worker, you are no longer guaranteed that cache will eventually be empty. In particular, you may

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-12 Thread Greg Brockman
Greg Brockman added the comment: > For processes disappearing (if that can at all happen), we could solve > that by storing the jobs a process has accepted (started working on), > so if a worker process is lost, we can mark them as failed too. Sure, this would be reasonable behavio

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-13 Thread Greg Brockman
Greg Brockman added the comment: > What kind of errors are you having that makes the get() call fail? Try running the script I posted. It will fail with an AttributeError (raised during unpickling) and hang. I'll note that the particular issues that I've run into in practice ar

[issue9244] multiprocessing.pool: Worker crashes if result can't be encoded

2010-07-13 Thread Greg Brockman
Greg Brockman added the comment: This looks pretty reasonable to my untrained eye. I successfully applied and ran the test suite. To be clear, the errback change and the unpickleable result change are actually orthogonal, right? Anyway, I'm not really familiar with the protocol here

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-13 Thread Greg Brockman
Greg Brockman added the comment: While looking at your patch in issue 9244, I realized that my code fails to handle an unpickleable task, as in: """ #!/usr/bin/env python import multiprocessing foo = lambda x: x p = multiprocessing.Pool(1) p.apply(foo, [1]) ""&quo

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-14 Thread Greg Brockman
Greg Brockman added the comment: Before I forget, looks like we also need to deal with the result from a worker being un-unpickleable: """ #!/usr/bin/env python import multiprocessing def foo(x): global bar def bar(x): pass return bar p = multiprocessing.Pool(1)

[issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64

2010-07-15 Thread Greg Hazel
New submission from Greg Hazel : ctypes on Windows on a 64bit Python installation gets a NULL pointer access where one is not expected. To reproduce the problem, run make.bat then "python ctypes_test.py" Failure output looks like this: Three! 1 2 <__main__.LP_S

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-15 Thread Greg Brockman
Greg Brockman added the comment: >> Before I forget, looks like we also need to deal with the >> result from a worker being un-unpickleable: >This is what my patch in bug 9244 does... Really? I could be misremembering, but I believe you deal with the case of the result bei

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-15 Thread Greg Brockman
Greg Brockman added the comment: Actually, the program you demonstrate is nonequivalent to the one I posted. The one I posted pickles just fine because 'bar' is a global name, but doesn't unpickle because it doesn't exist in the parent's namespace. (See http:

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-15 Thread Greg Brockman
Greg Brockman added the comment: Started looking at your patch. It seems to behave reasonably, although it still doesn't catch all of the failure cases. In particular, as you note, crashed jobs won't be noticed until the pool shuts down... but if you make a blocking call such

[issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64

2010-07-15 Thread Greg Hazel
Changes by Greg Hazel : Removed file: http://bugs.python.org/file18012/ctypes_test.zip ___ Python tracker <http://bugs.python.org/issue9266> ___ ___ Python-bugs-list m

[issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64

2010-07-15 Thread Greg Hazel
Greg Hazel added the comment: Ok, this issue is worse, and much easier to reproduce, than I thought. Here is an updated ctypes_test.zip with a repro using only integers and callbacks. Correct output: ('three', (1, 2, 3)) ('four', (1, 2, 3, 4)) ('five', (1,

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2010-07-19 Thread Greg Hazel
Changes by Greg Hazel : -- nosy: +ghazel ___ Python tracker <http://bugs.python.org/issue6792> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7171] Add inet_ntop and inet_pton support for Windows

2010-07-20 Thread Greg Hazel
Changes by Greg Hazel : -- nosy: +ghazel ___ Python tracker <http://bugs.python.org/issue7171> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-20 Thread Greg Brockman
Greg Brockman added the comment: At first glance, looks like there are a number of sites where you don't change the blocking calls to non-blocking calls (e.g. get()). Almost all of the get()s have the potential to be called when there is no possibility for them to terminate. I

[issue7171] Add inet_ntop and inet_pton support for Windows

2010-07-20 Thread Greg Hazel
Greg Hazel added the comment: In addition, inet_ntop and inet_pton can be implemented on Windows platforms prior to Vista using WSAAddressToStringA and WSAStringToAddressA. -- ___ Python tracker <http://bugs.python.org/issue7

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-21 Thread Greg Brockman
Greg Brockman added the comment: > I thought the EOF errors would take care of that, at least this has > been running in production on many platforms without that happening. There are a lot of corner cases here, some more pedantic than others. For example, suppose a child dies while h

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2010-07-22 Thread Greg Brockman
Changes by Greg Brockman : -- nosy: +gdb ___ Python tracker <http://bugs.python.org/issue9334> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-27 Thread Greg Brockman
Greg Brockman added the comment: > You can't have a sensible default timeout, because the worker may be > processing something important... In my case, the jobs are either functional or idempotent anyway, so aborting halfway through isn't a problem. In general though, I'

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-27 Thread Greg Brockman
Greg Brockman added the comment: Thanks for the comment. It's good to know what constraints we have to deal with. > we can not, however, change the API. Does this include adding optional arguments? -- ___ Python tracker <http://bugs

[issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError

2010-07-31 Thread Greg Malcolm
Greg Malcolm added the comment: I've uploaded a patch for 3.2 that throws a ValueError exception for non numeric port numbers and SMTPSocketConnectError for socket connection failures. This patch introduces an API change, by creating the SMTPSocketConnectError which provides inform

[issue1759845] subprocess.call fails with unicode strings in command line

2010-08-04 Thread Greg Couch
Greg Couch added the comment: So Terry, can you reopen this bug then? It's not out of date. -- ___ Python tracker <http://bugs.python.org/issue1759845> ___ ___

[issue9535] Pending signals are inherited by child processes

2010-08-06 Thread Greg Brockman
New submission from Greg Brockman : Upon os.fork(), pending signals are inherited by the child process. This can be demonstrated by pressing C-c in the middle of the following program: """ import os, sys, time, threading def do_fork(): while True:

[issue28939] Groupby Is Roughly Equivalent To ...

2016-12-11 Thread Greg Solomon
New submission from Greg Solomon: https://docs.python.org/3/library/itertools.html#itertools.groupby I found the "equivalent" code a bit hard to read. Is there any merit in changing it to something a bit like the following ? Kind Rgds, Greg class groupby: def __init__( self

[issue28939] Groupby Is Roughly Equivalent To ...

2016-12-11 Thread Greg Solomon
Greg Solomon added the comment: Oh, I get it. There needs to be a next(self.it) loop in __next__ as well as in _grouper in case the user doesn't call _grouper. My test was for ( k , g ) in groupby( L ): print ( k , len( list( g ) ) ) so I was executing _grouper on every row. T

[issue16026] csv.DictReader argument names documented incorrectly

2017-01-03 Thread Greg Bengeult
Greg Bengeult added the comment: Here's a revised patch file for Python 3.7. This is my first ever submission to an open source project, so please be gentle. -- nosy: +gbengeult versions: -Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file46132/csv.rst-

[issue11681] -b option undocumented

2017-01-11 Thread Greg Bengeult
Greg Bengeult added the comment: I have attached a patch for 2.7 that adds -b and -bb to the command line documentation in Modules/main.c and Doc/library/cmdline.rst, following the suggested text provided by Martin. Interestingly, unicode(), bytearray(), and str() don't seem to be trans

[issue29218] distutils: Remove unused install_misc class

2017-01-11 Thread Greg Ward
Greg Ward added the comment: LGTM, after a cursory glance at the code history. Been a lng time since I understood this stuff deeply, though! -- ___ Python tracker <http://bugs.python.org/issue29

[issue11681] -b option undocumented

2017-01-12 Thread Greg Bengeult
Greg Bengeult added the comment: Thanks for the :class: markup edits. I'm still learning this stuff. -- ___ Python tracker <http://bugs.python.org/is

[issue28130] Document that time.tzset updates time module globals

2017-01-12 Thread Greg Bengeult
Greg Bengeult added the comment: How about this documentation patch for tzset()? Most of the verbiage comes from the Linux tzset() man page. I can also generate a similar patch for 2.7 if it's needed. -- nosy: +gbengeult versions: +Python 3.7 Added file: http://bugs.pytho

[issue28130] Document that time.tzset updates time module globals

2017-01-12 Thread Greg Bengeult
Greg Bengeult added the comment: Here's the 2.7 patch. -- Added file: http://bugs.python.org/file46276/tzset_rst_27.patch ___ Python tracker <http://bugs.python.org/is

[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-01-20 Thread Greg Stark
New submission from Greg Stark: In my experiments with the relatively new class SSLObject from the ssl module I've noticed the following behavior(s) which I think can be described as bugs. The getpeercert() method raises a ValueError exception "handshake not done" even after th

[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-01-20 Thread Greg Stark
Greg Stark added the comment: Christian, I will gladly do so a little later today. Thanks for your quick response. --greg On Fri, Jan 20, 2017 at 7:29 AM, Christian Heimes wrote: > > Christian Heimes added the comment: > > Hi Grek, > > can you provide a script to rep

[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-01-20 Thread Greg Stark
Greg Stark added the comment: adding script the illustrates the bug. -- Added file: http://bugs.python.org/file46364/sslbugs.py ___ Python tracker <http://bugs.python.org/issue29

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2017-01-27 Thread Greg Onufer
Greg Onufer added the comment: 32-bit and 64-bit SPARC ABIs have 64-bit integer data types. SPARC, like many RISC architectures, also has natural alignment requirements. Attempting to dereference a pointer to a 4-byte-sized object requires 4-byte alignment, for example. 2-byte-sized objects

[issue29413] ssl.SSLSocket.unwrap() is not flexible enough

2017-02-01 Thread Greg Stark
New submission from Greg Stark: This is not a bug, but rather a request for API improvements. Correct SSL shutdown processing is frequent source of confusion. Python’s ssl module unfortunately lacks the flexibility to accommodate some common paradigms. The problem is that the unwrap

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-02 Thread Greg Stark
New submission from Greg Stark: The file Test/test_float.py has a decorator for tests that must be skipped on non-IEEE machines. However just eyeballing it it seems there are a few tests that test behaviour around Inf and NaN that are lacking this decorator. Alternately it's possible th

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-03 Thread Greg Stark
Greg Stark added the comment: I can easily grant you access to mine. It's a bit slow but you can quickly poke around with the state in the backtrace which honestly looks to me like it should be enough to spot the problem. There are other options. There's a good emulato

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-04 Thread Greg Stark
Greg Stark added the comment: I certainly understand the limitations of volunteer projects. I know you have limited resources and can't test on every platform. That's actually exactly why I'm testing on this platform and why I reported the bug. If there's any addition

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-04 Thread Greg Stark
Greg Stark added the comment: Well I was able to minimize the actual cause: $ /usr/pkg/bin/python -c 1e300*1e300 [1] Floating point exception /usr/pkg/bin/python -c 1e300*1e300 I noticed that the constant folding arithmetic is protected by "PyFPE_START_PROTECT" macros so I wonder

[issue17445] Return the type you accept

2013-03-17 Thread Greg Ward
Greg Ward added the comment: The particular use case that triggered this: Mercurial's test suite. It runs "hg blah blah" and compares the output against known good output. But Mercurial's output is just bytes, because pretty much everything in a Mercurial repo is just

[issue17445] Return the type you accept

2013-03-18 Thread Greg Ward
Greg Ward added the comment: The original reproduction I posted was incorrect -- it makes difflib look worse than it should. (I passed strings rather than lists of strings.) Here is a more accurate version: >>> import difflib >>> a = [b'hello'] >>> b = [b

[issue17445] Return the type you accept

2013-03-18 Thread Greg Ward
Greg Ward added the comment: Replying to Terry Reedy: > So a dual string/bytes function would not be completely trivial. Correct. I have one working, but it makes my eyes bleed. I fail ashamed to have written it. > Greg, can you convert bytes to strings, or strings to bytes Nope. Here

[issue17445] Return the type you accept

2013-03-18 Thread Greg Ward
Greg Ward added the comment: OK I now have two competing patches. Both are disgusting, but in different ways. 1) http://hg.gerg.ca/cpython/rev/fcf3d27f20d9 - factor out all the string constants - always concatenate, do not .format() 2) http://hg.gerg.ca/cpython/rev/cebefce2cfd4 - copy

[issue17445] Handle bytes comparisons in difflib.Differ

2013-03-18 Thread Greg Ward
Greg Ward added the comment: Take 3: http://hg.gerg.ca/cpython/rev/78bdb10551ee - uses surrogateescape as suggested by Antoine - seems to work -- ___ Python tracker <http://bugs.python.org/issue17

[issue17445] Handle bytes comparisons in difflib.Differ

2013-03-18 Thread Greg Ward
Greg Ward added the comment: Thanks for the review, Terry! Here is a revised patch, now on trunk: http://hg.gerg.ca/cpython/rev/6dedcdbe7cd5 I believe I have addressed all of your concerns. Note also that the tests now highlight some dubious behaviour. Further feedback is welcome! I&#

<    1   2   3   4   >