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
Changes by Facundo Batista <[EMAIL PROTECTED]>:
--
assignee: -> facundobatista
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2450>
__
___
Pyt
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
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
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://
Facundo Batista <[EMAIL PROTECTED]> added the comment:
Commited in r61731.
Thank you both!
--
resolution: -> fixed
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs
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
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 <
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
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://
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
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
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.
Facundo Batista <[EMAIL PROTECTED]> added the comment:
Yes! :)
--
assignee: -> facundobatista
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2451>
__
_
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
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
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!
__
Facundo Batista <[EMAIL PROTECTED]> added the comment:
Closed as by OP indication.
--
resolution: -> invalid
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs
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
Facundo Batista <[EMAIL PROTECTED]> added the comment:
Commited, r62638. Thank you both!
--
resolution: -> accepted
status: open -> closed
__
Tracker <[EMAIL PROTECTED]>
<http://bugs
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
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!
Changes by Facundo Batista :
--
nosy: +facundobatista
___
Python tracker
<http://bugs.python.org/issue4753>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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/
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
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
Facundo Batista added the comment:
Removed the messages in decimal.py (r.69674).
___
Python tracker
<http://bugs.python.org/issue3676>
___
___
Python-bugs-list mailin
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
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
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
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
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
Facundo Batista added the comment:
It's a theoretical issue, I didn't hit it myself.
--
___
Python tracker
<https://bugs.python.org/issue40153>
___
___
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:
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
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
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.
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
Change by Facundo Batista :
--
nosy: -facundobatista
___
Python tracker
<https://bugs.python.org/issue37168>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Facundo Batista :
--
nosy: -facundobatista
___
Python tracker
<https://bugs.python.org/issue18417>
___
___
Python-bugs-list mailing list
Unsubscribe:
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.
Change by Facundo Batista :
--
nosy: -facundobatista
___
Python tracker
<https://bugs.python.org/issue26680>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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,
Changes by Facundo Batista :
--
stage: resolved -> patch review
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue13866>
___
_
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
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
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
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
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
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
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
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
Changes by Facundo Batista :
--
nosy: +facundobatista
___
Python tracker
<http://bugs.python.org/issue5911>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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/
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
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
Changes by Facundo Batista :
--
nosy: -facundobatista
___
Python tracker
<http://bugs.python.org/issue24974>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Changes by Facundo Batista :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue23887>
___
___
Python-bugs-list
Changes by Facundo Batista :
--
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issue28019>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
301 - 372 of 372 matches
Mail list logo