Merlijn van Deen | 18 Apr 15:51 2014

[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy


New submission from Merlijn van Deen:

Which would make sense, but email.policy.Compat32 is *actually* the default policy. This patch adapts
the documentation to reflect this.

----------
assignee: docs <at> python
components: Documentation
files: defaultpolicy.diff
keywords: patch
messages: 216783
nosy: docs <at> python, r.david.murray, valhallasw
priority: normal
severity: normal
status: open
title: Docs (incorrectly) suggest email.policy.default is the default policy
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file34964/defaultpolicy.diff

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue21300>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

Berker Peksag | 18 Apr 15:13 2014

[issue21299] Spam


Changes by Berker Peksag <berker.peksag <at> gmail.com>:

----------
Removed message: http://bugs.python.org/msg216782

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue21299>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org

Bernie Keimel | 18 Apr 14:54 2014

[issue21299] Einladung in mein Netzwerk bei LinkedIn


New submission from Bernie Keimel:

LinkedIn
------------

Ich möchte Sie zu meinem beruflichen Netzwerk auf LinkedIn hinzufügen.

- Bernard Keimel

Bernard Keimel
Business bei privat
Berlin und Umgebung, Deutschland

Bestätigen, dass Sie Bernard Keimel kennen:
https://www.linkedin.com/e/-3qcne3-hu5hbkmh-1s/isd/16078050493/NNc4mKPz/?hs=false&tok=0SvHBVq3J6v6c1

--
Sie erhalten Einladungen zum Netwerkbeitritt per E-Mail. Klicken Sie hier, wenn Sie kein Interesse daran haben:
http://www.linkedin.com/e/-3qcne3-hu5hbkmh-1s/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I6913898468_1/?hs=false&tok=35uA1JgJ56v6c1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct., Mountain View, CA 94043, USA

----------
messages: 216782
nosy: Bernie.Keimel
priority: normal
severity: normal
status: open
title: Einladung in mein Netzwerk bei LinkedIn
(Continue reading)

Thomas Levine | 18 Apr 14:04 2014

[issue21298] Cheese shop registration stopped working for me recently


New submission from Thomas Levine:

This command used to work just fine for me. ::

    python setup.py register

Now it doesn't. For example, ::

    $ python3 setup.py register
    /usr/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution option: 'install_requires'
      warnings.warn(msg)
    /usr/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution option: 'tests_require'
      warnings.warn(msg)
    running register
    running check
    Registering sheetmusic to http://pypi.python.org/pypi
    Server response (401): Unauthorized

But I can submit just fine with the form at
https://pypi.python.org/pypi?%3Aaction=submit_form,
and the following works once I do that. ::

    python setup.py sdist upload

The attached setup.py file is from this package
https://pypi.python.org/pypi/sheetmusic

----------
components: Distutils
(Continue reading)

Daniel Andersson | 18 Apr 13:52 2014

[issue21297] skipinitialspace in the csv module only skips spaces, not "whitespace" in general


New submission from Daniel Andersson:

Regarding the `skipinitialspace` parameter to the different CSV reader dialects in the `csv` module, the
official documentation asserts:

    When True, whitespace immediately following the delimiter is ignored.

and the `help(csv)` style module documentation says:

    * skipinitialspace - specifies how to interpret whitespace which
      immediately follows a delimiter.  It defaults to False, which
      means that whitespace immediately following a delimiter is part
      of the following field.

"Whitespace" is a bit too general in both cases (at least a red herring in the second case), since it only
skips spaces and not e.g. tabs [1].

In `Modules/_csv.c`, it more correctly describes the parameter. At line 81:

    int skipinitialspace;       /* ignore spaces following delimiter? */

and the actual implementation at line 638:

    else if (c == ' ' && dialect->skipinitialspace)
        /* ignore space at start of field */
        ;

No-one will probably assume that the whole UTF-8 spectrum of "whitespace" is skipped, but at least I
initially assumed that the tab character was included.
(Continue reading)

Luiji Maryo | 18 Apr 13:03 2014

[issue21296] smtplib Sends Commands in Lower-Case


New submission from Luiji Maryo:

It has occurred to me while testing an SMTP server with smtplib that it sends commands in lower-case. This is
problematic because, although most SMTP servers seem to be case-insensitive, RFC 5321 (SMTP) doesn't
seem to explicitly require this and there may be systems out there which require upper-case commands.
Additionally, the output just looks unclean because the parameters are given capitalized (e.g. we get
"mail FROM:<guy <at> example.com>" instead of "MAIL FROM:<guy <at> example.com>" or "mail from:<guy <at> example.com>".

I would propose that putcmd() use cmd.upper(). Alternatively, all instances of putcmd() and docmd()
could be updated to have the commands in capitalized form so that, should the user desire, they could send
lower-case commands, though I don't quite see what would be useful about that.

----------
messages: 216779
nosy: luiji
priority: normal
severity: normal
status: open
title: smtplib Sends Commands in Lower-Case
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue21296>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-python-bugs-list%40m.gmane.org
(Continue reading)

Aivar Annamaa | 18 Apr 12:49 2014

[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse


New submission from Aivar Annamaa:

Following program gives correct result in Python versions older than 3.4, but incorrect result in 3.4:

----------------------
import ast
tree = ast.parse("sin(0.5)")
first_stmt = tree.body[0]
call = first_stmt.value
print("col_offset of call expression:", call.col_offset)
print("col_offset of func of the call:", call.func.col_offset)
-----------------------

it should print:
col_offset of call expression: 0
col_offset of func of the call: 0

but in 3.4 it prints:
col_offset of call expression: 3
col_offset of func of the call: 0

----------
components: Interpreter Core
files: py34_ast_call_bug.py
messages: 216777
nosy: Aivar.Annamaa
priority: normal
severity: normal
status: open
(Continue reading)

Vedran Čačić | 18 Apr 06:19 2014

[issue21294] len wrong help


New submission from Vedran Čačić:

>From recently, help(len) gives the wrong signature of len.

Help on built-in function len in module builtins:

len(...)
    len(module, object)
        ^^^^^^^^
    Return the number of items of a sequence or mapping.

I tried to track it down, I think it happened here: http://bugs.python.org/file33655/larry.support.text_signature.on.more.types.6.txt

I realize it was a part of some big fix, so I don't know how easy it is to fix independently. Also, you might
think it's not so big an issue. But I teach Python, and my pupils are really confused because of this. Please
fix it if anyhow possible. Tnx.

----------
assignee: docs <at> python
components: Documentation
messages: 216771
nosy: Vedran.Čačić, docs <at> python
priority: normal
severity: normal
status: open
title: len wrong help
versions: Python 3.4

_______________________________________
(Continue reading)

Larry Hastings | 18 Apr 01:55 2014

[issue21293] Remove "capsule hack" from object.c?


New submission from Larry Hastings:

I noticed this code in Objects/object.c today:

    /* Hack to force loading of pycapsule.o */
    PyTypeObject *_PyCapsule_hack = &PyCapsule_Type;

What is this doing?  Note that PyCapsule_Type is referred to inside _Py_ReadyTypes(), so there's already a
reference to it from this module.  This global seems redundant.

Attached is a patch that removes it.  Trunk compiles and all tests pass with it applied, though I only tried on
64-bit Linux so I concede if this is handling some obscure edge case I probably wouldn't have hit it.

----------
files: larry.remove.no.capsule.hack.1.diff
keywords: patch
messages: 216766
nosy: larry
priority: low
severity: normal
stage: patch review
status: open
title: Remove "capsule hack" from object.c?
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file34958/larry.remove.no.capsule.hack.1.diff

_______________________________________
Python tracker <report <at> bugs.python.org>
(Continue reading)

Steve | 17 Apr 23:51 2014

[issue21292] C API in debug fails


New submission from Steve:

Although not a bug, it annoys me enough that it is a bug in my head!

The problem is that trying to compile an application in debug that embeds Python fails.

Case in point; we canned the idea of embedding Python (went with Lua) for that reason only.  We did not have the
option of incorporating a Python build into our build system and not being able to compile in debug was not
an option either.  We would have been happy to compile in debug with a release lib of Python, but since it was
not possible, it got killed.

The fix: It should be possible for someone to compile an application in debug that embeds python without
having the Python debug libraries.

----------
components: Library (Lib)
messages: 216759
nosy: Banger
priority: normal
severity: normal
status: open
title: C API in debug fails
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report <at> bugs.python.org>
<http://bugs.python.org/issue21292>
_______________________________________
(Continue reading)

Gregory P. Smith | 17 Apr 23:49 2014

[issue21291] subprocess Popen objects are not thread safe w.r.t. wait() and returncode being set


New submission from Gregory P. Smith:

Executing the supplied test code you either get:

sys.version = 3.4.0+ (3.4:635817da596d, Apr 17 2014, 14:30:34) 
[GCC 4.6.3]
--------
Results with <class 'subprocess.Popen'>:
  r0    = None, expected None 
  r1    = None, expected None 
  ri0   = None, expected None 
  ri1   = -9, expected -9 
  ri2   = -9, expected -9 
  r2    = 0, expected -9 *** MISMATCH ***
  r3    = 0, expected -9 *** MISMATCH ***

or

Results with <class 'subprocess.Popen'>:
  r0    = None, expected None 
  r1    = None, expected None 
  ri0   = None, expected None 
  ri1   = -9, expected -9 
  ri2   = -9, expected -9 
  r2    = 0, expected -9 *** MISMATCH ***
  r3    = 0, expected -9 *** MISMATCH ***

At first glance it appears that the .returncode attribute is not safely set after the wait call... This test
code is using the Popen object from multiple threads at once.
(Continue reading)


Gmane