[issue8902] add datetime.time.now() for consistency

2010-06-05 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

There is:
datetime.date.today()
datetime.datetime.today()
datetime.datetime.now([tz])

But no:
datetime.time.now([tz])

--
components: Library (Lib)
messages: 107122
nosy: techtonik
priority: normal
severity: normal
status: open
title: add datetime.time.now() for consistency
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8902
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8903] datetime functions

2010-06-05 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

Current OOP API of datetime is ugly:

from datetime import datetime
print datetime.today().isoformat()

The proposal is to add today() and now() as module functions:

from datetime import today, now
print today()
# datetime.date(2010, 6, 5)
print now()
# datetime.datetime(2010, 6, 5, 9, 48, 4, 868000)

--
components: Library (Lib)
messages: 107123
nosy: techtonik
priority: normal
severity: normal
status: open
title: datetime functions
versions: Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8847] crash appending list and namedtuple

2010-06-05 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

The binaries get compiled with the PGInstrument/PGUpdate configurations.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8847
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4434] Embedding into a shared library fails

2010-06-05 Thread Jan Kratochvil

Changes by Jan Kratochvil jan.kratoch...@redhat.com:


--
nosy: +jankratochvil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4434
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2010-06-05 Thread Tal Einat

Tal Einat talei...@users.sourceforge.net added the comment:

Documentation patch attached against py3k branch.

Changes are:

* Added to documentation of JSONDecoder:

If *strict* is ``False`` (``True`` is the default), then control characters 
will be allowed inside strings.  Control characters in this context are those 
with character codes in the 0-31 range, including ``'\t'`` (tab), ``'\n'``, 
``'\r'`` and ``'\0'``.

* Added clarification in documentation of json.load and json.dump that unless 
the cls kwarg is specified, the JSONEncoder/JSONDecoder class will be used.

* Mirrored these additions in the relevant doc-strings (JSONDecoder.__init__, 
json.load, json.loads, json.dump, json.dumps).

* Copied description of the object_pairs_hook kwargs from the documentation to 
the relevant doc-strings, which otherwise fully mirrored the documentation. 
(json.load, json.loads, JSONDecoder.__init__)

--
keywords: +patch
versions: +Python 3.2 -Python 2.6, Python 3.0
Added file: http://bugs.python.org/file17560/json_docs_py3k.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4785
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2010-06-05 Thread Tal Einat

Tal Einat talei...@users.sourceforge.net added the comment:

Similar patch against trunk; same changes as for the py3k branch.

--
Added file: http://bugs.python.org/file17561/json_docs_trunk.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4785
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2010-06-05 Thread Tal Einat

Changes by Tal Einat talei...@users.sourceforge.net:


--
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4785
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8904] quick example how to fix docs

2010-06-05 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

It would be helpful to have examples how to patch docs in some place like 
http://docs.python.org/bugs.html

For example, in CHM version of 2.6.5 manual open() anchor points to 
reference/datamodel.html#index-844 and to tutorial/inputoutput.html#index-1080 
but not to library/functions.html#open

--
assignee: d...@python
components: Documentation
messages: 107127
nosy: d...@python, techtonik
priority: normal
severity: normal
status: open
title: quick example how to fix docs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8904
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8900] IDLE crashes if Preference set to At Startup - Open Edit Window

2010-06-05 Thread Tal Einat

Tal Einat talei...@users.sourceforge.net added the comment:

I can consistently reproduce this with Python 3.0.1 by setting IDLE to start in 
editing mode and using Ctrl+o to open the Open dialog. Doesn't happen when 
using the menu item in the File menu.

This leads me to believe it has something to do with keypress event processing. 
Also, the event for which the unbind call is failing is 
Control-KeyPress-slash.

Continuing to investigate.

--
nosy: +taleinat

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8900
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-06-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Slightly modified version committed revision 81728. (It truncates large diffs 
rather than omitting them and allows max_diff to be None - meaning no maximum.) 
Needs some extended tests and needs documenting.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8905] difflib: support input generators

2010-06-05 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

difflib operates on the lists, but it should be possible to use arbitrary 
generators. This will require internal limit on buffer size that has a side 
advantage of limiting difflib to available memory.

--
components: Library (Lib)
messages: 107130
nosy: techtonik
priority: normal
severity: normal
status: open
title: difflib: support input generators
type: resource usage
versions: Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8905
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-06-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Modified again in revision 81739. No longer uses a new argument, but a class 
attribute instead. All assert methods that generate failure messages with 
difflib truncate messages.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8906] Document TestCase attributes in class docstring

2010-06-05 Thread Floris Bruynooghe

New submission from Floris Bruynooghe floris.bruynoo...@gmail.com:

The unittest.TestCase class has some public attributes: failureException, 
longMessage and maxDiff.  They each have a description in a comment, but I 
think it would be good if that description got moved into the class docstring 
so that it would be found using help().

--
components: Library (Lib)
messages: 107132
nosy: ezio.melotti, flub
priority: normal
severity: normal
status: open
title: Document TestCase attributes in class docstring
type: feature request
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8906
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2010-06-05 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Removed the __cmp__ warning in r81736, and added a PyErr_Clear() for the __eq__ 
warning in r81740.  I'll leave this open in case anyone wants to figure out how 
to propagate the warning exception properly.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2010-06-05 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Not sure why I added 3.1 and 3.2 to the versions.

--
versions:  -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-06-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Modified again in revision 81752. Assertion methods now inform you when 
omitting an excessively long diff.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-06-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Still some tests and documentation needed. Leaving issue open until it is done. 
(Also needs backporting to unittest2...)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-06-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Note that we also have a bit of a performance issue in prettyprint / difflib 
when the diffs are very big. It can spend a minute or more constructing the 
diff - only to throw it away because it is too big...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8899] Add docstrings to time.struct_time

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Committed in r81756 (trunk) and r81757 (py3k).

--
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

 According to my reading of RFC 3339, it is not correct to produce 'Z'
 timestamps when local offset is not known.

It is not said that 'Z' SHOULD NOT be produced if local offset is unknown. Even 
if offset is unknown, UTC still can be the preferred reference point for the 
specified time.

From the user point of view the assumption about know or unknown offset is 
beyond the judgement of low-level datetime library. For example, if I read 
timestamp of a local file, I assume that local offset is unknown and UTC is 
not preferred, but still do not have other choice than to write zero. It won't 
help me to find actual offset. For a network file I assume that preferred 
offset is actually UTC and although I do not have any means to check the 
offset I can write zero without any hesitation.

Solving philosophical -00:00 +00:00 problems require a deep knowledge of 
RFC3339. I doubt that pleasing 1% who need this kind of fine-grained semantic 
control with special API deserves suffering of other 99%. In the end there is 
nothing hard in replacing 'Z' with a flavor of your choice.

Of course, if smb. want to force developers to overload their brain for the 
sake of providing the most accurate semantic timestamps (that nobody uses 
anyway) - then the -00:00/+00:00 stuff is a way to go. But my opinion is that 
datetime API in Python is already complicated enough to negatively affect this 
language karma.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

s/datetime/date\/time/ in the last sentence, as the complication comes  from:
-- start offtopic --
1. the vast amount of various date and time modules/functions
2. the little amount of what they can do

I still hardly believe that there is no way to get current TZ offset given that 
every OS provides such information.
-- end offtopic --

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8907] time module documentation differs in trunk and py3k

2010-06-05 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

Doc/library/time.rst differs in trunk and py3k.  It appears that the trunk 
version is more up to date and can simply replace the py3k version, but I would 
like to have another pair of eyes to take a look before committing.

I also noticed that time.asctime signature is displayed as asctime([t]) and as 
asctime([tuple]) in docstring.  I think docstring variant is better.

--
assignee: belopolsky
components: Documentation
files: time-doc.diff
keywords: patch
messages: 107141
nosy: belopolsky
priority: normal
severity: normal
stage: needs patch
status: open
title: time module documentation differs in trunk and py3k
versions: Python 3.2
Added file: http://bugs.python.org/file17562/time-doc.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8907
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8907] time module documentation differs in trunk and py3k

2010-06-05 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy: +d...@python

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8907
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7229] [PATCH] Manual entry for time.daylight can be misleading

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

issue8907 seems related.

--
nosy: +belopolsky, d...@python

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7229
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8151] [patch] convenience links for subprocess.call()

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

easy, just waits to be ported

--
nosy: +d...@python

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8151
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Sat, Jun 5, 2010 at 11:35 AM, anatoly techtonik
rep...@bugs.python.org wrote:
..
 s/datetime/date\/time/ in the last sentence, as the complication comes  from:
 -- start offtopic --
 1. the vast amount of various date and time modules/functions

Vast is a bit of overstatement.  It is mostly the datetime and time
module with a little bit in a less used calendar module.   I believe a
stated goal is to gradually remove the need for time module in
date/time manipulation and possibly fold it into posix module.

Can you be more specific?  The biggest omission, IMO, is the lack of
time zone support, but this is being worked on.  See  issue5094.

 I still hardly believe that there is no way to get current TZ offset given 
 that every OS provides such information.

See issue1647654.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8519] [patch] doc: termios and ioctl reference links

2010-06-05 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
nosy: +d...@python

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8519
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1635217] Add example of distutils setup() with requires argument

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Neal, why a piece from issue1635217#msg31028 doesn't qualify as an example?

It seems that this issue may become obsolete with new packaging guide coming up.

--
components: +Distutils, Distutils2
nosy: +d...@python
versions: +Python 2.7, Python 3.3 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1635217
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8151] [patch] convenience links for subprocess.call()

2010-06-05 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Already done AFAICS.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8151
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8847] crash appending list and namedtuple

2010-06-05 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

I've just found that:

[1] + foo()

crashes, but:

[1].__add__(foo())

gives:

Traceback (most recent call last):
  File pyshell#25, line 1, in module
[1].__add__(foo())
TypeError: can only concatenate list (not foo) to list

(IDLE on Windows XP)

--
nosy: +mrabarnett

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8847
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8446] buildbot: DeprecationWarning not raised for icglue (test_py3kwarn.TestStdlibRemovals)

2010-06-05 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8446
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7229] Manual entry for time.daylight can be misleading

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

It may be a bit off-topic for this issue, but I don't like that the python 
manual uses UTC as if it was a geographical location.  UTC is a time scale.  
You cannot be to the east or to the west of UTC just as you cannot be to the 
north of the Gregorian calendar.

Even if we replace UTC with Prime or Greenwich Meridian, the manual would still 
be incorrect because some regions in the western hemisphere use positive 
offsets from UTC.  For example, Madrid is at 3° 42' West, but uses Central 
European Time which is UTC+1.

Since there are no plans to include any kind of geographical database in  the 
standard library, I think the manual should avoid use of geographical terms.

What I need to know from the manual is how to get local time from utc and 
daylight savings time from the standard time.

From the top of my head, I know that localtime = utctime + utcoffset, but I am 
not sure whether dsttime = stdtime + dst or dsttime = stdtime - dst and the 
manual, reworded or not, does not immediately help me.

As for the original issue, do we really need time.daylight at all?  ISTM that 
in timezones without DST, time.altzone = time.timezone, so the software that 
unconditionally accounts for DST will still work correctly and software that 
wants to optimize for no DST case can simply chsck time.altzone == 
time.timezone.

$ TZ=UTC ./python.exe -c import time; print(time.daylight, time.tzname, 
(time.timezone, time.altzone))
0 ('UTC', 'UTC') (0, 0)

In other words, time.daylight is strictly redundant.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7229
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8908] friendly errors for UAC errors in windows installers

2010-06-05 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

The problem investigated in issue8870 detected that bdist_wininst installers 
fail in Vista and Windows 7 with enabled UAC (user access control) when run 
from local drives with non-MS file systems and from network drives.

The error message returned in this case is not explanative at all.
Failed to start elevated process (ShellExecute returned 5)

Further investigation revealed that if network samba share requires 
authentication, and authentication passes, then the installer won't fail. 
Unfortunately, I can not setup network access to unauthenticated Samba shares 
right now to test behavior, but I attach installer generated with 
--user-access-control=force in case somebody can help.

The error message needs to be improved to give users immediate hint what 
Windows UAC doesn't allow to run privileged executables from non-MS file 
systems and/or network drives.

--
assignee: tarek
components: Distutils, Distutils2
files: wget-0.6.win32.force.exe
messages: 107149
nosy: tarek, techtonik
priority: normal
severity: normal
status: open
title: friendly errors for UAC errors in windows installers
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file17563/wget-0.6.win32.force.exe

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8908
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8908] friendly errors for UAC errors in windows installers

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

A proper user error message requires investigation of behavior on anonymous 
samba shares. Attaching patch to install.c with backlinks to relevant ticket 
descriptions.

--
keywords: +patch
Added file: 
http://bugs.python.org/file17564/8908.windows.uac.research.comments.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8908
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8908] friendly errors for UAC misbehavior in windows installers

2010-06-05 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
title: friendly errors for UAC errors in windows installers - friendly errors 
for UAC misbehavior in windows installers

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8908
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8871] --user-access-control=auto has no effect

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Can't repeat right now. Please close with issue8870 as a superseder if nothing 
happens in the next two weeks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8871
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7582] [patch] diff.py to use iso timestamp

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Adding Alexander as ISTM he may be interested to read the time discussion.

--
nosy: +belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7582
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7229] Manual entry for time.daylight can be misleading

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

It is too hard to track this issue without quotes from manual. Let's bring 
context into discussion:

http://docs.python.org/library/time.html#time.altzone
  UTC offset of the local DST timezone if one is defined. Only use this if 
daylight is nonzero.
http://docs.python.org/library/time.html#time.daylight
  Nonzero if a DST timezone is defined.
http://docs.python.org/library/time.html#time.timezone
  UTC offset of the local (non-DST) timezone


So, to answer a question What is the current UTC offset? you need to:
if time.daylight:
  if time.altzone: # using only if defined
 use time.altzone
  else:
 use time.timezone
else:
  use time.timezone


1. Is that really works like described above?
2. Should we at least group these timezone variables?


As for offtopic UTC vs GMT - I doubt there is a way to clearly express that the 
offset sign of the returned values is negated in comparison with real UTC 
offsets without resorting to some king of alternative east/west scale.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7229
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7582] [patch] diff.py to use iso timestamp

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

The latest patch will produce wrong results if the file was last modified 
before timezone rules changed in your location.  See issue1647654.

--
assignee:  - belopolsky
dependencies: +No obvious and correct way to get the time zone offset

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7582
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1647654] No obvious and correct way to get the time zone offset

2010-06-05 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
nosy: +techtonik

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1647654
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7229] Manual entry for time.daylight can be misleading

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Sat, Jun 5, 2010 at 1:24 PM, anatoly techtonik
rep...@bugs.python.org wrote:
..
 As for offtopic UTC vs GMT - I doubt there is a way to clearly express that 
 the offset sign of the
 returned values is negated in comparison with real UTC offsets without 
 resorting to some
 king of alternative east/west scale.

Sure there is.  Here is how RFC 3339 handles this:


   Numeric offsets are calculated as local time minus UTC.  So the
   equivalent time in UTC can be determined by subtracting the offset
   from the local time.


and here is a quote from MacOS man page for tzset:


   offset   Indicates the value one must add to the local
time to arrive at Coor-
dinated Universal Time.


No geographic reference needed.  (And the issue is not UTC vs. GMT:
both UTC and GMT are timescales, sometimes even considered the same.
The off-topic issue is UTC vs. Prime Meridian.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7229
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1667546] Time zone-capable variant of time.localtime

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Yet another timezone issue. =/ Seems like it is too complicated.

Should we try to organize a dedicated sprint during EuroPython?
Do we need some easy to read research on the problem?
Should PSF define bounty for that?

Should we try to approach this with some other entrypoint like high level user 
story? I can play the role of the dumb user. Please, add your replies to this 
Wave https://wave.google.com/wave/waveref/googlewave.com/w+FbjMbPbEA so that we 
can develop the story.

--
nosy: +techtonik

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1667546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7229] Manual entry for time.daylight can be misleading

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Sat, Jun 5, 2010 at 1:24 PM, anatoly techtonik
rep...@bugs.python.org wrote:
..
 So, to answer a question What is the current UTC offset? you need to:
 if time.daylight:
  if time.altzone: # using only if defined
     use time.altzone
  else:
     use time.timezone
 else:
  use time.timezone


No, if time.daylight is non-zero, you still need to check the current
value of tm_isdst from localtime().

Here is how bzr reportedly handles this:

def local_time_offset(t=None):
Return offset of local zone from GMT, either at present or at time t.
# python2.3 localtime() can't take None
if t is None:
t = time.time()

if time.localtime(t).tm_isdst and time.daylight:
return -time.altzone
else:
return -time.timezone

http://blogs.gnome.org/jamesh/2006/12/31/python-timetimezone-timealtzone-edge-case/

 1. Is that really works like described above?

That works for current time, but subject to race condition twice a
year.  You should get time and dst indormation from the same
localtime() call.  For problems with  arbitrary time t, see the link
above.

 2. Should we at least group these timezone variables?


The come from existing C library practice.  POSIX defines tzname[2],
timezone, and daylight.

http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html

altzone is a popular non-standard addition which is strictly
redundant.  Since POSIX does not define anything about daylight
variable other than it has to be zero when DST is not in effect,
compliant implementations can define is so that altzone = timezone -
daylight.

These variables are already grouped in tzinfo API.  What is missing is
method to get concrete tzinfo implementation in stdlib.  See
issue5094.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7229
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

On Fri, Jun 4, 2010 at 11:09 PM, Brett Cannon rep...@bugs.python.org wrote:
 Unless other people step forward to debate this we probably are not going to 
 reach consensus without going to python-dev to see what others think.

I would really like to see:
1. a good definition of the problem
2. summary of research
3. possible solutions

The amount of text generated in bugtracker is already overwhelming for
others to plug in. I remember that my thread about datetime TZ was
also hijacked into the debate that we can not ship 3rd party TZ DB
with Python, so I can't even reference it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5094
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1667546] Time zone-capable variant of time.localtime

2010-06-05 Thread Paul Boddie

Paul Boddie p...@boddie.org.uk added the comment:

Speaking for myself, I'm not sure whether I'm really the person to push this 
further, at least, although others may see it as a worthy sprinting topic. In 
principle, adding the extra fields is the right thing to do, merely because it 
exposes things from struct tm which were missing and which influence the 
other functions depending on it.

The only things remaining are to make sure that existing code doesn't change 
its behaviour with these new fields, and that the new fields work together with 
the time functions as expected. Thus, testing is the most important thing now, 
I think.

For the bigger picture, which shouldn't be discussed here, Python's way of 
handling times and dates probably needs improvement - this has been discussed 
already (a reference for anyone not involved is Anatoly's initial message in 
one recent discussion: 
http://mail.python.org/pipermail/python-dev/2010-February/097710.html) - and I 
think usage of pytz is a step in the right direction, although it does not 
eliminate the need to learn about time zones (UTC, CET...), time regimes 
(Europe/Oslo, America/New_York...), floating times, and zone transitions (and 
ambiguous times).

Extending Python library support is potentially a sprinting topic, but not 
really a topic for discussion around this patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1667546
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

On Sat, Jun 5, 2010 at 7:00 PM, Alexander Belopolsky
rep...@bugs.python.org wrote:
 On Sat, Jun 5, 2010 at 11:35 AM, anatoly techtonik
 rep...@bugs.python.org wrote:
 ..
 s/datetime/date\/time/ in the last sentence, as the complication comes  from:
 -- start offtopic --
 1. the vast amount of various date and time modules/functions

 Vast is a bit of overstatement.  It is mostly the datetime and time
 module with a little bit in a less used calendar module.

Concise Python datetime module API =)
(without any way to get current UTC offset from operating system)
---
datetime.MINYEAR
datetime.MAXYEAR
class datetime.date
class datetime.time
class datetime.datetime
class datetime.timedelta
class datetime.tzinfo
timedelta.min
timedelta.max
timedelta.resolution
classmethod date.today()
classmethod date.fromtimestamp()
classmethod date.fromordinal()
date.min
date.max
date.resolution
date.year
date.month
date.day
date.replace()
date.timetuple()
date.toordinal()
date.weekday()
date.isoweekday()
date.isocalendar()
date.isoformat()
date.__str__()
date.ctime()
date.strftime(format)
classmethod datetime.today()
classmethod datetime.now()
classmethod datetime.utcnow()
classmethod datetime.fromtimestamp()
classmethod datetime.utcfromtimestamp()
classmethod datetime.fromordinal()
classmethod datetime.combine()
classmethod datetime.strptime()
datetime.min
datetime.max
datetime.resolution
datetime.year
datetime.month
datetime.day
datetime.hour
datetime.minute
datetime.second
datetime.microsecond
datetime.tzinfo
datetime.date()
datetime.time()
datetime.timetz()
datetime.replace()
datetime.astimezone()
datetime.utcoffset()
datetime.dst()
datetime.tzname()
datetime.timetuple()
datetime.utctimetuple()
datetime.toordinal()
datetime.weekday()
datetime.isoweekday()
datetime.isocalendar()
datetime.isoformat()
datetime.__str__()
datetime.ctime()
datetime.strftime()
time.min
time.max
time.resolution
time.hour
time.minute
time.second
time.microsecond
time.tzinfo
time.replace()
time.isoformat()
time.__str__()
time.strftime()
time.utcoffset()
time.dst()
time.tzname()
tzinfo.utcoffset()
tzinfo.dst()
tzinfo.tzname()
tzinfo.fromutc()

Raw doc with stripped markup is only 58161 bytes.
Perhaps the biggest problem that you need to read out the doc
thoroughly to understand that all UTC related stuff starts to work
only when somebody writes a tzinfo module. It is like you are
developer, so its your headache when you get this data - we gave you
The API. =)

 Can you be more specific?  The biggest omission, IMO, is the lack of
 time zone support, but this is being worked on.  See  issue5094.

Great, but it is Python 3.2 and I will be using 2.x Python for the
next two years at least.
It is not an only about omission - it is also about ineffective and
somehow bloated unpythonic C API that is not well suited for everyday
tasks.

 I still hardly believe that there is no way to get current TZ offset given 
 that every OS provides such information.

 See issue1647654.

Too long, and I've a little bit tired, and will be pretty busy next
week, but thanks for the pointers.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-05 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Please add issue8908 as superseder.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8870
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8302] SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip

2010-06-05 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Committed revision 81760. Needs tests and documentation.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8302
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-06-05 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Fixed on trunk in r81758 and r81759.
I'm leaving the issue open until I port it on the other versions.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8271
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8909] mention bitmap size for bdist_wininst

2010-06-05 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
assignee: tarek
components: Distutils, Documentation
files: mention.bdist.bitmap.size.diff
keywords: patch
nosy: tarek, techtonik
priority: normal
severity: normal
status: open
title: mention bitmap size for bdist_wininst
versions: Python 2.6, Python 2.7, Python 3.1
Added file: http://bugs.python.org/file17565/mention.bdist.bitmap.size.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8909] mention bitmap size for bdist_wininst

2010-06-05 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
nosy: +d...@python

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8302] SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip

2010-06-05 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
resolution:  - accepted
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8302
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-06-05 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
resolution:  - accepted
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8351
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8890] Modules have dangerous examples in documentation

2010-06-05 Thread Henri Salo

Henri Salo he...@nerv.fi added the comment:

No it does not.

http://www.owasp.org/index.php/Insecure_Temporary_File

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8890
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8903] datetime functions

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

How hard is it to add

now = datetime.now
todate = date.today

at the top of your module is you really like shorter names?

-1

--
assignee:  - belopolsky
nosy: +belopolsky
priority: normal - low

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8902] add datetime.time.now() for consistency

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Anatoly,

Didn't you just recently complain about the large number of functions in 
datetime module? (issue7584)

datetime.datetime.now().time() seems adequate to me.

What is your use case?

--
assignee:  - belopolsky
nosy: +belopolsky
priority: normal - low

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8902
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1777412] Python's strftime dislikes years before 1900

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I see this in py3k branch on MacOS X:

[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type help, copyright, credits or license for more information.
 import datetime
 datetime.date(1876, 2, 3).strftime('%Y-%m-%d')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: year=1876 is before 1900; the datetime strftime() methods require 
year = 1900


I like the approach taken in the David's patch.  The datetime module should 
stop piggybacking on the time module.

--
assignee:  - belopolsky
nosy: +belopolsky
versions: +Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1777412
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3173] external strftime for Python?

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

What platforms have broken strftime and how badly is it broken there?

Is there a python version somewhere?  PyPy?

--
assignee:  - belopolsky
nosy: +belopolsky
type:  - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3173
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4015] Make installed scripts executable on windows

2010-06-05 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
title: [patch] make installed scripts executable on windows - Make installed 
scripts executable on windows

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4015
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

With recent enhancements to datetime module, timegm has become a 1-liner:

EPOCH = 1970
_EPOCH_DATETIME = datetime.datetime(EPOCH, 1, 1)
_SECOND = datetime.timedelta(seconds=1)

def timegm(tuple):
Unrelated but handy function to calculate Unix timestamp from GMT.
return (datetime.datetime(*tuple[:6]) - _EPOCH_DATETIME) // _SECOND

I suggest committing modernized implementation to serve as a reference and 
encourage people to use datetime module and datetime objects instead of time 
module and time tuples.

--
assignee:  - belopolsky
nosy: +belopolsky, mark.dickinson -Alexander.Belopolsky
priority: normal - low
stage: needs patch - commit review
Added file: http://bugs.python.org/file17566/issue6280-calendar.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6280
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1083] Confusing error message when dividing timedelta using /

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Closing as duplicate of issue1289118.  Division of timedelta by integer is 
supported in py3k since r81625.

--
nosy: +belopolsky -Alexander.Belopolsky
resolution:  - duplicate
status: open - closed
superseder:  - timedelta multiply and divide by floating point

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1083
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7463] PyDateTime_IMPORT() causes compiler warnings

2010-06-05 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
assignee:  - belopolsky
nosy: +belopolsky
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7463
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7989] Transition time/datetime C modules to Python

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

As far as I remember, the datetime module started as a pure python module and 
was reimplemented in C around year 2003 or so.  One of the important additions 
at that time was the C API to datetime functionality.  I am afraid that with 
the _timemodule.c/timemodule.py split there will be more an more functionality 
that is awkward to access from C API.

--
assignee:  - belopolsky
nosy: +belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7989
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8482] test_gdb, gdb/libpython.py: Unable to read information on python frame

2010-06-05 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1726687] Bug found in datetime for Epoch time = -1

2010-06-05 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
assignee:  - belopolsky
nosy: +belopolsky -Alexander.Belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1726687
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7662] time.utcoffset()

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I would prefer exposing tm_gmtoff in time.localtime() output. The advantage is 
that on platforms that support it is struct tm, it will return correct offset 
for times in the past, not only for the current time. See issue1647654.

On platforms without tm_gmtoff we can fill it with -tm_isdst?timezone:altzone.  
The current situation on Linux is just backwards: we are trying to divine 
altzone by sampling tm_gmtoff and throw tm_gmtoff away.

See 
http://blogs.gnome.org/jamesh/2006/12/31/python-timetimezone-timealtzone-edge-case/.

--
assignee:  - belopolsky
nosy: +belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7662
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5979] strptime() gives inconsistent exceptions

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Looks like a bug to me:

 datetime.strptime(1, %d)
datetime.datetime(1900, 1, 1, 0, 0)

 datetime.strptime('1', '%m')
datetime.datetime(1900, 1, 1, 0, 0)

both %m and %d accept single digits but they should not.

 datetime.strptime('123', '%m%d')
datetime.datetime(1900, 12, 3, 0, 0)

 import this
..
In the face of ambiguity, refuse the temptation to guess.

--
assignee:  - belopolsky
nosy: +belopolsky
stage:  - unit test needed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5979
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5979] strptime() gives inconsistent exceptions

2010-06-05 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
versions: +Python 3.2 -Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 
3.0, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5979
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1982] Feature: extend strftime to accept milliseconds

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

With %f support in, isn't this issue out of date?

--
assignee:  - belopolsky
nosy: +belopolsky
stage:  - unit test needed
versions: +Python 3.2 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1982
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2516] Instance methods are misreporting the number of arguments

2010-06-05 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


Removed file: http://bugs.python.org/file14759/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2516] Instance methods are misreporting the number of arguments

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

gungor: your messages look mangled.  It may be the case of email to trucker 
bug.  Can you briefly explain what you are trying to add to the discussion?

--
assignee:  - belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2516
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8910] Write a text file explaining why Lib/test/data exists

2010-06-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

The directory is empty by default as that's where some temporary files are put 
during testing. Should have a text file in there explaining this fact.

--
components: Tests
keywords: easy
messages: 107176
nosy: brett.cannon
priority: low
severity: normal
status: open
title: Write a text file explaining why Lib/test/data exists

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8910
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8911] regrtest.main should have a test skipping argument

2010-06-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

If you look at importlib.regrtest you will notice it has to muck with sys.argv 
in order to get certain tests skipped. It would be much better if regrtest.main 
had an argument you could specify instead which listed the tests to skip.

This might lead to breaking out the command line parsing into the __main__ 
block at the end of the file instead of having it all in regrtest.main.

--
components: Tests
keywords: easy
messages: 107177
nosy: brett.cannon
priority: low
severity: normal
status: open
title: regrtest.main should have a test skipping argument
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8911
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

This would be especially useful now that only spaces are used in .c/.h files 
and not tabs.

--
messages: 107178
nosy: brett.cannon
priority: low
severity: normal
status: open
title: `make patchcheck` should check the whitespace of .c/.h files
type: feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8912
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8913] Document that datetime.__format__ is datetime.strftime

2010-06-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

Documenting that would help get people using datetime objects with 
string.format more.

--
assignee: d...@python
components: Documentation
keywords: easy
messages: 107179
nosy: brett.cannon, d...@python
priority: low
severity: normal
status: open
title: Document that datetime.__format__ is datetime.strftime
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8914] Run clang's static analyzer

2010-06-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

Just like I did for Python 2.7.

Should use this issue to keep track of what I have already processed and what I 
had to skip because OS X doesn't have the right files.

--
components: Extension Modules, Interpreter Core
messages: 107180
nosy: brett.cannon
priority: low
severity: normal
status: open
title: Run clang's static analyzer
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8914
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8915] Use locale.nl_langinfo in _strptime

2010-06-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

It might perform better to use locale.nl_langinfo to get the current locale's 
datetime information instead of reverse-engineering from strftime (need to 
benchmark to see if this is true). This would need to be conditional as the 
datetime info might not be exposed through nl_langinfo.

--
components: Library (Lib)
messages: 107181
nosy: brett.cannon
priority: low
severity: normal
status: open
title: Use locale.nl_langinfo in _strptime
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8915
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8916] Move PEP 362 (function signature objects) into inspect

2010-06-05 Thread Brett Cannon

New submission from Brett Cannon br...@python.org:

To get function signature objects (PEP 362) moving forward I should get it into 
the inspect module. That way people can start using it more beyond those in 
PyPI (http://pypi.python.org/pypi/pep362).

Michael Foord has mentioned how IronPython could use function signature 
objects. This would be a first step in getting the objects standardized enough 
so that IronPython could eventually consider putting them on all of their 
objects.

--
components: Library (Lib)
messages: 107182
nosy: brett.cannon, michael.foord
priority: low
severity: normal
status: open
title: Move PEP 362 (function signature objects) into inspect
type: feature request
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8916
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting

2010-06-05 Thread Shashwat Anand

Changes by Shashwat Anand anand.shash...@gmail.com:


Removed file: http://bugs.python.org/file16900/BaseHTTPServer.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7370
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting

2010-06-05 Thread Shashwat Anand

Shashwat Anand anand.shash...@gmail.com added the comment:

Seems that earlier patch was incorrect. Rectifying and submitting the correct 
patch.

--
Added file: http://bugs.python.org/file17567/BaseHTTPServer.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7370
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8913] Document that datetime.__format__ is datetime.strftime

2010-06-05 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I wonder if this is subject to change.  I find it odd that

 {:g}.format(1e3)
'1000'

but one has to use % in

 {:%Y}.format(datetime.now())
'2010'

It is also different from PEP 3101 recommendation:

An example is the 'datetime' class,
whose format specifiers might look something like the
arguments to the strftime() function:

Today is: {0:a b d H:M:S Y}.format(datetime.now())

The above, however, should probably be

Today is: {0:a} {0:b} {0:d} {0:H}:{0:M}:{0:S} {0:Y}.format(datetime.now())

--
nosy: +belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8913
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com