[issue44578] dict with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Michael


New submission from Michael :

dict with three type parameters is legal (e.g., dict[str, str, str]), where I 
expected a TypeError. When using typing.Dict, it does raise a TypeError.

Example in python 3.9:

>>> from typing import Dict
>>> Dict[str, str, str]  # Raises a TypeError, as expected
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
275, in inner
return func(*args, **kwds)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
828, in __getitem__
_check_generic(self, params, self._nparams)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
212, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for 
{cls};"
TypeError: Too many parameters for typing.Dict; actual 3, expected 2
>>> dict[str, str, str]  # No TypeError here?
dict[str, str, str]

This also works in 3.7 and 3.8:

Python 3.8.11 (default, Jul  6 2021, 12:13:09) 
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import annotations
>>> dict[str, str, str]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'type' object is not subscriptable
>>> def foo(bar: dict[str, str, str]): pass
... 
>>> foo.__annotations__
{'bar': 'dict[str, str, str]'}

--
messages: 397073
nosy: mthe
priority: normal
severity: normal
status: open
title: dict with more than two type parameters doesn't raise a TypeError
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

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



[issue44578] dict with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Michael


Michael  added the comment:

Same for list btw

Python 3.9.6 (default, Jul  7 2021, 11:41:04) 
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> list[str, str, str]
list[str, str, str]
>>> from typing import List
>>> List[str, str, str]
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
275, in inner
return func(*args, **kwds)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
828, in __getitem__
_check_generic(self, params, self._nparams)
  File "/Users/michaelthe/.pyenv/versions/3.9.6/lib/python3.9/typing.py", line 
212, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for 
{cls};"
TypeError: Too many parameters for typing.List; actual 3, expected 1
>>>

--

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



[issue44578] dict/list with more than two type parameters doesn't raise a TypeError

2021-07-07 Thread Michael


Change by Michael :


--
title: dict with more than two type parameters doesn't raise a TypeError -> 
dict/list with more than two type parameters doesn't raise a TypeError

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



[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2020-05-06 Thread Michael


Michael  added the comment:

Looks like a duplicate of my previous issue

https://bugs.python.org/issue29759

Unfortunately some frameworks like Gunicorn are extensively using signal 
handlers for their internal purposes.

--
nosy: +mapozyan

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



[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2020-05-06 Thread Michael


Michael  added the comment:

Reproducing issue with attached test (Python 3.8.2 on Ubuntu 16.04).

--
Added file: https://bugs.python.org/file49130/mp-signal-bug-python3.8.py

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



[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2020-05-06 Thread Michael


Michael  added the comment:

Attached working patch.
Tested with signal handler set in Lib/test/_test_multiprocessing.py:

2329a2330,2331
> def signal_handler(signum, frame):
> pass
2335a2338
> cls.old_handler = signal.signal(signal.SIGTERM, signal_handler)
2342a2346
> signal.signal(signal.SIGTERM, cls.old_handler)

All passing.

--
keywords: +patch
Added file: https://bugs.python.org/file49131/pool.py.patch

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



[issue29759] Deadlock in multiprocessing.pool.Pool on terminate

2017-07-05 Thread Michael

Michael added the comment:

If `task_handler._state = TERMINATE` is done before call to 
_help_stuff_finish(), then the following loop `while task_handler.is_alive() 
and inqueue._reader.poll()` in that function won't work as `is_alive()` will 
obviously return False.

--

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



[issue29759] Deadlock in multiprocessing.pool.Pool on terminate

2017-07-05 Thread Michael

Michael added the comment:

I found a couple of other cases when deadlock still occurs.

1. _help_stuff_finish may remove sentinels from the queue. Some of the workers 
will then never get a signal to terminate.

2. worker handler thread may be terminated too late, so it may spawn new 
workers while terminating is in progress.

I tried to fix these two issues too in following commit: 
https://github.com/michael-a-cliqz/cpython/commit/3a767ee7b33a194c193e39e0f614796130568630

NB: This updated snippet has higher chances for deadlock:

"""
import logging
import multiprocessing.pool
import signal
import time

def foo(num):
return num * num

def signal_handler(signum, frame):
pass

if __name__ == '__main__':
signal.signal(signal.SIGTERM, signal_handler)

logger = multiprocessing.log_to_stderr()
logger.setLevel(logging.DEBUG)

pool = multiprocessing.pool.Pool(processes=16)
time.sleep(0.5)
pool.map_async(foo, range(16))
pool.terminate()
"""

(I am running it from dead loop in a shell script)

--

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



[issue29759] Deadlock in multiprocessing.pool.Pool on terminate

2017-03-08 Thread Michael

New submission from Michael:

Following code snippet causes a deadlock on Linux:

"""
import multiprocessing.pool
import signal


def signal_handler(signum, frame):
pass

if __name__ == '__main__':
signal.signal(signal.SIGTERM, signal_handler)
pool = multiprocessing.pool.Pool(processes=1)
pool.terminate() # alternatively - raise Exception("EXCEPTION")
"""

The reason is that the termination code starts before the worker processes 
being fully initialized.

Here, parent process acquires a forever-lock:

"""
@staticmethod
def _help_stuff_finish(inqueue, task_handler, size):
# task_handler may be blocked trying to put items on inqueue
util.debug('removing tasks from inqueue until task handler finished')
inqueue._rlock.acquire()  < -
while task_handler.is_alive() and inqueue._reader.poll():
inqueue._reader.recv()
time.sleep(0)
"""

And then the worker processes are getting stuck here:

"""
def worker(...):

while maxtasks is None or (maxtasks and completed < maxtasks):
try:
task = get()  < - trying to acquire 
the same lock
except (EOFError, OSError):
util.debug('worker got EOFError or OSError -- exiting')
break


"""

Whats going on then? As far as the default process start method is set to 
'fork', worker subprocesses inherit parent's signal handler. Trying to 
terminate workers from _terminate_pool() doesn't have any effect. Finally, 
processes enter into a deadlock when parent join()-s workers.

--
components: Library (Lib)
messages: 289248
nosy: mapozyan
priority: normal
severity: normal
status: open
title: Deadlock in multiprocessing.pool.Pool on terminate
versions: Python 3.7

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



[issue29759] Deadlock in multiprocessing.pool.Pool on terminate

2017-03-08 Thread Michael

Michael added the comment:

This patch kind of solves the issue. Not a nice one, but perhaps the safest one.

https://github.com/michael-a-cliqz/cpython/commit/1536c8c8cfc5a87ad4ab84d1248cb50fefe166ae

--

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



[issue29759] Deadlock in multiprocessing.pool.Pool on terminate

2017-03-08 Thread Michael

Changes by Michael :


--
type:  -> behavior
versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



[issue10769] ast: provide more useful range information

2012-04-19 Thread Michael

Michael  added the comment:

Hi,

Attached is the updated patch by Sven Brauch from the original mailing list 
thread bringing column offset reporting for attributes in line with everything 
else.

The offsets for bar before the patch:
foo[bar] = 4
foo(bar) = 4
foo.bar = 0

After:

foo[bar] = 4
foo(bar) = 4
foo.bar = 4

With the update, are there still concerns?

--
keywords: +patch
nosy: +kensington
Added file: http://bugs.python.org/file25275/fix-attr-ranges.patch

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



[issue15659] using os.fork() and import user's modules results in errors

2012-08-14 Thread Michael

New submission from Michael:

if I import any python script in the beginning of the code in then I haver next 
errors:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 295, in _exit_function
p.join()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 143, in join
assert self._parent_pid == os.getpid(), 'can only join a child process'
AssertionError: can only join a child process
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
  File "/usr/lib/python2.7/multiprocessing/util.py", line 295, in _exit_function
p.join()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 143, in join
assert self._parent_pid == os.getpid(), 'can only join a child process'
AssertionError: can only join a child process

--
components: None
files: mydaemon.py
messages: 168251
nosy: michaeluc
priority: normal
severity: normal
status: open
title: using os.fork() and import user's modules results in errors
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file26816/mydaemon.py

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



[issue15659] using os.fork() and import user's modules results in errors

2012-08-14 Thread Michael

Michael added the comment:

thanks David,
scripts which I imported were relying on some librarary which I did not 
understand. I was able to get rid of it and I don't have these errors any more. 
It was bug in my program. Thank you again.

--
resolution:  -> fixed
status: open -> closed

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



[issue6389] os.chmod() documentation refers to non-existent documentation in stat

2009-06-30 Thread Michael

New submission from Michael :

If you look at the documentation for os.chmod(), it says:
"mode may take one of the following values (as defined in the stat
module)..."

and then lists a number of constants from the stat module (stat.S_ISUID,
stat.S_ISGID, etc.)

I cannot seem to find these constants defined anywhere on the stat
module page.  May I suggest that these constants be defined in the
documentation for os.chmod(), to make it easier on the user?

--
assignee: georg.brandl
components: Documentation
messages: 89932
nosy: georg.brandl, mhearne808
severity: normal
status: open
title: os.chmod() documentation refers to non-existent documentation in stat
versions: Python 2.6

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



[issue17214] http.client.HTTPConnection.putrequest encode error

2015-10-25 Thread Michael

Michael added the comment:

The patch issue17214 did fix this issue in my 3.4.2 install on Ubuntu LTS.

It triggered however another bug:

  File "/usr/local/lib/python3.4/urllib/request.py", line 646, in http_error_302
path = urlparts.path if urlpaths.path else "/"
NameError: name 'urlpaths' is not defined

This is obviously a typo. 

I'm not sure if that one has been reported yet (a short google search didn't 
find anything) and I don't know how to provoke it independently.

--
nosy: +Strecke
versions:  -Python 3.2, Python 3.3

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



[issue17214] http.client.HTTPConnection.putrequest encode error

2015-10-25 Thread Michael

Michael added the comment:

I should have looked more closely. 

The typo is part of the patch. It should be corrected there.

--

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



AssertionError in pickle's memoize function

2005-01-02 Thread Michael Hohn
Hi,
here is a code sample that shows the problem I ran into:
test.py:
=
import pickle
class aList(list):
   def __init__(self, arg):
   # w/o this call, pickle works...
   list.__init__(self, arg)
   pass
A = aList([1,2])
B = aList([A, 3])
the_data = {'a': A, 'b': B}
A._stored_by = the_data
pickle.dumps([the_data, B]) # ok
pickle.dumps([B, the_data]) # fails
=
Outputs under:
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
9 scarlet::~:0> python test.py
Traceback (most recent call last):
 File "test.py", line 16, in ?
   pickle.dumps([B, the_data]) # fails
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 1386, in dumps
   Pickler(file, protocol, bin).dump(obj)
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 231, in dump
   self.save(obj)
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 293, in save
   f(self, obj) # Call unbound method with explicit self
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 614, in save_list
   self._batch_appends(iter(obj))
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 629, in _batch_appends
   save(x)
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 338, in save
   self.save_reduce(obj=obj, *rv)
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 419, in save_reduce
   self.memoize(obj)
 File 
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/p
ickle.py", line 251, in memoize
   assert id(obj) not in self.memo
AssertionError

with the same problem under python on linux:
Python 2.3 (#1, Jul 31 2003, 14:19:24)
[GCC 2.96 2731 (Red Hat Linux 7.3 2.96-113)] on linux2
Traceback (most recent call last):
 File "", line 1, in ?
 File "/usr/tmp/python-286703ll", line 1, in ?
   pickle.dumps([B, the_data]) # fails
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 1386, 
in dumps
   Pickler(file, protocol, bin).dump(obj)
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 231, in 
dump
   self.save(obj)
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 293, in 
save
   f(self, obj) # Call unbound method with explicit self
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 614, in 
save_list
   self._batch_appends(iter(obj))
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 629, in 
_batch_appends
   save(x)
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 338, in 
save
   self.save_reduce(obj=obj, *rv)
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 419, in 
save_reduce
   self.memoize(obj)
 File "/usr/local_cci/Python-2.3/lib/python2.3/pickle.py", line 251, in 
memoize
   assert id(obj) not in self.memo
AssertionError


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



[issue40170] [C API] Prepare PyTypeObject structure for a stable ABI: avoid accessing members in the public API

2022-01-28 Thread Michael Felt


Change by Michael Felt :


--
nosy:  -Michael.Felt

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



[issue12029] Allow catching virtual subclasses in except clauses

2022-02-07 Thread Michael McCoy


Michael McCoy  added the comment:

Checking my comment history here, a past me was terribly bad at linking the
correct PR on github.This is the correct link:
https://github.com/python/cpython/pull/6461

On Mon, Feb 7, 2022 at 10:12 AM Guido van Rossum 
wrote:

>
> Guido van Rossum  added the comment:
>
> Fixing the version field. Since it's a feature, this could not go into any
> version before 3.11.
>
> Maybe Irit can look through the discussion and patch and see if there's
> value to doing this? (Feel free to decline!)
>
> --
> nosy: +iritkatriel
> versions: +Python 3.11 -Python 3.4, Python 3.5, Python 3.6, Python 3.7,
> Python 3.8, Python 3.9
>
> ___
> Python tracker 
> <https://bugs.python.org/issue12029>
> ___
>

--

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



[issue46810] multiprocessing.connection.Client doesn't support ipv6

2022-02-20 Thread Michael Hupfer


New submission from Michael Hupfer :

Hi there,

connecting a multiprocessing.connection.Client to an ipv6 address is not 
possible, since the address family is not passed into the constructor of class 
SocketClient. The constructor determines the family by calling 
address_type(address), which never returns AF_INET6.

The class SocketListener already implemented ipv6 support.

kind regards

--
messages: 413599
nosy: mhupfer
priority: normal
severity: normal
status: open
title: multiprocessing.connection.Client doesn't support ipv6
type: behavior
versions: Python 3.9

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



[issue1180] Option to ignore ~/.pydistutils.cfg

2007-09-19 Thread Michael Hoffman

Changes by Michael Hoffman:


--
components: Distutils
severity: normal
status: open
title: Option to ignore ~/.pydistutils.cfg
type: rfe
versions: Python 2.6

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2007-09-19 Thread Michael Hoffman

Changes by Michael Hoffman:


--
title: Option to ignore ~/.pydistutils.cfg -> Option to ignore or substitute 
~/.pydistutils.cfg

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



[issue1643369] function breakpoints in pdb

2007-09-19 Thread Michael Hoffman

Michael Hoffman added the comment:

Agree with isandler. This is not a bug.

--
nosy: +hoffman

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



[issue1180] Option to ignore ~/.pydistutils.cfg

2007-09-19 Thread Michael Hoffman

New submission from Michael Hoffman:

It would be useful if setup.py instances had an option to ignore
~/.pydistutils.cfg or substitute it with another file. For example, this
would be highly useful to people who maintain a system site-packages
directory along with one in their own home directory.

--
nosy: +hoffman

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



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-21 Thread Michael Hoffman

New submission from Michael Hoffman:

See <http://docs.python.org/lib/optparse-callback-example-6.html> where
it says 'either "-" or "-" can be option arguments'. One of these should
be --. The same error occurs several times on the same page.

Not a problem in the Optik docs at
<http://optik.sourceforge.net/doc/1.5/callbacks.html>.

--
components: Documentation
messages: 56074
nosy: gward, hoffman
severity: normal
status: open
title: optparse documentation: -- being collapsed to - in HTML
versions: Python 2.5

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



[issue1190] Windows rants& sugestions.

2007-09-22 Thread Michael Lawrence

New submission from Michael Lawrence:

TCL Perl , resources , sometimes with the python tool kit , i'd want 
certin compontents removed , 
namely tcl/tk ; on a custom Installer Do you have windows TCL/TK 
(YES/no) (Yes) and the gui option panel to repoiit items add perl ruby 
ponteirs etc.

Alt Python (type) I/E Unix or Cygwin 
ALT perl , Iterix is a real sweet set of tools ,

But mainly Adding Path Statments and getting rid of other Python 
interpriters, and just using main python, 
version'd python is nice but , often force C:\Python 

for windows i just wish you could index other dirs of python code , etc 
and compile them to pyc with a right click option.

some programs use full blown python stubs , anyhow with a path option 
etc , be nice to not have orphaned stubs, etc. 

Juice and others use older python compiler etc, a script to hunt down 
compile > default python = C:\Python\python.exe etc.
also lib paths on python for windows \python\lib-ver keep scripts for 
migration. etc. 
just for sake of argument give upgrade ease and less python25; 25; 26 ; 
30b folders 
and for testing can put the stable into main |python|bin 
beta into |python|testing|bin etc. 

thouse are my few irks with windows , having main tcl path specified is 
resonable because with a utility it is eassy to script-name.tcl > 
filename.dll  , wich offers some speed. 

I dont program to much but , I do try not to have wastes of disk space.
just the option of setting TCL/TK , perl ruby etc for python to call 
from default location would be a plus , and would save some disk space. 
and if the tcl/tk were updated wouldnt break links.
and if 
jsee or just the java  plugin were installed to have system vabiles etc 
for usage. 
PATHEXT add item for executable , can add ruby perl etc to it as well 
for py or pyc, this too would force a default python interpriter, 
option. the curent python for widows is alot faster than the older mini 
ones in other apps. 

anyhow thats my 2 ¢ cents

--
components: Windows
messages: 56089
nosy: wolfstar359
severity: minor
status: open
title: Windows rants& sugestions.
type: resource usage

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



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Michael Hoffman

Michael Hoffman added the comment:

At the very least could you change the "--" to be the verbatim class
that shows up properly beneath? There has to be another solution that
would result in the docs at least being correct even if we can't get
LaTeX to do exactly what we want.

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



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Michael Hoffman

Michael Hoffman added the comment:

Also, see http://bugs.python.org/issue798006 which shows how to fix a
similar problem elsewhere in the docs.

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



[issue1205] urllib fail to read URL contents, urllib2 crash Python

2007-10-16 Thread Michael Torrie

Michael Torrie added the comment:

I had a situation where I was talking to a Sharp MFD printer.  Their web
server apparently does not serve chunked data properly.  However the
patch posted here put it in an infinite loop.

Somewhere around line 525 in the python 2.4 version of httplib.py, I had
to make it look like this:

while True:
line = self.fp.readline()
if line == '\r\n' or not line:
break

I added "or not line" to the if statement.  The blank line in the
chunked http was confusing the _last_chunk thing, but even when it was
set to zero, since there was no more data, this loop to eat up crlfs was
never ending.

Is this really a proper fix?  

I'm in favor of changing urllib2 to be less strict because, despite the
RFCs, we're stuck talking to all kinds of web servers (embedded ones in
particular) that simply can't easily be changed.

--
nosy: +torriem

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



[issue1689617] Intel icc build fails with optimizations -O2

2007-11-10 Thread Michael Forbes

Michael Forbes added the comment:

This appears to have been a bug with the intel compilers.  With the latest 
version 10.1 20070913 everything seems to work.

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



[issue12958] test_socket failures on Mac OS X

2011-09-18 Thread Michael Foord

Michael Foord  added the comment:

See issue 10548. There is some resistance to expectedFailure masking errors in 
setUp/tearDown as these aren't the place where you would normally expect the 
expected failure...

--

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



[issue10548] Error in setUp not reported as expectedFailure (unittest)

2011-09-18 Thread Michael Foord

Michael Foord  added the comment:

I think Twisted uses the tearDown to fail tests as well. As we have two use 
cases perhaps we should allow expectedFailure to work with failues in tearDown? 
(And if we do that it should cover setUp as well for symmetry or it becomes a 
morass of special cases.)

--

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



[issue12681] unittest expectedFailure could take a message argument like skip does

2011-10-07 Thread Michael Foord

Michael Foord  added the comment:

Well, it would be nice for the Python test suite, maybe not so useful for 
external users of the api. Something for regrtest rather than unittest I think.

--

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



[issue13357] HTMLParser parses attributes incorrectly.

2011-11-06 Thread Michael Brooks

New submission from Michael Brooks :

Open the attached file "red_test.html" in a browser.  The "bad" elements are 
blue because the style tag isn't parsed by any known browser.   However,  the 
HTMLParser library will incorrectly recognize them.

--
components: Library (Lib)
files: red_test.html
messages: 147169
nosy: Michael.Brooks
priority: normal
severity: normal
status: open
title: HTMLParser parses attributes incorrectly.
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file23618/red_test.html

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



[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks

New submission from Michael Brooks :

The HTML tag at the bottom of this page correctly identified has having cdata 
like properties and trigger set_cdata_mode().  Due to the cdata properties of 
this tag,  the only way to end the data segment is with a closing  
tag, NO OTHER tag can close this data segment.  Currently in cdata mode the 
HTMLParser will use this regular expression to close this script tag: 
re.compile(r'<(/|\Z)'),  however this script tag is setting a variable with 
data that contains "" which will terminate this script tag prematurely.

I have written and tested the following patch on my system:
#used to terminate cdata elements
endtagfind_script = re.compile('(?i)')
endtagfind_style = re.compile('(?i)')

class html_patch(HTMLParser.HTMLParser):
# Internal -- sets the proper tag terminator based on cdata element type
def set_cdata_mode(self, tag):
#We check if the script is either a style or a script
#based on self.CDATA_CONTENT_ELEMENTS
if tag=="style":
self.interesting = endtagfind_style
elif tag=="script":
self.interesting = endtagfind_script
else:
self.error("Unknown cdata type:"+tag) # should never happen
self.cdata_tag = tag 


This cdata tag isn't parsed properly by HTMLParser,  but it works fine in a 
browser:

pwa.setup(
pwa.searchview,
'lhid_searchheader',
'lhid_content',
'lhid_trayhandle',
'lhid_tray',
{'query': 'test',
'tagQuery': '',
'searchScope': '',
'owner': '',
'doCrowding': false,
'isOwner': false,
'albumId': ''
,'experimentalsearchquality': true},
'firealwaysworks'
,
{feedUrl: 
'<a  rel="nofollow" href="https://picasaweb.google.com/data/feed/tiny/all?alt=jsonm&amp;kind=photo&amp;access=public&amp;filter=1&amp;q=test">https://picasaweb.google.com/data/feed/tiny/all?alt=jsonm&amp;kind=photo&amp;access=public&amp;filter=1&amp;q=test</a>',
feedPreload: null},
{NEW_HOMEPAGE:1,NEW_ONE_BAR:1,fr:1,tags:1,search:1,globalsearch:1,globalsearchpromo:1,newfeatureslink:1,cart:1,contentcaching:1,developerlink:1,payments:1,newStrings:1,cccquota:1,signups:1,flashSlideshow:1,URL_SHORTENER_VISIBILITY:1,emailupload:1,photopickeralbumview:1,PWA_NEWUI:1,WILDCARD_QUERY_FEED:1,recentphotos:1,editinpicasa:1,imagesearch:1,froptin:1,FR_CONTINUOUS_CLUSTERING:1,asyncUploads:1,PERFORMANCE_EXPERIMENTS:1,BAKED_PRELOAD_FEEDS:1,albumviewlimit:1,HQ_VIDEOS:1,VIDEO_INFO_DISPLAY:1,CSI:1,EXPERIMENTAL_SEARCH_QUALITY:1,COMMENT_TRANSLATION:1,NEW_COMMENT_STYLE:1,ENABLE_NEW_FLAG_ABUSE_FORM:1,QRCODE:1,CHINA:1,GWS_URL_REDIRECTION:1,FEATURED_PHOTOS:1,COMMENT_SUBSCRIPTION:1,COMMENT_SUBSCRIPTION_SETTING:1,PICASA_MAC:1,AD_ON_SEARCHPAGE:1,API_AUTO_ACCOUNTS:1,FOCUS_GROUP_ACL:1,PHOTOSTREAM:1,BACKEND_ACL:1,ADVANCED_SEARCH:1,FACE_SEARCH:1,CAMERA_SEARCH:1,NOTIFICATION:1,PIXELATED_PREVIEW:1,TRANSPARENT_PIXELATED_PREVIEW:1,NEW_SETTINGS_PAGE:1,VIEW_STARRERS:1,FR_FOCUS_MERGE:1,AD_ON_SEARCH_ONE
 
UP:1,GALLERY_COMMENTS:1,COMMENT_ABUSE_BLOCKING:1,FAVORITE_NOTIFICATION:1,IMAGE_ONLY_LINK:1,RECENT_PHOTOS_SLIDESHOW:1,HEART:1,SMALLER_IMAGE:1,FAST_SLIDESHOW:1,VIEW_CONTACTS:1,COLLABORATIVE_ALBUMS:1,PRINT_MARKETPLACE:1,PRINT_MARKETPLACE_REPLACEMENT:1,VIEW_COUNT:1,POST_TO:1,GAPLUS:1,PICASA_PROMO:1,DOUBLECLICK_PREMIUM_ADS:1,DOUBLECLICK_EXPLORE_MAIN:1,DOUBLECLICK_MYPHOTOS:1,DOUBLECLICK_PUBLIC_GALLERY:1,DOUBLECLICK_USER_ALBUM:1,DOUBLECLICK_USER_PHOTO:1,DOUBLECLICK_VISITOR_ADS:1,PRODUCTION:1,NOSCRIPT:1,UNLISTED_GALLERY:1,GA_TRACKING:1,UNLIMITED_GALLERY:1,PICNIK_EDIT:1,MICROSCOPE_ZOOM:1,FR_V2:1,FAVORITE_SUGGESTION:1,FAVORITE_UPDATE:1,MERGED_PROFILES_SOFTLAUNCH:1,MERGED_PROFILES:1,MERGED_PROFILES_ASYNC:1,NEW_FR_UI:1,GAPLUS_UNMERGED_SOCIALIZATION:1,OPTOUT_ACL_NOTIFICATION:1,HTTPS_VISIBILITY:1,DEFAULT_HTTPS:1,EXTENDED_EXIF:1,DOUBLECLICK_MULTISLOT:1,ONEPICK:1,PER_ALBUM_GEO_VISIBILITY:1,FOCUS_MERGE_LINK_DIALOG_VISIBILITY:1,SHAREBOX_VISIBILITY:1,AUTO_DOWNSIZE:1,BULK_ALBUM_EDITOR_VISIBILITY:1,PROF
 ILE_NAME_CHECK:1,COLLABORATIVE_NAMETAGS:1,NOT_FOUND_404:1,REDIRECT_TO_PLUS:1},
{
'gdataVersion': '4.0',
'updateCartPath': '\x2Flh\x2FupdateCart?rtok=b8S9ibYqrTMF',
'editCaptionsPath': '',
'albumMapPath': '',
'albumKmlUrl': '',
'selectedPhotosPath': 
'\x2Flh\x2FselectedPhotos?tok=QUI1UGxRYk9fNmw1Q2tVeS1DWnY3UlFoTTY1RzRNNWphdzoxMzIwNjAyMzA3NDYx',
'setLicensePath': '',
'setStarPath': 
'\x2Flh\x2FsetStar?tok=QUI1UGxRWW4zY1ZKb3U0TzROZU5tUHhIV3hhRW9HcUYwQToxMzIwNjAyMzA3NDYx',
'peopleManagerPath': '',
'peopleSearchPath': '',
'clusterViewPath&#

[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks

Changes by Michael Brooks :


--
type:  -> behavior

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



[issue13357] HTMLParser parses attributes incorrectly.

2011-11-06 Thread Michael Brooks

Michael Brooks  added the comment:

Yes, I am running the latest version,  which is python 2.7.2.

On Sun, Nov 6, 2011 at 12:14 PM, Ezio Melotti wrote:

>
> Ezio Melotti  added the comment:
>
> Thanks for the report.
> Could you try with the latest 2.7 and see if you can reproduce the
> problem? (see the devguide for instructions.)
>
> If you can reproduce the issue even on the latest 2.7, it would be great
> if you could provide a patch with a test case like the ones in
> Lib/test/test_htmlparser.py.
>
> --
> nosy: +ezio.melotti
> stage:  -> test needed
>
> ___
> Python tracker 
> <http://bugs.python.org/issue13357>
> ___
>

--

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



[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-06 Thread Michael Brooks

Michael Brooks  added the comment:

Yes I am running python 2.7.2.

On Sun, Nov 6, 2011 at 12:52 PM, Ezio Melotti wrote:

>
> Ezio Melotti  added the comment:
>
> Have you tried with the latest 2.7? (see msg147170)
>
> --
> nosy: +ezio.melotti
> stage:  -> test needed
>
> ___
> Python tracker 
> <http://bugs.python.org/issue13358>
> ___
>

--

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



[issue13357] HTMLParser parses attributes incorrectly.

2011-11-06 Thread Michael Brooks

Michael Brooks  added the comment:

Python 2.7.3 is still affected by both of these issues.

On Sun, Nov 6, 2011 at 12:56 PM, Ezio Melotti wrote:

>
> Ezio Melotti  added the comment:
>
> I mean 2.7.3 (i.e. the development version).
> You need to get a clone of Python as explained here:
> http://docs.python.org/devguide/
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue13357>
> ___
>

--

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



[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-07 Thread Michael Brooks

Michael Brooks  added the comment:

This one should also have a priority change. Tested python 2.7.3

--MIke

On Sun, Nov 6, 2011 at 12:54 PM, Michael Brooks wrote:

>
> Michael Brooks  added the comment:
>
> Yes I am running python 2.7.2.
>
> On Sun, Nov 6, 2011 at 12:52 PM, Ezio Melotti  >wrote:
>
> >
> > Ezio Melotti  added the comment:
> >
> > Have you tried with the latest 2.7? (see msg147170)
> >
> > --
> > nosy: +ezio.melotti
> > stage:  -> test needed
> >
> > ___
> > Python tracker 
> > <http://bugs.python.org/issue13358>
> > ___
> >
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue13358>
> ___
>

--

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-07 Thread Michael Foord

Michael Foord  added the comment:

On OS X Lion, with XCode 4.2 installed, I find the following works (no need to 
install macports):

./configure CC=gcc-4.2 --prefix=/dev/null --with-pydebug

--
nosy: +michael.foord

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-07 Thread Michael Foord

Michael Foord  added the comment:

Ah, it seems I have XCode 3.2.6 installed alongside XCode 4.2.

--

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



[issue11812] transient socket failure to connect to 'localhost'

2011-11-08 Thread Michael Foord

Changes by Michael Foord :


--
nosy:  -michael.foord

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



[issue13387] add exact_type argument to assertIsInstance

2011-11-12 Thread Michael Foord

Michael Foord  added the comment:

I think your proposed workaround is good enough and no extra effort to type 
than the suggested change to assertIsInstance.

-1 on a new method

I think the behaviour of isinstance is clear enough that people who 
misunderstand what assertIsInstance is doing have a problem with basic Python - 
and will continue to make the mistake whatever we do to assertIsInstance.

--

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



[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks

Michael Brooks  added the comment:

Has anyone else been able to verify this?

On Mon, Nov 7, 2011 at 7:46 AM, Michael Brooks wrote:

>
> Michael Brooks  added the comment:
>
> This one should also have a priority change. Tested python 2.7.3
>
> --MIke
>
> On Sun, Nov 6, 2011 at 12:54 PM, Michael Brooks  >wrote:
>
> >
> > Michael Brooks  added the comment:
> >
> > Yes I am running python 2.7.2.
> >
> > On Sun, Nov 6, 2011 at 12:52 PM, Ezio Melotti  > >wrote:
> >
> > >
> > > Ezio Melotti  added the comment:
> > >
> > > Have you tried with the latest 2.7? (see msg147170)
> > >
> > > --
> > > nosy: +ezio.melotti
> > > stage:  -> test needed
> > >
> > > ___
> > > Python tracker 
> > > <http://bugs.python.org/issue13358>
> > > ___
> > >
> >
> > --
> >
> > ___
> > Python tracker 
> > <http://bugs.python.org/issue13358>
> > ___
> >
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue13358>
> ___
>

--

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



[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks

Michael Brooks  added the comment:

Ok so until you fix this bug,  i'll be overriding HTMLParser with my fix,
becuase this is a blocking issue for my project.  My HTMLParser must behave
like a browser,  period end of story.

Thanks.

On Thu, Nov 17, 2011 at 9:24 AM, Ezio Melotti wrote:

>
> Ezio Melotti  added the comment:
>
> It seems to me that the arguments are parsed correctly, but handle_data is
> called multiple time between handle_starttag and handle_endtag.
> This might happen, e.g. in case the source lines are fed one by one to the
> parser, but in this case seems to happen whenever  (The tests didn't detect this because they join the data to avoid buffer
> artifacts.)
> I'm not sure if this can be considered a bug, but the situation can indeed
> be improved.
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue13358>
> ___
>

--

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



[issue13358] HTMLParser incorrectly handles cdata elements.

2011-11-17 Thread Michael Brooks

Michael Brooks  added the comment:

Oah,  then there is a misunderstanding.  No browser will parse the html
that is declared within a javascript variable,  it must be treated as a
continues data segment (with cdata properties) until the exit
 is encountered (and if this tag found anywhere,  even in a
quoted string it will still terminate this data segment,  because its a
cdata element).   The snip of html provided must only be a single data
segment.  wrote:

>
> Ezio Melotti  added the comment:
>
> It already behaves like a browser, it just gives you data in chunks
> instead of calling handle_data() only once at the end.  The documentation
> is not clear about this though.  It says that feed() can be called several
> times, but it doesn't say that handle_data() (and possibly other methods)
> might get called more than once.  This seems to always be the case while
> calling feed() several times.
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue13358>
> ___
>

--

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-19 Thread Michael Foord

Michael Foord  added the comment:

Note that this works for me on a Macbook Air that has never had Snow Leopard, 
nor XCode 3 installed. 

As far as I can tell non-llvm gcc *is* installed by XCode 4.2: /usr/bin/gcc-4.2

--

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



[issue10278] add time.wallclock() method

2011-11-25 Thread Michael Foord

Changes by Michael Foord :


--
nosy:  -michael.foord
versions: +Python 3.3 -Python 3.2

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



[issue13492] ./configure --with-system-ffi=LIBFFI-PATH

2011-11-28 Thread Michael Kraus

New submission from Michael Kraus :

It would be very helpful to have the ability to specify a LIBFFI-PATH during 
Python configuration via

./configure --with-system-ffi=LIBFFI-PATH

We are using the Intel compiler to build Python, NumPy, SciPy, and Cython on a 
SuSE Linux Enterprise Server. Libffi uses some 128bit int type which is not 
defined by the Intel compiler, thus can't be build with it. 

Unfortunately, the ./configure script, if run with --with-system-ffi looks for 
the ffi includes only in the standard directories (/usr/include, etc.). On our 
cluster, we are not allowed to install into the main system, we can only add 
modules. As there is no libffi coming with SLES and we cannot install it into 
the standard directories, the configure script won't find it. Thus the above 
request.

Best regards,
Michael

--
components: Build
messages: 148472
nosy: michael.kraus
priority: normal
severity: normal
status: open
title: ./configure --with-system-ffi=LIBFFI-PATH
type: feature request
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue13561] os.listdir documentation should mention surrogateescape

2011-12-08 Thread Michael Foord

New submission from Michael Foord :

Where os.listdir encounters undecodable bytes from the filesystem it uses the 
surrogateescape handler. As the resulting strings are invalid they can't be 
encoded without an errorhandler, and so can't be printed (for example).

This should be documented.

--
assignee: docs@python
components: Documentation
messages: 149070
nosy: docs@python, michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: os.listdir documentation should mention surrogateescape
versions: Python 3.3

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



[issue11813] inspect.getattr_static doesn't get module attributes

2011-12-18 Thread Michael Foord

Michael Foord  added the comment:

I'd like to commit this patch. What's your real name Trundle, for the NEWS 
entry?

--
assignee:  -> michael.foord

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



[issue11178] Running tests inside a package by module name fails

2011-12-18 Thread Michael Foord

Michael Foord  added the comment:

No longer reproducable on CPython. Unfortunately still an issue with unittest2.

--
resolution:  -> out of date
status: open -> closed

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



[issue11764] inspect.getattr_static code execution w/ class body as non dict

2011-12-18 Thread Michael Foord

Changes by Michael Foord :


--
resolution:  -> invalid
status: open -> closed

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



[issue11829] inspect.getattr_static code execution with meta-metaclasses

2011-12-18 Thread Michael Foord

Michael Foord  added the comment:

Andreas, is this still needed and valid?

--
assignee:  -> michael.foord

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



[issue8313] message in unittest tracebacks

2011-12-23 Thread Michael Foord

Michael Foord  added the comment:

traceback patch looks good. Thanks for the unittest2 patch as well.

--

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



[issue13675] IDLE won't open if it can't read recent-files.lst

2011-12-29 Thread Michael Foord

Michael Foord  added the comment:

Thanks

--
resolution:  -> duplicate
status: open -> closed

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



[issue13675] IDLE won't open if it can't read recent-files.lst

2011-12-29 Thread Michael Foord

New submission from Michael Foord :

Reported by a user. Reported on Windows but probably not Windows specific.

If IDLE doesn't have permission to read the recent-files.lst file then it 
crashes. (When launched with pythonw.exe on Windows it silently fails to open 
with no error message to the user.)

As the recent file list isn't "core functionality", IDLE should be able to run 
without access to this file. 

Attached is a screenshot of the traceback when IDLE is launched from the 
console.

--
components: IDLE
files: Python problem.JPG
messages: 150327
nosy: michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE won't open if it can't read recent-files.lst
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24103/Python problem.JPG

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



[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-06 Thread Michael Kesper

New submission from Michael Kesper :

http://docs.python.org/library/string.html#format-specification-mini-language 
mentions:
Changed in version 2.7: Added the ',' option (see also PEP 378).

PEP 378 tells me:
The ',' option is defined as shown above for types 'd', 'e', 'f', 'g', 'E', 
'G', '%', 'F' and ''.

However:

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> '{:.2,%}'.format(.537568)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Invalid conversion specification
>>> '{:2,%}'.format(.537568)
'53.756800%'

--
messages: 150721
nosy: mkesper
priority: normal
severity: normal
status: open
title: Format Specification Mini-Language does not accept comma for percent 
value
type: behavior
versions: Python 2.7

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



[issue13771] HTTPSConnection __init__ super implementation causes recursion error

2012-01-11 Thread Michael Mulich

New submission from Michael Mulich :

While working on porting wsgi_intercept to Python 3 I came across a recursion 
issue with http.client.HTTPSConnection. The following is an lesser extraction 
of the traceback:


Traceback (most recent call last):
  File ".../wsgi_intercept/test/test_httplib.py", line 28, in test_success
http = self.make_one(self.domain)
  File ".../wsgi_intercept/test/test_httplib.py", line 40, in make_one
return http.client.HTTPSConnection(*args)
  File ".../lib/python3.2/http/client.py", line 1075, in __init__
source_address)
  ...
  File ".../lib/python3.2/http/client.py", line 1075, in __init__
source_address)
  File ".../lib/python3.2/http/client.py", line 1074, in __init__
super(HTTPSConnection, self).__init__(host, port, strict, timeout,
RuntimeError: maximum recursion depth exceeded while calling a Python object

Some background information is necessary to explain what is happening here. 
One, this is a traceback from a test method (make_one) which makes and https 
connection. Two, wsgi_intercept has overridden http.client.HTTPSConnection with 
a class that subclasses HTTPSConnection and overrides a few methonds. For more 
general information, see the PyPI page 
(http://pypi.python.org/pypi/wsgi_intercept). 

After the wsgi_intercept behavior is invoked the __mro__ of 
http.client.HTTPSConnection becomes: (, , 
, ). Because of this we end 
up recursively running the __init__.

Possible solutions:

1) Fix the issue in http/client.py:1074 by replacing "super(HTTPSConnection, 
self)" with "super()", which if I'm not mistaken is the recommended usage of 
super in Python 3.
2) Fix the issue in the wsgi_intercept package.

I was successful with both approaches, but applying the second fix would make 
the maintenance of wsgi_intercept slightly harder because of the code 
duplication and round-about-way of calling its parent classes.

--
components: None
messages: 151072
nosy: michael.mulich
priority: normal
severity: normal
status: open
title: HTTPSConnection __init__ super implementation causes recursion error
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

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



[issue13777] socket: communicating with Mac OS X KEXT controls

2012-01-12 Thread Michael Goderbauer

New submission from Michael Goderbauer :

Mac OS X provides a socket-based API to communicate with Kernel Extensions 
(KEXTs) called "KEXT Controls". For this, Mac OS X defines PF_SYSTEM as a new 
socket domain which supports the SYSPROTO_CONTROL protocol.

Right now the PF_SYSTEM domain and the SYSPROTO_CONTROL protocol are not 
supported by Python's socket module. I am attaching a patch that introduces 
support for both.

More information on KEXT Controls can be found here:
http://developer.apple.com/library/mac/documentation/Darwin/Conceptual/NKEConceptual/control/control.html

--
components: Extension Modules
files: kext.patch
keywords: patch
messages: 151145
nosy: goderbauer
priority: normal
severity: normal
status: open
title: socket: communicating with Mac OS X KEXT controls
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file24220/kext.patch

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



[issue12166] object.__dir__

2011-05-24 Thread Michael Foord

New submission from Michael Foord :

Implementing a custom __dir__ method is fiddly because there is no way of 
obtaining the standard list of attributes that dir would return.

Moving the relevant parts of the dir implementation into object.__dir__ would 
allow a custom __dir__ to obtain the "standard list" by calling up to the base 
class.

See email discussion at:

http://mail.python.org/pipermail/python-ideas/2011-May/010319.html

--
messages: 136726
nosy: benjamin.peterson, michael.foord
priority: normal
severity: normal
status: open
title: object.__dir__
type: feature request
versions: Python 3.3

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



[issue11798] Test cases not garbage collected after run

2011-05-26 Thread Michael Foord

Michael Foord  added the comment:

Sure, let's do it. Fabio, care to provide patch with tests and doc changes? 
(For 3.3.)

--

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



[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord

Michael Foord  added the comment:

Unless Terry wants to contribute a fix I suggest closing this.

--

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



[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord

Michael Foord  added the comment:

> Interactive mode is an approved method of running Python code, along with 
> batch mode. 

That is not guaranteed for any particular piece of Python code in the standard 
library. In particular it is not amenable to test automation, so it is 
certainly not a requirement that tests pass in this mode. (What is the *use 
case* for running a command line argument parser in interactive mode?)

I'm certainly not opposed to fixing tests so that they do pass when run like 
this, but I disagree that it is a "bug".

--

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



[issue11906] test_argparse failure in interactive mode

2011-05-27 Thread Michael Foord

Michael Foord  added the comment:

> it should run interactively as documented.

Where is it documented that all tests will run from the IDLE prompt?

I have *never* heard this claim before. I have nothing against tests supporting 
this, but those who want it to happen will have to do the work.

--

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



[issue10884] pkgutil EggInfoDistribution requirements for .egg-info metadata

2011-06-05 Thread Michael Mulich

Michael Mulich  added the comment:

Looks like someone fixed this before distutils2 was merged into cpython as 
packaging. Thanks.

--
resolution:  -> works for me
status: open -> closed

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



[issue10884] pkgutil EggInfoDistribution requirements for .egg-info metadata

2011-06-08 Thread michael mulich

michael mulich  added the comment:

Sure, I'll have a look. I'm only getting back into the swing of
things, but hopefully I can get more involved. Trying to do one or two
small tasks a night.

-Michael Mulich (pumazi)

On Mon, Jun 6, 2011 at 11:33 AM, Éric Araujo  wrote:
>
> Éric Araujo  added the comment:
>
> Can you check if this is covered in test_database?
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue10884>
> ___
>

--
nosy: +michael.mulich2

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



[issue8371] Add a command to download distributions

2011-06-09 Thread Michael Mulich

Changes by Michael Mulich :


--
nosy: +michael.mulich

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



[issue8501] --dry-run option doesn't work

2011-06-09 Thread Michael Mulich

Changes by Michael Mulich :


--
nosy: +michael.mulich

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



[issue8591] update mkpkg to latest coding standards

2011-06-09 Thread Michael Mulich

Changes by Michael Mulich :


--
nosy: +michael.mulich

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



[issue11880] add a {dist-info} category to distutils2

2011-06-09 Thread Michael Mulich

Changes by Michael Mulich :


--
nosy: +michael.mulich

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



[issue8668] Packaging: add a 'develop' command

2011-06-09 Thread Michael Mulich

Changes by Michael Mulich :


--
nosy: +michael.mulich

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



[issue12302] pysetup run test

2011-06-09 Thread Michael Mulich

New submission from Michael Mulich :

A package's metadata (dist-info) should be available to it while running the 
test command (pysetup run test)?

The use case:

I've written a test for a function that is supposed to find the default 
configuration or one provided in a users local area (or {userbase} as sysconfig 
puts it). As part of the test, I'm ensuring that the forcibly found default 
config is loaded correctly. The function that finds the configuration uses 
sysconfig paths (sysconfig.get_paths) which rely on the packaging database (PEP 
376 API now in packaging.database).

To find the default config, or resource in packaging terms, I'm using the 
packaging.database.get_file_path, which requires the distribution metadata 
(dist-info) be available within the Python path, because it must lookup the 
RESOURCES file.

I've started work, in my local clone. We lack a unittest for this case. I'll be 
writing it some time within the next few days.

I'd like to know where this RESOURCES file came from? I don't recall, nor see 
mention of it in PEP 376. I would also have expected to find something in 
packaging.command.install_distinfo command related to this file. The 
install_distinfo command is lacking this logic. I'll add it after the first 
half of this case working.

--
assignee: tarek
components: Distutils2
messages: 138032
nosy: alexis, eric.araujo, michael.mulich, tarek
priority: normal
severity: normal
status: open
title: pysetup run test
type: behavior
versions: Python 3.3

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



[issue12302] test command is not loading the distribution metadata

2011-06-09 Thread Michael Mulich

Changes by Michael Mulich :


--
title: pysetup run test -> test command is not loading the distribution metadata

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



[issue12302] test command is not loading the distribution metadata

2011-06-09 Thread Michael Mulich

Michael Mulich  added the comment:

The RESOURCES implement in install_distinfo command should probably be a 
separate case, no?

--

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



[issue12279] Add build_distinfo command to packaging

2011-06-10 Thread Michael Mulich

Changes by Michael Mulich :


--
nosy: +michael.mulich

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



[issue10530] distutils2 should allow the installing of python files with invalid syntax

2011-06-14 Thread Michael Foord

Michael Foord  added the comment:

Config options are for when developers can't make decisions. Given that there 
are valid use cases please just allow it. A --strict option is fine... (but 
no-one will use it I suspect)

--

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



[issue11218] pattern=None when following documentation for load_tests and unittest.main()

2011-06-14 Thread Michael Foord

Changes by Michael Foord :


--
assignee:  -> michael.foord

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



[issue10530] distutils2 should allow the installing of python files with invalid syntax

2011-06-14 Thread Michael Foord

Michael Foord  added the comment:

Yes, allowing it by default. :-)

--

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



[issue12314] regrtest checks (os.environ, sys.path, etc.) are hard to use

2011-06-15 Thread Michael Foord

Michael Foord  added the comment:

I don't think this is something that belongs in unittest - it's not something 
particularly useful (or at least particularly requested) outside of the python 
test suite. No reason that a WatchfulTestRunner couldn't live in regrtest.

--

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



[issue12341] Some additions to .hgignore

2011-06-15 Thread Michael Foord

Changes by Michael Foord :


--
nosy: +michael.foord

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



[issue12366] packaging.pypi.dist should abstract download errors.

2011-06-19 Thread Michael Mulich

New submission from Michael Mulich :

packaging.pypi.dist should abstract download errors, especially those from 
external sources. Download errors are currently reported from urllib. We should 
probably be using packaging.errors.PackagingPyPIError in this situation. Other 
suggestions?

Example case:

sake version 0.0.0 has a external download URL that throws a 404 (see also 
http://pypi.python.org/simple/sake/). When attempting to download this release, 
we receive a ValueError from urllib, which is not very detailed and could mean 
a number of things.

Traceback (most recent call last):
  ... [dev project] ...
  File ".../cpython/Lib/packaging/pypi/dist.py", line 167, in download
.download(path=temp_path)
  File ".../cpython/Lib/packaging/pypi/dist.py", line 302, in download
path + "/" + archive_name)
  File ".../cpython/Lib/urllib/request.py", line 150, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
  File ".../cpython/Lib/urllib/request.py", line 1600, in retrieve
block = fp.read(bs)
ValueError: read of closed file

--
assignee: tarek
components: Distutils2
messages: 138658
nosy: alexis, eric.araujo, michael.mulich, tarek
priority: normal
severity: normal
status: open
title: packaging.pypi.dist should abstract download errors.
type: behavior
versions: Python 3.3

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



[issue12368] packaging.pypi.simple.Crawler assumes external download links are ok to follow

2011-06-19 Thread Michael Mulich

New submission from Michael Mulich :

The packaging.pypi.simple.Crawler blindly follows external download URLs. The 
crawler should honor a list of allowed hosts (see also the hosts parameter) 
before attempting to download from an external source.

Éric Araujo has also pointed out that established tools like easy_install and 
pip provide ways of allowing/restricting by host.

--
assignee: tarek
components: Distutils2
messages: 138663
nosy: alexis, eric.araujo, michael.mulich, tarek
priority: normal
severity: normal
status: open
title: packaging.pypi.simple.Crawler assumes external download links are ok to 
follow
type: behavior
versions: Python 3.3

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



[issue12370] Use of super overwrites use of __class__ in class namespace

2011-06-19 Thread Michael Foord

New submission from Michael Foord :

In Python 3 the following code prints "False" because the use of super() has 
caused the __class__ descriptor to be omitted from the class namespace. Remove 
the use of super and it prints "True".


class X(object):

def __init__(self):
super().__init__()

@property
def __class__(self):
return int

print (isinstance(X(), int))

--
messages: 138670
nosy: michael.foord
priority: normal
severity: normal
status: open
title: Use of super overwrites use of __class__ in class namespace
type: behavior
versions: Python 3.2, Python 3.3

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



[issue11763] assertEqual memory issues with large text inputs

2011-06-25 Thread Michael Foord

Michael Foord  added the comment:

The basic idea of the patch is good, but instead of introducing _MAX_LENGTH, 
maxDiff should be reused.

--

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



[issue11763] assertEqual memory issues with large text inputs

2011-06-25 Thread Michael Foord

Michael Foord  added the comment:

Sorry, ignore that. I see that the patch already passes maxDiff to truncate_str.

--

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



[issue11163] iter() documentation code doesn't work

2011-06-25 Thread Michael Grazebrook

Michael Grazebrook  added the comment:

Thank you.

On 25/06/2011 13:38, Raymond Hettinger wrote:
> Changes by Raymond Hettinger:
>
>
> --
> resolution:  ->  fixed
> status: open ->  closed
>
> ___
> Python tracker
> <http://bugs.python.org/issue11163>
> ___
>
>
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1388 / Virus Database: 1513/3725 - Release Date: 06/25/11
>
>
>

--

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



[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call

2011-06-27 Thread Michael Foord

Michael Foord  added the comment:

I have a feeling I added the arguments to TestResult.__init__ to allow it to be 
used as a silent test result directly in place of TextTestResult. I still need 
to check this. 

Not adding the arguments to the super call in TextTestResult would have been an 
oversight. Let me check this understanding is correct, and if there is no 
reason for it not to pass on those arguments I'll fix it.

--

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



[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call

2011-06-27 Thread Michael Foord

Changes by Michael Foord :


--
assignee:  -> michael.foord

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



[issue7117] Backport py3k float repr to trunk

2011-06-29 Thread Michael Foord

Michael Foord  added the comment:

Wondered if you guys had heard of some recent advances in the state of the art 
in this field. I'm sure you have, but thought I'd link it here anywhere.

Quote taken from this article (which links to relevant papers):

http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/

In 2010, Florian Loitsch published a wonderful paper in PLDI, "Printing 
floating-point numbers quickly and accurately with integers", which represents 
the biggest step in this field in 20 years: he mostly figured out how to use 
machine integers to perform accurate rendering! Why do I say "mostly"? Because 
although Loitsch's "Grisu3" algorithm is very fast, it gives up on about 0.5% 
of numbers, in which case you have to fall back to Dragon4 or a derivative.

If you're a language runtime author, the Grisu algorithms are a big deal: 
Grisu3 is about 5 times faster than the algorithm used by printf in GNU libc, 
for instance. A few language implementors have already taken note: Google hired 
Loitsch, and the Grisu family acts as the default rendering algorithms in both 
the V8 and Mozilla Javascript engines (replacing David Gay's 17-year-old dtoa 
code). Loitsch has kindly released implementations of his Grisu algorithms as a 
library named double-conversion.

--
nosy: +michael.foord

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



[issue12526] packaging.pypi.Crawler and resulting objects have a circular API

2011-07-10 Thread Michael Mulich

New submission from Michael Mulich :

The issue, as best I can describe it, is in how the a release list 
(packaging.pypi.dist.ReleaseList) looks up releases.

Here is a simple example using a random package on PyPI.

>>> crawler = Crawler()
>>> projects = crawler.search_projects('snimpy')
>>> projects
[]
>>> project = projects[0]
>>> [x for x in project]
[]

The results show that project 'snimpy' has no releases, but this is incorrect 
because distribution 'snimpy' has five releases.

Even after calling sort_releases and fetch_releases on the project which both 
refer back to the crawler instance (see the project's _index attribute) the 
project fails to get the releases.

>>> project.fetch_releases()
[]
>>> project.sort_releases()
>>> [x for x in project]
[]

In order to get the releases, one is forced to use the crawler's
API rather than the resulting project's API.

>>> crawler.get_releases(project.name, force_update=True)

>>> [x for x in project]
[, , , , ]

So as far as I can gather, We lack the ability to forcibly update the project 
(or ReleaseList). I don't have a solution at this time, but we may want to look 
into adding a force_update argument to the get_release method on the Crawler.

--
assignee: tarek
components: Distutils2
messages: 140083
nosy: alexis, eric.araujo, michael.mulich, tarek
priority: normal
severity: normal
status: open
title: packaging.pypi.Crawler and resulting objects have a circular API
type: behavior
versions: Python 3.3

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



[issue8639] Allow callable objects in inspect.getargspec

2011-07-11 Thread Michael Foord

Michael Foord  added the comment:

Doesn't seem like an unreasonable request. Nick / Benjamin, what do you think?

--

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



[issue8639] Allow callable objects in inspect.getfullargspec

2011-07-11 Thread Michael Foord

Michael Foord  added the comment:

I can produce a patch w/ tests and documentation for you to review Nick.

--

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



[issue12532] PyPI server index names with '/' in them

2011-07-11 Thread Michael Mulich

New submission from Michael Mulich :

Forward slashes show up in a project's (packaging.pypi.dist.ReleaseList) name 
when using a crawler (packaging.pypi.simple.Crawler) against, say and Apache 
index page. The packaging.tests:/pypiserver/foo_bar_baz directory is a perfect 
example of this type of data, but it isn't used anywhere in the current tests.

If a crawl is run on the index, results will come back with '/' in there name.

The issue was found when I was attempting to use a Crawler against the 
packaging.tests.pypi_server.PyPIServer in my package's tests.

--
assignee: tarek
components: Distutils2
files: test_name.py
messages: 140117
nosy: alexis, eric.araujo, michael.mulich, tarek
priority: normal
severity: normal
status: open
title: PyPI server index names with '/' in them
versions: Python 3.3
Added file: http://bugs.python.org/file22621/test_name.py

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



[issue12532] PyPI server index names with '/' in them

2011-07-11 Thread Michael Mulich

Changes by Michael Mulich :


--
type:  -> behavior

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



[issue8668] Packaging: add a 'develop' command

2011-07-11 Thread Michael Mulich

Michael Mulich  added the comment:

After looking over the use cases, these are my findings and questions:

* Cases 2, 3, 5 and 6 are strongly related. I'd suggest you condense them into 
a single use case. I agree with case 2 and 6 most, but have questions:
** Why wouldn't one simply use a virtualenv? -- Case 5 touches on this topic, 
but if we are installing in-place, who cares if can place a development package 
in the global site-packages directory?
** After the package has been installed in-place (using the develop command), 
how does one identify it as an in development project (or in development mode)? 
-- Case 3 and 6 touch on this topic (case 3 is a little vague at this time), 
but doesn't explain what type of action is intended. So if we install in-place 
(aka, develop), how does the python interpreter find the package? Are we using 
PYTHONPATH at this point (which would be contradict a requirement in  case 6)?

* Case 4 is a be unclear. Is Carl, the actor, pulling unreleased remote changes 
(hg pull --update) for these mercurial server plugins then running the develop 
command on them? 

* Case 1 is good and very clear, but I'd consider it a feature rather than 
required. Perhaps it should not be focused on first (priority). Thoughts?

--

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



[issue12279] Add build_distinfo command to packaging

2011-07-11 Thread michael mulich

michael mulich  added the comment:

We have to generate a RECORD, otherwise resource lookups in
development and testing modes will fail or at least should fail.

Yes, but that's not all.

> 4) don’t add a build_distinfo command, just run install_distinfo to the build 
> dir from the test and develop commands

The action needs to be called with an install, develop or test
context, so I think item four is our best option.

--
nosy: +michael.mulich2

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



[issue12279] Add build_distinfo command to packaging

2011-07-11 Thread michael mulich

michael mulich  added the comment:

Gmail decided to strip the quotes... Grr...

  > So, what do we do?
  > 1) don’t generate RECORD at all → invalid PEP 376
We have to generate a RECORD, otherwise resource lookups in
development and testing modes will fail or at least should fail.

  > 2) generate RECORD with paths to the files in the build dir
Yes, but that's not all.

  > 4) don’t add a build_distinfo command, just run install_distinfo
to the build dir from the test and develop commands

The action needs to be called with an install, develop or test
context, so I think item four is our best option.

--

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



  1   2   3   4   5   6   7   8   9   10   >