[issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded

2014-10-02 Thread Santiago Gala

Santiago Gala added the comment:

Something like this should do it:

$ diff -u /usr/lib/python2.7/wsgiref/simple_server.py{~,}
--- /usr/lib/python2.7/wsgiref/simple_server.py~2014-10-02 
23:32:47.718382895 +0200
+++ /usr/lib/python2.7/wsgiref/simple_server.py 2014-10-02 14:36:10.662220865 
+0200
@@ -118,7 +118,8 @@
 return
 
 handler = ServerHandler(
-self.rfile, self.wfile, self.get_stderr(), self.get_environ()
+self.rfile, self.wfile, self.get_stderr(), self.get_environ(),
+multithread = False
 )
 handler.request_handler = self  # backpointer for logging
 handler.run(self.server.get_app())

--
keywords: +patch
Added file: http://bugs.python.org/file36787/multithread.patch

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



[issue8416] python 2.6.5 documentation can't search

2012-01-03 Thread Santiago Gala

Santiago Gala sg...@apache.org added the comment:

Still http://docs.python.org/release/2.6.6/search.html?q=regular+expression
works, while 
http://docs.python.org/release/2.6.5/search.html?q=regular+expression
fails, and http://docs.python.org/release/2.6.5/searchindex.js gives a
404, while http://docs.python.org/release/2.6.6/searchindex.js works
so the bug report stands as it was reported...

Regards
Santiago

On Wed, Jan 4, 2012 at 12:55 AM, Ezio Melotti rep...@bugs.python.org wrote:

 Changes by Ezio Melotti ezio.melo...@gmail.com:


 --
 nosy: +ezio.melotti

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue8416
 ___

--

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



[issue8416] python 2.6.5 documentation can't search

2010-08-05 Thread Santiago Gala

Santiago Gala sg...@apache.org added the comment:

I got this trying to reply:

This is the mail system at host psf.upfronthosting.co.za.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

  The mail system

roundup+trac...@psf.upfronthosting.co.za (expanded from
   rep...@bugs.python.org): Command died with signal 9:
   /home/roundup/roundup/bin/roundup-mailgw /home/roundup/trackers/tracker

Final-Recipient: rfc822; roundup+trac...@psf.upfronthosting.co.za
Original-Recipient: rfc822;rep...@bugs.python.org
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; internal software error


-- Forwarded message --
From: Santiago Gala sg...@apache.org
To: Python tracker rep...@bugs.python.org
Date: Thu, 5 Aug 2010 21:52:14 +0200
Subject: Re: [issue8416] python 2.6.5 documentation can't search
You should find the 404 in http://docs.python.org/release/2.6.5/searchindex.js 
, not in the root of the release. I.E., it is the search index that is 
missing.

Regards
Satntiago

On Thu, Aug 5, 2010 at 9:41 PM, Terry J. Reedy rep...@bugs.python.org wrote:


Terry J. Reedy tjre...@udel.edu added the comment:

With FireFox, searching from http://docs.python.org/release/2.6.5/
does not get 404 Not Found for me, but neither does it return any hits. The 
2.7, 3.1.2, 3.2a pages work fine.

Georg, I do not see a 2.6.6 page. Can you verify that it will work when 
released?

--
nosy: +terry.reedy

--

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



[issue8416] python 2.6.5 documentation can't search

2010-04-16 Thread Santiago Gala

New submission from Santiago Gala sg...@apache.org:

http://docs.python.org/release/2.6.5/search.html?q=regular+expression

fails. It fails because

http://docs.python.org/release/2.6.5/searchindex.js

returns 404 NOT FOUND

There are really two bugs here:
* that the file is not there, and
* that the page gives no clue that there is something broken inside

IMO the second one is more important: the page stays forever with the Searching 
and the dots moving...

I reported against build and Documentation as I'm not sure if the web site 
belongs here and where is the issue originating.

--
assignee: georg.brandl
components: Documentation
messages: 103293
nosy: georg.brandl, sgala
severity: normal
status: open
title: python 2.6.5 documentation can't search
type: behavior
versions: Python 2.6

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



[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-03-22 Thread Santiago Gala

Santiago Gala sg...@apache.org added the comment:

I don't think they are equally clear, at least from the point of view of the 
code written towards the API. I think that

execute(UPDATE authors set name = ?, email = ?, comment = ? WHERE id = ?, 
(form.name, form.email, form.text, form.id))

is way less clear, more verbose, and prone to alignment errors, than

execute(UPDATE authors set name = :name, email = :email, comment = :text WHERE 
id = :id, form)

I think this is the reason why the PEP writer prefer named style and. I was 
about to recode an example using a dictionary for cleaner code, when I noticed 
the bug. Now I need to hardcode that sqlite3 supports 'named' style, even if 
paramstyle says other thing, or to dynamically test, in case they decide to 
remove support for the next release. Both are ugly alternatives.

--

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



[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-03-21 Thread Santiago Gala

New submission from Santiago Gala sg...@apache.org:

 import sqlite3
 sqlite3.paramstyle
'qmark'

The documentation claims that sqlite3 accepts 'named' paramstyle, and 
:PEP:`249` says in footnote 2:

Module implementors should prefer 'numeric', 'named' or
'pyformat' over the other formats because these offer more
clarity and flexibility.

I think the module should report 'named', as it is preferred, and leave to the 
documentation the fact that 'qmark' is also supported.

--
components: Extension Modules
messages: 101470
nosy: sgala
severity: normal
status: open
title: sqlit3.paramstyle reported as 'qmark'
versions: Python 2.6

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



[issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded

2010-03-14 Thread Santiago Gala

New submission from Santiago Gala sg...@apache.org:

In python 2.6, a server created with wsgiref.simple_server.make_server will
claim to be multithreaded and multiprocess through it wsgi environ. See  
wsgi.multithread in the browser page after launching

  $ python /usr/lib/python2.6/wsgiref/simple_server.py

The bug is due to the default value in the constructor 
wsgiref.handlers.SimpleHandler, and it is misleading, as the servier is 
singlethreaded. It gives problems for any app that wants to change behavior or 
error on singlethreaded.

The problem can be fixed very simply by patching a multithreaded=False 
argument into the ServerHandler constructor in simple_server.

--
messages: 101058
nosy: sgala
severity: normal
status: open
title: wsgiref.simple_server.SimpleServer claims to be multithreaded
versions: Python 2.6

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



[issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded

2010-03-14 Thread Santiago Gala

Changes by Santiago Gala sg...@apache.org:


--
components: +Library (Lib)
type:  - behavior

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



[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell

2009-04-12 Thread Santiago Gala

Santiago Gala sg...@apache.org added the comment:

Updating the components as the error surfaces in the compile builtin.
the compile builtin works when given unicode, but fails when using a
utf8 (local input encoding) string.

Rather than adding a coding string to compile, my guess is that
compile should be fixed or fed a unicode string. See the effects on the
shell:

 print len('à')
2
 print len(u'à')
1
 exec compile(print len('à'),'test', 'single')
2
 exec compile(print len(u'à'),'test', 'single')
2
 exec compile(print len('à').decode(utf8),'test', 'single')
2
 exec compile(print len(u'à').decode(utf8),'test', 'single')
1
 

So the error disappears when the string fed to exec compile is properly
decoded to unicode.

In idlelib there is an attempt to encode the input to
IOBindings.encoding, but IOBindings.encoding is broken here, as
locale.nl_langinfo(locale.CODESET) gives 'ANSI_X3.4-1968', which looks
up as 'ascii', while locale.getpreferredencoding() gives 'UTF-8' (as it
should).


If I comment the whole attempt, idle works (for this test, not fully
tested):

sg...@marlow ~ $ diff -u /tmp/PyShell.py 
/usr/lib64/python2.6/idlelib/PyShell.py
--- /tmp/PyShell.py 2009-04-12 11:01:01.0 +0200
+++ /usr/lib64/python2.6/idlelib/PyShell.py 2009-04-12
10:59:16.0 +0200
@@ -592,14 +592,14 @@
 self.more = 0
 self.save_warnings_filters = warnings.filters[:]
 warnings.filterwarnings(action=error, category=SyntaxWarning)
-if isinstance(source, types.UnicodeType):
-import IOBinding
-try:
-source = source.encode(IOBinding.encoding)
-except UnicodeError:
-self.tkconsole.resetoutput()
-self.write(Unsupported characters in input\n)
-return
+#if isinstance(source, types.UnicodeType):
+#import IOBinding
+#try:
+#source = source.encode(IOBinding.encoding)
+#except UnicodeError:
+#self.tkconsole.resetoutput()
+#self.write(Unsupported characters in input\n)
+#return
 try:
 # InteractiveInterpreter.runsource() calls its runcode()
method,
 # which is overridden (see below)


 print len('á')
2
 print len(u'á')
1
 print 'á'
á
 print u'á'
á
 


Now using Python 2.6.1 (r261:67515, Apr 10 2009, 14:34:00) on x86_64

--
components: +Interpreter Core

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



[issue4667] Patch with a couple of 2.0isms in tutorial

2008-12-14 Thread Santiago Gala

New submission from Santiago Gala sg...@apache.org:

references to reload as builtin or dict.keys as returning a list, and
the use of the .sort method, all gone in 3.X

--
assignee: georg.brandl
components: Documentation
files: tutorial.patch
keywords: patch
messages: 77843
nosy: georg.brandl, sgala
severity: normal
status: open
title: Patch with a couple of 2.0isms in tutorial
versions: Python 3.0
Added file: http://bugs.python.org/file12359/tutorial.patch

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



[issue4668] examples in the functional howto are not consistent with 3.X behavior

2008-12-14 Thread Santiago Gala

New submission from Santiago Gala sg...@apache.org:

map and filter don't return lists anymore, so wrapping them in list() in
the examples will make the real output consistent with what is seen in
the doc.

--
assignee: georg.brandl
components: Documentation
files: 0001-Make-examples-consistent-with-3.0.patch
keywords: patch
messages: 77844
nosy: georg.brandl, sgala
severity: normal
status: open
title: examples in the functional howto are not consistent with 3.X behavior
versions: Python 3.0
Added file: 
http://bugs.python.org/file12360/0001-Make-examples-consistent-with-3.0.patch

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



[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-12-06 Thread Santiago Gala

Santiago Gala [EMAIL PROTECTED] added the comment:

Note that if the error is in the documentation semantics, and not in the
implementation, then the benchmark code in the documentation is also
broken, and should be change to not use lock=True/False respectively...

I'm not sure if the patch here is good or rather lock=True/False should
be the right API and the implementation should be changed along this lines:

diff --git a/Lib/multiprocessing/sharedctypes.py
b/Lib/multiprocessing/sharedctypes.py
index b94cd52..2f68e74 100644
--- a/Lib/multiprocessing/sharedctypes.py
+++ b/Lib/multiprocessing/sharedctypes.py
@@ -79,10 +79,11 @@ def Array(typecode_or_type, size_or_initializer,
**kwds):
 if kwds:
 raise ValueError('unrecognized keyword argument(s): %s' %
list(kwds.keys()))
 obj = RawArray(typecode_or_type, size_or_initializer)
-if lock is None:
+if lock is True:
 lock = RLock()
-assert hasattr(lock, 'acquire')
-return synchronized(obj, lock)
+return synchronized(obj, lock)
+return obj
+
 
 def copy(obj):
 new_obj = _new_value(type(obj))

--
nosy: +sgala

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



[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-12-06 Thread Santiago Gala

Santiago Gala [EMAIL PROTECTED] added the comment:

oops, there is a proper code patch in issue4449 , and the documentation
is right.

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



[issue3603] trivial typo in Include/pymath.h

2008-08-20 Thread Santiago Gala

Santiago Gala [EMAIL PROTECTED] added the comment:

Notice the typo is still in a number of branches/tags (I know, tags
should be static, but nothing impedes committing into a subversion tag
once it is created, so I quote for reference):

[EMAIL PROTECTED] ~/newcode/python.git (py3k)$ for i in $(git branch -a| sed
-e s/\*//); do if git rev-parse --verify $i:Include/pymath.h
/dev/null ;then PAGER= git grep doube $i:Include/pymath.h 2/dev/null
; fi; done
benjaminp-testing:Include/pymath.h:extern double copysign(doube, double);
okkoto-sizeof:Include/pymath.h:extern double copysign(doube, double);
py3k-ctypes-pep3118:Include/pymath.h:extern double copysign(doube, double);
py3k-urllib:Include/pymath.h:extern double copysign(doube, double);
tags/r26a3:Include/pymath.h:extern double copysign(doube, double);
tags/r26b1:Include/pymath.h:extern double copysign(doube, double);
tags/r26b2:Include/pymath.h:extern double copysign(doube, double);
tags/r30a5:Include/pymath.h:extern double copysign(doube, double);
tags/r30a5-real:Include/pymath.h:extern double copysign(doube, double);
tags/[EMAIL PROTECTED]:Include/pymath.h:extern double copysign(doube,
double);
tags/r30b1:Include/pymath.h:extern double copysign(doube, double);
tags/r30b2:Include/pymath.h:extern double copysign(doube, double);
tlee-ast-optimize:Include/pymath.h:extern double copysign(doube, double);
tnelson-trunk-bsddb-47-upgrade:Include/pymath.h:extern double
copysign(doube, double);
trunk-math:Include/pymath.h:extern double copysign(doube, double);


I just paste the list because I can't say which branches are currently
active or suitable to be retaken in the  future. The origin of the typo
is in trunk-math.

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



[issue3603] trivial typo in Include/pymath.h

2008-08-19 Thread Santiago Gala

New submission from Santiago Gala [EMAIL PROTECTED]:

file Include/pymath.h has the typo s/doube/double/, hidden by the fact
that any sane OS defines copysign:


diff --git a/Include/pymath.h b/Include/pymath.h
index a3735c2..7cea9ae 100644
--- a/Include/pymath.h
+++ b/Include/pymath.h
@@ -19,7 +19,7 @@ functions and constants
  *Note: PC/pyconfig.h defines copysign as _copysign
  */
 #ifndef HAVE_COPYSIGN
-extern double copysign(doube, double);
+extern double copysign(double, double);
 #endif
 
 #ifndef HAVE_ACOSH


It is both in trunk and py3k

--
messages: 71465
nosy: sgala
severity: normal
status: open
title: trivial typo in Include/pymath.h
type: compile error

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



[issue1867] patch for pydoc to work in py3k

2008-01-21 Thread Santiago Gala

Santiago Gala added the comment:

El sáb, 19-01-2008 a las 20:44 +, Georg Brandl escribió:
 Georg Brandl added the comment:
 
 Fixed in r60100.
 

If the problem with the output of filter is solved at the call site I'd
suggest the second hunk of:

$ svn diff Lib/pydoc.py
Index: Lib/pydoc.py
===
--- Lib/pydoc.py(revisión: 60126)
+++ Lib/pydoc.py(copia de trabajo)
@@ -1192,7 +1192,7 @@
 else:
 tag = inherited from %s % classname(thisclass,

object.__module__)
-filter(lambda t: not t[0].startswith('_'), attrs)
+#filter(lambda t: not t[0].startswith('_'), attrs)

 # Sort attrs by name.
 attrs.sort()
@@ -1972,9 +1972,8 @@
 '#ff', '#7799ee')
 def bltinlink(name):
 return 'a href=%s.html%s/a' % (name, name)
-names = filter(lambda x: x != '__main__',
-   sys.builtin_module_names)
-contents = html.multicolumn(list(names), bltinlink)
+names = [x for x in sys.builtin_module_names if x !=
'__main__']
+contents = html.multicolumn(names, bltinlink)
 indices = ['p' + html.bigsection(
 'Built-in Modules', '#ff', '#ee77aa',
contents)]

instead, i.e. use a simple list comprehension instead of the filter
expression (ugly) and list(names). The first hunk removes a useles
expression, I'm not sure why it is there, but filter has no side
effects. It looks like attrs = filter... is intended, but then, again a
list comprehension would be clearer.

Regards
Santiago

 --
 nosy: +georg.brandl
 resolution:  - fixed
 status: open - closed
 
 __
 Tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue1867
 __

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



[issue1867] patch for pydoc to work in py3k

2008-01-18 Thread Santiago Gala

New submission from Santiago Gala:

Basically I'm finding to simple errors:

 * an iterable where it expects a list, I solved it using a simple list
comprehension on the original iterable
 * it tries to write a string to the socket, I used UTF-8 both in the
Content-Type header and in the conversion to bytes. It could easyly be
parameterized.

This two changes enabled me to get a basic pydoc running.

--
components: Documentation
files: pydoc.patch
messages: 60112
nosy: sgala
severity: normal
status: open
title: patch for pydoc to work in py3k
versions: Python 3.0
Added file: http://bugs.python.org/file9204/pydoc.patch

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



[issue1542677] IDLE shell doesn't accept non ascii char input

2008-01-14 Thread Santiago Gala

Santiago Gala added the comment:

works in python 3ka2 (svn as of today):

 print(á)
á
 print(bá)
SyntaxError: bytes can only contain ASCII literal characters.
(pyshell#5, line 1)

as it should, so the problem appears in 2.* only.

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