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
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,
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
___
Changes by Jan Kratochvil jan.kratoch...@redhat.com:
--
nosy: +jankratochvil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4434
___
___
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
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
Changes by Tal Einat talei...@users.sourceforge.net:
--
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4785
___
___
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
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
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.
--
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
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.
--
___
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
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.
--
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
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
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
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...
--
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
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
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
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
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
nosy: +d...@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8907
___
___
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
___
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
___
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
Changes by anatoly techtonik techto...@gmail.com:
--
nosy: +d...@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8519
___
___
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:
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
___
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
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8446
___
___
Python-bugs-list
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
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
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:
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
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
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
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
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
Changes by anatoly techtonik techto...@gmail.com:
--
nosy: +techtonik
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1647654
___
___
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
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
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
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
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
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
anatoly techtonik techto...@gmail.com added the comment:
Please add issue8908 as superseder.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8870
___
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
___
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
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:
Changes by anatoly techtonik techto...@gmail.com:
--
nosy: +d...@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8909
___
___
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
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
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
___
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
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: -
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')
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
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
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
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: -
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
___
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
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
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
___
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
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.
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
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
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
___
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
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
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
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
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
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
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
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
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
___
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
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
81 matches
Mail list logo