[issue11197] information leakage with SimpleHTTPServer

2011-06-25 Thread engelbert gruber

engelbert gruber  added the comment:

SimpleHTTPServer does not exist in Python3.1 up instead http.server.

All versions (3.x 2011-06-25) reply the contents from the served directory on a 
request of the upper directory and act similar with files.

Maybe documentation needs an update documentation.

--
nosy: +grubert
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue11197] information leakage with SimpleHTTPServer

2011-06-25 Thread engelbert gruber

engelbert gruber  added the comment:

My test setup:

  test.html
  2.5/test.html
  2.7/test.html

in 2.5 and 2.7 execute ::

  python.exe -m SimpleHTTPServer 8000

``http://localhost:8000/../`` shows the contents of the ``2.x`` directory.

``http://localhost:8000/../test.html`` shows the contents of the file in the 
``2.x`` directory not the one in the upper.

Should be closed.

--

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



[issue11197] information leakage with SimpleHTTPServer

2011-06-25 Thread engelbert gruber

Changes by engelbert gruber :


--
nosy: +rhettinger

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-25 Thread engelbert gruber

engelbert gruber  added the comment:

patch to test_marshal.py that obviously fails in current implementation.

IMHO is file might not be seekable one can not cache so maybe do not do it.

--
nosy: +grubert
Added file: http://bugs.python.org/file22472/multiple_dump_load_test.patch

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-26 Thread engelbert gruber

engelbert gruber  added the comment:

add interleaved writing to the same file (which might happen or not?)

the tests pass when vinay's marshal.c is applied.

sorry for another patch

--
Added file: 
http://bugs.python.org/file22479/multiple_dump_load_read_write_test.patch

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



[issue8890] Use tempfile instead of /tmp in examples

2011-06-26 Thread engelbert gruber

engelbert gruber  added the comment:

Assumption:

  /tmp is used in examples so the examples work 
  because /tmp is always writeable

module tempfile is for creating temporary files, the name of which is 
unimported, when a user is trying code from documentation it might be hard on 
him/her to additionally guess/save the random filenames.

``grep tmp -r CPython3.3/Doc`` (trimmed results and grouped)

* Doc/distutils/install.rst, Doc/install/install.rst:

  e.g. ``--install-base=/tmp`` 

  maybe ``--install-base=``
  if someone installs to another directory, one has a reason and 
  therefore knows the directory.

* all other e.g. ::

Doc/library/sqlite3.rst::file:`/tmp/example` file::
Doc/library/sqlite3.rst:   conn = sqlite3.connect('/tmp/example')

  use ``/tmp`` because it is writeable, but assuming the user wants
  to program i think it is not so big a burden to assume him/her to
  grasp the concept of directories, files and write protection.

  So either it can be left out, as in sqlite3.rst, maybe a file 
  extension would be more helpful, or replaced by a placeholder
  like  or .

  I am unsure about the ``<>`` chars ?

list of files:

Doc/distutils/install.rst
Doc/documenting/fromlatex.rst
Doc/howto/logging-cookbook.rst
Doc/install/install.rst
Doc/library/atexit.rst
Doc/library/cgi.rst
Doc/library/imghdr.rst
Doc/library/mailcap.rst
Doc/library/nntplib.rst
Doc/library/optparse.rst
Doc/library/packaging.database.rst
Doc/library/packaging.pypi.simple.rst
Doc/library/pipes.rst
Doc/library/sqlite3.rst
Doc/library/tempfile.rst
Doc/library/trace.rst
Doc/library/zipimport.rst
Doc/tools/sphinxext/susp-ignored.csv
Doc/tutorial/inputoutput.rst

So which way ?

--
nosy: +grubert

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



[issue5950] Make zipimport work with zipfile containing comments

2011-06-26 Thread engelbert gruber

engelbert gruber  added the comment:

+1*4

--
nosy: +grubert

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



[issue3390] [PATCH] replace last has_key in unittest by in operator

2008-07-17 Thread engelbert gruber

New submission from engelbert gruber <[EMAIL PROTECTED]>:

take the line from python-3

--
components: Library (Lib)
files: lib_unittest-r65058
messages: 69877
nosy: grubert
severity: normal
status: open
title: [PATCH] replace last has_key in unittest by in operator
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10925/lib_unittest-r65058

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



[issue1513299] Clean up usage of map() in the stdlib

2008-07-18 Thread engelbert gruber

engelbert gruber <[EMAIL PROTECTED]> added the comment:

and now it is 2.6 ?

--
nosy: +grubert

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



[issue1513299] Clean up usage of map() in the stdlib

2008-07-18 Thread engelbert gruber

engelbert gruber <[EMAIL PROTECTED]> added the comment:

i just wanted to get rid of one "python2.6 -3" warning in string and
found that a patch was already waiting. from this thing i conclude
smaller patches might get committed earlier , do they ?

On Fri, Jul 18, 2008 at 8:42 PM, Georg Brandl <[EMAIL PROTECTED]> wrote:
>
> Georg Brandl <[EMAIL PROTECTED]> added the comment:
>
> May even be too late for 2.6. :)
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> <http://bugs.python.org/issue1513299>
> ___
>

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



[issue1513299] Clean up usage of map() in the stdlib

2008-07-18 Thread engelbert gruber

engelbert gruber <[EMAIL PROTECTED]> added the comment:

so i add a one liner replacing map(None with list ?

On 7/18/08, Georg Brandl <[EMAIL PROTECTED]> wrote:
>
>  Georg Brandl <[EMAIL PROTECTED]> added the comment:
>
>
> That is true. Barry might not want to allow a large catch-all patch; but
>  since those changes are not adding new features, simple small ones can
>  certainly get in before beta3.
>
>
>  ___
>  Python tracker <[EMAIL PROTECTED]>
>  <http://bugs.python.org/issue1513299>
>  ___
>

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



[issue1513299] Clean up usage of map() in the stdlib

2008-07-18 Thread engelbert gruber

engelbert gruber <[EMAIL PROTECTED]> added the comment:

it is only one in string.py, but then again it is save to do.

thanks

On 7/18/08, Georg Brandl <[EMAIL PROTECTED]> wrote:
>
>  Georg Brandl <[EMAIL PROTECTED]> added the comment:
>
>
> I can replace those too.
>
>
>  ___
>  Python tracker <[EMAIL PROTECTED]>
>  <http://bugs.python.org/issue1513299>
>  ___
>

Added file: http://bugs.python.org/file10939/lib_string-r65106

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1513299>
___

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



[issue1513299] Clean up usage of map() in the stdlib

2008-07-18 Thread engelbert gruber

engelbert gruber <[EMAIL PROTECTED]> added the comment:

http://bugs.python.org/issue3390 is similar trivial , replacing has_key by in
(this small patches might be considered tweaking the bugfix statistic)

i am off now (tell me if you think i should stay there)

On 7/18/08, Georg Brandl <[EMAIL PROTECTED]> wrote:
>
>  Georg Brandl <[EMAIL PROTECTED]> added the comment:
>
>
> OK, I nixed the "simple" uses of map(None, a).
>
>
>  ___
>  Python tracker <[EMAIL PROTECTED]>
>  <http://bugs.python.org/issue1513299>
>  ___
>

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



[issue2532] file that breaks 2to3 (despite being correct python)

2008-07-18 Thread engelbert gruber

engelbert gruber <[EMAIL PROTECTED]> added the comment:

The much simpler input might be another problem::

  # this is accepted
  b = ("a = 0\n" * 100)
  # this one breaks it
  ("a = 0\n" * 100)

this looks similar to ``map(None, t)`` on a line by itself is 
translated to ``list(map(None, t))`` and the message "You should use a 
for loop her"

--
nosy: +grubert

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



[issue2532] file that breaks 2to3 (despite being correct python)

2008-07-20 Thread engelbert gruber

engelbert gruber <[EMAIL PROTECTED]> added the comment:

Truncating the file to 2448 lines helps, seams to be a size not content 
problem.

All fixes work exept fix_next.py .

And removing the lines ::

  |
  mod=file_input< any+ >

makes even this run through.

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



[issue2263] struct.pack() + numpy int raises SystemError

2009-01-28 Thread engelbert gruber

engelbert gruber  added the comment:

on ubuntu 8.04, Python 2.7a0 (trunk:69044) and numpy 1.2.1
("." is OK, "e" means SystemError)

* signed always works, longlong also.
* unsigned native works half of the time
* unsigned little/big endian never works
* the numpy type does seam to have any effect.

signed char  b   'int16'   .  <.  >.  'uint32'   .  <.  >. 
sys:1: DeprecationWarning: struct integer overflow masking is deprecated
unsigned charB   'int16'   .  e  'uint32'   .  e 
signed short h   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned short   H   'int16'   .  e  'uint32'   .  e 
signed int   i   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned int I   'int16'   e  e  'uint32'   e  e 
signed long  l   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned longL   'int16'   e  e  'uint32'   e  e 
signed long long q   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned long long   Q   'int16'   .  <.  >.  'uint32'   .  <.  >.

--
nosy: +grubert
versions: +Python 2.7
Added file: http://bugs.python.org/file12888/issue2263-numpy.py

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



[issue2263] struct.pack() + numpy int raises SystemError

2009-02-09 Thread engelbert gruber

engelbert gruber  added the comment:

in 2.7 svn _struct.c 

formatdef native_table[] = {
  {'B',   sizeof(char),   0,  nu_ubyte,   np_ubyte},
formatdef bigendian_table[]
  {'B',   1,  0,  nu_ubyte,   bp_uint},
formatdef lilendian_table[]
{'B',   1,  0,  nu_ubyte,   lp_uint},

np_ubyte calls get_long b/lp_uint call get_wrapped_ulong which calls
#define PyInt_Check(op) \
  PyType_FastSubclass((op)->ob_type, Py_TPFLAGS_INT_SUBCLASS)

but ob_type is set to BASE flags INT_SUBCLASS i snot set.

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



[issue2263] struct.pack() + numpy int raises SystemError

2009-02-12 Thread engelbert gruber

engelbert gruber  added the comment:

Including Py_TPFLAGS_INT_SUBCLASS in numpy's BASEFLAGS cures this.
This is an external problem then.
But I could not find any reference to Py_TPFLAGS_*_SUBCLASS in the
documentation, that is a python problem.

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



[issue19631] "exec" BNF in simple statements

2013-11-17 Thread engelbert gruber

New submission from engelbert gruber:

the doc says::

  exec_stmt ::= "exec" or_expr ["in" expression ["," expression]]

imho it should read ::

  exec_stmt ::= "exec" expression ["in" expression ["," expression]]
| "exec(" expression [ ", expression" [ ", expression" ]] ")"

--
assignee: docs@python
components: Documentation
messages: 203146
nosy: docs@python, grubert
priority: normal
severity: normal
status: open
title: "exec" BNF in simple statements
versions: Python 2.6, Python 2.7

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



[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2009-05-18 Thread engelbert gruber

engelbert gruber  added the comment:

testing with 2.6 and numpy 1.3 already ::

   timedelta(seconds = int32(36)) 
   TypeError: unsupported type for timedelta seconds component: 
numpy.int32

But not if I apply a change to numpy to fix issue2263
then ``timedelta(days = int32(36))`` and ``timedelta(minutes = 
int32(36))`` result in wrong timedeltas.

--
nosy: +grubert
versions: +Python 2.6

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



[issue2263] struct.pack() + numpy int raises SystemError

2009-05-18 Thread engelbert gruber

engelbert gruber  added the comment:

issue5476 has a problem with timedelta(microseconds = int32(36))

interestingly 0 to 35 work , if the patch for this issue2263 is applied.

--

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