[issue22444] Floor divide should return int

2014-09-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg227146 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-20 Thread juj
juj added the comment: Very good question akira. In one codebase where I have fixed this kind of bug, see https://github.com/kripken/emscripten/commit/1b2badd84bc6f54a3125a494fa38a51f9dbb5877 https://github.com/kripken/emscripten/commit/2f048a4e452f5bacdb8fa31481c55487fd64d92a the intended usa

[issue22444] Floor divide should return int

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is this change compelling enough to break compatibility, or is it just a matter of purity? -- nosy: +pitrou ___ Python tracker ___

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-09-20 Thread Christian Heimes
New submission from Christian Heimes: The behavior of SSLContext.load_verify_locations is rather inconsistent across platforms: On most POSIX platforms (Linux, BSD, non-Apple builds of OpenSSL) it loads certificates from predefined locations. The locations are defined during compile time and

[issue22444] Floor divide should return int

2014-09-20 Thread Stefan Krah
Stefan Krah added the comment: Perhaps it's worth mentioning that several people on Python-ideas took the opposite view: math.floor() should return a float. PEP-3141 does not mention Infinities and NaNs: "The Real ABC indicates that the value is on the real line, and supports the operations o

[issue22444] Floor divide should return int

2014-09-20 Thread Stefan Krah
Stefan Krah added the comment: Argh, forget the second Haskell example: inf / 0 is fine. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-20 Thread Stefan Krah
Stefan Krah added the comment: Ok, so it is a debug thing in the current NumPy sources. IMO ultimately the getbufferproc needs to return valid strides, even if the first value isn't used. For that matter, the getbufferproc is free to translate the multi- dimensional corner case array to a one-

[issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature

2014-09-20 Thread Ned Deily
Ned Deily added the comment: After a fair amount of research, trial-and-error, and testing on all of the OS X platforms we support, I think we're now ready to switch to signed flat packages for the OS X installers and thereby greatly improve the user installation experience on current systems.

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-20 Thread Sebastian Berg
Sebastian Berg added the comment: An extra dimension is certainly not irrelevant! The strides *are* valid and numpy currently actually commonly creates such arrays when slicing. The question is whether or not we want to ignore them for contiguity checks even if they have no effect on the memory l

[issue22444] Floor divide should return int

2014-09-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Is this change compelling enough to break compatibility, > or is it just a matter of purity? According to the PEP 3141, Integer is a subtype of Real, so one should be able to substitute an Integer whenever Real is expected. The reverse is not true, fo

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-20 Thread Joshua Moore-Oliva
Joshua Moore-Oliva added the comment: > You can contribute upstream to the Tulip project first. Will I be writing a patch and tests for tulip, and then separate a patch and tests for python 3.4? Or will I submit to tulip, and then the changes will get merged from tulip into python by some oth

[issue22444] Floor divide should return int

2014-09-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > However, Scheme returns floats Does Scheme's default integer type support arbitrarily large values? -- ___ Python tracker ___ _

[issue22444] Floor divide should return int

2014-09-20 Thread Case Van Horsen
Case Van Horsen added the comment: > > Does Scheme's default integer type support arbitrarily large values? > Yes, at least is does on the version I tested. -- ___ Python tracker ___

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: We can merge the changes into 3.4 and 3.5 for you, it's just a simple copy (the codebases are identical). However, the 3.4.2 release candidate is apparently in 2 days, so I think you've missed that train already. On Sat, Sep 20, 2014 at 9:02 AM, Joshua Moore-O

[issue22444] Floor divide should return int

2014-09-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Perhaps it's worth mentioning that several people on Python-ideas > took the opposite view: math.floor() should return a float. I sympathize with the idea that math module functions should return floats. I find it unfortunate that math.floor delegates

[issue22444] Floor divide should return int

2014-09-20 Thread Case Van Horsen
Case Van Horsen added the comment: > What are the use-cases for float // float where integer result is not > acceptable? It can lead to unexpected memory consumption when dealing with arbitrary precision values. What should Decimal('1e123456')//1 return? The result is exactly equal to Decimal('

[issue22444] Floor divide should return int

2014-09-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > What should Decimal('1e123456')//1 return? I think Decimal case should be considered separately. Note that unlike float, they are not part of the numerical tower, so PEP 3141 arguments don't apply: >>> isinstance(1.0, numbers.Real) True >>> isinstance

[issue22444] Floor divide should return int

2014-09-20 Thread Case Van Horsen
Case Van Horsen added the comment: On Sat, Sep 20, 2014 at 9:38 AM, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > >> Perhaps it's worth mentioning that several people on Python-ideas >> took the opposite view: math.floor() should return a float. > > I sympathize with

[issue22444] Floor divide should return int

2014-09-20 Thread Case Van Horsen
Case Van Horsen added the comment: >> What should Decimal('1e123456')//1 return? > > I think Decimal case should be considered separately. Note that unlike > float, they are not part of the numerical tower, so PEP 3141 arguments don't > apply: > isinstance(1.0, numbers.Real) > True i

[issue22417] PEP 476: verify HTTPS certificates by default

2014-09-20 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue22444] Floor divide should return int

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What are the use-cases for float // float where integer result is not > acceptable? I can't think of any. I was mostly making the case for conservatism here. The indexing use case is interesting, although I suppose enumerate() should eliminate most instance

[issue19776] Provide expanduser() on Path objects

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy, would you like to update your patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-20 Thread Stefan Krah
Stefan Krah added the comment: I think it would help discussing your options if the patch passes test_buffer first. Currently it segfaults because shape can be NULL. Also, code in memoryobject.c relies on the fact that ndim==0 means contiguous. Then, it would help enormously if you give Python

[issue22440] Setting SSLContext object's check_hostname manually might accidentally skip hostname verification

2014-09-20 Thread Christian Heimes
Christian Heimes added the comment: Alex's analysis is correct. Starting with 3.4 the SSLSocket object can perform a hostname check during the handshake. More recent versions of OpenSSL or a custom verify callback could do the check even earlier during the handshake. -- __

[issue22440] Setting SSLContext object's check_hostname manually might accidentally skip hostname verification

2014-09-20 Thread Alex Gaynor
Alex Gaynor added the comment: This can be closed then I think? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue22440] Setting SSLContext object's check_hostname manually might accidentally skip hostname verification

2014-09-20 Thread Christian Heimes
Christian Heimes added the comment: Yeah. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker ___ __

[issue22444] Floor divide should return int

2014-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Is this change compelling enough to break compatibility, > or is it just a matter of purity? I agree with Antoine that making this change is a really bad idea. 1) The current behavior has been around for a long time and is implemented in several modules i

[issue22444] Floor divide should return int

2014-09-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue19776] Provide expanduser() on Path objects

2014-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry. Here is updated patch. -- Added file: http://bugs.python.org/file36669/pathlib_expanduser_2.patch ___ Python tracker ___ __

[issue21163] asyncio doesn't warn if a task is destroyed during its execution

2014-09-20 Thread Marco Paolini
Marco Paolini added the comment: Sorry for keeping this alive. Take a look at the `wait_for.py` just submitted in the unrelated #22448: no strong refs to the tasks are kept. Tasks remain alive only because they are timers and the event loop keeps strong ref. Do you think my proposed patch is

[issue21091] EmailMessage.is_attachment should be a method

2014-09-20 Thread R. David Murray
R. David Murray added the comment: Here is a patch. Sorry for leaving it until the last minute...maybe someone can review it, but it is simple enough I'll commit it soon regardless. -- Added file: http://bugs.python.org/file36670/is_attachment_as_method.patch _

[issue21163] asyncio doesn't warn if a task is destroyed during its execution

2014-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not sure how that wait_for.py example from issue2116 relates to this issue -- it seems to demonstrate the opposite problem (tasks are kept alive even though they are cancelled). Then again I admit I haven't looked deeply into the example (though I am sy

[issue21163] asyncio doesn't warn if a task is destroyed during its execution

2014-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: (Whoops meant to link to issue22448.) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: By the way I just looked at wait_for.py; it has a bug where do_work() isn't using yield-from with the sleep() call. But that may well be the issue you were trying to debug, and this does not change my opinion about the issue -- I am still looking forward to

[issue14293] Message methods delegated via __getattr__ inaccessible using super().

2014-09-20 Thread R. David Murray
R. David Murray added the comment: _Headerlist never made it into the committed code. Subclassing Message works fine in both the mainline email code and the provisional extensions. -- resolution: -> out of date stage: -> resolved status: open -> closed __

[issue22444] Floor divide should return int

2014-09-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +alex ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue21083] Add get_content_disposition() to email.message.Message

2014-09-20 Thread R. David Murray
Changes by R. David Murray : -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue22444] Floor divide should return int

2014-09-20 Thread Tim Peters
Tim Peters added the comment: Floor division on floats is an unattractive nuisance and should be removed, period - so there ;-) But short of that, I favor leaving it alone. Whose life would be improved by changing it to return an int? Not mine - and doing so anyway is bound to break existin

[issue21079] EmailMessage.is_attachment == False if filename is present

2014-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0044ed0af96f by R David Murray in branch '3.4': #21079: is_attachment now looks only at the value, ignoring parameters. https://hg.python.org/cpython/rev/0044ed0af96f -- nosy: +python-dev ___ Python track

[issue21079] EmailMessage.is_attachment == False if filename is present

2014-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 54392c4a8880 by R David Murray in branch 'default': Merge: #21079: is_attachment now looks only at the value, ignoring parameters. https://hg.python.org/cpython/rev/54392c4a8880 -- ___ Python tracker

[issue21079] EmailMessage.is_attachment == False if filename is present

2014-09-20 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker ___

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-09-20 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue22444] Floor divide should return int

2014-09-20 Thread Alex Gaynor
Alex Gaynor added the comment: I can't say that I've ever used // on floats, but it seems to me anyone doing so (as opposed to normal division + explicit rounding) *intentionally* might be broken by this change, but anyone doing this incidentally is not really in a "gotcha" situation. Since th

[issue21091] EmailMessage.is_attachment should be a method

2014-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3df1c24d586 by R David Murray in branch '3.4': #21091: make is_attachment a method. https://hg.python.org/cpython/rev/a3df1c24d586 New changeset f7aff40609e7 by R David Murray in branch 'default': Merge: #21091: make is_attachment a method. https:/

[issue21091] EmailMessage.is_attachment should be a method

2014-09-20 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: -> behavior versions: +Python 3.4 ___ Python tracker ___ __

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-20 Thread Joshua Moore-Oliva
Joshua Moore-Oliva added the comment: My patch is ready for review, if I followed the process correctly I think you should have received an email https://codereview.appspot.com/145220043 > By the way I just looked at wait_for.py; it has a bug where do_work() isn't > using yield-from with the

[issue22359] Remove incorrect uses of recursive make

2014-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset c2a53aa27cad by Antoine Pitrou in branch 'default': Issue #22359: Remove incorrect uses of recursive make. Patch by Jonas Wagner. https://hg.python.org/cpython/rev/c2a53aa27cad -- nosy: +python-dev ___ P

[issue5309] distutils doesn't parallelize extension module compilation

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch raising DistutilsOptionError. I couldn't find any docs so I didn't update them :-) -- Added file: http://bugs.python.org/file36671/build_ext_parallel6.patch ___ Python tracker

[issue22359] Remove incorrect uses of recursive make

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've pushed the patch. Let's see if anyone complains. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: I will try to review later tonight. One thing though: > I tend to write my code with the thought that any non standard library function can yield That makes sense when using geven, but not when using asyncio or Trollius. Nothing will make events run if you d

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-20 Thread Joshua Moore-Oliva
Joshua Moore-Oliva added the comment: > I will try to review later tonight. Thanks! > That makes sense when using gevent, but not when using asyncio or Trollius. > Nothing will make events run if you don't use yield [from]. Yes, I am aware of that. I have written a small custom library using

[issue21354] PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers

2014-09-20 Thread Larry Hastings
Larry Hastings added the comment: This is still not fixed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue21354] PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers

2014-09-20 Thread Georg Brandl
Georg Brandl added the comment: Sorry for the "mismanagement", I probably didn't check again after the final resolution. -- nosy: +georg.brandl ___ Python tracker ___ __

[issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument

2014-09-20 Thread paul j3
paul j3 added the comment: Your patch fails: python3 -m unittest test_argparse.TestEmptyAndSpaceContainingArguments specifically these 2 subcases: (['-a badger'], NS(x='-a badger', y=None)), (['-y', '-a badger'], NS(x=None, y='-a badger')), At issue is

[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-20 Thread paul j3
Changes by paul j3 : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue21965] Add support for Memory BIO to _ssl

2014-09-20 Thread Joshua Moore-Oliva
Changes by Joshua Moore-Oliva : -- nosy: +chatgris ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

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

2014-09-20 Thread Raymond Hettinger
New submission from Raymond Hettinger: The use of urllib for REST APIs is impaired in the absence of a "Accept: */*" header such as that added automatically by the requests package or by the CURL command-line tool. # Example that gets an incorrect result due to the missing header import urll

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

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you explain how the result is incorrect? >>> f = urllib.request.urlopen('http://graph.facebook.com/raymondh') >>> json.loads(f.read().decode()) {'link': 'https://www.facebook.com/raymondh', 'id': '562805507', 'last_name': 'Hettinger', 'gender': 'male', 'fir

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

2014-09-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: Patch looks good. Will need similar addition in urllib2 and inclusion of tests. -- nosy: +orsenthil versions: +Python 3.4, Python 3.5 ___ Python tracker __

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

2014-09-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: Well, the result with loading using json will be same. but without sending Accept */*. The content-type returned is text/javascript; charset=UTF-8 and with sending of Accept */* the content-type is set to application/json; charset=UTF-8 (which is more desirab

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

2014-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The content-type returned is text/javascript; charset=UTF-8 and with > sending of Accept */* the content-type is set to application/json; > charset=UTF-8 (which is more desirable). Is that a bug in urllib, or in Facebook's HTTP implementation? Frankly, we shou

[issue22451] filtertuple, filterstring and filterunicode don't have optimization for PyBool_Type

2014-09-20 Thread Joshua Landau
New submission from Joshua Landau: All code referred to is from bltinmodule.c, Python 2.7.8: https://github.com/python/cpython/blob/2.7/Python/bltinmodule.c filter implements and optimization for PyBool_Type, making it equivalent to PyNone: # Line 303 if (func == (PyObject *)&PyBool_Ty

[issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument

2014-09-20 Thread paul j3
Changes by paul j3 : Added file: http://bugs.python.org/file36674/example.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument

2014-09-20 Thread paul j3
Changes by paul j3 : Removed file: http://bugs.python.org/file36672/example.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: On Sat, Sep 20, 2014 at 3:38 PM, Joshua Moore-Oliva wrote: > > Joshua Moore-Oliva added the comment: > > > I will try to review later tonight. > > Thanks! > > > That makes sense when using gevent, but not when using asyncio or > Trollius. Nothing will make ev

[issue22451] filtertuple, filterstring and filterunicode don't have optimization for PyBool_Type

2014-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is there code that isn't working as documented or are you asking for additional optimizations to make the other cases run a bit faster when 'bool' is passed in as the filter function? -- nosy: +rhettinger ___ Pyt

[issue22451] filtertuple, filterstring and filterunicode don't have optimization for PyBool_Type

2014-09-20 Thread Joshua Landau
Joshua Landau added the comment: It's solely a speed thing. I think it was an oversight that the optimisation was only applied to lists. I didn't expect the optimisation to break when applied to tuples. -- ___ Python tracker

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-09-20 Thread Alex Gaynor
Alex Gaynor added the comment: Does this effect anything besides causing SSL_CERT_DIR and SSL_CERT_FILE to be respected? -- ___ Python tracker ___ __