[issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library

2018-09-06 Thread Tim Lesher


Change by Tim Lesher :


--
nosy: +tlesher

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



[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2012-03-12 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

Corrected const warning in previous patch.

--
Added file: http://bugs.python.org/file24794/8070-use-default-encoding-2.patch

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



[issue8010] tkFileDialog.askopenfiles crashes on Windows 7

2012-03-12 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher

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



[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2012-03-11 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

Updated patch:  use Py_FileSystemDefaultEncoding (if possible) when sys.stdin 
is (or becomes) invalid; if none, then fails without entering infinite loop. 
Docs for PyRun_InteractiveLoopFlags have been updated.

--
Added file: http://bugs.python.org/file24785/8070-use-default-encoding.patch

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



[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2012-03-09 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

Victor: would you object to ysj.ray's solution? 

I don't think it was an option when we last looked at this issue.

--

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




[issue3905] subprocess failing in GUI applications on Windows

2012-02-13 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher

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



[issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings

2012-02-09 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

This patch should both correct the incorrect acceptance of strings and the 
incorrect rejection of buffer objects when using SND_MEMORY.

--
keywords: +patch
Added file: http://bugs.python.org/file24470/11620-PlaySound.patch

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



[issue11838] IDLE: make interactive code savable as a runnable script

2011-06-14 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher

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



[issue12261] urllib.parse docs still refer to urlparse

2011-06-03 Thread Tim Lesher

New submission from Tim Lesher tles...@gmail.com:

While most of the occurrences of urlparse were corrected to urllib.parse 
when the module was renamed, two were missed: one in the second example, and 
one in the See also note for RFC 3986.

--
assignee: docs@python
components: Documentation
messages: 137574
nosy: docs@python, tlesher
priority: normal
severity: normal
status: open
title: urllib.parse docs still refer to urlparse
type: behavior
versions: Python 3.2

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



[issue12261] urllib.parse docs still refer to urlparse

2011-06-03 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file22238/remove-urlparse.patch

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



[issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings

2011-06-03 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher

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



[issue1635741] Interpreter seems to leak references after finalization

2011-03-31 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher

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



[issue1189811] pydoc may hide non-private doc strings.

2011-03-15 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher

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



[issue4510] ValueError for list.remove() not very helpful

2010-07-26 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

Ugh.  That's a reasonable objection.

What's the best thing to do in this case, generally speaking?

list.index() does print the full repr on a value error; and a quick grep shows 
a number of other similar uses, although those don't seem to be as easy to 
trigger inadvertently.

Should this feature be removed from list.index as well?

--

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



[issue4510] ValueError for list.remove() not very helpful

2010-07-21 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

It looks as if this has been addressed for list.index (aka issue #7252), in 
r76058.  The same fix could be applied for list.remove.

--

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



[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

Added patch that replicates the change in r82035 for Visual Studio 2005 (VC8) 
builds.

--
nosy: +tlesher
Added file: http://bugs.python.org/file18107/add_time_to_vc8_build.diff

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



[issue4510] ValueError for list.remove() not very helpful

2010-07-21 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

This patch combines the fix from Georg Brandl's original patch with the fix 
made to listindex.  The r76058 fix fails the test in Georg's original test 
where the repr of the item to be removed itself raises; this patch handles that 
case for both list.remove and list.index.

--
Added file: http://bugs.python.org/file18110/improve_list_remove_error.diff

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



[issue9324] signal.signal(bogus_signal, handler) segfaults on Windows

2010-07-21 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

This appears to run afoul of Microsoft's security-enhanced CRT, which aborts 
a program that calls certain API functions (including signal) with invalid 
parameters.  

PyOS_getsig() has conditionally-compiled code added to deal with this (and 
handle invalid signal values before passing them to the CRT); PyOS_setsig() 
should get the same treatment.

--
nosy: +tlesher

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



[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

No, there's no automated way to keep legacy Windows toolchains in sync; short 
of adopting something like Scons or CMAKE (which I'm *not* suggesting) I don't 
think I've seen a trustworthy way of doing so.

The PCBuild's readme.txt states:

You can find build directories for older versions of Visual Studio and Visual 
C++ in the PC directory. The legacy build directories are no longer actively 
maintained and may not work out of the box.

To date, I believe that the attitude toward these older build files has been 
unsupported; use at own risk; patches welcome.

--

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



[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


Removed file: http://bugs.python.org/file18107/add_time_to_vc8_build.diff

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



[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


Added file: http://bugs.python.org/file18113/add_time_to_vc8_build.diff

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



[issue9204] The documentation of PyType_Type in py3k mentions types.TypeType

2010-07-19 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

There are a number of similar mentions in the C API docs and index; attached is 
a patch that removes each.

--
keywords: +patch
nosy: +tlesher
Added file: http://bugs.python.org/file18068/remove-extraneous-types.diff

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



[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2010-04-08 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

I just hit this one myself, and was about to write a bug and patch.

On reviewing the patch:

1. This really has the same issue as the original code: it detects one of a few 
known return values, and will infinitely loop on an unexpected return value.  
It would be better to explicitly check for 0 (continue), E_EOF (exit normally), 
and any other result (exit abnormally).

2. I don't think you want to unconditionally call PyErr_Print(), because you 
don't know for sure that an exception is set.

3. Returning 0 from PyRun_InteractiveLoopFlags() when an error occurs is a 
behavior change, which makes its documentation incorrect (meaning there should 
also be a doc patch). But to be honest, I don't think it's correct to return 0 
in this case. It seems better to return the actual error code (which also 
requires a doc patch)

If you don't have time to update the patch, let me know and I'll put one 
together.

--
nosy: +tlesher

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



[issue1674032] Make threading.Event().wait(timeout=3) return isSet

2009-03-30 Thread Tim Lesher

Tim Lesher tles...@gmail.com added the comment:

Thanks, Antoine. I will re-check the patch against trunk and add tests 
this week.

--

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



[issue4510] ValueError for list.remove() not very helpful

2009-03-10 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher
nosy_count: 2.0 - 3.0

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



[issue5015] The Py_SetPythonHome C API function is undocumented

2009-02-03 Thread Tim Lesher

Changes by Tim Lesher tles...@gmail.com:


--
nosy: +tlesher

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



[issue4483] Error to build _dbm module during make

2008-12-04 Thread Tim Lesher

Changes by Tim Lesher [EMAIL PROTECTED]:


--
nosy: +tlesher

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4483
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1674032] Make threading.Event().wait(timeout=3) return isSet

2008-05-06 Thread Tim Lesher

Changes by Tim Lesher [EMAIL PROTECTED]:


--
assignee:  - georg.brandl
components: +Documentation, Library (Lib) -Interpreter Core
nosy: +georg.brandl

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



[issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs

2008-04-15 Thread Tim Lesher

New submission from Tim Lesher [EMAIL PROTECTED]:

The urllib.quote docstring implies that it quotes only characters in RFC
2396's reserved set.

However, urllib.quote currently escapes all characters except those in
an always_safe list, which consists of alphanumerics and three
punctuation characters, _.-.

This behavior is contrary to the RFC, which defines unreserved
characters as alphanumerics plus mark characters, or -_.!~*'().  

The RFC also says:

  Unreserved characters can be escaped without changing the semantics
  of the URI, but this should not be done unless the URI is being used
  in a context that does not allow the unescaped character to appear.

This seems to imply that always_safe should correspond to the RFC's
unreserved set of alphanum | mark.

--
components: Library (Lib)
messages: 65518
nosy: tlesher
severity: normal
status: open
title: urllib.quote() escapes characters unnecessarily and contrary to docs
type: behavior
versions: Python 2.5

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



[issue1781] ConfigParser: add_section('DEFAULT') causes duplicate sections.

2008-01-09 Thread Tim Lesher

New submission from Tim Lesher:

ConfigParser doesn't prevent manually adding a section named DEFAULT;
however, doing so creates a duplicate, inaccessible [DEFAULT] section in
the config file:

 import sys, ConfigParser
 c = ConfigParser.ConfigParser()
 c.add_section('DEFAULT')
 c.write(sys.stdout)
[DEFAULT]

 c.set('DEFAULT', 'color', 'yellow')
 c.write(sys.stdout)
[DEFAULT]
color = yellow

[DEFAULT]


It seems that the correct thing to do would be to disallow
add_section('DEFAULT').

--
components: Library (Lib)
messages: 59652
nosy: tlesher
severity: normal
status: open
title: ConfigParser: add_section('DEFAULT') causes duplicate sections.
type: behavior
versions: Python 2.6

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



[issue1202] zlib.crc32() and adler32() return value

2007-12-09 Thread Tim Lesher

Tim Lesher added the comment:

Both CRC-32 and ADLER32 are standards (described in ISO 3309 and RFC
1950 respectively); whatever fix implemented should make sure that the
output complies.  

ISO 3309 isn't available online as far as I can see, but CRC-32
reference code is published in RFC 1952; RFC 1950 contains reference
code for ADLER32.

--
nosy: +tlesher

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