Alexander Belopolsky added the comment:
How do I enable `network' resource?
I am getting
$ ./python.exe -m test.regrtest test_urllibnet
test_urllibnet
test_urllibnet skipped -- Use of the `network' resource not enabled
1 test skipped:
test_urllibnet
Those skips are all expected
Alexander Belopolsky added the comment:
What is your locale?
--
___
Python tracker
<http://bugs.python.org/issue8963>
___
___
Python-bugs-list mailing list
Unsub
Alexander Belopolsky added the comment:
Is this check needed on darwin? Why not simply set fs_encoding = 'utf-8'?
--
nosy: +flox
___
Python tracker
<http://bugs.python.
Alexander Belopolsky added the comment:
I still cannot reproduce the failure, but please, try the attached patch.
--
keywords: +patch
Added file: http://bugs.python.org/file17608/issue8963.diff
___
Python tracker
<http://bugs.python.org/issue8
Alexander Belopolsky added the comment:
> The patch is not sufficient, since other
> failures can then occur if test_strptime gets
> run after test_urllibnet
This looks like a bug in support.run_with_locale decorator.
It is des
Alexander Belopolsky added the comment:
Antoine,
Would s/LC_TIME/LC_ALL/ in my patch fix your problem? I could not find an
affected system, but I simulated the problem by adding
locale.setlocale(locale.LC_ALL, "") call in the test.
I think the patch is worth applying. It fixes t
Alexander Belopolsky added the comment:
$ ./python.exe -m test.regrtest -unetwork test_urllibnet
test_urllibnet
1 test OK.
Also the arguments to strptime from reported error message work fine:
>>> import time
>>> time.strptime('Thu, 10 Jun 2010 19:03:39 GMT'
Changes by Alexander Belopolsky :
--
type: -> feature request
versions: +Python 3.2 -Python 3.0
___
Python tracker
<http://bugs.python.org/issue1452>
___
_
Alexander Belopolsky added the comment:
It looks like your libc calls setlocale(LC_ALL, "") on error. This may or may
not be right and not python's problem in any case. What is worth to
investigate, however is why @run_with_locale decorator fails to restore the
locale after
Alexander Belopolsky added the comment:
My knowledge may be out of date, but I thought multiple inheritance was only
supported at the python level. If this is still the case, then no
initialization check is needed. (You cannot get an uninitialized type at python
level.) An extra defensive
Changes by Alexander Belopolsky :
--
type: -> feature request
versions: +Python 3.2 -Python 2.6
___
Python tracker
<http://bugs.python.org/issue1516>
___
_
Alexander Belopolsky added the comment:
I understand that the latest RFE in this issue is to provide a custom __repr__
to functools.partial. Something along the lines of
class partial(functools.partial):
def __repr__(self):
return "functools.partial(%r, %s)" %
Changes by Alexander Belopolsky :
--
versions: +Python 3.2 -Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/issue4113>
___
___
Python-bugs-list m
Alexander Belopolsky added the comment:
Victor,
Your patch works for me and makes sense even though I don't really know where
Py_FileSystemDefaultEncoding is set on Darwin. :-)
--
___
Python tracker
<http://bugs.python.org/i
Alexander Belopolsky added the comment:
On the second thought, test_imp is not the right place to test this. Can you
add a sys module test for this issue?
--
stage: -> unit test needed
___
Python tracker
<http://bugs.python.org/iss
Changes by Alexander Belopolsky :
--
stage: -> patch review
type: -> feature request
versions: +Python 3.2 -Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/iss
Alexander Belopolsky added the comment:
Nope.
$ ./python.exe -m test.regrtest test_sys
test test_sys failed -- Traceback (most recent call last):
File "Lib/test/test_sys.py", line 877, in test_getfilesystemencoding
self.assertEqual(fs_encoding, 'utf-8')
AssertionError
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17619/issue8965-test.diff
___
Python tracker
<http://bugs.python.org/issue8965>
___
___
Python-bug
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17620/issue8965-test.diff
___
Python tracker
<http://bugs.python.org/issue8965>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17619/issue8965-test.diff
___
Python tracker
<http://bugs.python.org/issue8965>
___
___
Pytho
Alexander Belopolsky added the comment:
Sorry for extra traffic. I thought my patch introduced an indentation error,
but it looks like you truly don't check sys.getfilesystemencoding() output if
not on darwin.
--
___
Python tracker
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17621/issue8965-test-1.diff
___
Python tracker
<http://bugs.python.org/issue8965>
___
___
Pytho
Alexander Belopolsky added the comment:
Looks reasonable to me as well. Code patch applies cleanly, but tests don't.
I'll get it ready for commit.
--
assignee: -> belopolsky
nosy: +belopolsky
resolution: -> accepted
versions: -Python 2.6, Python
Alexander Belopolsky added the comment:
I am attaching an updated patch, but it fails one of the old tests. Need to
investigate this some more.
--
resolution: accepted ->
Added file: http://bugs.python.org/file17624/issue3129.diff
___
Pyt
Alexander Belopolsky added the comment:
Attached patch works and passes the tests. The failing test was clearly wrong.
I am still not sure that it is right to raise TypeError rather than
struct.error on invalid offset in pack_into, but this is a separate issue.
--
Added file: http
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17624/issue3129.diff
___
Python tracker
<http://bugs.python.org/issue3129>
___
___
Python-bug
Alexander Belopolsky added the comment:
On Thu, Jun 10, 2010 at 10:37 PM, R. David Murray
wrote:
>
> R. David Murray added the comment:
>
> I actually agree with Anatoly here. I find it much more intuitive to do
>
> import datetime
>
> timestamp = datet
Alexander Belopolsky added the comment:
On Fri, Jun 11, 2010 at 10:23 AM, Mark Dickinson wrote:
..
> Some comments from playing with this patch (without having looked at the
> implementation):
>
thank you very much for your comments. As we are fine-tuning the
timezone class, do you
Alexander Belopolsky added the comment:
I have to stop replying to emails. There is no reason behind roundup remove
">" comments logic. Reposting my message:
"""
On Fri, Jun 11, 2010 at 10:23 AM, Mark Dickinson wrote:
..
> Some comments from playing with th
Alexander Belopolsky added the comment:
On Fri, Jun 11, 2010 at 10:43 AM, Mark Dickinson wrote:
..
> It's a little awkward to review this patch independently of the issue 5094
> patch.
> Can we work on issue 5094 first, and then come back to this one?
Sure. Unfortunately, I t
New submission from Alexander Belopolsky :
Module level pack, unpack etc. methods have similar functionality with Struct
instance methods, but docs are different. The immediate issue is the lack of
signature in the module level methods' docstrings.
$ ./python.exe -m pydoc struct.Struct
Alexander Belopolsky added the comment:
Two more bits:
1. "See struct.__doc__", while technically correct, is not user friendly. If
you copy struct.__doc__ to >>> prompt, you get an ugly repr of a multiline
string. I suggest s/struct.__doc__/help(struct)/.
Alexander Belopolsky added the comment:
I am attaching a new patch, issue5094e.diff which addresses most of Mark's
comments. I left out repr() because two opinions were voiced on IRC with
respect to datetime. prefix. I would like to give it some more thought even
though I am le
Alexander Belopolsky added the comment:
Downgrading further. If anyone has interest in supplying a patch, please step
in. Otherwise I plan to add a note to documentation and leave the code as is.
--
priority: critical -> low
title: asctime causing python to crash -> asctime do
Alexander Belopolsky added the comment:
That's what CERT recommends. Their code can be reused as is:
int validate_tm(struct tm* time) {
/*
* The range of valid values of the tm_sec member is [0, 60]
* inclusive (to allow for leap seconds).
*/
if (time->tm_sec <
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue5845>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Note that
>>> help(str.translate)
Help on method_descriptor:
translate(...)
S.translate(table) -> str
Return a copy of the string S, where all characters have been mapped
..
but
>>> help('str.translate')
no
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue8912>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Nice implementation. I wonder if the /5 loop can be eliminated by noting that
/5 is *2 followed by decimal shift. (Probably not without fast decimal
arithmetics.)
A few documentation nits:
1. In Decimal methods there is no consistency in referring to
New submission from Alexander Belopolsky :
>>> import _struct
>>> _struct.__version__
b'0.3'
I would rather simply remove this since it is no longer exposed in struct.
Yes, it does cause problems in real life code: I have applications that keep
track of versions
Alexander Belopolsky added the comment:
There is a separate issue #5288 asking to support sub-minute offsets. This is
not hard, but the C code still has a few interfaces left from the time when
offset was an integer # of minutes. I am +1 to fix that, but not as a part of
this issue.
On
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
nosy: +belopolsky
versions: +Python 3.2 -Python 2.6, Python 3.0
___
Python tracker
<http://bugs.python.org/iss
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
dependencies: +No obvious and correct way to get the time zone offset
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/iss
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file13373/unnamed
___
Python tracker
<http://bugs.python.org/issue1520662>
___
___
Python-bug
Alexander Belopolsky added the comment:
%O is used by POSIX spec to indicate alternative locale format.
Gnu date uses %:z
%:z+hh:mm numeric timezone (e.g., -04:00)
%::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric
time zone with : to
Alexander Belopolsky added the comment:
Mark, reassigning this to you for commit review.
--
assignee: belopolsky -> mark.dickinson
___
Python tracker
<http://bugs.python.org/iss
Changes by Alexander Belopolsky :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue7463>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
calcsize() still does not have signature in docstring.
A nit: maybe follow calcsize() lead and say "format string fmt" rather than
just "fmt".
One more __doc__ mention: in Struct docstring,
| __init__(...)
| x.__init__(...
New submission from Alexander Belopolsky :
Inspired by issue issue8973, I did
$ grep -in "see.*\.__doc__" Modules/*.c
Surprisingly, there were not as many results as I feared.
As I explained in the referenced issue, "See name.__doc__", while technically
correct, is no
Alexander Belopolsky added the comment:
A couple more:
$ grep -in "see.*\.__doc__" Lib/*.py
Lib/doctest.py:1782:See doctest.__doc__ for an overview.
Lib/inspect.py:162:See isfunction.__doc__ for attributes listing."""
an a really problematic
Objects/typeobje
Alexander Belopolsky added the comment:
See issue #8983 for the the __init__ doc discussion since it is not specific to
the struct module.
--
___
Python tracker
<http://bugs.python.org/issue8
Alexander Belopolsky added the comment:
I have made my mind on subclassing timezone issue. I believe subclassing
should not be allowed and here is the reason:
The new datetime.timezone class is a very specific implementation of tzinfo
interface. It guarantees that utcoffset(dt) and friends
Alexander Belopolsky added the comment:
Will do.
--
assignee: d...@python -> belopolsky
___
Python tracker
<http://bugs.python.org/issue8983>
___
___
Python-
Alexander Belopolsky added the comment:
This is borderline enough that I am not comfortable making a call. If anyone
speaks in support of backporting I'll do it. For 2.7 or 2.7.1.
--
status: closed -> pending
___
Python tracke
Alexander Belopolsky added the comment:
> +1 for 'UTC±HH:MM' for both tzname and __str__, too.
It looks like I subconsciently allocated enough characters for this in the
string buffer, so now this is a single character change. I'll do it with other
changes (if
Alexander Belopolsky added the comment:
Attaching issue8983.diff patch. I am a bit unsure about __init__ docstring
change:
1. Are cases when help(type(x)) differs from help(x) important enough to
distinguish in docstring?
2. Do we need a default docstring on __init__ at all? If so
Alexander Belopolsky added the comment:
Attaching issue5094f.diff which implements 'UTC±HH:MM' and adds unit tests for
more error cases.
--
Added file: http://bugs.python.org/file17648/issue5094f.diff
___
Python tracker
<http://bu
Alexander Belopolsky added the comment:
How does issue8973-Struct.diff look?
--
Added file: http://bugs.python.org/file17649/issue8973-Struct.diff
___
Python tracker
<http://bugs.python.org/issue8
Alexander Belopolsky added the comment:
Committed in r81961. Yes, I used "format" for consistency with the manual,
but on the second thought consistency within help() is more important.
--
___
Python tracker
<http://bugs.python.
Changes by Alexander Belopolsky :
--
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexander Belopolsky added the comment:
On Sun, Jun 13, 2010 at 10:09 AM, Mark Dickinson wrote:
..
> - Should the PyDateTime_TimeZone struct definition go into
> datetime.h, so that it's avaiable if you want to export any C-API
> functions later on?
>
The original patch had t
Alexander Belopolsky added the comment:
Just to add a little bit of historical perspective, this proposal is really
more than seven years old:
"""
s.keim (Dec 20, 2002 3:33 am; Comment #13)
.. do we really need methods like utcnow. I believe the following could be a
litt
Alexander Belopolsky added the comment:
issue5094g.diff addresses all Mark's suggestions except making struct
definition public. I also made a few other changes:
1. Constructor now raises TypeError when offset is not a timedelta instead of
ValueError in previous version.
2. NEWS ent
Alexander Belopolsky added the comment:
Also I changed Py_DECREFs in destructor to Py_CLEAR. I understand that while
not strictly required in this case, it is a good practice.
--
___
Python tracker
<http://bugs.python.org/issue5
Alexander Belopolsky added the comment:
Committed in r81981. I'll open a separate documentation issue to update
Doc/includes/tzinfo-examples.py and improve TZ related documentation.
--
stage: patch review -> committed/rejected
status: open -> closed
title: datetime lac
Alexander Belopolsky added the comment:
With issue5094 patch now committed, I am replacing issue6641.diff with a new
version that does not include issue5094.
--
title: strptime doesn't support %z format ? -> datetime.strptime doesn't
support %z format ?
Add
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17590/issue6641.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Alexander Belopolsky added the comment:
Committed issue6280-calendar.diff in r81988. I believe tests should be merged
in 2.7. Any objections?
As for the original RFE, I think it should be rejected. I believe users should
be encouraged to use datetime objects instead of timetuples and
Alexander Belopolsky added the comment:
I reverted r81988 in r81989. Some code may rely on timegm() accepting float in
tm_sec. See http2time in Lib/http/cookiejar.py.
It is very easy to modify implementation to accept float seconds, but old
implementation accidentally work for float hours
Alexander Belopolsky added the comment:
Éric,
It will be helpful if your code could also check for lines longer than 79
characters.
--
___
Python tracker
<http://bugs.python.org/issue8
Alexander Belopolsky added the comment:
.. and trailing white space.
--
___
Python tracker
<http://bugs.python.org/issue8912>
___
___
Python-bugs-list mailin
Alexander Belopolsky added the comment:
Reopening to add some minor fixes to tests and documentation. See
issue5094h.diff. Ezio, thanks for finding these issues.
--
status: closed -> open
Added file: http://bugs.python.org/file17676/issue5094h.d
Changes by Alexander Belopolsky :
--
nosy: +ezio.melotti
___
Python tracker
<http://bugs.python.org/issue5094>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Belopolsky :
Recently added datetime.timezone class does not have a custom repr, so one gets
>>> timezone.utc
instead of parseable
datetime.timezone(datetime.timedelta(0))
This is inconsistent with the way other classes in datetime modu
Changes by Alexander Belopolsky :
--
dependencies: +datetime lacks concrete tzinfo implementation for UTC
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Merged issue5094 nosy list.
--
nosy: +ajaksu2, akira, brett.cannon, doerwalter, durban, ezio.melotti,
gagenellina, kawai, l0nwlf, mark.dickinson, merwok, pitrou, r.david.murray,
rafe, techtonik, tim_one
Alexander Belopolsky added the comment:
What about
"""
.. method:: datetime.utcoffset()
If :attr:`tzinfo` is ``None``, returns ``None``, else returns ...
"""
Should this use "return" too?
--
___
Alexander Belopolsky added the comment:
How to specify offset range horse got its beating above. See msg107554. The
current wording is the best compromise between verbosity and precision.
Replacing the patch with one that fixes other nits.
--
Added file: http://bugs.python.org
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17676/issue5094h.diff
___
Python tracker
<http://bugs.python.org/issue5094>
___
___
Python-bug
Alexander Belopolsky added the comment:
On this happy note, I am closing this issue. Doc changes have been committed
in r82004, test changes in r82003. For repr(timezone(..)) development, please
follow issue #9000.
--
status: open -> clo
Changes by Alexander Belopolsky :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue3129>
___
___
Python-bugs-list mailing list
Un
Changes by Alexander Belopolsky :
Added file: http://bugs.python.org/file17681/issue6641.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17667/issue6641.diff
___
Python tracker
<http://bugs.python.org/issue6641>
___
___
Python-bug
Alexander Belopolsky added the comment:
Mark,
I am reassigning this to you for a commit review.
--
assignee: belopolsky -> mark.dickinson
___
Python tracker
<http://bugs.python.org/iss
New submission from Alexander Belopolsky :
I find the following quite misleading:
>>> from datetime import datetime
>>> import time
>>> time.strftime('%c %z %Z', datetime.utcnow().utctimetuple())
'Wed Jun 16 03:26:26 2010 -0500 EST'
As far as I
New submission from Alexander Belopolsky :
Current datetime.timetuple() implementation goes out of its way to support edge
cases that produce timetuples beyond the naive datetime range:
>>> t1 = datetime.min.replace(tzinfo=timezone.max)
>>> t2 = datetime.max.replace(t
Changes by Alexander Belopolsky :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue9009>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alexander Belopolsky :
Here is the history of the issue per Martin v. Löwis on python-dev:
"""
This was added with
r36221 | bcannon | 2004-06-24 03:38:47 +0200 (Do, 24. Jun 2004)
Changes by Alexander Belopolsky :
--
keywords: +patch
Added file: http://bugs.python.org/file17684/timefunc-split.diff
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Based on IRC discussion, here is a modified patch that places C code in _time.c
and creates a stub for _time.h so that future shared definitions can go there.
--
Added file: http://bugs.python.org/file17685/issue9012.diff
Changes by Alexander Belopolsky :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue9012>
___
___
Python-bugs-list mai
Changes by Alexander Belopolsky :
--
resolution: -> accepted
___
Python tracker
<http://bugs.python.org/issue9012>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
Added new Module/_time.h to the patch.
--
Added file: http://bugs.python.org/file17686/issue9012.diff
___
Python tracker
<http://bugs.python.org/issue9
Changes by Alexander Belopolsky :
Removed file: http://bugs.python.org/file17685/issue9012.diff
___
Python tracker
<http://bugs.python.org/issue9012>
___
___
Python-bug
New submission from Alexander Belopolsky :
This idea was brought in the original fixed offset timezone proposal (see issue
5094), but was met with some opposition. See msg106914, point 2. As a result,
the timezone implementation is in conflict with tzinfo documentation that says
&qu
Changes by Alexander Belopolsky :
--
dependencies: +datetime lacks concrete tzinfo implementation for UTC
nosy: +brett.cannon, mark.dickinson
___
Python tracker
<http://bugs.python.org/issue9
Alexander Belopolsky added the comment:
Mark,
It is great to see you doing this. I looked at this code on several occasions
before and each time ran away scared! I sincerely hope I will understand how
it works after your rewrite.
Just a small suggestion at this point: can you give longer
Alexander Belopolsky added the comment:
Committed in r82034.
--
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Alexander Belopolsky added the comment:
I would like to move this forward. The PyPy implementation at
http://codespeak.net/pypy/dist/pypy/lib/datetime.py
claims to be based on the original CPython datetime implementation from the
time when datetime was a python module. I looked through the
Alexander Belopolsky added the comment:
On Thu, Jun 17, 2010 at 10:31 AM, Marc-Andre Lemburg
wrote:
..
> To avoid the wasted memory and import time, it's better to use:
>
> try:
> from _cmodule import *
> except ImportError:
> from _pymodule import *
>
Hmm,
2801 - 2900 of 4097 matches
Mail list logo