[issue2451] No way to disable socket timeouts in httplib, etc.

2008-03-21 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: When the semantics of timout in htmllib (and the other libraries) were discussed, the community approved the following behaviour: - setdefaulttimeout() was a hack to allow to set the timeout when nothing else is available. - Now th

[issue2450] urllib2.Request constructor has no timeout parameter

2008-03-21 Thread Facundo Batista
Changes by Facundo Batista <[EMAIL PROTECTED]>: -- assignee: -> facundobatista __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2450> __ ___ Pyt

[issue2451] No way to disable socket timeouts in httplib, etc.

2008-03-21 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Two or three threads run in parallel at that time for this issue, don't remember exactly where this was decided. > *Because* socket.setdefaulttimeout() is a hack for when nothing else is > available, there should be a

[issue2450] urllib2.Request constructor has no timeout parameter

2008-03-21 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: The argument timeout can not have the same semantics than data, see the following cases: - r = Request(url) - urlopen(r, data="foo") - # data is "foo" - r = Request(url, data="foo") - urlopen(r) - # da

[issue2450] urllib2.Request constructor has no timeout parameter

2008-03-21 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: As I wrote in the other bug that you opened (#2451), introducing this will complicate the usage and semantics of what is already established and working. __ Tracker <[EMAIL PROTECTED]> <http://

[issue2273] test_decimal: possible thread lockup in test case

2008-03-21 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Commited in r61731. Thank you both! -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2482] Decimal(unicode)

2008-03-25 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Decimal needs to grow something like the following near the top of the module: try: _bytes = bytes except NameError: # 2.5 or earlier _bytes = str and then use _bytes instead of str as appropriate throughout the rest of the

[issue2478] decimal.Decimal( 0 ).sqrt() fails

2008-03-25 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: It'd be nice to have it, but actually I'm not sure that this is doable without some heavy editing of decimal's test framework. Thanks! -- nosy: +facundobatista __ Tracker <

[issue2451] No way to disable socket timeouts in httplib, etc.

2008-03-27 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Mmm it seems that not only overlooked this final agreement, but also forgot it! Bloody brain, :( I'll happily review any proposed patch for this. Alan, maybe you can be persuaded to submit one? <.5 wink> -- res

[issue2508] When you create a file using file(path, "w") if the filename is illegal it throws an irrelevant error message

2008-03-29 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: How do you know, in a cross platform way, that the name is illegal instead that the file or directory does not exist? -- nosy: +facundobatista __ Tracker <[EMAIL PROTECTED]> <http://

[issue2531] float compared to decimal is silently incorrect.

2008-04-02 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Which version of 2.4 are you talking about? This line in the tests... self.assertNotEqual(da, 32.7) is there since almost 4 years ago (release 36325, and 2.4 is tagged in release 37906). Anyway, this behaviour is ok, as

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: I find similar speedups: isinstance(42, int) -2% isinstance(42, type) 45% isinstance(object, type) -1% isinstance(object, int) 42% isinstance(float, int)44% (both negative ones are actually lower than original, but

[issue2576] httplib read() very slow due to lack of socket buffer

2008-04-08 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Daniel, Aren, please submit also what Daniel described, and I'll take a look and push it forward. Regards, -- nosy: +facundobatista __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2451] No way to disable socket timeouts in httplib, etc.

2008-04-25 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Yes! :) -- assignee: -> facundobatista __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2451> __ _

[issue2690] Precompute range length

2008-04-28 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: My 2 cents: for me is more useful to have a unbound range() than to be able to do a len() on it. For me, range() should mimic a number generator: no limit, no length. -- nosy: +facundob

[issue2714] Unable to start IDLE on Windows Server 2003 x64 Edition w/ SP2

2008-04-28 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Disable all Operating System firewalls and try again (remember to enable the firewalls again after the test). This was a common problem in WinXP -- nosy: +facundobatista __ Tracker <[EMAIL

[issue2690] Precompute range length

2008-04-29 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Fair enough, specially if in the documentation of range() we put "if you want a unbound, no limit, number generator, use itertools.count()" (or something well written in english ;) ). Thanks! __

[issue2714] Unable to start IDLE on Windows Server 2003 x64 Edition w/ SP2

2008-04-30 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Closed as by OP indication. -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2735] range: lean and mean

2008-05-01 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Just for the record: Why __len__ tries to convert it to Py_size_t (possibly generating an Overflow), and not just returns the PyLong object? -- nosy: +facundobatista __ Tracker <[EMAIL

[issue2728] Failing decimal doctest

2008-05-02 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Commited, r62638. Thank you both! -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2486] Decimal slowdown in 3.0 due to str/unicode changes

2008-05-04 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: I like this path, also. Beyond Deccoeff, this module could hold in the future other functions that are speed critical. Great work, Mark! __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4084] Decimal.max(NaN, x) gives incorrect results when x is finite and long

2008-12-10 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Commited in trunk and Py3, thanks Mark! Please, could you commit it in 2.5? The only change I've made in the patch is adding the issue number to Misc/NEWS, the rest is ok. After that, just close this. Thanks again!

[issue4753] Faster opcode dispatch on gcc

2009-01-04 Thread Facundo Batista
Changes by Facundo Batista : -- nosy: +facundobatista ___ Python tracker <http://bugs.python.org/issue4753> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1251] ssl module doesn't support non-blocking handshakes

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Bill, should this issue be closed? Or Senthil found a bug in the actual code and you're waiting for him to point out where is the problem or a way to reproduce it? -- nosy: +facundobatista ___ Python tr

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Everything looks ok, with one detail, the new set_tunnel() function. Should this function be public? If yes, new documentation should be added. If not, it should start with "_". I think that it should be public, because we're using it from

[issue4607] uuid behavior with multiple threads

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Yes, _buffer is not longer global. Thanks for the report! -- nosy: +facundobatista resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4608] urllib.request.urlopen does not return an iterable object

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Senthil, do you think you could provide a test case for this? Thank you! -- assignee: -> facundobatista nosy: +facundobatista ___ Python tracker <http://bugs.python.org/iss

[issue4796] Decimal to receive from_float method

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Raymond, Mark, thanks for this work! I'd include the following in the PEP (under the "from float" discussion), what do you think? """ Update: The .from_float() method was added to Python 2.7 and 3.1 versions, providing loss

[issue3676] Obsolete references to PEP 291 in py3k lib

2009-02-16 Thread Facundo Batista
Facundo Batista added the comment: Removed the messages in decimal.py (r.69674). ___ Python tracker <http://bugs.python.org/issue3676> ___ ___ Python-bugs-list mailin

[issue24260] TabError behavior doesn't match documentation

2021-03-13 Thread Facundo Batista
Facundo Batista added the comment: Found this after seeing (once again) somebody asking for help in Python Argentina after having a file mixing tabs and spaces. This tends to catch new people. I'm +1 to just raise an error if the file mixes tabs and spaces for indentation. I've

[issue39275] Traceback off by one line when

2020-01-09 Thread Facundo Batista
New submission from Facundo Batista : When using pdb to debug, the traceback is off by one line. For example, this simple script: ``` print("line 1") import pdb;pdb.set_trace() print("line 2") print("line 3", broken) print("line 4") ``` ...when run

[issue39275] Traceback off by one line when

2020-01-11 Thread Facundo Batista
Facundo Batista added the comment: This is a duplicate of https://bugs.python.org/issue16482 -- closing it. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34972] json dump silently converts int keys to string

2020-02-03 Thread Facundo Batista
Facundo Batista added the comment: I understand (and agree with) the merits of automatically converting the int to str when dumping to a string. However, this result really surprised me: >>> json.dumps({1:2, "1":3}) '{"1": 2, "1": 3}' Is i

[issue40153] json dump with repeated key

2020-04-02 Thread Facundo Batista
New submission from Facundo Batista : As stated in docs [0], JSON structures must not have duplicated keys. >>> json.dumps({1:2, "1":3}) '{"1": 2, "1": 3}' This is related to https://bugs.python.org/issue34972 . [0] "The RFC specifie

[issue40153] json dump with repeated key

2020-04-07 Thread Facundo Batista
Facundo Batista added the comment: It's a theoretical issue, I didn't hit it myself. -- ___ Python tracker <https://bugs.python.org/issue40153> ___ ___

[issue40382] Make 'rt' the default for open in docs

2020-04-24 Thread Facundo Batista
New submission from Facundo Batista : This is mostly a confusion about 'r' being a synonym of 'rt', while it's more explicit if we consider 'r' as one default, and 't' as other (as other parts of the documentation do). Doing `help(open)` we get:

[issue40486] pathlib's iterdir doesn't expecify what happens if directory content change

2020-05-03 Thread Facundo Batista
New submission from Facundo Batista : Documentation for Path.iterdir ( https://docs.python.org/3/library/pathlib.html#pathlib.Path.iterdir ) doesn't specify what happens when the directory change. This is important, as the function does NOT return a list (which would imply that a &quo

[issue40153] json dump with repeated key

2020-08-30 Thread Facundo Batista
Facundo Batista added the comment: The balance here is allow an invalid JSON to be created (but documenting that on some situations that will happen), or sticking to always produce valid JSONs, but with a hit in performance (which we don't know so far if it's big

[issue15947] Assigning new values to instance of pointer types does not check validity

2020-08-30 Thread Facundo Batista
Facundo Batista added the comment: I'm closing this, it looks to me that behaviour changed and this is safe now. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.

[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-08-30 Thread Facundo Batista
Facundo Batista added the comment: However, Serhiy, `os.listdir()` builds a list quickly and gives you that, so the chance of the directory being modified is quite low (however, for big directories, that may happen, and it's probably good to notice that in the docs). For `Path.it

[issue37168] Decimal divisions sometimes 10x or 100x too large

2020-08-30 Thread Facundo Batista
Change by Facundo Batista : -- nosy: -facundobatista ___ Python tracker <https://bugs.python.org/issue37168> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18417] urlopen() has a hidden default for its timeout argument

2020-08-30 Thread Facundo Batista
Change by Facundo Batista : -- nosy: -facundobatista ___ Python tracker <https://bugs.python.org/issue18417> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41400] Remove references to nonexisting __ne__ methods

2020-08-31 Thread Facundo Batista
Facundo Batista added the comment: >From a "consumer" POV, it's totally useful to see that `__ne__` is part of >what Set (and others) provides, even if it's implemented in the Set class >itself or wherever. So +1 to leave it like it's currently is.

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2018-03-15 Thread Facundo Batista
Change by Facundo Batista : -- nosy: -facundobatista ___ Python tracker <https://bugs.python.org/issue26680> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33160] Negative values in positional access inside formatting

2018-03-27 Thread Facundo Batista
New submission from Facundo Batista : This works fine: >>> "{[0]}".format([1, 2, 3]) '1' This should work too: >>> "{[-1]}".format([1, 2, 3]) Traceback (most recent call last): File "", line 1, in TypeError: list indices must be int

[issue28700] test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)

2017-10-16 Thread Facundo Batista
Facundo Batista added the comment: I have this failure on my machine too (Ubuntu 17.04, kernel 4.10.0-37-generic). Installing `libgdbm-dev` and running configure with `--with-dbmliborder=gdbm:bdb` didn't help. -- nosy: +facundobatista ___ P

[issue32487] assertRaises should return the "captured" exception

2018-01-03 Thread Facundo Batista
New submission from Facundo Batista : Sometimes it's nice to do extra checks on the error raised and captured by self.assertRaises call. Yes, the same can be achieved using assertRaises as a context manager and then accessing the `exception` attribute in the context manager, but it look

[issue15947] Assigning new values to instance of pointer types does not check validity

2012-09-15 Thread Facundo Batista
New submission from Facundo Batista: In the doc it says: """ Assigning a new value to instances of the pointer types c_char_p, c_wchar_p, and c_void_p changes the memory location they point to, not the contents of the memory block [...]. >>> s = "Hello,

[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus

2014-05-20 Thread Facundo Batista
Changes by Facundo Batista : -- stage: resolved -> patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker <http://bugs.python.org/issue13866> ___ _

[issue19272] Can't pickle lambda (while named functions are ok)

2013-10-16 Thread Facundo Batista
New submission from Facundo Batista: This is ok: Python 3.4.0a3+ (default:86af5991c809, Oct 13 2013, 16:42:52) ... >>> import pickle >>> def f(): ... pass ... >>> pickle.dumps(f) b'\x80\x03c__main__\nf\nq\x00.' However, whe

[issue19272] Can't pickle lambda (while named functions are ok)

2013-10-16 Thread Facundo Batista
Facundo Batista added the comment: Ethan, lambda functions are included in "functions defined at the top level of a module". Probably we should note there something like "except lambdas, because function pickling is by na

[issue19272] Can't pickle lambda (while named functions are ok)

2013-10-16 Thread Facundo Batista
Facundo Batista added the comment: Jesús, Amaury: What if pickle would assign a random unique name to the lambda (like, an UUID) so it can be pickled and unpickled? -- ___ Python tracker <http://bugs.python.org/issue19

[issue22058] datetime.datetime() should accept a datetime.date as constructor

2014-07-24 Thread Facundo Batista
New submission from Facundo Batista: Currently (tested on py3.4): >>> from datetime import datetime, date >>> d = datetime.now() >>> date(d) Traceback (most recent call last): File "", line 1, in TypeError: an integer is required (got type datetime.date

[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Facundo Batista
Changes by Facundo Batista : -- title: datetime.datetime() should accept a datetime.date as constructor -> datetime.datetime() should accept a datetime.date as init parameter ___ Python tracker <http://bugs.python.org/issu

[issue22058] datetime.datetime() should accept a datetime.date as init parameter

2014-07-24 Thread Facundo Batista
Facundo Batista added the comment: El 24/07/14 a las 15:01, Tim Peters escibió: > "datetime.date() should accept a datetime.datetime as init > parameter" > > instead? That's what the example appears to be getting at. > > If so, -1. Datetime objects a

[issue6795] decimal.py: minor issues && usability

2009-09-04 Thread Facundo Batista
Facundo Batista added the comment: Issue 1: +1 to raise ValueError Issue 3: -0 to change actual behaviour Thanks! -- ___ Python tracker <http://bugs.python.org/issue6

[issue6845] Restart support in binary upload for ftplib

2009-09-21 Thread Facundo Batista
Facundo Batista added the comment: I like this. I'd love to see a test of this, though. Pablo, do you think you could came up with a test? Thanks! -- ___ Python tracker <http://bugs.python.org/i

[issue5911] built-in compile() should take encoding option.

2009-10-12 Thread Facundo Batista
Changes by Facundo Batista : -- nosy: +facundobatista ___ Python tracker <http://bugs.python.org/issue5911> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5445] codecs.StreamWriter.writelines problem when passed generator

2009-03-09 Thread Facundo Batista
Facundo Batista added the comment: When fixing this, note that the builtin name "list" should not be overwritten by the argument name. -- message_count: 1.0 -> 2.0 nosy: +facundobatista nosy_count: 1.0 -> 2.0 ___ Pytho

[issue5435] test_httpservers on Debian Testing

2009-03-23 Thread Facundo Batista
Facundo Batista added the comment: CGI tests shouldn't be run as root, it seems, as it breaks the inherent protection. -- nosy: +facundobatista resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-05-20 Thread Facundo Batista
Facundo Batista added the comment: Hans, please take a look to my comment 79573 in this same bug. If you could do that, it'd be amazing... Thank you! -- ___ Python tracker <http://bugs.python.org/issu

[issue6274] subprocess.Popen() may leak file descriptors

2009-06-12 Thread Facundo Batista
New submission from Facundo Batista : If something bad happens between a os.pipe() call is called, and the returned file descriptors are closed, those file descriptors are never closed. In a long lived process this is a problem. Patch (against trunk) to solve this is attached

[issue6274] subprocess.Popen() may leak file descriptors

2009-06-19 Thread Facundo Batista
Facundo Batista added the comment: Applied the patch (slightly modified) to trunk (2.7), 2.6, and 3k branches. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue29696] Use namedtuple in Formatter.parse iterator response

2017-03-02 Thread Facundo Batista
New submission from Facundo Batista: Right now: >>> Formatter().parse("mira como bebebn los peces en el {rio} {de} {la} plata") >>> next(_) ('mira como bebebn los peces en el ', 'rio', '', None) This returned tuple should be a namedtup

[issue26826] Expose new copy_file_range() syscall in os module.

2016-07-05 Thread Facundo Batista
Facundo Batista added the comment: It looked ok to me (I couldn't try it, as I still have 4.4 kernel). One thing to the be done is to improve the test coverage (trying the usage of all the parameters, at least). -- nosy: +facundobatista ___ P

[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-01 Thread Facundo Batista
Changes by Facundo Batista : -- nosy: -facundobatista ___ Python tracker <http://bugs.python.org/issue24974> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23887] HTTPError doesn't have a good "repr" representation

2015-04-08 Thread Facundo Batista
New submission from Facundo Batista: I normally print(repr()) the exception I got, for debugging purposes. I use repr() because for builtin exceptions, str() will print only the message, and not the exception type. But for HTTPError, the repr() of it is "HTTPError()", witho

[issue23887] HTTPError doesn't have a good "repr" representation

2015-04-16 Thread Facundo Batista
Facundo Batista added the comment: Hi Berker, I like your patch, will apply it after doing a test for it. -- ___ Python tracker <http://bugs.python.org/issue23

[issue23887] HTTPError doesn't have a good "repr" representation

2015-04-22 Thread Facundo Batista
Changes by Facundo Batista : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue23887> ___ ___ Python-bugs-list

[issue28019] itertools.count() falls back to fast (integer) mode when step rounds to 1

2016-09-08 Thread Facundo Batista
Changes by Facundo Batista : -- versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue28019> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28019] itertools.count() falls back to fast (integer) mode when step rounds to 1

2016-09-08 Thread Facundo Batista
Facundo Batista added the comment: I think the fix nails it; all the problem was that the "fast" mode was wrongly detected, and all the problems (counting badly, or a bad repr, etc) is a problem after setting cnt into PY_SSIZE_T_MAX. IIUC there is nothing special to do when step=1.0

[issue28135] assertRaises should return the exception in its simple form

2016-09-13 Thread Facundo Batista
New submission from Facundo Batista: So, you could do: exc = self.assertRaises(ValueError, somefunc, someargs) And then, explore "exc" as will. Yes, you can get the exception if you use assertRaises as a context manager, but that leads to more cumbersome code: with self.as

<    1   2   3   4