[issue23224] LZMADecompressor object is only initialized in __init__

2016-12-01 Thread Aaron Hill

Aaron Hill added the comment:

I've upload a patch which should address the issue in both the lzma and bz2 
modules.

--
keywords: +patch
nosy: +Aaron1011
Added file: http://bugs.python.org/file45730/fix-lzma-bz2-segfaults.patch

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



[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-16 Thread Aaron Hill

Aaron Hill added the comment:

I've added a test case to exercise reset()

--
Added file: 
http://bugs.python.org/file39934/fix-multibytecodec-segfault-with-test.patch

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



[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread Aaron Hill

Aaron Hill added the comment:

The patch didn't get attached for some reason. It's attached now.

--
Added file: http://bugs.python.org/file39933/fix-multibytecodec-segfault.patch

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



[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread Aaron Hill

Aaron Hill added the comment:

The included patch fixes the issue, and modifies the existing unittest to 
prevent a future regression.

The patch corrects an issue where the 'pending' struct field was NULL, but was 
used as the input to multibytecodec_encode anyay.

--

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



[issue23247] Multibyte codec StreamWriter.reset() crashes

2015-07-15 Thread Aaron Hill

Aaron Hill added the comment:

This is also present in the latest Python 3.6.

I'm going to work on providing a patch for this, unless someone else already is

--
nosy: +Aaron1011
versions: +Python 3.6

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



[issue23004] mock_open() should allow reading binary data

2014-12-19 Thread Aaron Hill

Aaron Hill added the comment:

I've fixed the formatting issues.

--
Added file: 
http://bugs.python.org/file37510/mock-open-allow-binary-data-fix-formatting.patch

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



[issue23004] mock_open() should allow reading binary data

2014-12-15 Thread Aaron Hill

Aaron Hill added the comment:

I've fixed the issues you pointed out.

Is there a better way than uploading a new patch file to make changes?

--
Added file: 
http://bugs.python.org/file37458/mock-open-allow-binary-without-coerce-fixup.patch

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



[issue23004] mock_open() should allow reading binary data

2014-12-14 Thread Aaron Hill

Aaron Hill added the comment:

Thanks, I've fixed that. Not sure why I thought decoding and re-encoding would 
work with any binary data.

I've also updated one of the tests to use non-utf8-decodeable binary data, to 
prevent a future regression.

--
Added file: 
http://bugs.python.org/file37446/mock-open-allow-binary-without-coerce.patch

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



[issue23004] mock_open() should allow reading binary data

2014-12-13 Thread Aaron Hill

Aaron Hill added the comment:

I've created a new patch, which addresses the problem. Your example now 
currently returns [b'foo\n', b'bar\n']

--
Added file: 
http://bugs.python.org/file37440/mock-open-allow-binary-data-updated.patch

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



[issue23004] mock_open() should allow reading binary data

2014-12-12 Thread Aaron Hill

Aaron Hill added the comment:

I've created a patch that fixes this, and added an accompanying unit test 
(which fails without the change).

--
keywords: +patch
nosy: +Aaron1011
Added file: http://bugs.python.org/file37435/mock-open-allow-binary-data.patch

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



[issue18216] gettext doesn't check MO versions

2014-10-28 Thread Aaron Hill

Aaron Hill added the comment:

Awesome! Thanks!

--

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



[issue18216] gettext doesn't check MO versions

2014-10-25 Thread Aaron Hill

Aaron Hill added the comment:

Is there anything that needs to be changed?

--

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



[issue18216] gettext doesn't check MO versions

2014-10-17 Thread Aaron Hill

Aaron Hill added the comment:

Does anyone have any thoughts about throwing a warning for an unexpected minor 
revision?

--

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



[issue18216] gettext doesn't check MO versions

2014-10-17 Thread Aaron Hill

Aaron Hill added the comment:

Okay, then. I'll just leave it out.

--

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



[issue18216] gettext doesn't check MO versions

2014-10-17 Thread Aaron Hill

Changes by Aaron Hill aa1ron...@gmail.com:


Added file: http://bugs.python.org/file36957/gettext-mo-fix-minor-version.patch

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



[issue18216] gettext doesn't check MO versions

2014-10-17 Thread Aaron Hill

Changes by Aaron Hill aa1ron...@gmail.com:


Removed file: 
http://bugs.python.org/file36957/gettext-mo-fix-minor-version.patch

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



[issue18216] gettext doesn't check MO versions

2014-10-17 Thread Aaron Hill

Changes by Aaron Hill aa1ron...@gmail.com:


Added file: http://bugs.python.org/file36958/gettext-mo-fixup.patch

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



[issue18216] gettext doesn't check MO versions

2014-10-17 Thread Aaron Hill

Aaron Hill added the comment:

I've added a second patch, which properly distinguishes between major and minor 
revisions, and updates the docs to account for the new behavior.

--

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



[issue5843] Normalization error in urlunparse

2014-10-09 Thread Aaron Hill

Aaron Hill added the comment:

In order to fix this, I think ParseResult needs to have two additional fields, 
indicating with an empty prefix or query string are used.

Both ParseResult.fragment and ParseResult.query omit the leading '#' or '?' 
from their value. This makes it impossible to determine if the fragment/query 
string is entirely absent, or has no value.

--
nosy: +Aaron1011

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



[issue18216] gettext doesn't check MO versions

2014-10-07 Thread Aaron Hill

Aaron Hill added the comment:

That sounds good. Should a warning be thrown for an unexpected minor revision?

--

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



[issue18216] gettext doesn't check MO versions

2014-10-06 Thread Aaron Hill

Changes by Aaron Hill aa1ron...@gmail.com:


--
keywords: +patch
nosy: +Aaron1011
Added file: http://bugs.python.org/file36828/gettext-mo-version.patch

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



[issue22037] Poor grammar in asyncio TCP echo client example

2014-07-22 Thread Aaron Hill

New submission from Aaron Hill:

The last sentence in the explanation of the TCP echo client currently reads: 

At run_until_complete() exit, the loop is no more running, so there is no need 
to stop the loop in case of an error.

The grammar should be improved to something like ...the loop is no longer 
running, or ...the loop has stopped running

The current documentation can be found here: 
https://docs.python.org/3/library/asyncio-protocol.html#echo-client

--
assignee: docs@python
components: Documentation
messages: 223673
nosy: Aaron1011, docs@python
priority: normal
severity: normal
status: open
title: Poor grammar in asyncio TCP echo client example

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



Re: formatted 'time' data in calculations

2009-01-07 Thread Aaron Hill
I personally use epoch time since its absolute. I have a simple time clock
app that uses this method, from that it is easy to convert into human date:


[code]

def OnButtonIn(self,evt):

'create time stamp with ID/action'

'print to the rightFrame text'

if self.punchedIn:

print Already punched in cannot punch again

else:

seconds = time.time()

current = time.localtime(seconds)

day = time.localtime()

# time string can have characters 0..9, -, period, or space

timeday = time.strftime('%H:%M-%m.%d.%y', day)

formatday = time.strftime('%c', day)

self.ClockIntext = seconds

#self.text =  Clock in:  + self.text

self.punchIn.SetValue(formatday)

self.punchedIn = True

self.punchedOut = False



def OnButtonOut(self,evt):

if self.punchedOut:

print Already punched out!

else:

'create time stamp with ID/action'

'print to the rightFrame text'

'write to time sheet'

seconds = time.time()

current = time.localtime(seconds)

day = time.localtime()

# time string can have characters 0..9, -, period, or space

timeday = time.strftime('%H:%M-%m.%d.%y', day)

formatday = time.strftime('%c', day)

self.ClockOuttext = seconds

self.punchOut.SetValue(formatday)

self.punchedIn = False

self.punchedOut = True

'create a file and write the table to it'

file = open('timesheet.txt', 'a')

file.write(str(self.ClockIntext))

file.write('\t')

file.write(str(self.ClockOuttext))

file.write('\n')

file.close()

return None



def OnButtonCalc(self,event):

'open the time sheet and calculate the total time'

file = open('timesheet.txt','r')

lines = file.readlines()

time1 = ''

time2 = ''

self.hours = 0.000

for punch in lines:

for x in punch:

if(len(x) = 0):

self.hours = self.hours

else:

if x != '\t' and x!= '\n':

time1 = time1 + x

elif x == '\t':

time2 = time1

time1 = ''

elif x == '\n':

self.hours = self.hours +
abs(((float(time2)-float(time1))/60)/60)

time2 = ''

time1 = ''



self.total.SetValue('%2f' % self.hours)
[/code]

Oops wrong person, sorry about that. This time it should go to the mailing
list



Aaron Hill
--
http://mail.python.org/mailman/listinfo/python-list