[issue20587] sqlite3 converter not being called

2014-02-12 Thread Kathryn M Kowalski

Kathryn M Kowalski added the comment:

See attached file with output from both python versions.  It is using the 
converter as shown in demo2a.  The code using the converter was working on 2.5 
for years - it quit working on the move to 2.7 because it couldn't compare a 
datetime to the text string returned from the database.

--
Added file: http://bugs.python.org/file34061/demo2a.py

___
Python tracker 
<http://bugs.python.org/issue20587>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20587] sqlite3 converter not being called

2014-02-11 Thread Kathryn M Kowalski

Kathryn M Kowalski added the comment:

Worked on my machine too - but if you add "union all" AND "order by" it breaks

--
Added file: http://bugs.python.org/file34047/demo2.py

___
Python tracker 
<http://bugs.python.org/issue20587>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20587] sqlite3 converter not being called

2014-02-10 Thread Kathryn M Kowalski

Changes by Kathryn M Kowalski :


Added file: http://bugs.python.org/file34029/check_with_output.txt

___
Python tracker 
<http://bugs.python.org/issue20587>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20587] sqlite3 converter not being called

2014-02-10 Thread Kathryn M Kowalski

New submission from Kathryn M Kowalski:

I have a timestamp converter that works on 2.5 but doesn't on 2.7.2 
(ActiveState 2.7.2.5  Attached is some pared down test code and output from a 
machine running 2.5 and one running 2.7.  At one point I even put print 
statements in the converter - they show up under 2.5 not 2.7.  I don't think it 
is getting called.

--
components: Windows
files: check_with_output.txt
messages: 210873
nosy: kmk
priority: normal
severity: normal
status: open
title: sqlite3 converter not being called
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file34026/check_with_output.txt

___
Python tracker 
<http://bugs.python.org/issue20587>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-02 Thread Kathryn M Kowalski

Kathryn M Kowalski <[EMAIL PROTECTED]> added the comment:

sorry

Added file: http://bugs.python.org/file10170/testofResize.py.txt

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2733>
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-01 Thread Kathryn M Kowalski

New submission from Kathryn M Kowalski <[EMAIL PROTECTED]>:

We have a shared memory module that has been running fine on Windows 
with Active State Python 2.4.3 Build 12.  On machines with 2.5.1.1 
mmap.resize fails on an existing anonymous shared memory.  The attached 
file is a stripped down version of the code to illustrate the problem.  
Start it running in one window to create the shared memory, then in 
another window run it again to hook into existing shared memory. Result:
Testing SharedMemory
open -self.memory_size 336
Traceback (most recent call last):
  File "C:/home/weather/TESTOF~1.PY", line 164, in 
example()
  File "C:/home/weather/TESTOF~1.PY", line 147, in example
sm = SharedMemory( 'my_shared_memory')
  File "C:/home/weather/TESTOF~1.PY", line 31, in __init__
self.__open()
  File "C:/home/weather/TESTOF~1.PY", line 94, in __open
self.memory.resize(self.memory_size)
WindowsError: [Error 8] Not enough storage is available to process this 
command

--
components: Library (Lib)
files: testofResizeB.txt
messages: 66036
nosy: kmk
severity: normal
status: open
title: mmap resize fails on anonymous memory (Windows)
type: crash
versions: Python 2.5
Added file: http://bugs.python.org/file10151/testofResizeB.txt

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2733>
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1836] 'weekly' rotating logging file rotation incorrect

2008-01-18 Thread Kathryn M Kowalski

Kathryn M Kowalski added the comment:

I did not put suggested code in - walking through it and counting days 
on my fingers I don't think it works.

If the desired rollover day is Tuesday (self.dayOfWeek = 1) and today 
is Tuesday (day = 1) then self.rolloverAt is the seconds to midnight as 
if daysToWait =0, and it rolls over at midnight Tuesday.  However if 
the desired rollover day is Tuesday (self.dayOfWeek = 1) and today is 
Monday (day = 0) then daysToWait = 0 again.  It rolls over on Monday at 
midnight - not Tuesday at midnight.

If the desired rollover day is Tuesday (self.dayOfWeek = 1) and today 
is Wednesday (day = 2) then daysToWait = 5.  It also rolls over on 
Monday at midnight - not Tuesday at midnight.

Changing it to:
day = t[6] # 0 is Monday
if day != self.dayOfWeek:
if day < self.dayOfWeek:
daysToWait = self.dayOfWeek - day
else:
daysToWait = 6 - day + self.dayOfWeek + 1

would make it equivalent to what I have running and appears to work. 
(Always rolls (ends) on day specified at midnight.)

Alternatively, if you wanted to change it so the log starts on the day 
specified you could just get rid of "if day != self.dayOfWeek:" from 
your code.

if when.startswith('W'):
day = t[6] # 0 is Monday
if day < self.dayOfWeek:
daysToWait = self.dayOfWeek - day - 1
else:
daysToWait = 6 - day + self.dayOfWeek
self.rolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24))

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1836>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1836] 'weekly' rotating logging file rotation incorrect

2008-01-17 Thread Kathryn M Kowalski

Kathryn M Kowalski added the comment:

downloaded from ActiveState aug 2007 Python 2.5.1.1 

# Case 2) The day to rollover is further in the interval (i.e., today is
# day 2 (Wednesday) and rollover is on day 6 (Sunday).  Days to
# next rollover is simply 6 - 2 - 1, or 3.
# Case 3) The day to rollover is behind us in the interval (i.e., today
# is day 5 (Saturday) and rollover is on day 3 (Thursday).
# Days to rollover is 6 - 5 + 3, or 4.  In this case, it's the
# number of days left in the current week (1) plus the number
# of days in the next week until the rollover day (3).
if when.startswith('W'):
   day = t[6] # 0 is Monday
   if day > self.dayOfWeek:
   daysToWait = (day - self.dayOfWeek) - 1
   self.rolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24))
   if day < self.dayOfWeek:
   daysToWait = (6 - self.dayOfWeek) + day

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1836>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1836] 'weekly' rotating logging file rotation incorrect

2008-01-15 Thread Kathryn M Kowalski

New submission from Kathryn M Kowalski:

Log file did not 'rotate' on day requested.
Fixed code in Lib/logging/handlers.py class TimedRotatingFileHandler
Compare excerpt of my fix below to the original

# Case 2) The day to rollover is further in the interval (i.e., today is
# day 2 (Wednesday) and rollover is on day 6 (Sunday).  Days to
# next rollover is simply 6 - 2, or 4.
# Case 3) The day to rollover is behind us in the interval (i.e., today
# is day 5 (Saturday) and rollover is on day 3 (Thursday).
# Days to rollover is 6 - 5 + 3 + 1, or 5.  In this case, it's 
the
# number of days left in the current week (1) plus the number
# of days in the next week until the rollover day (4).
if when.startswith('W'):
   day = t[6] # 0 is Monday
   if self.dayOfWeek > day:
   daysToWait = (self.dayOfWeek - day)
   self.rolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24))
   if self.dayOfWeek < day:
   daysToWait = (6 - day) + self.dayOfWeek + 1

--
components: Library (Lib)
messages: 59983
nosy: kmk
severity: normal
status: open
title: 'weekly' rotating logging file rotation incorrect
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1836>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com