Alexander Grigorievskiy added the comment:
I have added some clarification following Westley Martínez recommendation. I
provided references to the list comprehensions and generator expressions. I
tried to make the description short.
--
keywords: +patch
nosy: +AlexGrig
Added file: http
Alexander Belopolsky added the comment:
As David explained, utcoffset() method signature is dictated by the base class.
This is not a bug.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python track
New submission from Alexander Schepanovski:
inspect.getargspec() returns empty ArgSpec for map() and filter():
>>> import inspect
>>> inspect.getargspec(map)
ArgSpec(args=[], varargs=None, keywords=None, defaults=None)
>>> inspect.getargspec(filter)
New submission from Alexander Patrakov:
I could not access http://docs.python.org/ from work today. Upon investigation,
it appears that the ISP has blocked all sites on the IP address 185.31.17.175,
because of the court order unrelated to docs.python.org. Many other ISPs in
Russia also don
Alexander Patrakov added the comment:
The site is now accessible. But this case is going to repeat itself.
--
___
Python tracker
<http://bugs.python.org/issue22
Alexander Belopolsky added the comment:
This is a duplicate of #15873.
--
components: +Extension Modules
resolution: -> duplicate
status: open -> closed
superseder: -> datetime: add ability to parse RFC 3339 dates and times
type: behavior -> enhancement
versions:
Alexander Belopolsky added the comment:
I see. I thought you were complaining about "%z" format not supporting "00:00"
as in
>>> from datetime import *
>>> datetime.strptime("00:00","%z")
Traceback (most recent call last):
..
Val
Alexander Belopolsky added the comment:
See also <http://bugs.python.org/issue5094#msg106476>.
It looks like providing 'UTC' as the name of utc singleton was part of my
original proposal. I have no recollection on why it was not implemented that
way.
--
nos
Alexander Belopolsky added the comment:
Akira,
I see that you participated in the original discussion (msg107608). We settled
on str(timezone.utc) == 'UTC+00:00' and this was clearly a deliberate choice.
I don't think we can revisit this now, but we can probably make strptim
New submission from Alexander Patrakov:
See the example at
https://docs.python.org/2/library/socket.html#socket.getaddrinfo
>>> socket.getaddrinfo("www.python.org", 80, 0, 0, socket.SOL_TCP)
As I am primarily a C programmer, it is quite surprising for me to see a SOL_*
be
Alexander Weidinger added the comment:
So, I analyzed the error and I think I found the problem. (urllib.request -
Python 3.5.0)
It all starts with l. 1079, as the 407 error gets handled, everything ok here,
in l. 1081 http_error_auth_reqed(...) gets executed.
So next, we are in l. 939, also
Alexander Belopolsky added the comment:
There is no daylight savings time in Moscow and python detects this correctly:
$ TZ=Europe/Moscow python3
>>> import time
>>> time.daylight
0
Note that historically, there was DST, but time module cannot handle historical
TZ
Alexander Belopolsky added the comment:
I don't think there is anything we can do here. Without a TZ database, Python
has to rely on time.tzname which in case of TZ=Europe/Moscow returns
>>> time.tzname
('MSK', 'MSK')
Hardcoding a timezones dictionary as d
Alexander Belopolsky added the comment:
On the second thought, we can probably make the same guesswork as in
PyInit_timezone (see Modules/timemodule.c) in time.strptime, but not for the
current time, but for the time parsed.
--
___
Python tracker
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
___
Python tracker
<http://bugs.python.org/issue22426>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
--
stage: -> needs patch
type: behavior -> enhancement
versions: -Python 2.7, Python 3.4
___
Python tracker
<http://bugs.python.org/i
New submission from Alexander Belopolsky:
PEP 3141 defines floor division as floor(x/y) and specifies that floor() should
return int type. Builtin float type has been made part of the PEP 3141
numerical tower, but floor division of two floats still results in a float.
See also:
* #1656
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue22445>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue22385>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 no
Alexander Belopolsky added the comment:
> However, Scheme returns floats
Does Scheme's default integer type support arbitrarily large values?
--
___
Python tracker
<http://bugs.python.org
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
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:
>>> isinsta
Alexander Belopolsky added the comment:
I find this footnote somewhat confusing:
"""
(8) Similar to %U and %W, %V is only used in calculations when the day of the
week and the ISO year (%G) are specified when used with the strptime method.
"""
The existin
Alexander Belopolsky added the comment:
How was "%Y %V" issue resolved? I don't see any tests for this case.
--
___
Python tracker
<http://bugs.pyt
Alexander Belopolsky added the comment:
[Raymond]
> The current behavior has been around for a long time and is implemented in
> several modules including decimal and fractions.
No, in the fractions module floor division returns an int:
>>> type(Fraction(2) // Fraction(1
Alexander Belopolsky added the comment:
[Raymond]
> The PEP should be revised to say that floor division is defined to
> return a value that is *equal* to an Integral but not place any
> restriction on the return type.
If we take this route, what float('inf') // 1 and float
Alexander Belopolsky added the comment:
Mark,
Raymond suggested that "The PEP 3141 should be revised to say that floor
division is defined to return a value that is *equal* to an Integral".
Since nan or inf are not *equal* to any Integral, the current implementation
does not compl
Alexander Belopolsky added the comment:
skrah> I think both should return inf.
What about this case:
>>> Decimal('1') // Decimal('-inf')
Decimal('-0')
>>> 1. // float('-inf')
-1.0
--
_
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue22198>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I wonder if it would make sense to rewrite float_divmod using the newer
POSIX/C99 remquo function. I believe it is designed to compute the exact value
of round(x/y), but getting floor instead should not be hard. Its behavior on
special values is fully
Changes by Alexander Belopolsky :
--
assignee: belopolsky ->
___
Python tracker
<http://bugs.python.org/issue9104>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
For future reference, here is the example showing %Y %V ambiguity:
>>> date(2013,12,31).strftime('%Y %V %u')
'2013 01 2'
>>> date(2013,1,1).strftime('%Y %V %u')
'2013 01 2'
which is resolved by us
Alexander Belopolsky added the comment:
I think we need more tests showing that new directives don't violate strftime -
strptime round-trip invariants.
--
title: strptime should implement %V or %u directive from libc -> strptime
should implement %G, %V and %u di
Changes by Alexander Belopolsky :
--
resolution: -> wont fix
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue5979>
___
___
Pyth
Alexander Belopolsky added the comment:
Documentation should say "new in 3.5".
--
___
Python tracker
<http://bugs.python.org/issue12006>
___
___
Python-b
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue22486>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue22194>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I don't think fficonfig.py.in is from upstream.
--
___
Python tracker
<http://bugs.python.org/issue17873>
___
___
Alexander Belopolsky added the comment:
The issue was not fixed. With multiple invisible space characters I can get
Python 3.5.0a0 (default:5313b4c0bb6c, Sep 30 2014, 18:55:45)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] on darwin
>>> invalid = None
File "",
Alexander Belopolsky added the comment:
The original problem is still present
Python 3.5.0a0 (default:5313b4c0bb6c, Sep 30 2014, 18:55:45)
>>> A_I_U_E_O$ = None
File "", line 1
A_I_U_E_O$ = None
^
SyntaxError: invalid syntax
Replace A_I_U_E_O above with the
Alexander Belopolsky added the comment:
Leon,
Are you trying to run compiled python binary before it was installed? If so,
this is expected and not specific to clang or libffi.
If your issue is something else - please explain how to reproduce it and post
the error messages that you see
Alexander Belopolsky added the comment:
Josh,
Would issue7830.diff solve your use-case as is? See msg108980 for the
limitations. If so, I don't mind reopening this issue.
--
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
I would say that getting "maximum recursion depth exceeded" error from
evaluating a deeply nested partial is a bug, but I am not sure we should fix it
by flattening partial objects in the constructor or by being smarter at
evalu
Alexander Belopolsky added the comment:
I've updated the patch.
--
keywords: +patch
Added file: http://bugs.python.org/file36837/issue7830-2.diff
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
I am going to reject this. Assert failures should never be seen by users and
for a developer "assert 1 <= month <= 12" is as clear as "month must be in
1..12."
--
nosy: +belopolsky
resolution: -> wont fix
stage:
Alexander Belopolsky added the comment:
@terry - datetime.py was originally written as a prototype for the C code and
many seemingly unpythonic constructs therein are motivated by the desire to
ease the translation to C.
I would not mind simplifying _DI4Y calculation as you suggest, but
New submission from Alexander Boyd:
pathlib.Path.relative_to() blows up when given a path that's not an ancestor of
the path on which relative_to is being called:
>>> pathlib.Path("/usr/bin").relative_to("/etc")
Traceback (most recent call last):
File
New submission from Alexander Belopolsky:
This problem happens when I unpack a file from a 200+ MB zip archive as follows:
with zipfile.ZipFile(archive) as z:
data = b''
with z.open(filename, 'rU') as f:
for line in f:
data += line
I cannot redu
Changes by Alexander Belopolsky :
--
dependencies: +Add support for bzip2 compression to the zipfile module
keywords: +gsoc
nosy: +serhiy.storchaka
___
Python tracker
<http://bugs.python.org/issue20
Changes by Alexander Belopolsky :
--
keywords: +3.2regression -gsoc
nosy: +alanmcintyre
___
Python tracker
<http://bugs.python.org/issue20048>
___
___
Python-bug
Changes by Alexander Belopolsky :
--
keywords: -3.2regression
___
Python tracker
<http://bugs.python.org/issue20048>
___
___
Python-bugs-list mailing list
Unsub
Changes by Alexander Belopolsky :
--
components: +Library (Lib)
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue20048>
___
___
Python-
Alexander Belopolsky added the comment:
It does!
--
___
Python tracker
<http://bugs.python.org/issue20048>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Pyhalov:
When Python 2.6 (or 2.7) compiled with _XOPEN_SOURCE=600 on illumos
string.lowercase and string.uppercase contain garbage when UTF-8 locale is
used.
(OpenIndiana bug report - https://www.illumos.org/issues/4411 ).
The reason is that with UTF-8 locale
Alexander Pyhalov added the comment:
Honestly, I don't understand locale-related things good enough. But I
received this explanation when discussed similar issue in illumos
developers mailing list.
http://comments.gmane.org/gmane.os.illumos.devel/14193
2013/12/22 Antoine Pitrou
>
&
Alexander Pyhalov added the comment:
I've discussed this once more.
>From islower man page:
RETURN VALUES
If the argument to any of the character handling macros is
not in the domain of the function, the result is undefined.
And (char)128-255 are not legal UTF-8 (at leas
Alexander Boyd added the comment:
Then perhaps the docstring of relative_to could note this (like relpath does),
or a separate method that's explicitly not symlink safe created.
Or better yet, what about a function that does (or at least tries to) give the
correct answer in the fa
Alexander Belopolsky added the comment:
If "equivalent to" code is not considered to be part of documentation, then the
meaning of negative times should be documented.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.o
Alexander Ljungberg added the comment:
This still appears to be an issue in Python 2.7. Queue.get routinely hangs for
a very long time on the Raspberry Pi as it doesn't have a clock battery and
often ends up significantly adjusting its system time soon after startup.
--
New submission from Alexander Mohr:
it would be REALLY nice (and REALLY easy) to add a parameter: exist_ok and pass
this to os.makedirs with the same parameter name so you can use copytree to
append a src dir to an existing dst dir.
--
components: Library (Lib)
messages: 212691
nosy
Alexander Belopolsky added the comment:
> Please reopen.
Please bring your case to python-ideas. All developers who commented on this
issue agree that it is invalid.
--
___
Python tracker
<http://bugs.python.org/issu
Alexander Mohr added the comment:
awesome, thanks so much!!
--
___
Python tracker
<http://bugs.python.org/issue20849>
___
___
Python-bugs-list mailing list
Unsub
New submission from Alexander Belopolsky:
The rationale for making this change is that the current behaviour converts a
stylistic problem in checking values against a sentinel via "bool(value)"
instead of "value is not None" into a subtle data driven behavioural bug that
Changes by Alexander Belopolsky :
--
nosy: -belopolsky
___
Python tracker
<http://bugs.python.org/issue20855>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
nosy: -belopolsky
___
Python tracker
<http://bugs.python.org/issue13936>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I thought literal copying was enough of a hint to humor without a smiley in the
title.
--
___
Python tracker
<http://bugs.python.org/issue20
Alexander Belopolsky added the comment:
#20855 was meant as a joke, so I'll keep serious responses here.
Nick wrote:
"""
Alexander, my goal is to flip the default assumption in the time discussion. It
is clear from the documentation that the current behaviour is intention
Alexander Belopolsky added the comment:
Nick wrote:
> any deprecation warning should explain how to convert
> a time object to "seconds since midnight".
I would like to see such an explanation regardless of the outcome here.
The best I can think of is
timedelta(hours=t.hour,
Alexander Belopolsky added the comment:
> You're trying to count midnight as the previous day instead of the actual day?
yes
> That seems extremely contrived
Why? Midnight can be considered to be the last moment of the day or the first
moment of the day. In ISO standard there a
Alexander Belopolsky added the comment:
> If Midnight is considered the last moment of the day then it
> evaluating to false makes even less sense since the rationale
> given is "time is seconds since midnight".
You are erecting a straw-man. Python clearly considers time
Alexander Belopolsky added the comment:
> So in that case your example using midnight as false is even more
> confusing and even more wrong than not using ``is None`` on the
> conditional check.
I should have added that dt is a datetime instance and therefore dt.time() is
None is alw
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
___
Python tracker
<http://bugs.python.org/issue20858>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
I would like to hear from PyPy developers before we decide what to do with this
effort. Pure Python implementation is not used by CPython,
but I am afraid that people who actually use it will not appreciate the code
churn.
--
nosy
Alexander Belopolsky added the comment:
Oh - I did not realize that this originated in PyPy.
--
___
Python tracker
<http://bugs.python.org/issue20858>
___
___
Changes by Alexander Belopolsky :
--
nosy: +mark.dickinson
___
Python tracker
<http://bugs.python.org/issue20861>
___
___
Python-bugs-list mailing list
Unsub
Alexander Belopolsky added the comment:
>I'd appreciate any pointers on how to get started
You probably know that the relevant code is in
http://hg.python.org/cpython/file/47f37a688c4c/Modules/_datetimemodule.c#l4059
The devguide should get you started:
http://docs.python.org/
Alexander Belopolsky added the comment:
> On Mar 7, 2014, at 10:12 AM, "R. David Murray" wrote:
>
> I asked about it on IRC and someone said it was because arithmetic on times
> was ambiguous because of timezones, and I just accepted that rather than
> wonder why i
Alexander Belopolsky added the comment:
> On Mar 7, 2014, at 10:15 AM, Antoine Pitrou wrote:
>
> Adding times of the day sounds as well-defined to me as adding
> centigrade temperatures.
What is wrong with adding temperatures? Climate people do it all the time when
computing
Alexander Belopolsky added the comment:
I think the timezone related problems are a red herring. Aware datetime +/-
timedelta arithmetics is naive - tzinfo is ignored in calculations and copied
to the result:
http://hg.python.org/cpython/file/c83ce2a1841c/Lib/datetime.py#l1711
The utcoffset
Alexander Mohr added the comment:
how about instead we rename the new parameter to dirs_exists_ok or something
like that since the method already allows for existing files.
--
___
Python tracker
<http://bugs.python.org/issue20
Alexander Mohr added the comment:
I personally dont think this is worth investing the time for a discussion.
If the maintainers dont want to accept this or a minor variation without a
discussion ill just keep my local monkeypatch :) thanks again for the
quick patch Elias!
On Mar 8, 2014 4:03 PM
New submission from Alexander Myodov :
Occurs in 2.6, doesn't occur in 3.1.
Example:
Python 2.6.2+ (release26-maint, Jun 23 2009, 07:08:39)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> fr
New submission from Alexander Myodov :
Seems like a minor documentation issue in 2.x became more significant
one in 3.x.
In Python 2.6 (and lower), the documentation on Profile objects
discussed them as a part of hotshot module, while omitting the fact
that any profiler module, either of
Changes by Alexander Stanley :
--
nosy: +swixel
___
Python tracker
<http://bugs.python.org/issue2057>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Does this patch fix issue1545463 by any chance? I am away from a
development box ATM and cannot test the patch myself.
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue812
Alexander Belopolsky added the comment:
Just to give credit where credit is due: see #4 here
http://mail.python.org/pipermail/python-dev/2003-December/040579.html
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue7
New submission from Alexander Belopolsky :
Attached patch implements python-ideas proposal to return added or
existing element from set.add(). See
http://mail.python.org/pipermail/python-ideas/2009-October/006491.html .
In addition this patch contains a reimplementation of issue1507011 using
Alexander Belopolsky added the comment:
Any reason you don't want to call set_next from set_get?
I would say
static PyObject *
set_get(PySetObject *so)
{
register Py_ssize_t pos = 0;
register setentry *entry;
if (set_next(so, &pos, &entry)) {
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue5872>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
I agree, _PySet_Add name can be improved upon, but I don't want to paint
this particular bikeshed until it is clearer what if anything will be done
with this idea. If we add PySet_Intern API, then it would be natural to
expose it as set.intern r
Alexander Belopolsky added the comment:
On Wed, Nov 4, 2009 at 9:46 AM, Nick Coghlan wrote:
>
> Nick Coghlan added the comment:
>
> If the idea is to create the "one obvious way" for interning, calling
> the method and corresponding C function "intern"
New submission from Alexander Belopolsky :
"""
intersection(...)
Return the intersection of two sets as a new set.
(i.e. all elements that are in both sets.)
"""
Is incorrect because set.intersection takes two or more sets.
Attached patch cha
Alexander Belopolsky added the comment:
I don't want to pollute python-dev with more hopeless ideas, but I wonder
if itertools could grow an efficient C-implemented
def first(collection):
return next(iter(collection))
On the other hand, it probably belongs to recipes more than s
Alexander Belopolsky added the comment:
On Thu, Nov 5, 2009 at 2:16 PM, Raymond Hettinger
wrote:
>
> Raymond Hettinger added the comment:
>
> The basic problem here is that the "one obvious way" to some people
> (including me and Martin v. Löwis) is to use a diction
Alexander Belopolsky added the comment:
On Thu, Nov 5, 2009 at 3:23 PM, Raymond Hettinger
wrote:
..
> Martin has already rejected a similar proposal for similar reasons.
> Please drop this one.
Sure. In fact I've never proposed to apply this patch. As I said in
my original subm
Alexander Belchenko added the comment:
As the author of original patch I want to note that it seems your merged
patch does not update the documentation (list of standard encodings).
Please, update the docs as well.
--
___
Python tracker
<h
Alexander Belchenko added the comment:
OK, thanks.
--
___
Python tracker
<http://bugs.python.org/issue1616979>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Dutton :
--
nosy: +alexdutton
___
Python tracker
<http://bugs.python.org/issue5862>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Belopolsky :
Attached zip archive can be run directly to reproduce the bug:
$ ./python.exe bug.zip
Traceback (most recent call last):
File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 162, in
_run_module_as_main
"__main__&
2501 - 2600 of 4097 matches
Mail list logo